11 |
|
|
12 |
#include <TrkLevel1.h> |
#include <TrkLevel1.h> |
13 |
#include <TrkLevel2.h> |
#include <TrkLevel2.h> |
14 |
|
#include <TrkHough.h> |
15 |
|
#include <CaloLevel1.h> |
16 |
#include <CaloLevel2.h> |
#include <CaloLevel2.h> |
17 |
#include <ToFLevel2.h> |
#include <ToFLevel2.h> |
18 |
#include <TrigLevel2.h> |
#include <TrigLevel2.h> |
26 |
|
|
27 |
|
|
28 |
#include <TTree.h> |
#include <TTree.h> |
29 |
|
#include <TFriendElement.h> |
30 |
#include <TChain.h> |
#include <TChain.h> |
31 |
#include <TFile.h> |
#include <TFile.h> |
32 |
#include <TList.h> |
#include <TList.h> |
57 |
|
|
58 |
PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar* ); |
PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar* ); |
59 |
|
|
60 |
|
TrkTrack* GetTrkTrack(){return trk_track;}; |
61 |
|
CaloTrkVar* GetCaloTrack(){return calo_track;}; |
62 |
|
ToFTrkVar* GetToFTrack(){return tof_track;}; |
63 |
|
|
64 |
ClassDef(PamTrack,1); |
ClassDef(PamTrack,1); |
65 |
}; |
}; |
66 |
|
|
71 |
* This allows to solve the tracker ambiguity (that is, to choose between track images) by using also information from other detectors. |
* This allows to solve the tracker ambiguity (that is, to choose between track images) by using also information from other detectors. |
72 |
*/ |
*/ |
73 |
|
|
74 |
class PamLevel2 : public CaloLevel2, public TrkLevel2, public TrkLevel1, public ToFLevel2, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2, public OrbitalInfo { |
class PamLevel2 : public CaloLevel2, public CaloLevel1, public ToFLevel2, public TrkLevel2, public TrkLevel1, public TrkHough, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2, public OrbitalInfo { |
75 |
|
|
76 |
private: |
private: |
77 |
|
public: |
78 |
|
|
79 |
|
TrkLevel1* trk1_obj; |
80 |
|
TrkLevel2* trk2_obj; |
81 |
|
TrkHough* trkh_obj; |
82 |
|
|
83 |
|
CaloLevel1* calo1_obj; |
84 |
|
CaloLevel2* calo2_obj; |
85 |
|
|
|
TrkLevel1* trk_l1_obj; |
|
|
TrkLevel2* trk_obj; |
|
|
CaloLevel2* calo_obj; |
|
86 |
ToFLevel2* tof_obj; |
ToFLevel2* tof_obj; |
87 |
TrigLevel2* trig_obj; |
TrigLevel2* trig_obj; |
88 |
S4Level2* s4_obj; |
S4Level2* s4_obj; |
89 |
NDLevel2* nd_obj; |
NDLevel2* nd_obj; |
90 |
AcLevel2* ac_obj; |
AcLevel2* ac_obj; |
91 |
OrbitalInfo* orb_obj; |
OrbitalInfo* orb_obj; |
92 |
|
|
93 |
GL_RUN* run_obj; |
GL_RUN* run_obj; |
94 |
|
|
95 |
TRefArray* sorted_tracks; |
/* TrkLevel1* trk1_clone; */ |
96 |
|
/* TrkLevel2* trk2_clone; */ |
97 |
TChain* Tout; |
/* TrkHough* trkh_clone; */ |
98 |
|
|
99 |
public: |
/* CaloLevel1* calo1_clone; */ |
100 |
|
/* CaloLevel2* calo2_clone; */ |
101 |
|
|
102 |
|
/* ToFLevel2* tof_clone; */ |
103 |
|
/* TrigLevel2* trig_clone; */ |
104 |
|
/* S4Level2* s4_clone; */ |
105 |
|
/* NDLevel2* nd_clone; */ |
106 |
|
/* AcLevel2* ac_clone; */ |
107 |
|
/* OrbitalInfo* orb_clone; */ |
108 |
|
|
109 |
|
/* TTree* T_clone; //tracker */ |
110 |
|
/* TTree* C_clone; //calo */ |
111 |
|
/* TTree* O_clone; //tof */ |
112 |
|
/* TTree* R_clone; //trigger */ |
113 |
|
/* TTree* S_clone; //s4 */ |
114 |
|
/* TTree* A_clone; //anti */ |
115 |
|
/* TTree* N_clone; //nd */ |
116 |
|
/* TTree* B_clone; //orbital */ |
117 |
|
|
118 |
|
TTree* tree_clone[8]; |
119 |
|
|
120 |
|
TRefArray* sorted_tracks; |
121 |
|
|
122 |
|
Bool_t CAL2; //level2 branch |
123 |
|
Bool_t CAL1; //level1 branch |
124 |
|
|
125 |
|
Bool_t TRK2; //level2 branch |
126 |
|
Bool_t TRK1; //level1 branch |
127 |
|
Bool_t TRKh; //hough branch |
128 |
|
|
129 |
|
Bool_t TRG; |
130 |
|
Bool_t TOF; |
131 |
|
Bool_t S4; |
132 |
|
Bool_t ND; |
133 |
|
Bool_t AC; |
134 |
|
Bool_t ORB; |
135 |
|
|
136 |
Bool_t CAL; |
Bool_t RUN; |
137 |
Bool_t TRK; |
|
|
Bool_t TRG; |
|
|
Bool_t TOF; |
|
|
Bool_t S4; |
|
|
Bool_t ND; |
|
|
Bool_t AC; |
|
|
Bool_t ORB; |
|
|
|
|
|
Bool_t TRK_L1; |
|
|
|
|
138 |
PamLevel2(); |
PamLevel2(); |
139 |
~PamLevel2(); |
~PamLevel2(); |
140 |
|
|
141 |
void Clear(); |
void Clear(); |
142 |
|
|
143 |
|
/* TrkLevel1* GetTrkLevel1() { return trk1_obj; }; */ |
144 |
|
/* TrkLevel2* GetTrkLevel2() { return trk2_obj; }; */ |
145 |
|
/* TrkHough* GetTrkHough() { return trkh_obj; }; */ |
146 |
|
/* CaloLevel1* GetCaloLevel1() { return calo1_obj; }; */ |
147 |
|
/* CaloLevel2* GetCaloLevel2() { return calo2_obj; }; */ |
148 |
|
/* ToFLevel2* GetToFLevel2() { return tof_obj; }; */ |
149 |
|
/* TrigLevel2* GetTrigLevel2() { return trig_obj; }; */ |
150 |
|
/* S4Level2* GetS4Level2() { return s4_obj; }; */ |
151 |
|
/* NDLevel2* GetNDLevel2() { return nd_obj; }; */ |
152 |
|
/* AcLevel2* GetAcLevel2() { return ac_obj; }; */ |
153 |
|
/* OrbitalInfo* GetOrbitalInfo(){ return orb_obj; }; */ |
154 |
|
/* TrkLevel1* GetTrkLevel1() { return ; }; */ |
155 |
|
/* TrkLevel2* GetTrkLevel2() { return TrkLevel2::GetTrkLevel2(); }; */ |
156 |
|
/* TrkHough* GetTrkHough() { return TrkHough::GetTrkHough(); }; */ |
157 |
|
/* CaloLevel1* GetCaloLevel1() { return CaloLevel1::GetCaloLevel1(); }; */ |
158 |
|
/* CaloLevel2* GetCaloLevel2() { return CaloLevel2::GetCaloLevel2(); }; */ |
159 |
|
/* ToFLevel2* GetToFLevel2() { return ToFLevel2::GetToFLevel2(); }; */ |
160 |
|
/* TrigLevel2* GetTrigLevel2() { return TrigLevel2::GetTrigLevel2(); }; */ |
161 |
|
/* S4Level2* GetS4Level2() { return S4Level2::GetS4Level2(); }; */ |
162 |
|
/* NDLevel2* GetNDLevel2() { return NDLevel2::GetNDLevel2(); }; */ |
163 |
|
/* AcLevel2* GetAcLevel2() { return AcLevel2::GetAcLevel2(); }; */ |
164 |
|
/* OrbitalInfo* GetOrbitalInfo(){ return OrbitalInfo::GetOrbitalInfo(); }; */ |
165 |
|
GL_RUN* GetRunInfo() { return run_obj; }; |
166 |
|
|
167 |
|
// ========================================= |
168 |
|
// methods needed to read/write Level2 trees |
169 |
|
// ========================================= |
170 |
|
void SetWhichTrees(TString); |
171 |
|
void GetWhichTrees(TFile*); |
172 |
|
|
173 |
|
TTree* GetPamTree(TFile*,TString); |
174 |
|
TTree* GetPamTree(TFile* f){return GetPamTree(f,"");}; |
175 |
|
|
176 |
|
TList* GetListOfLevel2Files(TString, TString); |
177 |
|
Bool_t CheckLevel2File(TString); |
178 |
|
TChain* GetPamTree(TList*,TString); |
179 |
|
TChain* GetPamTree(TString ddir,TString list,TString detlist){ return GetPamTree(GetListOfLevel2Files(ddir,list),detlist); }; |
180 |
|
TChain* GetPamTree(TString ddir,TString list){ return GetPamTree(GetListOfLevel2Files(ddir,list),""); }; |
181 |
|
|
182 |
|
TTree* GetRunTree(TFile*); |
183 |
|
TChain* GetRunTree(TList*); |
184 |
|
|
185 |
|
void CreateCloneTrees0(TChain *fChain, TFile* file); |
186 |
|
void CreateCloneTrees(TFile* file); |
187 |
|
void FillCloneTrees(); |
188 |
|
TTree *GetCloneTree(TString); |
189 |
|
void WriteCloneTrees(); |
190 |
|
|
191 |
|
void SetBranchAddress(TTree *); |
192 |
|
void SetBranchAddress(TChain *); |
193 |
|
|
|
TrkLevel1* GetTrkLevel1() { return trk_l1_obj; }; |
|
|
TrkLevel2* GetTrkLevel2() { return trk_obj; }; |
|
|
CaloLevel2* GetCaloLevel2() { return calo_obj; }; |
|
|
ToFLevel2* GetToFLevel2() { return tof_obj; }; |
|
|
TrigLevel2* GetTrigLevel2() { return trig_obj; }; |
|
|
S4Level2* GetS4Level2() { return s4_obj; }; |
|
|
NDLevel2* GetNDLevel2() { return nd_obj; }; |
|
|
AcLevel2* GetAcLevel2() { return ac_obj; }; |
|
|
OrbitalInfo* GetOrbitalInfo(){ return orb_obj; }; |
|
|
GL_RUN* GetRunInfo() { return run_obj; }; |
|
|
|
|
|
// ===================================== |
|
|
// methods needed to read Level2 trees |
|
|
// ===================================== |
|
|
void SetWhichTrees(TString); |
|
|
TList* GetListOfLevel2Files(TString, TString); |
|
|
Bool_t CheckLevel2File(TString); |
|
|
void SetBranchAddress(); |
|
|
TTree* GetPamTree(TFile*,TString); |
|
|
TTree* GetPamTree(TFile* f){return GetPamTree(f,"+ALL");}; |
|
|
TChain* GetPamTree(TList*,TString); |
|
|
TTree* GetRunTree(TFile*); |
|
|
TChain* GetRunTree(TList*); |
|
|
|
|
194 |
// ===================================== |
// ===================================== |
195 |
// methods needed to set brach addresses |
// methods needed to set brach addresses |
196 |
// ===================================== |
// ===================================== |
197 |
void* GetPointerToTrk() {return &trk_obj;}; |
/* void* GetPointerToTrk(); */ |
198 |
void* GetPointerToTrk(int s){ |
/* void* GetPointerToTrk(int s); */ |
199 |
switch (s) { |
/* void* GetPointerToCalo(); */ |
200 |
case 1: return &trk_l1_obj; |
/* void* GetPointerToCalo(int s); */ |
201 |
case 2: return &trk_obj; |
/* void* GetPointerToToF(); */ |
202 |
default: return 0; |
/* void* GetPointerToTrig(); */ |
203 |
}; |
/* void* GetPointerToS4(); */ |
204 |
}; |
/* void* GetPointerToND(); */ |
205 |
void* GetPointerToCalo() {return &calo_obj; }; |
/* void* GetPointerToAc(); */ |
206 |
void* GetPointerToToF() {return &tof_obj; }; |
/* void* GetPointerToOrb(); */ |
207 |
void* GetPointerToTrig() {return &trig_obj; }; |
/* void* GetPointerToRun(); */ |
208 |
void* GetPointerToS4() {return &s4_obj; }; |
void* GetPointerTo(const char*); |
|
void* GetPointerToND() {return &nd_obj; }; |
|
|
void* GetPointerToAc() {return &ac_obj; }; |
|
|
void* GetPointerToOrb() {return &orb_obj; }; |
|
|
void* GetPointerToRun() {return &run_obj; }; |
|
|
void* GetPointerTo(const char*); |
|
209 |
|
|
210 |
// ============================================== |
// ============================================== |
211 |
// methods to retrieve subdetectors stored tracks |
// methods to retrieve subdetectors stored tracks |
212 |
// ============================================== |
// ============================================== |
213 |
TrkTrack* GetTrkStoredTrack(int seqno){return TrkLevel2::GetStoredTrack(seqno); }; |
TrkTrack* GetTrkStoredTrack(int seqno){return TrkLevel2::GetStoredTrack(seqno); }; |
214 |
CaloTrkVar* GetCaloStoredTrack(int); |
CaloTrkVar* GetCaloStoredTrack(int); |
215 |
ToFTrkVar* GetToFStoredTrack(int); |
ToFTrkVar* GetToFStoredTrack(int); |
216 |
// |
// |
217 |
PamTrack* GetPamTrackAlong(TrkTrack*); |
PamTrack* GetPamTrackAlong(TrkTrack*); |
218 |
// PamTrack* GetPamTrackAlong(CaloTrkVar*); //se serve |
// PamTrack* GetPamTrackAlong(CaloTrkVar*); //se serve |
219 |
// PamTrack* GetPamTrackAlong(ToFTrkVar*); //se serve |
// PamTrack* GetPamTrackAlong(ToFTrkVar*); //se serve |
220 |
|
|
222 |
// methods to retrieve pamela tracks |
// methods to retrieve pamela tracks |
223 |
// ================================= |
// ================================= |
224 |
PamTrack* GetStoredTrack(Int_t); |
PamTrack* GetStoredTrack(Int_t); |
225 |
// |
// |
226 |
void SortTracks(TString); //assign value to variable sorted_tracks |
void SortTracks(TString); //assign value to variable sorted_tracks |
227 |
TRefArray* GetTracks(); //return sorted_tracks |
TRefArray* GetTracks(); //return sorted_tracks |
228 |
PamTrack* GetTrack(int); |
PamTrack* GetTrack(int); |
229 |
PamTrack* GetTrackImage(int); |
PamTrack* GetTrackImage(int); |
230 |
|
|
231 |
|
// ================================= |
232 |
|
// other methods |
233 |
|
// ================================= |
234 |
|
Int_t ntrk(){ return TrkLevel2::ntrk(); }; |
235 |
|
|
236 |
|
|
237 |
ClassDef(PamLevel2,1); |
ClassDef(PamLevel2,1); |
238 |
}; |
}; |
239 |
|
|