HighLAND
CreateMiniTree.hxx
1 #ifndef CreateMiniTree_h
2 #define CreateMiniTree_h
3 
4 #include "SimpleLoopBase.hxx"
5 #include "DataClasses.hxx"
6 #include "InputManager.hxx"
7 #include "RooTrackerVtxManager.hxx"
8 #include <set>
9 
11  public:
12 
13  CreateMiniTree(int argc, char *argv[]);
14  virtual ~CreateMiniTree(){}
15 
16 protected:
17 
18  //---- These are mandatory functions
19  virtual bool Initialize ();
20  virtual bool InitializeSpill(){return _rooVtxManager.InitializeEntry();}
21 
22  virtual void DefineOutputTree();
23 
24  virtual void FinalizeSpill(){}
25  virtual void Finalize ();
26 
27  virtual bool Process();
28  //--------------------
29 
30  virtual bool CheckTruthFillMiniTree(const AnaSpill& spill);
31  virtual bool CheckReconFillMiniTree(const AnaBunchB& bunch);
32  virtual bool CheckReconFillMiniTreeOutOfBunch(const AnaBunchB& bunch);
33 
34  virtual bool CheckTrueVertexReaction(const AnaTrueVertex& vtx);
35  virtual bool CheckTrueVertexDetector(unsigned long det);
36 
37  virtual void FillMiniTree();
38  virtual void FillRooTrackerVtxTree();
39  virtual void FilterRooTrackerVtxTree();
40 
41  virtual void WriteGeometry();
42 
43  void DeleteUninterestingBunches();
44 
45  virtual AnaSpillB* MakeSpill(){return new AnaSpill();}
46  virtual AnaBeamB* MakeBeam() {return new AnaBeam();}
47 
48  enum miniTreeIndex{
49  minitree = OutputManager::enumSpecialTreesLast+1
50  };
51 
52 
53 protected:
54 
55  RooTrackerVtxManager _rooVtxManager;
56 
57  bool _saveGeometry;
58  bool _saveRoo;
59  bool _filterRoo;
60 
61  bool _saveTPCInfo;
62  bool _saveFGDInfo;
63  bool _saveECALInfo;
64  bool _saveP0DInfo;
65  bool _saveSMRDInfo;
66  bool _saveTrackerInfo;
67 
68  // read the parameters file to decide if information from the local reconstruction should
69  // be saved to the mini tree.
70  bool _saveReconDirTECALInfo;
71  bool _saveReconDirPECALInfo;
72  bool _saveReconDirP0DInfo;
73  bool _saveReconDirFGDOnlyInfo;
74 
75  bool _useTPC1;
76  bool _useTPC2;
77  bool _useTPC3;
78  bool _useFGD1;
79  bool _useFGD2;
80  bool _useP0D;
81  bool _useDsECal;
82  bool _useTrECal;
83  bool _useP0DECal;
84  bool _useSMRD;
85 
86  bool _useTPC1outOfBunch;
87  bool _useTPC2outOfBunch;
88  bool _useTPC3outOfBunch;
89  bool _useFGD1outOfBunch;
90  bool _useFGD2outOfBunch;
91  bool _useP0DoutOfBunch;
92  bool _useDsECaloutOfBunch;
93  bool _useTrECaloutOfBunch;
94  bool _useP0DECaloutOfBunch;
95  bool _useSMRDoutOfBunch;
96 
97  bool _saveTrueNuNC;
98  bool _saveTrueAntiNuNC;
99  bool _saveTrueNumuCC;
100  bool _saveTrueAntiNumuCC;
101  bool _saveTrueNueCC;
102  bool _saveTrueAntiNueCC;
103 
104  Double_t _POTSincePreviousSavedSpill;
105  Int_t _SpillsSincePreviousSavedSpill;
106 
107  bool _lastSpillSaved;
108 
109  std::vector<SubDetId::SubDetEnum> _saveTrueVertexInDet;
110 
111  AnaSpill* _spill;
112 
113  UInt_t _currentGeomID;
114 };
115 
116 #endif
Representation of the beam quality and perhaps other beam information as needed.
virtual bool InitializeSpill()
virtual bool Process()
virtual bool Initialize()
Representation of a true Monte Carlo vertex.
Definition: DataClasses.hxx:50
virtual void DefineOutputTree()
Define the tree that should be written to the output file.
virtual void Finalize()
virtual void FinalizeSpill()
Finalize each spill, including cleaning up data read from the input file.
Representation of the beam information, including POT and quality.