/[PAMELA software]/DarthVader/ToFLevel2/inc/ToFLevel2.h
ViewVC logotype

Diff of /DarthVader/ToFLevel2/inc/ToFLevel2.h

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

revision 1.2 by mocchiut, Sat Jun 17 12:21:32 2006 UTC revision 1.14 by pam-de, Thu Mar 1 10:48:25 2007 UTC
# Line 1  Line 1 
1    /**
2     * \file ToFLevel2.h
3     * \author Gianfranca DeRosa / Wolfgang Menn
4     */
5    
6  #ifndef ToFLevel2_h  #ifndef ToFLevel2_h
7  #define ToFLevel2_h  #define ToFLevel2_h
8  //  //
9  #include <TObject.h>  #include <TObject.h>
10    #include <TArrayI.h>
11    #include <TArrayF.h>
12  #include <TClonesArray.h>  #include <TClonesArray.h>
13    
14    #include <ToFStruct.h>
15    
16    
17  //  //
18  // class which contains track related variables  // class which contains track related variables
19  //  //
# Line 13  Line 24 
24  #define ZTOF31 -23.49  #define ZTOF31 -23.49
25  #define ZTOF32 -24.34  #define ZTOF32 -24.34
26    
27    
28    /**
29     * \brief  Class which contains the PMT data
30     *
31     */
32    class ToFPMT : public TObject {
33    
34     private:
35    
36     public:
37        Int_t pmt_id;     ///<the identification number of the PMT from 0 to 47
38        Float_t adc;      ///<raw ADC values adc[4,12]
39        Float_t tdc_tw;   ///<time-walk corrected TDC values tdc_tw[4,12]
40        //
41        ToFPMT();
42        ToFPMT(const ToFPMT&);
43        //
44        ToFPMT* GetToFPMT(){return this;};
45        void Clear();
46    
47    
48    
49        ClassDef(ToFPMT,1);
50    };
51    
52    
53    /**
54     * \brief Class which contains the tracker realated variables
55     *
56     */
57  class ToFTrkVar : public TObject {  class ToFTrkVar : public TObject {
58      
59   private:   private:
60    
61   public:   public:
   Int_t trkseqno; // tracker entry coming from tracker, 100 if image track is used, -100 if the track is not consistent with MyDetector2 one  
62    //    //
63    Float_t beta_a[13];    Int_t trkseqno; ///< tracker sequ. number: -1=ToF standalone, 0=first Tracker track, ...
64    Float_t adc_c[12][4];    //
65        Int_t npmttdc;  ///<number of TDC used to evaluate beta
66      TArrayI pmttdc;  ///<contains the PMT ID for the tdc used to evaluate beta
67      TArrayI tdcflag; ///<array  flagging the artificial TDCs, "0" if normal TDC value
68      Float_t beta[13]; ///<beta, 12 measurements for the 12  combinations, beta[13] is weighted mean
69      //
70      Int_t npmtadc;  ///<number of ADCs used for dEdx evaluation
71      TArrayI pmtadc; ///<contains the PMT ID for the adc used in evaluate dedx=adc_c
72      TArrayI adcflag; ///<array flagging the artificial ADCs, "0" if normal ADC value
73      TArrayF dedx;    ///<energy loss in mip
74      //
75      Float_t xtofpos[3];  ///<x-measurement using the TDC values and the calibration
76      Float_t ytofpos[3];  ///<x-measurement using the TDC values and the calibration
77    
78    //    //
79    ToFTrkVar();    ToFTrkVar();
80    ToFTrkVar(const ToFTrkVar&);    ToFTrkVar(const ToFTrkVar&);
81      
82    ToFTrkVar* GetToFTrkVar(){return this;};    ToFTrkVar* GetToFTrkVar(){return this;};
83        void Clear();
84    
85    ClassDef(ToFTrkVar,1);    ClassDef(ToFTrkVar,1);
86    //    //
87  };  };
88    
89    /**
90     * \brief  Class to describe ToF LEVEL2 data
91     *
92     */
93    
94  class ToFLevel2 : public TObject {  class ToFLevel2 : public TObject {
95   private:   private:
96      
97   public:   public:
   Float_t xtofpos[3];  
   Float_t ytofpos[3];  
   Int_t  tof_i_flag[6];  
   Int_t tof_j_flag[6];  
   Float_t betatof_a[13];  
   Float_t adctof_c[12][4];  
   Float_t tdc_c[12][4];  
   TClonesArray *ToFTrk; // track related variable class  
98    //    //
99      TClonesArray *PMT; ///<class needed to store PMT hit informations
100      TClonesArray *ToFTrk; ///<track related variable class
101      Int_t tof_j_flag[6];  ///<number of hitted paddle(s) for each ToF layer: flag = flag + 2**(paddlenumber-1)
102    
103      Int_t unpackError;
104      //
105      Float_t GetdEdx(Int_t notrack, Int_t plane);
106    //    //
107    // methods to make life simplier during the analysis, returns a pointer to the ToFTrkVar class containing track related variables    // methods to make life simplier during the analysis, returns a pointer to the ToFTrkVar class containing track related variables
108    //    //
109    Int_t ntrk(){return ToFTrk->GetEntries();};    Int_t ntrk(){return ToFTrk->GetEntries();};
110        Int_t npmt(){return PMT->GetEntries();};
111      
112      //
113      void GetLevel2Struct(cToFLevel2 *) const;
114    //    //
115    ToFTrkVar *GetToFTrkVar(Int_t notrack);      ToFTrkVar *GetToFTrkVar(Int_t notrack);
116      ToFPMT *GetToFPMT(Int_t nohit);
117      Int_t GetPMTid(Int_t gg, Int_t hh);
118      TString GetPMTName(Int_t ind);
119      Int_t GetPlaneIndex(Int_t pmt_id);
120      void GetMatrix(Int_t notrack, Float_t adc[4][12], Float_t tdc[4][12]);
121      void GetPMTIndex(Int_t pmt_id, Int_t &gg, Int_t &hh);
122    //    //
123    // constructor    // constructor
124    //    //
125    ToFLevel2();    ToFLevel2();
126      ~ToFLevel2(){Delete();}; //ELENA
127      void Delete(); //ELENA
128      void Set();//ELENA
129    //    //
130    //    //
131    ToFLevel2*   GetToFLevel2(){return this;};    ToFLevel2*   GetToFLevel2(){return this;};
132      Float_t      GetZTOF(Int_t plane_id){  
133    /**
134     * Method to get the z-position of the 6 TOF layers from th plane ID
135     * @param plane_id Plane ID (11 12 21 22 31 32)
136     */
137      Float_t      GetZTOF(Int_t plane_id){
138        switch(plane_id){        switch(plane_id){
139        case 11: return ZTOF11;        case 11: return ZTOF11;
140        case 12: return ZTOF12;        case 12: return ZTOF12;
# Line 71  class ToFLevel2 : public TObject { Line 144  class ToFLevel2 : public TObject {
144        case 32: return ZTOF32;        case 32: return ZTOF32;
145        default: return 0.;        default: return 0.;
146        };        };
147      };    };
148        
149      //      //
150      // Paddles position      // Paddles position
151      //      //
# Line 84  class ToFLevel2 : public TObject { Line 157  class ToFLevel2 : public TObject {
157        S31 3 paddles  15.0 x 6.0 cm        S31 3 paddles  15.0 x 6.0 cm
158        S32 3 paddles  18.0 x 5.0 cm        S32 3 paddles  18.0 x 5.0 cm
159      */      */
160        
161      Int_t  GetToFPlaneID(Int_t ip);      Int_t  GetToFPlaneID(Int_t ip);
162      Int_t  GetToFPlaneIndex(Int_t plane_id);      Int_t  GetToFPlaneIndex(Int_t plane_id);
163      Bool_t HitPaddle(Int_t ,Int_t);      Bool_t HitPaddle(Int_t ,Int_t);
164      Int_t  GetNHitPaddles(Int_t plane);      Int_t  GetNHitPaddles(Int_t plane);
165          void Clear();
166      //      //
167      ClassDef(ToFLevel2,1);      ClassDef(ToFLevel2,2);
168  };  };
169    
170  #endif  #endif
171    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.23