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

Annotation of /PamelaLevel2/inc/PamLevel2.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (hide annotations) (download)
Mon Jan 15 11:51:40 2007 UTC (17 years, 10 months ago) by pam-fi
Branch: MAIN
Changes since 1.9: +46 -70 lines
File MIME type: text/plain
v3r00 **NEW**

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 pam-fi 1.10 //class PamTrack : public TrkTrack, public CaloTrkVar, public ToFTrkVar {
47     class PamTrack : public TObject {
48 pam-fi 1.1
49     private:
50    
51     TrkTrack* trk_track;
52     CaloTrkVar* calo_track;
53     ToFTrkVar* tof_track;
54    
55 pam-fi 1.10 bool candeleteobj;
56    
57     // TClonesArray *Cluster; ///< clusters (if stored)
58    
59 pam-fi 1.1 public:
60    
61     PamTrack();
62 pam-fi 1.10 PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar* );
63     PamTrack(const PamTrack&);
64     ~PamTrack(){ Delete(); };
65 pam-fi 1.1
66 pam-fi 1.10 void Clear();
67     void Clear(Option_t *option){Clear();};
68     void Delete();
69 pam-fi 1.1
70 pam-fi 1.10 TrkTrack* GetTrkTrack(){return trk_track;};
71 pam-fi 1.8 CaloTrkVar* GetCaloTrack(){return calo_track;};
72 pam-fi 1.10 ToFTrkVar* GetToFTrack(){return tof_track;};
73 pam-fi 1.8
74 pam-fi 1.1 ClassDef(PamTrack,1);
75     };
76    
77     /**
78     * \brief Class to describe PAMELA LEVEL2 data.
79     *
80     * This class inherites from TrkLevel2, CaloLevel2 ecc... and it overrides the TrkLevel2:GetTrack(int it) and TrkLevel2:GetTrackImage(int it) methods.
81     * This allows to solve the tracker ambiguity (that is, to choose between track images) by using also information from other detectors.
82     */
83    
84 pam-fi 1.10 //class PamLevel2 : public CaloLevel2, public CaloLevel1, public ToFLevel2, public TrkLevel2, public TrkLevel1, public TrkHough, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2, public OrbitalInfo {
85     class PamLevel2 : public TObject {
86 pam-fi 1.1
87     private:
88 pam-fi 1.7 public:
89 pam-fi 1.1
90 pam-fi 1.6 TrkLevel1* trk1_obj;
91     TrkLevel2* trk2_obj;
92     TrkHough* trkh_obj;
93    
94     CaloLevel1* calo1_obj;
95     CaloLevel2* calo2_obj;
96    
97 pam-fi 1.2 ToFLevel2* tof_obj;
98     TrigLevel2* trig_obj;
99     S4Level2* s4_obj;
100     NDLevel2* nd_obj;
101     AcLevel2* ac_obj;
102 pam-fi 1.6 OrbitalInfo* orb_obj;
103 pam-fi 1.4
104 pam-fi 1.6 GL_RUN* run_obj;
105 pam-fi 1.1
106 pam-fi 1.10 TTree* tree_clone[8];
107    
108     // TRefArray* sorted_tracks;
109     // TRefArray sorted_tracks;
110    
111     TClonesArray *tsorted;
112     TClonesArray *timage;
113    
114    
115     PamTrack *track; //store the last required
116 pam-fi 1.7
117    
118 pam-fi 1.6 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 pam-fi 1.9
132     Bool_t RUN;
133 pam-fi 1.6
134 pam-fi 1.1 PamLevel2();
135 pam-fi 1.10 ~PamLevel2(){Delete();};
136 pam-fi 1.2
137 pam-fi 1.6 void Clear();
138 pam-fi 1.10 void Delete();
139 pam-fi 1.2
140 pam-fi 1.7 GL_RUN* GetRunInfo() { return run_obj; };
141    
142     // =========================================
143     // methods needed to read/write Level2 trees
144     // =========================================
145 pam-fi 1.6 void SetWhichTrees(TString);
146 pam-fi 1.8 void GetWhichTrees(TFile*);
147    
148     TTree* GetPamTree(TFile*,TString);
149     TTree* GetPamTree(TFile* f){return GetPamTree(f,"");};
150    
151 pam-fi 1.6 TList* GetListOfLevel2Files(TString, TString);
152     Bool_t CheckLevel2File(TString);
153     TChain* GetPamTree(TList*,TString);
154 pam-fi 1.8 TChain* GetPamTree(TString ddir,TString list,TString detlist){ return GetPamTree(GetListOfLevel2Files(ddir,list),detlist); };
155     TChain* GetPamTree(TString ddir,TString list){ return GetPamTree(GetListOfLevel2Files(ddir,list),""); };
156    
157 pam-fi 1.6 TTree* GetRunTree(TFile*);
158     TChain* GetRunTree(TList*);
159 pam-fi 1.7
160 pam-fi 1.8 void CreateCloneTrees0(TChain *fChain, TFile* file);
161     void CreateCloneTrees(TFile* file);
162 pam-fi 1.7 void FillCloneTrees();
163     TTree *GetCloneTree(TString);
164     void WriteCloneTrees();
165    
166 pam-fi 1.6 void SetBranchAddress(TTree *);
167     void SetBranchAddress(TChain *);
168    
169 pam-fi 1.10 // ========================================================
170     // methods needed to retrieve subdetector general variables
171     // ========================================================
172 pam-fi 1.6 void* GetPointerTo(const char*);
173 pam-fi 1.10 TrkLevel1 *GetTrkLevel1() { return trk1_obj;};
174     TrkLevel2 *GetTrkLevel2() { return trk2_obj;};
175     TrkHough *GetTrkHough() { return trkh_obj;};
176     CaloLevel1 *GetCaloLevel1() { return calo1_obj;};
177     CaloLevel2 *GetCaloLevel2() { return calo2_obj;};
178     ToFLevel2 *GetToFLevel2() { return tof_obj;};
179     TrigLevel2 *GetTrigLevel2() { return trig_obj;};
180     S4Level2 *GetS4Level2() { return s4_obj;};
181     NDLevel2 *GetNDLevel2() { return nd_obj;};
182     AcLevel2 *GetAcLevel2() { return ac_obj;};
183     OrbitalInfo *GetOrbitalInfo(){ return orb_obj;};
184 pam-fi 1.3
185     // ==============================================
186     // methods to retrieve subdetectors stored tracks
187     // ==============================================
188 pam-fi 1.10 TrkTrack* GetTrkStoredTrack(int seqno){return trk2_obj->TrkLevel2::GetStoredTrack(seqno); };
189 pam-fi 1.6 CaloTrkVar* GetCaloStoredTrack(int);
190     ToFTrkVar* GetToFStoredTrack(int);
191     //
192     PamTrack* GetPamTrackAlong(TrkTrack*);
193 pam-fi 1.3 // PamTrack* GetPamTrackAlong(CaloTrkVar*); //se serve
194     // PamTrack* GetPamTrackAlong(ToFTrkVar*); //se serve
195    
196 pam-fi 1.1 // =================================
197     // methods to retrieve pamela tracks
198     // =================================
199 pam-fi 1.3 PamTrack* GetStoredTrack(Int_t);
200 pam-fi 1.6 //
201     void SortTracks(TString); //assign value to variable sorted_tracks
202 pam-fi 1.10 // TRefArray* GetTracks(); //return sorted_tracks
203     TClonesArray* GetTracks(); //return sorted_tracks
204 pam-fi 1.6 PamTrack* GetTrack(int);
205 pam-fi 1.1 PamTrack* GetTrackImage(int);
206 pam-fi 1.2
207 pam-fi 1.6 // =================================
208     // other methods
209     // =================================
210 pam-fi 1.10 // Int_t ntrk(){ return trk2_obj->TrkLevel2::ntrk(); };
211 pam-fi 1.6
212    
213 pam-fi 1.1 ClassDef(PamLevel2,1);
214     };
215    
216     //===============================================================================================
217     //
218     //
219     //
220     //
221     //===============================================================================================
222    
223    
224     #endif
225    

  ViewVC Help
Powered by ViewVC 1.1.23