| 7 |
#ifndef pamlevel2_h |
#ifndef pamlevel2_h |
| 8 |
#define pamlevel2_h |
#define pamlevel2_h |
| 9 |
|
|
| 10 |
#include <TClonesArray.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> |
| 19 |
#include <S4Level2.h> |
#include <S4Level2.h> |
| 20 |
#include <NDLevel2.h> |
#include <NDLevel2.h> |
| 21 |
#include <AcLevel2.h> |
#include <AcLevel2.h> |
| 22 |
|
#include <OrbitalInfo.h> |
| 23 |
|
#include <RunInfo.h> |
| 24 |
|
#include <GLTables.h> |
| 25 |
|
|
| 26 |
|
|
| 27 |
#include <TTree.h> |
#include <TTree.h> |
| 28 |
|
#include <TFriendElement.h> |
| 29 |
|
#include <TChain.h> |
| 30 |
#include <TFile.h> |
#include <TFile.h> |
| 31 |
|
#include <TList.h> |
| 32 |
|
#include <TKey.h> |
| 33 |
|
#include <TSystemFile.h> |
| 34 |
|
#include <TSystemDirectory.h> |
| 35 |
|
|
| 36 |
#include <iostream> |
#include <iostream> |
| 37 |
using namespace std; |
using namespace std; |
| 42 |
* This class inherites from TrkTrack, CaloTrkVar ecc... |
* This class inherites from TrkTrack, CaloTrkVar ecc... |
| 43 |
* |
* |
| 44 |
*/ |
*/ |
| 45 |
class PamTrack : public TrkTrack, public CaloTrkVar, public ToFTrkVar { |
//class PamTrack : public TrkTrack, public CaloTrkVar, public ToFTrkVar { |
| 46 |
|
class PamTrack : public TObject { |
| 47 |
|
|
| 48 |
private: |
private: |
| 49 |
|
|
| 51 |
CaloTrkVar* calo_track; |
CaloTrkVar* calo_track; |
| 52 |
ToFTrkVar* tof_track; |
ToFTrkVar* tof_track; |
| 53 |
|
|
| 54 |
|
bool candeleteobj; |
| 55 |
|
|
| 56 |
|
// TClonesArray *Cluster; ///< clusters (if stored) |
| 57 |
|
|
| 58 |
public: |
public: |
| 59 |
|
|
| 60 |
PamTrack(); |
PamTrack(); |
|
|
|
| 61 |
PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar* ); |
PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar* ); |
| 62 |
|
PamTrack(const PamTrack&); |
| 63 |
|
~PamTrack(){ Delete(); }; |
| 64 |
|
|
| 65 |
|
void Clear(); |
| 66 |
|
void Clear(Option_t *option){Clear();}; |
| 67 |
|
void Delete(); |
| 68 |
|
|
| 69 |
|
TrkTrack* GetTrkTrack(){return trk_track;}; |
| 70 |
|
CaloTrkVar* GetCaloTrack(){return calo_track;}; |
| 71 |
|
ToFTrkVar* GetToFTrack(){return tof_track;}; |
| 72 |
|
|
| 73 |
ClassDef(PamTrack,1); |
ClassDef(PamTrack,1); |
| 74 |
}; |
}; |
| 80 |
* 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. |
| 81 |
*/ |
*/ |
| 82 |
|
|
| 83 |
class PamLevel2 : public CaloLevel2, public TrkLevel2, public ToFLevel2, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2 { |
//class PamLevel2 : public CaloLevel2, public CaloLevel1, public ToFLevel2, public TrkLevel2, public TrkLevel1, public TrkHough, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2, public OrbitalInfo { |
| 84 |
|
class PamLevel2 : public TObject { |
| 85 |
|
|
| 86 |
private: |
private: |
| 87 |
|
public: |
| 88 |
|
|
| 89 |
TrkLevel2* trk_obj; |
TrkLevel1* trk1_obj; |
| 90 |
CaloLevel2* calo_obj; |
TrkLevel2* trk2_obj; |
| 91 |
ToFLevel2* tof_obj; |
TrkHough* trkh_obj; |
| 92 |
TrigLevel2* trig_obj; |
|
| 93 |
S4Level2* s4_obj; |
CaloLevel1* calo1_obj; |
| 94 |
NDLevel2* nd_obj; |
CaloLevel2* calo2_obj; |
| 95 |
AcLevel2* ac_obj; |
|
| 96 |
|
ToFLevel2* tof_obj; |
| 97 |
|
TrigLevel2* trig_obj; |
| 98 |
|
S4Level2* s4_obj; |
| 99 |
|
NDLevel2* nd_obj; |
| 100 |
|
AcLevel2* ac_obj; |
| 101 |
|
OrbitalInfo* orb_obj; |
| 102 |
|
|
| 103 |
|
GL_RUN* run_obj; |
| 104 |
|
SoftInfo* soft_obj; // Emiliano |
| 105 |
|
|
| 106 |
public: |
TTree* tree_clone[8]; |
| 107 |
|
|
| 108 |
PamLevel2(); |
// TRefArray* sorted_tracks; |
| 109 |
|
// TRefArray sorted_tracks; |
| 110 |
|
|
| 111 |
TrkLevel2* GetTrkLevel2() {return trk_obj;}; |
TClonesArray *tsorted; |
| 112 |
CaloLevel2* GetCaloLevel2() {return calo_obj;}; |
TClonesArray *timage; |
|
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;}; |
|
| 113 |
|
|
|
// ================================= |
|
|
// methods needed to ... well I am not shure they are needed |
|
|
// ================================= |
|
|
void* GetPointerToTrk() {return &trk_obj;}; |
|
|
void* GetPointerToCalo() {return &calo_obj;}; |
|
|
void* GetPointerToToF() {return &tof_obj;}; |
|
|
void* GetPointerToTrig() {return &trig_obj;}; |
|
|
void* GetPointerToS4() {return &s4_obj;}; |
|
|
void* GetPointerToND() {return &nd_obj;}; |
|
|
void* GetPointerToAc() {return &ac_obj;}; |
|
| 114 |
|
|
| 115 |
TTree* LoadPamTrees(TFile*); |
PamTrack *track; //store the last required |
| 116 |
|
|
| 117 |
|
|
| 118 |
|
Bool_t CAL2; //level2 branch |
| 119 |
|
Bool_t CAL1; //level1 branch |
| 120 |
|
|
| 121 |
|
Bool_t TRK2; //level2 branch |
| 122 |
|
Bool_t TRK1; //level1 branch |
| 123 |
|
Bool_t TRKh; //hough branch |
| 124 |
|
|
| 125 |
|
Bool_t TRG; |
| 126 |
|
Bool_t TOF; |
| 127 |
|
Bool_t S4; |
| 128 |
|
Bool_t ND; |
| 129 |
|
Bool_t AC; |
| 130 |
|
Bool_t ORB; |
| 131 |
|
|
| 132 |
|
Bool_t RUN; |
| 133 |
|
|
| 134 |
|
PamLevel2(); |
| 135 |
|
~PamLevel2(){Delete();}; |
| 136 |
|
|
| 137 |
|
void Clear(); |
| 138 |
|
void Delete(); |
| 139 |
|
|
| 140 |
|
|
| 141 |
|
// ========================================= |
| 142 |
|
// methods needed to read/write Level2 trees |
| 143 |
|
// ========================================= |
| 144 |
|
void SetWhichTrees(TString); |
| 145 |
|
void GetWhichTrees(TFile*); |
| 146 |
|
|
| 147 |
|
TTree* GetPamTree(TFile*,TString); |
| 148 |
|
TTree* GetPamTree(TFile* f){return GetPamTree(f,"");}; |
| 149 |
|
|
| 150 |
|
TList* GetListOfLevel2Files(TString, TString); |
| 151 |
|
Bool_t CheckLevel2File(TString); |
| 152 |
|
TChain* GetPamTree(TList*,TString); |
| 153 |
|
TChain* GetPamTree(TString ddir,TString list,TString detlist){ return GetPamTree(GetListOfLevel2Files(ddir,list),detlist); }; |
| 154 |
|
TChain* GetPamTree(TString ddir,TString list){ return GetPamTree(GetListOfLevel2Files(ddir,list),""); }; |
| 155 |
|
|
| 156 |
|
TTree* GetRunTree(TFile*); |
| 157 |
|
TChain* GetRunTree(TList*); |
| 158 |
|
|
| 159 |
|
void CreateCloneTrees0(TChain *fChain, TFile* file); |
| 160 |
|
void CreateCloneTrees(TFile* file); |
| 161 |
|
void FillCloneTrees(); |
| 162 |
|
TTree *GetCloneTree(TString); |
| 163 |
|
void WriteCloneTrees(); |
| 164 |
|
|
| 165 |
|
void SetBranchAddress(TTree *); |
| 166 |
|
void SetBranchAddress(TChain *); |
| 167 |
|
|
| 168 |
|
// ======================================================== |
| 169 |
|
// methods needed to retrieve subdetector general variables |
| 170 |
|
// ======================================================== |
| 171 |
|
void* GetPointerTo(const char*); |
| 172 |
|
TrkLevel1 *GetTrkLevel1() { return trk1_obj;}; |
| 173 |
|
TrkLevel2 *GetTrkLevel2() { return trk2_obj;}; |
| 174 |
|
TrkHough *GetTrkHough() { return trkh_obj;}; |
| 175 |
|
CaloLevel1 *GetCaloLevel1() { return calo1_obj;}; |
| 176 |
|
CaloLevel2 *GetCaloLevel2() { return calo2_obj;}; |
| 177 |
|
ToFLevel2 *GetToFLevel2() { return tof_obj;}; |
| 178 |
|
TrigLevel2 *GetTrigLevel2() { return trig_obj;}; |
| 179 |
|
S4Level2 *GetS4Level2() { return s4_obj;}; |
| 180 |
|
NDLevel2 *GetNDLevel2() { return nd_obj;}; |
| 181 |
|
AcLevel2 *GetAcLevel2() { return ac_obj;}; |
| 182 |
|
OrbitalInfo *GetOrbitalInfo(){ return orb_obj;}; |
| 183 |
|
GL_RUN *GetRunInfo() { return run_obj; }; |
| 184 |
|
SoftInfo *GetSoftInfo() { return soft_obj; }; // Emiliano |
| 185 |
|
|
| 186 |
|
// ============================================== |
| 187 |
|
// methods to retrieve subdetectors stored tracks |
| 188 |
|
// ============================================== |
| 189 |
|
TrkTrack* GetTrkStoredTrack(int seqno){return trk2_obj->TrkLevel2::GetStoredTrack(seqno); }; |
| 190 |
|
CaloTrkVar* GetCaloStoredTrack(int); |
| 191 |
|
ToFTrkVar* GetToFStoredTrack(int); |
| 192 |
|
// |
| 193 |
|
PamTrack* GetPamTrackAlong(TrkTrack*); |
| 194 |
|
// PamTrack* GetPamTrackAlong(CaloTrkVar*); //se serve |
| 195 |
|
// PamTrack* GetPamTrackAlong(ToFTrkVar*); //se serve |
| 196 |
|
|
| 197 |
// ================================= |
// ================================= |
| 198 |
// methods to retrieve pamela tracks |
// methods to retrieve pamela tracks |
| 199 |
// ================================= |
// ================================= |
| 200 |
PamTrack* GetStoredTrack(Int_t itrk); |
PamTrack* GetStoredTrack(Int_t); |
| 201 |
TClonesArray* GetTracks(); |
// |
| 202 |
|
void SortTracks(TString); //assign value to variable sorted_tracks |
| 203 |
|
// TRefArray* GetTracks(); //return sorted_tracks |
| 204 |
|
TClonesArray* GetTracks(); //return sorted_tracks |
| 205 |
PamTrack* GetTrack(int); |
PamTrack* GetTrack(int); |
| 206 |
PamTrack* GetTrackImage(int); |
PamTrack* GetTrackImage(int); |
| 207 |
|
|
| 208 |
|
// ================================= |
| 209 |
|
// other methods |
| 210 |
|
// ================================= |
| 211 |
|
// Int_t ntrk(){ return trk2_obj->TrkLevel2::ntrk(); }; |
| 212 |
|
|
| 213 |
|
|
| 214 |
ClassDef(PamLevel2,1); |
ClassDef(PamLevel2,1); |
| 215 |
}; |
}; |
| 216 |
|
|