HighLAND
baseTrackerAnalysis.hxx
1 #ifndef baseTrackerAnalysis_h
2 #define baseTrackerAnalysis_h
3 
4 #include "baseAnalysis.hxx"
5 
6 #include "ChargeIDEffSystematics.hxx"
7 #include "TPCTrackEffSystematics.hxx"
8 #include "FGDTrackEffSystematics.hxx"
9 #include "FGDHybridTrackEffSystematics.hxx"
10 #include "TPCFGDMatchEffSystematics.hxx"
11 #include "MichelElectronEffSystematics.hxx"
12 
13 // High-angle matching
14 #include "FGDECalMatchEffSystematics.hxx"
15 #include "FGDECalSMRDMatchEffSystematics.hxx"
16 
17 // TPC->P0D/ECal matching
18 #include "TPCP0DMatchEffSystematics.hxx"
19 #include "TPCECalMatchEffSystematics.hxx"
20 
21 //ECal
22 #include "ECalTrackEffSystematics.hxx"
23 
24 // ECal PID
25 #include "ECalPIDSystematics.hxx"
26 
27 // NuE specific
28 #include "ECalEmHipPIDSystematics.hxx"
29 #include "FGD2ShowerSystematics.hxx"
30 
31 /// This class provides a base for user analyses. It handles many common
32 /// functions, and provides a structure so that users don't have to write too
33 /// much "boiler-plate" code.
34 ///
35 /// User analyses should inherit from this class.
37  public:
38  /// Constructor, which instantiates the necessary converters for converting
39  /// input files to the AnaSpill format.
41  virtual ~baseTrackerAnalysis(){}
42 
43  virtual bool Initialize(){return baseAnalysis::Initialize();}
44 
45  virtual void DefineCorrections();
46  virtual void DefineSystematics();
47  virtual void DefineConfigurations();
48  virtual void DefineMicroTrees(bool addBase=true);
49  virtual void DefineTruthTree();
50 
51  virtual void FillMicroTrees(bool addBase=true);
52  virtual void FillToyVarsInMicroTrees(bool addBase=true);
53  virtual void FillTruthTreeBase(const AnaTrueVertex& vtx, const SubDetId::SubDetEnum det=SubDetId::kFGD1, bool IsAntinu = false);
54 
55  /// Returns the ToyBoxTracker
56  virtual const ToyBoxTracker& box(Int_t isel=-1) const {return *static_cast<const ToyBoxTracker*>(&boxB(isel));}
57 
58  /// Returns the vertex for the ToyBoxTracker
59  virtual AnaVertexB* GetVertex() const{return box().Vertex;}
60 
61  /// Returns the true vertex for the ToyBoxTracker
62  virtual AnaTrueVertexB* GetTrueVertex() const {return box().TrueVertex;}
63 
64 
65  protected:
66 
67 
68  /// Compute analysis sample efficiency
70 
71  ChargeIDEffSystematics *_chargeid;
72  TPCFGDMatchEffSystematics *_tpcfgdmatch;
73  TPCTrackEffSystematics *_tpctr;
74  FGDTrackEffSystematics *_fgdtr;
77  TPCECalMatchEffSystematics *_tpc_ecal_matcheff;
78  TPCP0DMatchEffSystematics *_tpc_p0d_matcheff;
79  FGDECalMatchEffSystematics *_fgd_ecal_matcheff;
80  FGDECalSMRDMatchEffSystematics *_fgd_ecal_smrd_matcheff;
81  // Keep ECal-iso tracking efficiency here for the moment since used for tracker-based analysis so far
82  ECalTrackEffSystematics *_ecal_trackeff;
83  ECalPIDSystematics *_ecal_pid;
84  ECalEmHipPIDSystematics *_ecal_emhippid;
85  FGD2ShowerSystematics *_fgd2shower;
86 
87 public:
88 
89  enum enumStandardMicroTrees_baseTrackerAnalysis{
90  ntpctracks = enumStandardMicroTreesLast_baseAnalysis+1,
91  ntpcposQualityFV,
92  ntpcnegQualityFV,
93  nfgdtracks,
94  nfgdonlytracks,
95  chargeid_ncorrect,
96  chargeid_nwrong,
97  tpcfgdmatch_ncorrect,
98  tpcfgdmatch_nwrong,
99  tpctr_ncorrect,
100  tpctr_nwrong,
101  fgdtr_ncorrect,
102  fgdtr_nwrong,
103  fgdhybtr_ncorrect,
104  fgdhybtr_nwrong,
105  meeff_ncorrect,
106  meeff_nwrong,
107  mepur_ncorrect,
108  mepur_nwrong,
109  tpc_ecal_match_ncorrect,
110  tpc_ecal_match_nwrong,
111  tpc_p0d_match_ncorrect,
112  tpc_p0d_match_nwrong,
113  fgd_ecal_match_ncorrect,
114  fgd_ecal_match_nwrong,
115  fgd_ecal_smrd_match_ncorrect,
116  fgd_ecal_smrd_match_nwrong,
117  ecal_pid_ncorrect,
118  ecal_pid_nwrong,
119  ecal_tr_ncorrect,
120  ecal_tr_nwrong,
121  ecal_emhippid_ncorrect,
122  ecal_emhippid_nwrong,
123  fgd2shower_ncorrect,
124  fgd2shower_nwrong,
125 
126  enumStandardMicroTreesLast_baseTrackerAnalysis
127  };
128 
129  enum enumConf_baseTrackerAnalysis{
130  bfield_syst=baseAnalysis::enumConfLast_baseAnalysis+1,
131  momscale_syst,
132  momresol_syst,
133  momrange_resol_syst,
134  tpcpid_syst,
135  fgdpid_syst,
136  chargeideff_syst,
137  tpctrackeff_syst,
138  fgdtrackeff_syst,
139  fgdhybridtrackeff_syst,
140  tpcfgdmatcheff_syst,
141  tpcclustereff_syst,
142  michel_syst,
143  oofv_syst,
144  pileup_syst,
145  fgdmass_syst,
146  sandmu_syst,
147  ecal_emresol_syst,
148  ecal_emscale_syst,
149  tpc_ecal_matcheff_syst,
150  tpc_p0d_matcheff_syst,
151  fgd_ecal_matcheff_syst,
152  fgd_ecal_smrd_matcheff_syst,
153  ecal_trackeff_syst,
154  ecal_pid_syst,
155  tof_resol_syst,
156  ecal_emhippid_syst,
157  fgd2shower_syst,
158  nuetpcpileup_syst,
159  nuep0dpileup_syst,
160  nueecalpileup_syst,
161  nueoofv_syst,
162  p0d_elossscale_syst,
163  p0d_elossresol_syst,
164  p0d_veto_syst,
165  enumConfLast_baseTrackerAnalysis
166  };
167 
168 };
169 
170 #endif
Representation of a true Monte Carlo vertex.
virtual bool Initialize()
[AnalysisAlgorithm_mandatory]
bool _computeEfficiency
Compute analysis sample efficiency.
AnaTrueVertexB * TrueVertex
For storing the true vertex, for analyses with no reconstructed primary vertex.
Definition: ToyBoxND280.hxx:22
virtual AnaTrueVertexB * GetTrueVertex() const
Returns the true vertex for the ToyBoxTracker.
virtual void DefineSystematics()
virtual AnaVertexB * GetVertex() const
Returns the vertex for the ToyBoxTracker.
AnaVertexB * Vertex
For storing the reconstructed vertex.
Representation of a true Monte Carlo vertex.
Definition: DataClasses.hxx:50
virtual const ToyBoxTracker & box(Int_t isel=-1) const
Returns the ToyBoxTracker.
SubDetEnum
Enumeration of all detector systems and subdetectors.
Definition: SubDetId.hxx:25
virtual bool Initialize()
[AnalysisAlgorithm_mandatory]
Representation of a global vertex.
baseTrackerAnalysis(AnalysisAlgorithm *ana=NULL)
Charge confusion systematic. This is treated as an efficiency systematic, applying a weight to the ev...
Michel electron effciency systematic.
virtual void DefineConfigurations()