Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
VDCeff.h
Go to the documentation of this file.
1#ifndef Podd_VDCeff_h_
2#define Podd_VDCeff_h_
3
5//
6// VDCeff - VDC efficiency calculation
7//
9
10#include "THaPhysicsModule.h"
11#include <vector>
12
13class THaVar;
14class TH1F;
15
16class VDCeff : public THaPhysicsModule {
17public:
18 VDCeff( const char* name, const char* description );
19 virtual ~VDCeff();
20
21 virtual Int_t Begin( THaRunBase* r=nullptr );
22 virtual Int_t End( THaRunBase* r=nullptr );
23 virtual EStatus Init( const TDatime& run_time );
24 virtual Int_t Process( const THaEvData& );
25
26 void Reset( Option_t* opt="" );
27
28protected:
29
30 typedef std::vector<Long64_t> Vcnt_t;
31 typedef const THaVar CVar_t;
32
33 // Data needed for efficiency calculation for one VDC plane/wire spectrum
34 class VDCvar_t {
35 public:
36 VDCvar_t( const char* nm, const char* hn, Int_t nw )
37 : name(nm), histname(hn), pvar(nullptr), nwire(nw), hist_nhit(nullptr),
38 hist_eff(nullptr) {}
39 ~VDCvar_t();
40 void Reset( Option_t* opt ="" );
49 };
50
51 // Internal working storage
52 std::vector<VDCvar_t> fVDCvar;
53 std::vector<Short_t> fWire;
54 std::vector<bool> fHitWire;
55
57
58 // Configuration parameters
61
62 virtual Int_t ReadDatabase( const TDatime& date );
63
64 void WriteHist();
65
66 ClassDef(VDCeff,0) // VDC hit efficiency physics module
67};
68
69#endif
int Int_t
ROOT::R::TRInterface & r
double Double_t
const char Option_t
#define ClassDef(name, id)
char name[80]
CVar_t * pvar
Definition VDCeff.h:43
Vcnt_t ncnt
Definition VDCeff.h:45
VDCvar_t(const char *nm, const char *hn, Int_t nw)
Definition VDCeff.h:36
TString histname
Definition VDCeff.h:42
Vcnt_t nhit
Definition VDCeff.h:46
TH1F * hist_nhit
Definition VDCeff.h:47
void Reset(Option_t *opt="")
Definition VDCeff.cxx:66
TString name
Definition VDCeff.h:41
TH1F * hist_eff
Definition VDCeff.h:48
void Reset(Option_t *opt="")
Definition VDCeff.cxx:95
void WriteHist()
Definition VDCeff.cxx:356
Double_t fMaxOcc
Definition VDCeff.h:60
Long64_t fNevt
Definition VDCeff.h:56
virtual Int_t ReadDatabase(const TDatime &date)
Definition VDCeff.cxx:250
std::vector< Short_t > fWire
Definition VDCeff.h:53
virtual Int_t Process(const THaEvData &)
Definition VDCeff.cxx:172
virtual ~VDCeff()
Definition VDCeff.cxx:87
virtual Int_t End(THaRunBase *r=nullptr)
Definition VDCeff.cxx:137
const THaVar CVar_t
Definition VDCeff.h:31
std::vector< bool > fHitWire
Definition VDCeff.h:54
std::vector< VDCvar_t > fVDCvar
Definition VDCeff.h:52
Int_t fCycle
Definition VDCeff.h:59
virtual Int_t Begin(THaRunBase *r=nullptr)
Definition VDCeff.cxx:106
std::vector< Long64_t > Vcnt_t
Definition VDCeff.h:30
long long Long64_t