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

Annotation of /PamelaLevel2/inc/PamLevel2.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Tue Nov 28 10:58:34 2006 UTC (18 years ago) by pam-fi
Branch: MAIN
Changes since 1.5: +88 -60 lines
File MIME type: text/plain
implemented CaloLevel1, TrkHough and other things...

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.2 #include <TChain.h>
30 pam-fi 1.1 #include <TFile.h>
31 pam-fi 1.2 #include <TList.h>
32     #include <TKey.h>
33     #include <TSystemFile.h>
34     #include <TSystemDirectory.h>
35 pam-fi 1.1
36     #include <iostream>
37     using namespace std;
38    
39     /**
40     * \brief Class to describe particle tracks in the apparatus, including tracker and track-related variables from other detectors (calorimeter and TOF).
41     *
42     * This class inherites from TrkTrack, CaloTrkVar ecc...
43     *
44     */
45     class PamTrack : public TrkTrack, public CaloTrkVar, public ToFTrkVar {
46    
47     private:
48    
49     TrkTrack* trk_track;
50     CaloTrkVar* calo_track;
51     ToFTrkVar* tof_track;
52    
53     public:
54    
55     PamTrack();
56    
57     PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar* );
58    
59     ClassDef(PamTrack,1);
60     };
61    
62     /**
63     * \brief Class to describe PAMELA LEVEL2 data.
64     *
65     * This class inherites from TrkLevel2, CaloLevel2 ecc... and it overrides the TrkLevel2:GetTrack(int it) and TrkLevel2:GetTrackImage(int it) methods.
66     * This allows to solve the tracker ambiguity (that is, to choose between track images) by using also information from other detectors.
67     */
68    
69 pam-fi 1.6 class PamLevel2 : public CaloLevel2, public CaloLevel1, public TrkLevel2, public TrkLevel1, public TrkHough, public ToFLevel2, public TrigLevel2, public S4Level2, public NDLevel2, public AcLevel2, public OrbitalInfo {
70 pam-fi 1.1
71     private:
72    
73 pam-fi 1.6 TrkLevel1* trk1_obj;
74     TrkLevel2* trk2_obj;
75     TrkHough* trkh_obj;
76    
77     CaloLevel1* calo1_obj;
78     CaloLevel2* calo2_obj;
79    
80 pam-fi 1.2 ToFLevel2* tof_obj;
81     TrigLevel2* trig_obj;
82     S4Level2* s4_obj;
83     NDLevel2* nd_obj;
84     AcLevel2* ac_obj;
85 pam-fi 1.6 OrbitalInfo* orb_obj;
86 pam-fi 1.4
87 pam-fi 1.6 GL_RUN* run_obj;
88 pam-fi 1.1
89 pam-fi 1.6 TRefArray* sorted_tracks;
90 pam-fi 1.4
91 pam-fi 1.6 // TChain* Tout;
92 pam-fi 1.2
93 pam-fi 1.1 public:
94    
95 pam-fi 1.6 Bool_t CAL2; //level2 branch
96     Bool_t CAL1; //level1 branch
97    
98     Bool_t TRK2; //level2 branch
99     Bool_t TRK1; //level1 branch
100     Bool_t TRKh; //hough branch
101    
102     Bool_t TRG;
103     Bool_t TOF;
104     Bool_t S4;
105     Bool_t ND;
106     Bool_t AC;
107     Bool_t ORB;
108    
109 pam-fi 1.1 PamLevel2();
110 pam-fi 1.6 ~PamLevel2();
111 pam-fi 1.2
112 pam-fi 1.6 void Clear();
113 pam-fi 1.2
114 pam-fi 1.6 TrkLevel1* GetTrkLevel1() { return trk1_obj; };
115     TrkLevel2* GetTrkLevel2() { return trk2_obj; };
116     TrkHough* GetTrkHough() { return trkh_obj; };
117     CaloLevel1* GetCaloLevel1() { return calo1_obj; };
118     CaloLevel2* GetCaloLevel2() { return calo2_obj; };
119 pam-fi 1.2 ToFLevel2* GetToFLevel2() { return tof_obj; };
120     TrigLevel2* GetTrigLevel2() { return trig_obj; };
121     S4Level2* GetS4Level2() { return s4_obj; };
122     NDLevel2* GetNDLevel2() { return nd_obj; };
123     AcLevel2* GetAcLevel2() { return ac_obj; };
124 pam-fi 1.6 OrbitalInfo* GetOrbitalInfo(){ return orb_obj; };
125     GL_RUN* GetRunInfo() { return run_obj; };
126 pam-fi 1.4
127 pam-fi 1.2 // =====================================
128     // methods needed to read Level2 trees
129     // =====================================
130 pam-fi 1.6 void SetWhichTrees(TString);
131     TList* GetListOfLevel2Files(TString, TString);
132     Bool_t CheckLevel2File(TString);
133     // void SetBranchAddress();
134     TTree* GetPamTree(TFile*,TString);
135     TTree* GetPamTree(TFile* f){return GetPamTree(f,"+ALL");};
136     TChain* GetPamTree(TList*,TString);
137     TTree* GetRunTree(TFile*);
138     TChain* GetRunTree(TList*);
139 pam-fi 1.1
140 pam-fi 1.6 void SetBranchAddress(TTree *);
141     void SetBranchAddress(TChain *);
142    
143 pam-fi 1.2 // =====================================
144     // methods needed to set brach addresses
145     // =====================================
146 pam-fi 1.6 void* GetPointerToTrk() {return &trk2_obj;};
147     void* GetPointerToTrk(int s){
148     switch (s) {
149     case 1: return &trk1_obj;
150     case 2: return &trk2_obj;
151     case 3: return &trkh_obj;
152     default: return 0;
153 pam-fi 1.4 };
154 pam-fi 1.6 };
155     void* GetPointerToCalo() {return &calo2_obj; };
156     void* GetPointerToCalo(int s){
157     switch (s) {
158     case 1: return &calo1_obj;
159     case 2: return &calo2_obj;
160     default: return 0;
161     };
162     };
163     void* GetPointerToToF() {return &tof_obj; };
164     void* GetPointerToTrig() {return &trig_obj; };
165     void* GetPointerToS4() {return &s4_obj; };
166     void* GetPointerToND() {return &nd_obj; };
167     void* GetPointerToAc() {return &ac_obj; };
168     void* GetPointerToOrb() {return &orb_obj; };
169     void* GetPointerToRun() {return &run_obj; };
170     void* GetPointerTo(const char*);
171 pam-fi 1.3
172     // ==============================================
173     // methods to retrieve subdetectors stored tracks
174     // ==============================================
175 pam-fi 1.6 TrkTrack* GetTrkStoredTrack(int seqno){return TrkLevel2::GetStoredTrack(seqno); };
176     CaloTrkVar* GetCaloStoredTrack(int);
177     ToFTrkVar* GetToFStoredTrack(int);
178     //
179     PamTrack* GetPamTrackAlong(TrkTrack*);
180 pam-fi 1.3 // PamTrack* GetPamTrackAlong(CaloTrkVar*); //se serve
181     // PamTrack* GetPamTrackAlong(ToFTrkVar*); //se serve
182    
183 pam-fi 1.1 // =================================
184     // methods to retrieve pamela tracks
185     // =================================
186 pam-fi 1.3 PamTrack* GetStoredTrack(Int_t);
187 pam-fi 1.6 //
188     void SortTracks(TString); //assign value to variable sorted_tracks
189     TRefArray* GetTracks(); //return sorted_tracks
190     PamTrack* GetTrack(int);
191 pam-fi 1.1 PamTrack* GetTrackImage(int);
192 pam-fi 1.2
193 pam-fi 1.6 // =================================
194     // other methods
195     // =================================
196     Int_t ntrk(){ return TrkLevel2::ntrk(); };
197    
198    
199 pam-fi 1.1 ClassDef(PamLevel2,1);
200     };
201    
202     //===============================================================================================
203     //
204     //
205     //
206     //
207     //===============================================================================================
208    
209    
210     #endif
211    

  ViewVC Help
Powered by ViewVC 1.1.23