HighLAND
baseP0DAnalysis.hxx
1 #ifndef baseP0DAnalysis_h
2 #define baseP0DAnalysis_h
3 
4 #include "baseAnalysis.hxx"
5 #include "P0DDataClasses.hxx"
6 
7 /// This class provides a base for user p0d analyses. It handles many common
8 /// functions, and provides a structure so that users don't have to write too
9 /// much "boiler-plate" code.
10 ///
11 /// User analyses should inherit from this class.
13  public:
14  /// Constructor, which instantiates the necessary converters for converting
15  /// input files to the AnaSpill format.
17  virtual ~baseP0DAnalysis(){}
18 
19  virtual void DefineCorrections();
20  virtual void DefineSystematics();
21  virtual void DefineConfigurations();
22  virtual void DefineMicroTrees(bool addBase=true);
23  virtual void DefineTruthTree();
24 
25  virtual void FillMicroTrees(bool addBase=true);
26  virtual void FillToyVarsInMicroTrees(bool addBase=true);
27  virtual void FillTruthTreeBase(const AnaTrueVertex& vtx, const SubDetId::SubDetEnum det=SubDetId::kP0D, bool IsAntinu = false);
28 
29 
30  /// Get a casted AnaBunchBB to AnaBunch from the InputManager
31  AnaP0DBunch& GetBunch(){return *static_cast<AnaP0DBunch*>(&input().GetBunch());}
32 
33  /// Get a casted AnaEventC to AnaEvent
34  AnaP0DEvent& GetEvent(){return *static_cast<AnaP0DEvent*>(_event);}
35 
36 
37  public:
38 
39 
40  enum enumStandardMicroTrees_baseP0DAnalysis{
41  np0dtracks = enumStandardMicroTreesLast_baseAnalysis+1,
42  np0donlytracks,
43  np0dreconvertices,
44  np0drecontracks,
45  np0dreconclusters,
46 
47  enumStandardMicroTreesLast_baseP0DAnalysis
48  };
49 
50  /*
51  enum enumConf_baseP0DAnalysis{
52  bfield_syst=baseAnalysis::enumConfLast_baseAnalysis+1,
53  enumConfLast_baseP0DAnalysis
54  };
55  */
56 };
57 
58 #endif
AnaP0DBunch & GetBunch()
Get a casted AnaBunchBB to AnaBunch from the InputManager.
AnaP0DEvent & GetEvent()
Get a casted AnaEventC to AnaEvent.
Representation of a true Monte Carlo vertex.
Definition: DataClasses.hxx:50
AnaEventC * _event
The current event.
SubDetEnum
Enumeration of all detector systems and subdetectors.
Definition: SubDetId.hxx:25
AnaBunchC & GetBunch()
Get the current bunch (to have corrections and systematics applied to it).
baseP0DAnalysis(AnalysisAlgorithm *ana=NULL)