/[PAMELA software]/DarthVader/CalorimeterLevel2/inc/CaloLevel2.h
ViewVC logotype

Annotation of /DarthVader/CalorimeterLevel2/inc/CaloLevel2.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.24 - (hide annotations) (download)
Wed Oct 15 12:06:21 2014 UTC (10 years, 1 month ago) by pam-fi
Branch: MAIN
CVS Tags: v10RED, v10REDr01, HEAD
Changes since 1.23: +3 -0 lines
File MIME type: text/plain
*** empty log message ***

1 mocchiut 1.1 /**
2     * \file inc/CaloLevel2.h
3     * \author Emiliano Mocchiutti
4     */
5     #ifndef CaloLevel2_h
6     #define CaloLevel2_h
7     //
8     #include <TObject.h>
9     #include <TClonesArray.h>
10 mocchiut 1.9 #include <TArrayI.h>
11 mocchiut 1.1 //
12 mocchiut 1.17 #include <math.h>
13 pam-fi 1.24 #include <string.h>//ELENA
14    
15 mocchiut 1.17 //
16 pam-fi 1.5 #include <CaloStruct.h>
17 mocchiut 1.10 //
18    
19 mocchiut 1.1 /**
20     * \brief Calorimeter track-related variables class
21     *
22     * This class contains track-related variables. One set of variables is saved for any given
23     * track, including seltrigger event tracks.
24     *
25     */
26     class CaloTrkVar : public TObject {
27    
28     private:
29    
30     public:
31     //
32 mocchiut 1.9 Int_t trkseqno; ///< this variable determine which track and which routine was used to obtain track related variables: if >= 0 standard routine/tracker track, -1 selftrigger event routine/calorimeter track, -2 high Z nuclei routine/calorimeter track, -3 standard routine/calorimeter track
33 mocchiut 1.1 //
34     // track related variables
35     //
36     Int_t ncore; ///< SUM(j=1,2)SUM(i=1,PLmax) Nhit(i,j)*i , where Nhit(i,j) is the number of hits in a cylinder of radius 2 Rm (Moliere radius) around the track in the i-th plane (where the top plane is number 1 and the sum runs up to plane number PLmax, closest to the calculated electromagnetic shower maximum of the j-th view)
37     Int_t noint; ///< SUM(j=1,2)SUM(i=1,22) TH(i,j)*i , where TH(i,j) = 1 if the i-th plane of the j-th view has a cluster along (less than 4 mm away) the track with a deposited energy typical of a proton (order of one MIP), otherwise TH(i,j) = 0
38     Int_t ncyl; ///< the number of strip hit in a cylinder of radius 8 strips around the shower axis
39 mocchiut 1.2 Int_t nlast; ///< the same as "ncyl" but only for the last four planes and radius 4 strips.
40 mocchiut 1.1 Int_t npre; ///< the same as "ncyl" but only for the first three planes
41     Int_t npresh; ///< the same as "ncyl" but with radius 2 strips and only in the first four planes
42     Int_t ntr; ///< the same as "ncyl" but with radius 4 strips
43     Int_t planetot; ///< number of planes used to calculate the energy truncated mean "qmean"
44 mocchiut 1.9 Int_t nlow; ///< the same as "nstrip" but only after the calculated electromagnetic shower maximum
45 mocchiut 1.13 Int_t tibar[22][2]; ///< strip traversed by the trajectory as measured by the tracker or by the selftrigger when trkseqno = -1
46     Float_t tbar[22][2]; ///< position in cm as measured by the tracker or by the selftrigger when trkseqno = -1
47 mocchiut 1.1 Float_t qcore; ///< SUM(j=1,2)SUM(i=1,PLmax) Qhit(i,j)*i , where Qhit(i,j) is the energy released (MIP) in a cylinder of radius 2 Rm (Moliere radius) around the track in the i-th plane (where the top plane is number 1 and the sum runs up to plane number PLmax, closest to the calculated electromagnetic shower maximum of the j-th view).
48     Float_t qcyl; ///< the measured energy deposited in a cylinder of radius 8 strips around the shower axis
49 mocchiut 1.2 Float_t qlast; ///< the same as "qcyl" but only for the last four planes and radius 4 strips.
50 mocchiut 1.1 Float_t qpre; ///< the same as "qcyl" but only for the first three planes
51     Float_t qpresh; ///< the same as "qcyl" but with radius 2 strips and only in the first four planes
52     Float_t qtr; ///< the same as "qcyl" but with radius 4 strips
53     Float_t qtrack; ///< the energy deposited in the strip closest to the track and the neighbouring strip on each side
54     Float_t qtrackx; ///< measured energy in clusters along the track in the x-view
55     Float_t qtracky; ///< measured energy in clusters along the track in the y-view
56     Float_t dxtrack; ///< measured energy outside the clusters along the track in the x-view
57     Float_t dytrack; ///< measured energy outside the clusters along the track in the y-view
58     Float_t qmean; ///< the energy truncated mean that is the average energy deposit for the five planes with the smaller energy deposit of the whole calorimeter
59 mocchiut 1.9 Float_t qlow; ///< the same as "qtot" but only after the calculated electromagnetic shower maximum
60 mocchiut 1.2 Float_t dX0l; ///< tranversed X0 lenght
61 mocchiut 1.1 //
62     CaloTrkVar(); ///< Constructor.
63     /**
64     * \param trkvar Object of the class CaloTrkVar
65     */
66     CaloTrkVar(const CaloTrkVar &trkvar); ///< copy values from trkvar to this
67     //
68 mocchiut 1.18 void Clear(Option_t *t=""); ///< clear variables
69 pam-fi 1.22 CaloTrkVar* GetCaloTrkVar(){return this;} ///< returns pointer to this object
70 mocchiut 1.1 //
71 mocchiut 1.8 ClassDef(CaloTrkVar,2);
72 mocchiut 1.1 //
73     };
74    
75     /**
76     * \brief Calorimeter level2 class
77     *
78     * This class contains level2 calorimeter variables
79     *
80     **/
81     class CaloLevel2 : public TObject {
82     private:
83     TClonesArray *CaloTrk; ///< track related variables
84    
85     public:
86     //
87     // general variables
88     //
89     Int_t good; ///< no errors (perr, swerr and crc are checked)
90     Int_t perr[4]; ///< processing errors (one for each calorimeter section)
91     Int_t swerr[4];///< DSP status word
92     Int_t crc[4]; ///< CRC errors on data
93 mocchiut 1.21 Int_t selftrigger;///< self-trigger flag: 0 tof trigger, 2 selftrigger event, 3 selftrigger + tof trigger, 102 selftrigger event not stored in the selfdelay array NB: selftrigger == S4 trigger || no trigger || calo trigger in the triggerconf array
94 mocchiut 1.1 //
95     // common variables (not related to tracks)
96     //
97     Int_t nstrip; ///< total number of strip hit
98 mocchiut 1.19 Int_t nsatstrip; ///< total number of strip hit with saturated signal
99 mocchiut 1.1 Int_t nx22; ///< number of strip hit in the last silicon plane of the calorimeter (x view number 22)
100     Int_t planemax[2]; ///< plane of maximum energy release (x and y)
101 mocchiut 1.16 Int_t selfdelay[4][7]; ///< Delay of the selftrigger planes + coincidence for every section
102 mocchiut 1.1 Float_t qtot; ///< total energy detected (MIP)
103     Float_t qx22; ///< energy detected in the last silicon plane of the calorimeter (x view number 22)
104     Float_t qmax; ///< the maximum energy detected in a strip
105     Float_t qq[4]; ///< the energy released in the first half of each of the four calorimeter sections
106     //
107     // Fit variables
108     //
109 mocchiut 1.13 Int_t npcfit[4]; ///< number of point used to perform the fit for the two views (0,1 calo fit, 2,3 selftrigger fit if any)
110     Float_t varcfit[4]; ///< variance of the calorimeter fit for the two views (0,1 calo fit, 2,3 selftrigger fit if any)
111     Float_t tanx[2]; ///< the tangent of the angle in the x direction as determined by the track fitted in the calorimeter (0 calo fit, 1 selftrigger fit)
112     Float_t tany[2]; ///< the tangent of the angle in the x direction as determined by the track fitted in the calorimeter (0 calo fit, 1 selftrigger fit)
113     Int_t fitmode[2]; ///< for x and y is 0 if the fit was performed with the "electron" algorithm, is 1 if the fit was performed with the "nuclei" algorithm
114     Int_t cibar[22][2]; ///< strip traversed by the trajectory as measured by the calorimeter (calo fit)
115     Float_t cbar[22][2]; ///< position in cm as measured by the calorimeter (calo fit)
116 mocchiut 1.1 //
117     // Energy variables
118     //
119     Float_t elen; ///< energy in GeV assuming an electron interaction (from simulations).
120     Float_t selen; ///< sigma of the energy
121     //
122     // track related variables: inline methods
123     //
124 pam-fi 1.22 Int_t ntrk(){return CaloTrk->GetEntries();} ///< number of saved blocks of track-related variables
125 mocchiut 1.1 //
126     // METHODS
127     //
128 mocchiut 1.13 Float_t impx(Int_t tr); ///< the x impact position on the first plane as determined by the track fitted in the calorimeter ( tr = 0 calo fit, tr = 1 selftrigger fit)
129     Float_t impy(Int_t tr); ///< the y impact position on the first plane as determined by the track fitted in the calorimeter ( tr = 0 calo fit, tr = 1 selftrigger fit)
130    
131 pam-ts 1.23 TClonesArray** GetPointerToTrackArray(){return &CaloTrk;}///< returns pointer to pointer to the track array
132 pam-fi 1.24 void SetTrackArray(TClonesArray *track);///<set pointer to the track array
133 pam-ts 1.23
134 mocchiut 1.13 //
135 mocchiut 1.1 void GetElectronEnergy(Float_t &energy, Float_t &sigma); ///< returns energy and sigma using qtot and assuming the particle being an electron
136     //
137 mocchiut 1.9 CaloTrkVar *GetCaloTrkVar(Int_t notrack); ///< returns a pointer to the CaloTrkVar class containing track related variables for track number notrack
138 mocchiut 1.15 CaloTrkVar* GetCaloStoredTrack(Int_t seqno); ///< returns pointer to the track set related to the seqno number
139 mocchiut 1.9 //
140 pam-fi 1.22 TClonesArray *GetTrackArray(){return CaloTrk;} ///< returns a pointer to the track related variables array
141     CaloLevel2* GetCaloLevel2(){return this;} ///< returns pointer to this object
142 mocchiut 1.1 //
143 pam-fi 1.5 void GetLevel2Struct(cCaloLevel2 *l2) const;
144 mocchiut 1.9 //
145 mocchiut 1.18 void Clear(Option_t *t="");
146     void Delete(Option_t *t=""); //ELENA
147 pam-fi 1.12 void Set(); //ELENA
148 mocchiut 1.20 Bool_t IsGood(Bool_t strict = false); // method to check if the event is good or not
149 mocchiut 1.4 //
150 mocchiut 1.1 // constructor
151     //
152 mocchiut 1.6 CaloLevel2(); ///< Constructor.
153 pam-fi 1.22 ~CaloLevel2(){Delete();} //ELENA
154 mocchiut 1.1 //
155 mocchiut 1.14 friend class CaloLevel0;
156 mocchiut 1.1 //
157 mocchiut 1.21 ClassDef(CaloLevel2,6);
158 mocchiut 1.1 };
159    
160     #endif

  ViewVC Help
Powered by ViewVC 1.1.23