/[PAMELA software]/PamelaLevel2/inc/PamLevel2.h
ViewVC logotype

Annotation of /PamelaLevel2/inc/PamLevel2.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Mon Dec 11 17:49:03 2006 UTC (18 years ago) by pam-fi
Branch: MAIN
Changes since 1.7: +14 -9 lines
File MIME type: text/plain
*** empty log message ***

1 pam-fi 1.1
2    
3     /**
4     * \file PamLevel2.h
5     * \author Elena Vannuccini
6     */
7     #ifndef pamlevel2_h
8     #define pamlevel2_h
9    
10 pam-fi 1.2 #include <TRefArray.h>
11 pam-fi 1.1
12 pam-fi 1.4 #include <TrkLevel1.h>
13 pam-fi 1.1 #include <TrkLevel2.h>
14 pam-fi 1.6 #include <TrkHough.h>
15     #include <CaloLevel1.h>
16 pam-fi 1.1 #include <CaloLevel2.h>
17     #include <ToFLevel2.h>
18     #include <TrigLevel2.h>
19     #include <S4Level2.h>
20     #include <NDLevel2.h>
21     #include <AcLevel2.h>
22 pam-fi 1.2 #include <OrbitalInfo.h>
23 pam-fi 1.4 #include <OrbitalInfo.h>
24     #include <RunInfo.h>
25     #include <GLTables.h>
26    
27 pam-fi 1.1
28     #include <TTree.h>
29 pam-fi 1.7 #include <TFriendElement.h>
30 pam-fi 1.2 #include <TChain.h>
31 pam-fi 1.1 #include <TFile.h>
32 pam-fi 1.2 #include <TList.h>
33     #include <TKey.h>
34     #include <TSystemFile.h>
35     #include <TSystemDirectory.h>
36 pam-fi 1.1
37     #include <iostream>
38     using namespace std;
39    
40     /**
41     * \brief Class to describe particle tracks in the apparatus, including tracker and track-related variables from other detectors (calorimeter and TOF).
42     *
43     * This class inherites from TrkTrack, CaloTrkVar ecc...
44     *
45     */
46     class PamTrack : public TrkTrack, public CaloTrkVar, public ToFTrkVar {
47    
48     private:
49    
50     TrkTrack* trk_track;
51     CaloTrkVar* calo_track;
52     ToFTrkVar* tof_track;
53    
54     public:
55    
56     PamTrack();
57    
58     PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar* );
59    
60 pam-fi 1.8 TrkTrack* GetTrkTrack(){return trk_track;};
61     CaloTrkVar* GetCaloTrack(){return calo_track;};
62     ToFTrkVar* GetToFTrack(){return tof_track;};
63    
64 pam-fi 1.1 ClassDef(PamTrack,1);
65     };
66    
67     /**
68     * \brief Class to describe PAMELA LEVEL2 data.
69     *
70     * This class inherites from TrkLevel2, CaloLevel2 ecc... and it overrides the TrkLevel2:GetTrack(int it) and TrkLevel2:GetTrackImage(int it) methods.
71     * This allows to solve the tracker ambiguity (that is, to choose between track images) by using also information from other detectors.
72     */
73    
74 pam-fi 1.7 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 pam-fi 1.1
76     private:
77 pam-fi 1.7 public:
78 pam-fi 1.1
79 pam-fi 1.6 TrkLevel1* trk1_obj;
80     TrkLevel2* trk2_obj;
81     TrkHough* trkh_obj;
82    
83     CaloLevel1* calo1_obj;
84     CaloLevel2* calo2_obj;
85    
86 pam-fi 1.2 ToFLevel2* tof_obj;
87     TrigLevel2* trig_obj;
88     S4Level2* s4_obj;
89     NDLevel2* nd_obj;
90     AcLevel2* ac_obj;
91 pam-fi 1.6 OrbitalInfo* orb_obj;
92 pam-fi 1.4
93 pam-fi 1.6 GL_RUN* run_obj;
94 pam-fi 1.1
95 pam-fi 1.7 /* TrkLevel1* trk1_clone; */
96     /* TrkLevel2* trk2_clone; */
97     /* TrkHough* trkh_clone; */
98    
99     /* 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 pam-fi 1.6 TRefArray* sorted_tracks;
121 pam-fi 1.4
122 pam-fi 1.6 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 pam-fi 1.1 PamLevel2();
137 pam-fi 1.6 ~PamLevel2();
138 pam-fi 1.2
139 pam-fi 1.6 void Clear();
140 pam-fi 1.2
141 pam-fi 1.7 /* TrkLevel1* GetTrkLevel1() { return trk1_obj; }; */
142     /* TrkLevel2* GetTrkLevel2() { return trk2_obj; }; */
143     /* TrkHough* GetTrkHough() { return trkh_obj; }; */
144     /* CaloLevel1* GetCaloLevel1() { return calo1_obj; }; */
145     /* CaloLevel2* GetCaloLevel2() { return calo2_obj; }; */
146     /* ToFLevel2* GetToFLevel2() { return tof_obj; }; */
147     /* TrigLevel2* GetTrigLevel2() { return trig_obj; }; */
148     /* S4Level2* GetS4Level2() { return s4_obj; }; */
149     /* NDLevel2* GetNDLevel2() { return nd_obj; }; */
150     /* AcLevel2* GetAcLevel2() { return ac_obj; }; */
151     /* OrbitalInfo* GetOrbitalInfo(){ return orb_obj; }; */
152     /* TrkLevel1* GetTrkLevel1() { return ; }; */
153     /* TrkLevel2* GetTrkLevel2() { return TrkLevel2::GetTrkLevel2(); }; */
154     /* TrkHough* GetTrkHough() { return TrkHough::GetTrkHough(); }; */
155     /* CaloLevel1* GetCaloLevel1() { return CaloLevel1::GetCaloLevel1(); }; */
156     /* CaloLevel2* GetCaloLevel2() { return CaloLevel2::GetCaloLevel2(); }; */
157     /* ToFLevel2* GetToFLevel2() { return ToFLevel2::GetToFLevel2(); }; */
158     /* TrigLevel2* GetTrigLevel2() { return TrigLevel2::GetTrigLevel2(); }; */
159     /* S4Level2* GetS4Level2() { return S4Level2::GetS4Level2(); }; */
160     /* NDLevel2* GetNDLevel2() { return NDLevel2::GetNDLevel2(); }; */
161     /* AcLevel2* GetAcLevel2() { return AcLevel2::GetAcLevel2(); }; */
162     /* OrbitalInfo* GetOrbitalInfo(){ return OrbitalInfo::GetOrbitalInfo(); }; */
163     GL_RUN* GetRunInfo() { return run_obj; };
164    
165     // =========================================
166     // methods needed to read/write Level2 trees
167     // =========================================
168 pam-fi 1.6 void SetWhichTrees(TString);
169 pam-fi 1.8 void GetWhichTrees(TFile*);
170    
171     TTree* GetPamTree(TFile*,TString);
172     TTree* GetPamTree(TFile* f){return GetPamTree(f,"");};
173    
174 pam-fi 1.6 TList* GetListOfLevel2Files(TString, TString);
175     Bool_t CheckLevel2File(TString);
176     TChain* GetPamTree(TList*,TString);
177 pam-fi 1.8 TChain* GetPamTree(TString ddir,TString list,TString detlist){ return GetPamTree(GetListOfLevel2Files(ddir,list),detlist); };
178     TChain* GetPamTree(TString ddir,TString list){ return GetPamTree(GetListOfLevel2Files(ddir,list),""); };
179    
180 pam-fi 1.6 TTree* GetRunTree(TFile*);
181     TChain* GetRunTree(TList*);
182 pam-fi 1.7
183 pam-fi 1.8 void CreateCloneTrees0(TChain *fChain, TFile* file);
184     void CreateCloneTrees(TFile* file);
185 pam-fi 1.7 void FillCloneTrees();
186     TTree *GetCloneTree(TString);
187     void WriteCloneTrees();
188    
189 pam-fi 1.6 void SetBranchAddress(TTree *);
190     void SetBranchAddress(TChain *);
191    
192 pam-fi 1.2 // =====================================
193     // methods needed to set brach addresses
194     // =====================================
195 pam-fi 1.7 /* void* GetPointerToTrk(); */
196     /* void* GetPointerToTrk(int s); */
197     /* void* GetPointerToCalo(); */
198     /* void* GetPointerToCalo(int s); */
199     /* void* GetPointerToToF(); */
200     /* void* GetPointerToTrig(); */
201     /* void* GetPointerToS4(); */
202     /* void* GetPointerToND(); */
203     /* void* GetPointerToAc(); */
204     /* void* GetPointerToOrb(); */
205     /* void* GetPointerToRun(); */
206 pam-fi 1.6 void* GetPointerTo(const char*);
207 pam-fi 1.3
208     // ==============================================
209     // methods to retrieve subdetectors stored tracks
210     // ==============================================
211 pam-fi 1.6 TrkTrack* GetTrkStoredTrack(int seqno){return TrkLevel2::GetStoredTrack(seqno); };
212     CaloTrkVar* GetCaloStoredTrack(int);
213     ToFTrkVar* GetToFStoredTrack(int);
214     //
215     PamTrack* GetPamTrackAlong(TrkTrack*);
216 pam-fi 1.3 // PamTrack* GetPamTrackAlong(CaloTrkVar*); //se serve
217     // PamTrack* GetPamTrackAlong(ToFTrkVar*); //se serve
218    
219 pam-fi 1.1 // =================================
220     // methods to retrieve pamela tracks
221     // =================================
222 pam-fi 1.3 PamTrack* GetStoredTrack(Int_t);
223 pam-fi 1.6 //
224     void SortTracks(TString); //assign value to variable sorted_tracks
225     TRefArray* GetTracks(); //return sorted_tracks
226     PamTrack* GetTrack(int);
227 pam-fi 1.1 PamTrack* GetTrackImage(int);
228 pam-fi 1.2
229 pam-fi 1.6 // =================================
230     // other methods
231     // =================================
232     Int_t ntrk(){ return TrkLevel2::ntrk(); };
233    
234    
235 pam-fi 1.1 ClassDef(PamLevel2,1);
236     };
237    
238     //===============================================================================================
239     //
240     //
241     //
242     //
243     //===============================================================================================
244    
245    
246     #endif
247    

  ViewVC Help
Powered by ViewVC 1.1.23