HighLAND
tutorialAnalysis.hxx
1 #ifndef tutorialAnalysis_h
2 #define tutorialAnalysis_h
3 
4 #include "baseTrackerAnalysis.hxx"
5 #include "ND280AnalysisUtils.hxx"
6 #include "nueCCAnalysis.hxx"
7 
8 /// Inherit from baseTrackerAnalysis, which inherit from basAnslysis, which inherits from AnalysisAlgorithm (in highlandCore)
10  public:
12  virtual ~tutorialAnalysis(){}
13 
14  //---- These are mandatory functions (pure virtual, =0, in AnalysisAlgorithm) ---
15 
16  // However most of them were already implemented in baseAnalysis and baseTracker analysis
17  // Some of them are extend it here and some others are not
18 
19  bool Initialize();
20 
21  // void DefineProductions(); // No need to extend it
22  // void DefineInputConverters(); // no need to extend it
23 
24  /// Add to the selection manager the selections for this analysis
25  void DefineSelections();
26  void DefineCorrections();
27  void DefineSystematics();
28  void DefineConfigurations();
29  void DefineMicroTrees(bool addBase=true);
30  void DefineTruthTree();
31 
32  void FillMicroTrees(bool addBase=true);
33  void FillToyVarsInMicroTrees(bool addBase=true);
34 
35  bool CheckFillTruthTree(const AnaTrueVertex& vtx);
36 
37  using baseTrackerAnalysis::FillTruthTree;
38  void FillTruthTree(const AnaTrueVertex& vtx);
39 
40  //--------------------
41 
42  void FillConfigTree();
43  void FillCategories();
44 
45 public:
46 
47  /* Here we create an enum with all variables we want to add to the trees, starting at the last variable it was added by used analyses or base analyses,
48  in this case the last of the nueCCAnalysis
49  */
50 
51  enum enumStandardMicroTrees_tutorialAnalysis{
52  nLongTPCTracks= nueCCAnalysis::enumStandardMicroTreesLast_nueCCAnalysis+1,
53  selmu_truemom,
54  selmu_detectors,
55  selmu_sense,
56  selmu_costheta,
57  selmu_deltaPhi,
58  selmu_pT,
59  selmu_dir,
60  selmu_pos,
61  selmu_ntpcs,
62  selmu_tpc_det,
63  selmu_tpc_nnodes,
64  selmu_tpc_mom,
65  selmu_tpc_pos,
66  selmu_tpc_dir,
67  selmu_tpc_truemom,
68 
69  selmu_mom,
70  selmu_tpc_dedx,
71 
72  truelepton_pdg,
73  truelepton_mom,
74  truelepton_pos,
75  truelepton_dir,
76  truelepton_costheta,
77  enumStandardMicroTreesLast_tutorialAnalysis
78  };
79 
80  // Here we create an enum with all systematics we want to add starting at the last systematic it was added by used analyses or base analyses,
81  enum enumSyst_tutorialAnalysis{
82  kTutorialWeight = SystId::SystEnumLast_SystId+1,
83  kTutorialVariation,
84  enumSystLast_tutorialAnalysis
85  };
86 
87  // Here we create an enum with all configurations we want to add starting at the last configuration it was added by used analyses or base analyses,
88  enum enumConf_tutorialAnalysis{
89  tutorial_syst=enumConfLast_baseTrackerAnalysis+1,
90  enumConfLast_btutorialAnalysis
91  };
92 
93  // Here we create an enum with all variables we want to add to the config tree starting with the last it wad added by used analyses or base analyses,
94  enum enumConfigTree_tutorialAnalysis{
95  nNucleonsFGD1 = enumConfigTreeLast_AnalysisAlgorithm+1,
96  nNucleonsFGD2scint,
97  nNucleonsFGD2water,
98  enumConfigTreeLast_tutorialAnalysis
99  };
100 
101 };
102 
103 #endif
void FillMicroTrees(bool addBase=true)
[tutorialAnalysis_DefineTruthTree]
bool Initialize()
[AnalysisAlgorithm_mandatory]
Representation of a true Monte Carlo vertex.
Definition: DataClasses.hxx:50
void DefineMicroTrees(bool addBase=true)
[tutorialAnalysis_DefineConfigurations]
void FillToyVarsInMicroTrees(bool addBase=true)
[tutorialAnalysis_FillMicroTrees]
void DefineTruthTree()
[tutorialAnalysis_DefineMicroTrees]
void DefineConfigurations()
[tutorialAnalysis_DefineSystematics]
Inherit from baseTrackerAnalysis, which inherit from basAnslysis, which inherits from AnalysisAlgorit...
void DefineCorrections()
[tutorialAnalysis_DefineSelections]
void DefineSelections()
Add to the selection manager the selections for this analysis.
bool CheckFillTruthTree(const AnaTrueVertex &vtx)
[tutorialAnalysis_FillToyVarsInMicroTrees]
void DefineSystematics()
[tutorialAnalysis_DefineCorrections]