| 9 |
|
|
| 10 |
#include <TRefArray.h> |
#include <TRefArray.h> |
| 11 |
|
|
| 12 |
|
#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> |
| 20 |
#include <NDLevel2.h> |
#include <NDLevel2.h> |
| 21 |
#include <AcLevel2.h> |
#include <AcLevel2.h> |
| 22 |
#include <OrbitalInfo.h> |
#include <OrbitalInfo.h> |
| 23 |
|
#include <OrbitalInfo.h> |
| 24 |
|
#include <RunInfo.h> |
| 25 |
|
#include <GLTables.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> |
| 67 |
* 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. |
| 68 |
*/ |
*/ |
| 69 |
|
|
| 70 |
class PamLevel2 : public CaloLevel2, public TrkLevel2, 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 { |
| 71 |
|
|
| 72 |
private: |
private: |
| 73 |
|
public: |
| 74 |
|
|
| 75 |
|
TrkLevel1* trk1_obj; |
| 76 |
|
TrkLevel2* trk2_obj; |
| 77 |
|
TrkHough* trkh_obj; |
| 78 |
|
|
| 79 |
|
CaloLevel1* calo1_obj; |
| 80 |
|
CaloLevel2* calo2_obj; |
| 81 |
|
|
|
TrkLevel2* trk_obj; |
|
|
CaloLevel2* calo_obj; |
|
| 82 |
ToFLevel2* tof_obj; |
ToFLevel2* tof_obj; |
| 83 |
TrigLevel2* trig_obj; |
TrigLevel2* trig_obj; |
| 84 |
S4Level2* s4_obj; |
S4Level2* s4_obj; |
| 85 |
NDLevel2* nd_obj; |
NDLevel2* nd_obj; |
| 86 |
AcLevel2* ac_obj; |
AcLevel2* ac_obj; |
| 87 |
OrbitalInfo* orb_obj; |
OrbitalInfo* orb_obj; |
| 88 |
|
|
| 89 |
|
GL_RUN* run_obj; |
| 90 |
|
|
| 91 |
TRefArray* sorted_tracks; // TEMPORANEO ... lo mettero` menbro di TrkLevel2 |
/* TrkLevel1* trk1_clone; */ |
| 92 |
|
/* TrkLevel2* trk2_clone; */ |
| 93 |
|
/* TrkHough* trkh_clone; */ |
| 94 |
|
|
| 95 |
|
/* CaloLevel1* calo1_clone; */ |
| 96 |
|
/* CaloLevel2* calo2_clone; */ |
| 97 |
|
|
| 98 |
|
/* ToFLevel2* tof_clone; */ |
| 99 |
|
/* TrigLevel2* trig_clone; */ |
| 100 |
|
/* S4Level2* s4_clone; */ |
| 101 |
|
/* NDLevel2* nd_clone; */ |
| 102 |
|
/* AcLevel2* ac_clone; */ |
| 103 |
|
/* OrbitalInfo* orb_clone; */ |
| 104 |
|
|
| 105 |
|
/* TTree* T_clone; //tracker */ |
| 106 |
|
/* TTree* C_clone; //calo */ |
| 107 |
|
/* TTree* O_clone; //tof */ |
| 108 |
|
/* TTree* R_clone; //trigger */ |
| 109 |
|
/* TTree* S_clone; //s4 */ |
| 110 |
|
/* TTree* A_clone; //anti */ |
| 111 |
|
/* TTree* N_clone; //nd */ |
| 112 |
|
/* TTree* B_clone; //orbital */ |
| 113 |
|
|
| 114 |
|
TTree* tree_clone[8]; |
| 115 |
|
|
| 116 |
|
TRefArray* sorted_tracks; |
| 117 |
|
|
| 118 |
|
// TChain* Tout; |
| 119 |
|
|
|
public: |
|
| 120 |
|
|
| 121 |
Bool_t CAL; |
Bool_t CAL2; //level2 branch |
| 122 |
Bool_t TRK; |
Bool_t CAL1; //level1 branch |
| 123 |
Bool_t TRG; |
|
| 124 |
Bool_t TOF; |
Bool_t TRK2; //level2 branch |
| 125 |
Bool_t S4; |
Bool_t TRK1; //level1 branch |
| 126 |
Bool_t ND; |
Bool_t TRKh; //hough branch |
| 127 |
Bool_t AC; |
|
| 128 |
Bool_t ORB; |
Bool_t TRG; |
| 129 |
|
Bool_t TOF; |
| 130 |
|
Bool_t S4; |
| 131 |
|
Bool_t ND; |
| 132 |
|
Bool_t AC; |
| 133 |
|
Bool_t ORB; |
| 134 |
|
|
| 135 |
PamLevel2(); |
PamLevel2(); |
| 136 |
~PamLevel2(); |
~PamLevel2(); |
| 137 |
|
|
| 138 |
void Clear(); |
void Clear(); |
| 139 |
|
|
| 140 |
TrkLevel2* GetTrkLevel2() { return trk_obj; }; |
/* TrkLevel1* GetTrkLevel1() { return trk1_obj; }; */ |
| 141 |
CaloLevel2* GetCaloLevel2() { return calo_obj; }; |
/* TrkLevel2* GetTrkLevel2() { return trk2_obj; }; */ |
| 142 |
ToFLevel2* GetToFLevel2() { return tof_obj; }; |
/* TrkHough* GetTrkHough() { return trkh_obj; }; */ |
| 143 |
TrigLevel2* GetTrigLevel2() { return trig_obj; }; |
/* CaloLevel1* GetCaloLevel1() { return calo1_obj; }; */ |
| 144 |
S4Level2* GetS4Level2() { return s4_obj; }; |
/* CaloLevel2* GetCaloLevel2() { return calo2_obj; }; */ |
| 145 |
NDLevel2* GetNDLevel2() { return nd_obj; }; |
/* ToFLevel2* GetToFLevel2() { return tof_obj; }; */ |
| 146 |
AcLevel2* GetAcLevel2() { return ac_obj; }; |
/* TrigLevel2* GetTrigLevel2() { return trig_obj; }; */ |
| 147 |
OrbitalInfo* GetOrbitalInfo(){ return orb_obj; }; |
/* S4Level2* GetS4Level2() { return s4_obj; }; */ |
| 148 |
|
/* NDLevel2* GetNDLevel2() { return nd_obj; }; */ |
| 149 |
|
/* AcLevel2* GetAcLevel2() { return ac_obj; }; */ |
| 150 |
|
/* OrbitalInfo* GetOrbitalInfo(){ return orb_obj; }; */ |
| 151 |
|
/* TrkLevel1* GetTrkLevel1() { return ; }; */ |
| 152 |
|
/* TrkLevel2* GetTrkLevel2() { return TrkLevel2::GetTrkLevel2(); }; */ |
| 153 |
|
/* TrkHough* GetTrkHough() { return TrkHough::GetTrkHough(); }; */ |
| 154 |
|
/* CaloLevel1* GetCaloLevel1() { return CaloLevel1::GetCaloLevel1(); }; */ |
| 155 |
|
/* CaloLevel2* GetCaloLevel2() { return CaloLevel2::GetCaloLevel2(); }; */ |
| 156 |
|
/* ToFLevel2* GetToFLevel2() { return ToFLevel2::GetToFLevel2(); }; */ |
| 157 |
|
/* TrigLevel2* GetTrigLevel2() { return TrigLevel2::GetTrigLevel2(); }; */ |
| 158 |
|
/* S4Level2* GetS4Level2() { return S4Level2::GetS4Level2(); }; */ |
| 159 |
|
/* NDLevel2* GetNDLevel2() { return NDLevel2::GetNDLevel2(); }; */ |
| 160 |
|
/* AcLevel2* GetAcLevel2() { return AcLevel2::GetAcLevel2(); }; */ |
| 161 |
|
/* OrbitalInfo* GetOrbitalInfo(){ return OrbitalInfo::GetOrbitalInfo(); }; */ |
| 162 |
|
GL_RUN* GetRunInfo() { return run_obj; }; |
| 163 |
|
|
| 164 |
|
// ========================================= |
| 165 |
|
// methods needed to read/write Level2 trees |
| 166 |
|
// ========================================= |
| 167 |
|
void SetWhichTrees(TString); |
| 168 |
|
TList* GetListOfLevel2Files(TString, TString); |
| 169 |
|
Bool_t CheckLevel2File(TString); |
| 170 |
|
TTree* GetPamTree(TFile*,TString); |
| 171 |
|
TTree* GetPamTree(TFile* f){return GetPamTree(f,"+ALL");}; |
| 172 |
|
TChain* GetPamTree(TList*,TString); |
| 173 |
|
TTree* GetRunTree(TFile*); |
| 174 |
|
TChain* GetRunTree(TList*); |
| 175 |
|
|
| 176 |
|
// TTree* GetNewPamTree(); |
| 177 |
|
// void FillNewPamTree(TTree*); |
| 178 |
|
// void FillNewPamTree(); |
| 179 |
|
void CreateCloneTrees(TChain *fChain); |
| 180 |
|
void FillCloneTrees(); |
| 181 |
|
TTree *GetCloneTree(TString); |
| 182 |
|
void WriteCloneTrees(); |
| 183 |
|
|
| 184 |
|
void SetBranchAddress(TTree *); |
| 185 |
|
void SetBranchAddress(TChain *); |
| 186 |
|
|
|
// ===================================== |
|
|
// methods needed to read Level2 trees |
|
|
// ===================================== |
|
|
void SetWhichTrees(TString); |
|
|
TList* GetListOfLevel2Files(TString, TString); |
|
|
Bool_t CheckLevel2File(TString); |
|
|
TTree* LoadPamTrees(TFile*); |
|
|
TTree* LoadPamTrees(TFile*,TString); |
|
|
TChain* LoadPamTrees(TList*,TString); |
|
|
|
|
| 187 |
// ===================================== |
// ===================================== |
| 188 |
// methods needed to set brach addresses |
// methods needed to set brach addresses |
| 189 |
// ===================================== |
// ===================================== |
| 190 |
void* GetPointerToTrk() {return &trk_obj;}; |
/* void* GetPointerToTrk(); */ |
| 191 |
void* GetPointerToCalo() {return &calo_obj;}; |
/* void* GetPointerToTrk(int s); */ |
| 192 |
void* GetPointerToToF() {return &tof_obj;}; |
/* void* GetPointerToCalo(); */ |
| 193 |
void* GetPointerToTrig() {return &trig_obj;}; |
/* void* GetPointerToCalo(int s); */ |
| 194 |
void* GetPointerToS4() {return &s4_obj;}; |
/* void* GetPointerToToF(); */ |
| 195 |
void* GetPointerToND() {return &nd_obj;}; |
/* void* GetPointerToTrig(); */ |
| 196 |
void* GetPointerToAc() {return &ac_obj;}; |
/* void* GetPointerToS4(); */ |
| 197 |
void* GetPointerToOrb() {return &orb_obj;}; |
/* void* GetPointerToND(); */ |
| 198 |
|
/* void* GetPointerToAc(); */ |
| 199 |
|
/* void* GetPointerToOrb(); */ |
| 200 |
|
/* void* GetPointerToRun(); */ |
| 201 |
|
void* GetPointerTo(const char*); |
| 202 |
|
|
| 203 |
// ============================================== |
// ============================================== |
| 204 |
// methods to retrieve subdetectors stored tracks |
// methods to retrieve subdetectors stored tracks |
| 205 |
// ============================================== |
// ============================================== |
| 206 |
TrkTrack* GetTrkStoredTrack(int seqno){return TrkLevel2::GetStoredTrack(seqno); }; |
TrkTrack* GetTrkStoredTrack(int seqno){return TrkLevel2::GetStoredTrack(seqno); }; |
| 207 |
CaloTrkVar* GetCaloStoredTrack(int); |
CaloTrkVar* GetCaloStoredTrack(int); |
| 208 |
ToFTrkVar* GetToFStoredTrack(int); |
ToFTrkVar* GetToFStoredTrack(int); |
| 209 |
// |
// |
| 210 |
PamTrack* GetPamTrackAlong(TrkTrack*); |
PamTrack* GetPamTrackAlong(TrkTrack*); |
| 211 |
// PamTrack* GetPamTrackAlong(CaloTrkVar*); //se serve |
// PamTrack* GetPamTrackAlong(CaloTrkVar*); //se serve |
| 212 |
// PamTrack* GetPamTrackAlong(ToFTrkVar*); //se serve |
// PamTrack* GetPamTrackAlong(ToFTrkVar*); //se serve |
| 213 |
|
|
| 215 |
// methods to retrieve pamela tracks |
// methods to retrieve pamela tracks |
| 216 |
// ================================= |
// ================================= |
| 217 |
PamTrack* GetStoredTrack(Int_t); |
PamTrack* GetStoredTrack(Int_t); |
| 218 |
// |
// |
| 219 |
void SortTracks(TString); //assign value to variable sorted_tracks |
void SortTracks(TString); //assign value to variable sorted_tracks |
| 220 |
TRefArray* GetTracks(); //return sorted_tracks |
TRefArray* GetTracks(); //return sorted_tracks |
| 221 |
PamTrack* GetTrack(int); |
PamTrack* GetTrack(int); |
| 222 |
PamTrack* GetTrackImage(int); |
PamTrack* GetTrackImage(int); |
| 223 |
|
|
| 224 |
|
// ================================= |
| 225 |
|
// other methods |
| 226 |
|
// ================================= |
| 227 |
|
Int_t ntrk(){ return TrkLevel2::ntrk(); }; |
| 228 |
|
|
| 229 |
|
|
| 230 |
ClassDef(PamLevel2,1); |
ClassDef(PamLevel2,1); |
| 231 |
}; |
}; |
| 232 |
|
|