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

Annotation of /PamelaLevel2/inc/PamLevel2.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Mon Oct 9 08:57:41 2006 UTC (18 years, 2 months ago) by pam-fi
Branch: MAIN
Changes since 1.4: +1 -6 lines
File MIME type: text/plain
some bugs fixed + added RunInfo and TrkLevel2

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

  ViewVC Help
Powered by ViewVC 1.1.23