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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Fri May 19 13:15:49 2006 UTC revision 1.22 by pam-fi, Fri Sep 2 14:49:02 2011 UTC
# Line 7  Line 7 
7  //  //
8  #include <TObject.h>  #include <TObject.h>
9  #include <TClonesArray.h>  #include <TClonesArray.h>
10  #include <TArrayF.h>  #include <TArrayI.h>
11  //  //
12    #include <math.h>
13    //
14    #include <CaloStruct.h>
15    //
16    
17  /**  /**
18   * \brief Calorimeter track-related variables class   * \brief Calorimeter track-related variables class
19   *   *
# Line 22  private: Line 27  private:
27    
28  public:  public:
29      //      //
30      Int_t trkseqno; ///< tracker entry coming from tracker, -1 if selftrigger event, 100 if image track is used, -100 if the track is not consistent with calorimeter one      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
31      //      //
32      // track related variables      // track related variables
33      //      //
34      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)      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)
35      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      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
36      Int_t ncyl;      ///< the number of strip hit in a cylinder of radius 8 strips around the shower axis      Int_t ncyl;      ///< the number of strip hit in a cylinder of radius 8 strips around the shower axis
37      Int_t nlast;     ///< the same as "ncyl" but only for the last four planes.      Int_t nlast;     ///< the same as "ncyl" but only for the last four planes and radius 4 strips.
38      Int_t npre;      ///< the same as "ncyl" but only for the first three planes      Int_t npre;      ///< the same as "ncyl" but only for the first three planes
39      Int_t npresh;    ///< the same as "ncyl" but with radius 2 strips and only in the first four planes      Int_t npresh;    ///< the same as "ncyl" but with radius 2 strips and only in the first four planes
40      Int_t ntr;       ///< the same as "ncyl" but with radius 4 strips      Int_t ntr;       ///< the same as "ncyl" but with radius 4 strips
41      Int_t planetot;  ///< number of planes used to calculate the energy truncated mean "qmean"      Int_t planetot;  ///< number of planes used to calculate the energy truncated mean "qmean"
42      Int_t nlow;      ///< the same as "nstrip" but below the calculated electromagnetic shower maximum      Int_t nlow;      ///< the same as "nstrip" but only after the calculated electromagnetic shower maximum
43      Int_t tibar[22][2];  ///< strip traversed by the trajectory as measured by the tracker      Int_t tibar[22][2];  ///< strip traversed by the trajectory as measured by the tracker or by the selftrigger when trkseqno = -1
44      Float_t tbar[22][2]; ///< position in cm as measured by the tracker      Float_t tbar[22][2]; ///< position in cm as measured by the tracker or by the selftrigger when trkseqno = -1
45      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).      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).
46      Float_t qcyl;    ///< the measured energy deposited in a cylinder of radius 8 strips around the shower axis      Float_t qcyl;    ///< the measured energy deposited in a cylinder of radius 8 strips around the shower axis
47      Float_t qlast;   ///< the same as "qcyl" but only for the last four planes.      Float_t qlast;   ///< the same as "qcyl" but only for the last four planes and radius 4 strips.
48      Float_t qpre;    ///< the same as "qcyl" but only for the first three planes      Float_t qpre;    ///< the same as "qcyl" but only for the first three planes
49      Float_t qpresh;  ///< the same as "qcyl" but with radius 2 strips and only in the first four planes      Float_t qpresh;  ///< the same as "qcyl" but with radius 2 strips and only in the first four planes
50      Float_t qtr;     ///< the same as "qcyl" but with radius 4 strips      Float_t qtr;     ///< the same as "qcyl" but with radius 4 strips
# Line 49  public: Line 54  public:
54      Float_t dxtrack; ///< measured energy outside the clusters along the track in the x-view      Float_t dxtrack; ///< measured energy outside the clusters along the track in the x-view
55      Float_t dytrack; ///< measured energy outside the clusters along the track in the y-view      Float_t dytrack; ///< measured energy outside the clusters along the track in the y-view
56      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      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
57      Float_t qlow;    ///< the same as "qstrip" but below the calculated electromagnetic shower maximum      Float_t qlow;    ///< the same as "qtot" but only after the calculated electromagnetic shower maximum
58      Float_t dX0l;    ///< traversed X0 lenght      Float_t dX0l;    ///< tranversed X0 lenght
59      //      //
60      CaloTrkVar(); ///< Constructor.      CaloTrkVar(); ///< Constructor.
61      /**      /**
# Line 58  public: Line 63  public:
63       */       */
64      CaloTrkVar(const CaloTrkVar &trkvar); ///< copy values from trkvar to this      CaloTrkVar(const CaloTrkVar &trkvar); ///< copy values from trkvar to this
65      //      //
66      CaloTrkVar* GetCaloTrkVar(){return this;}; ///< returns pointer to this object      void Clear(Option_t *t=""); ///< clear variables
67        CaloTrkVar* GetCaloTrkVar(){return this;} ///< returns pointer to this object
68      //      //
69      ClassDef(CaloTrkVar,1);      ClassDef(CaloTrkVar,2);
70      //      //
71  };  };
72    
# Line 82  class CaloLevel2 : public TObject { Line 88  class CaloLevel2 : public TObject {
88      Int_t perr[4]; ///< processing errors (one for each calorimeter section)      Int_t perr[4]; ///< processing errors (one for each calorimeter section)
89      Int_t swerr[4];///< DSP status word      Int_t swerr[4];///< DSP status word
90      Int_t crc[4];  ///< CRC errors on data      Int_t crc[4];  ///< CRC errors on data
91      Int_t selftrigger;///< self-trigger flag (1 selftrigger event, 0 normal event)      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
92      //      //
93      // common variables (not related to tracks)      // common variables (not related to tracks)
94      //      //
95      Int_t nstrip;      ///< total number of strip hit      Int_t nstrip;      ///< total number of strip hit
96        Int_t nsatstrip;   ///< total number of strip hit with saturated signal
97      Int_t nx22;        ///< number of strip hit in the last silicon plane of the calorimeter (x view number 22)      Int_t nx22;        ///< number of strip hit in the last silicon plane of the calorimeter (x view number 22)
98      Int_t planemax[2]; ///< plane of maximum energy release (x and y)      Int_t planemax[2]; ///< plane of maximum energy release (x and y)
99        Int_t selfdelay[4][7]; ///< Delay of the selftrigger planes + coincidence for every section
100      Float_t qtot;      ///< total energy detected (MIP)      Float_t qtot;      ///< total energy detected (MIP)
101      Float_t qx22;      ///< energy detected in the last silicon plane of the calorimeter (x view number 22)      Float_t qx22;      ///< energy detected in the last silicon plane of the calorimeter (x view number 22)
102      Float_t qmax;      ///< the maximum energy detected in a strip      Float_t qmax;      ///< the maximum energy detected in a strip
# Line 96  class CaloLevel2 : public TObject { Line 104  class CaloLevel2 : public TObject {
104      //      //
105      // Fit variables      // Fit variables
106      //      //
107      Int_t npcfit[2];     ///< number of point used to perform the fit for the two views      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)
108      Int_t cibar[22][2];  ///< strip traversed by the trajectory as measured by the calorimeter      Float_t varcfit[4];  ///< variance of the calorimeter fit for the two views (0,1 calo fit, 2,3 selftrigger fit if any)
109      Float_t cbar[22][2]; ///< position in cm as measured by the calorimeter      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)
110      Float_t impx;        ///< the x impact position on the first plane as determined by the track fitted in the calorimeter      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)
111      Float_t impy;        ///< the y impact position on the first plane as determined by the track fitted in the calorimeter      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
112      Float_t tanx;        ///< the tangent of the angle in the x direction as determined by the track fitted in the calorimeter      Int_t cibar[22][2];  ///< strip traversed by the trajectory as measured by the calorimeter (calo fit)
113      Float_t tany;        ///< the tangent of the angle in the x direction as determined by the track fitted in the calorimeter      Float_t cbar[22][2]; ///< position in cm as measured by the calorimeter (calo fit)
     Float_t varcfit[2];  ///< variance of the calorimeter fit for the two views  
114      //      //
115      // Energy variables      // Energy variables
116      //      //
# Line 112  class CaloLevel2 : public TObject { Line 119  class CaloLevel2 : public TObject {
119      //      //
120      // track related variables: inline methods      // track related variables: inline methods
121      //      //
122      Int_t ntrk()                                       {return CaloTrk->GetEntries();};  ///< number of saved blocks of track-related variables      Int_t ntrk(){return CaloTrk->GetEntries();}  ///< number of saved blocks of track-related variables
     Int_t trkseqno(Int_t entry)                        {return (((CaloTrkVar *)CaloTrk->At(entry))->trkseqno);}; ///< extract trkseqno  
     Int_t ncore(Int_t entry)                           {return (((CaloTrkVar *)CaloTrk->At(entry))->ncore);}; ///< extract ncore  
     Int_t noint(Int_t entry)                           {return (((CaloTrkVar *)CaloTrk->At(entry))->noint);}; ///< extract noint  
     Int_t ncyl(Int_t entry)                            {return (((CaloTrkVar *)CaloTrk->At(entry))->ncyl);}; ///< extract ncyl  
     Int_t nlast(Int_t entry)                           {return (((CaloTrkVar *)CaloTrk->At(entry))->nlast);}; ///< extract nlast  
     Int_t npre(Int_t entry)                            {return (((CaloTrkVar *)CaloTrk->At(entry))->npre);}; ///< extract npre  
     Int_t npresh(Int_t entry)                          {return (((CaloTrkVar *)CaloTrk->At(entry))->npresh);}; ///< extract npresh  
     Int_t ntr(Int_t entry)                             {return (((CaloTrkVar *)CaloTrk->At(entry))->ntr);}; ///< extract ntr  
     Int_t nlow(Int_t entry)                            {return (((CaloTrkVar *)CaloTrk->At(entry))->nlow);}; ///< extract nlow  
     Int_t planetot(Int_t entry)                        {return (((CaloTrkVar *)CaloTrk->At(entry))->planetot);}; ///< extract planetot  
     Int_t tibar(Int_t entry, Int_t plane, Int_t view)  {return (((CaloTrkVar *)CaloTrk->At(entry))->tibar[plane][view]);}; ///< extract tibar  
     Float_t tbar(Int_t entry, Int_t plane, Int_t view) {return (((CaloTrkVar *)CaloTrk->At(entry))->tbar[plane][view]);}; ///< extract tbar  
     Float_t qcore(Int_t entry)                         {return (((CaloTrkVar *)CaloTrk->At(entry))->qcore);}; ///< extract qcore  
     Float_t qcyl(Int_t entry)                          {return (((CaloTrkVar *)CaloTrk->At(entry))->qcyl);}; ///< extract qcyl  
     Float_t qlast(Int_t entry)                         {return (((CaloTrkVar *)CaloTrk->At(entry))->qlast);}; ///< extract qlast  
     Float_t qpre(Int_t entry)                          {return (((CaloTrkVar *)CaloTrk->At(entry))->qpre);}; ///< extract qpre  
     Float_t qpresh(Int_t entry)                        {return (((CaloTrkVar *)CaloTrk->At(entry))->qpresh);}; ///< extract qpresh  
     Float_t qtr(Int_t entry)                           {return (((CaloTrkVar *)CaloTrk->At(entry))->qtr);}; ///< extract qtr  
     Float_t qtrack(Int_t entry)                        {return (((CaloTrkVar *)CaloTrk->At(entry))->qtrack);}; ///< extract qtrack  
     Float_t qtrackx(Int_t entry)                       {return (((CaloTrkVar *)CaloTrk->At(entry))->qtrackx);}; ///< extract qtrackx  
     Float_t qtracky(Int_t entry)                       {return (((CaloTrkVar *)CaloTrk->At(entry))->qtracky);}; ///< extract qtracky  
     Float_t dxtrack(Int_t entry)                       {return (((CaloTrkVar *)CaloTrk->At(entry))->dxtrack);}; ///< extract dxtrack  
     Float_t dytrack(Int_t entry)                       {return (((CaloTrkVar *)CaloTrk->At(entry))->dytrack);}; ///< extract dytrack  
     Float_t qmean(Int_t entry)                         {return (((CaloTrkVar *)CaloTrk->At(entry))->qmean);}; ///< extract qmean  
     Float_t qlow(Int_t entry)                          {return (((CaloTrkVar *)CaloTrk->At(entry))->qlow);}; ///< extract qlow  
     Float_t dX0l(Int_t entry)                          {return (((CaloTrkVar *)CaloTrk->At(entry))->dX0l);}; ///< extract dX0l  
     //  
     // Number of strip with energy > emip and their value coded with view plane and strip number:  
     // view x(y) plane PP strip SS with energy mmmm.iip = +(-) ( PP*10^6 + SS*10^4 + mmmm.iip )  
     //  
     TArrayF estrip; ///< MIP values for each strip with energy > emin  
123      //      //
124      // METHODS      // METHODS
125      //      //
126        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)
127        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)
128    
129        //
130      void GetElectronEnergy(Float_t &energy, Float_t &sigma); ///< returns energy and sigma using qtot and assuming the particle being an electron      void GetElectronEnergy(Float_t &energy, Float_t &sigma); ///< returns energy and sigma using qtot and assuming the particle being an electron
     Float_t GetEstrip(Int_t view, Int_t plane, Int_t strip); ///< returns saved MIP value for the indicated strip  
     Float_t DecodeEstrip(Int_t entry, Int_t &view, Int_t &plane, Int_t &strip); ///< returns saved MIP value for the entry number "entry" of the TArrayF.  
     CaloTrkVar *GetCaloTrkVar(Int_t notrack);  ///< returns a pointer to the CaloTrkVar class containing track related variables  
131      //      //
132      CaloLevel2* GetCaloLevel2(){return this;}; ///< returns pointer to this object      CaloTrkVar *GetCaloTrkVar(Int_t notrack);  ///< returns a pointer to the CaloTrkVar class containing track related variables for track number notrack
133        CaloTrkVar* GetCaloStoredTrack(Int_t seqno); ///< returns pointer to the track set related to the seqno number
134        //
135        TClonesArray *GetTrackArray(){return CaloTrk;} ///< returns a pointer to the track related variables array
136        CaloLevel2* GetCaloLevel2(){return this;} ///< returns pointer to this object
137        //
138        void GetLevel2Struct(cCaloLevel2 *l2) const;
139        //
140        void Clear(Option_t *t="");
141        void Delete(Option_t *t=""); //ELENA
142        void Set(); //ELENA
143        Bool_t IsGood(Bool_t strict = false); // method to check if the event is good or not
144      //      //
145      // constructor      // constructor
146      //      //
147      CaloLevel2();      CaloLevel2(); ///< Constructor.
148        ~CaloLevel2(){Delete();} //ELENA
149      //      //
150      friend class CaloProcessing;      friend class CaloLevel0;
151      //      //
152      ClassDef(CaloLevel2,1);      ClassDef(CaloLevel2,6);
153  };  };
154    
155  #endif  #endif

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.23