/[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.21 by mocchiut, Fri Apr 18 18:55:51 2008 UTC revision 1.24 by mocchiut, Mon Nov 23 09:50:48 2009 UTC
# Line 1  Line 1 
1  /**  /**
2   * \file ToFLevel2.h   * \file ToFLevel2.h
3   * \author Gianfranca DeRosa / Wolfgang Menn   * \author Gianfranca DeRosa / Wolfgang Menn / Rita Carbone with E. M. supervision
4   */   */
5    
6  #ifndef ToFLevel2_h  #ifndef ToFLevel2_h
# Line 25  Line 25 
25  #include <GLTables.h> // Emiliano  #include <GLTables.h> // Emiliano
26  #include <OrbitalInfo.h> // Emiliano  #include <OrbitalInfo.h> // Emiliano
27  #include <ToFCore.h> // Emiliano  #include <ToFCore.h> // Emiliano
28    #include <physics/tof/TofEvent.h>
29    
30  //  //
31  // Declaration of the core fortran routines  // Declaration of the core fortran routines
32  //  //
# Line 46  extern "C" int rdtofcal(char [], int *); Line 48  extern "C" int rdtofcal(char [], int *);
48  #define ZTOF32 -24.34  #define ZTOF32 -24.34
49    
50    
51    class ToFGeom : public TObject {
52    
53    private:
54      TArrayI  ePlane, eXY;
55    
56    public:
57      ToFGeom() {
58        int plane[24] = {
59          0, 0, 0, 0, 0, 0, 0, 0,
60          1, 1, 1, 1, 1, 1,
61          2, 2,            
62          3, 3,            
63          4, 4, 4,
64          5, 5, 5
65        };
66        int plXY[6]= {  2,  1,  1,  2,  2,  1 }; // X==1, Y==2 */
67        ePlane.Set(24,plane);
68        eXY.Set(6,plXY);
69      }
70    
71      int GetPad(   int idpmt)  { return (int)((idpmt+0.5)/2.); }
72      int GetPlane( int idpmt)  { return ePlane[ GetPad(idpmt) ];  }
73      int GetXY(    int idpmt)  { return eXY[ GetPlane(idpmt) ]; }
74    
75       ClassDef(ToFGeom,1);
76    
77    };
78    
79    
80  /**  /**
81   * \brief  Class which contains the PMT data   * \brief  Class which contains the PMT data
82   *   *
# Line 74  class ToFPMT : public TObject { Line 105  class ToFPMT : public TObject {
105      ClassDef(ToFPMT,2);      ClassDef(ToFPMT,2);
106  };  };
107    
108    /**
109     * \brief  Class used to calibrate adc to dEdx for each PMT
110     *
111     * Class used to calibrate adc to dEdx for each PMT
112     */
113    class ToFdEdx : public TObject {
114    
115     private:
116        //
117        ToFGeom  eGeom;  // ToF geometry
118        //
119        Float_t  adc_he;
120        TArrayF eDEDXpmt;  // 0-47  pmt dEdx
121        // parameters:
122        TArrayF PMTsat;  // 0-47  saturation parameters
123        Float_t adc[48];
124        //
125    
126        TArrayF parAtt[48];      // 48 x 6
127        TArrayF parPos[48];      // 48 x 4
128        TArrayF parDesatBB[48];  // 48 x 3
129        TArrayF parBBneg[48];    // 48 x 3
130        TArrayF  parBBpos;    // 48 x 1
131    
132        double f_adcPC( float x );
133        double f_BB( TArrayF &p, float x );
134        double f_BB5B( float x );
135        double f_att( TArrayF &p, float x ) ;
136        double f_att5B( float x );
137        double f_desatBB( TArrayF &p, float x );  
138        double f_desatBB5B( float x );
139        double f_pos( TArrayF &p, float x );
140        double f_pos5B( float x );
141        float Get_adc_he( int id, float pl_x[6], float pl_y[6]);
142    
143        Bool_t conn[12];
144    
145        UInt_t ts[12];
146        UInt_t te[12];    
147      
148        
149     public:
150        ToFdEdx();   // class constructor
151        ~ToFdEdx(){ Delete(); };  // class distructor
152        //
153        void Clear(Option_t *option="");
154        void Delete(Option_t *option="") { Clear(); }
155    
156        void Init(pamela::tof::TofEvent *tofl0 );  // init parameters
157        void Init(Int_t i, Int_t j, Float_t adce);
158        void Define_PMTsat();
159    
160        void ReadParAtt(            const char *fname  );
161        void ReadParPos(            const char *fname  );
162        void ReadParBBneg(          const char *fname  );
163        void ReadParBBpos(          const char *fname  );
164        void ReadParDesatBB(        const char *fname  );
165    
166        void CheckConnectors(UInt_t atime, GL_PARAM *glparam, TSQLServer *dbc);
167    
168        void Process( UInt_t atime, Float_t betamean, Float_t *xtr_tof, Float_t *ytr_tof); //
169        void Print(Option_t *option="");
170    
171        Float_t GetdEdx_pmt(Int_t ipmt) { return eDEDXpmt[ipmt]; }  // 0-47 dEdx for each PMT for tracked events
172        //
173        ToFdEdx* GetToFdEdx(){return this;};
174        ClassDef(ToFdEdx,2);
175    };
176    
177    
178  /**  /**
179   * \brief Class which contains the tracker related variables   * \brief Class which contains the tracker related variables
# Line 187  class ToFLevel2 : public TObject { Line 287  class ToFLevel2 : public TObject {
287    void GetdEdxPaddle(Int_t notrack, Int_t paddleid, Int_t adcfl, Float_t &PadEdx, Int_t &SatWarning); // gf Apr 07    void GetdEdxPaddle(Int_t notrack, Int_t paddleid, Int_t adcfl, Float_t &PadEdx, Int_t &SatWarning); // gf Apr 07
288    TString GetPMTName(Int_t ind, Int_t &iplane, Int_t &ipaddle,Int_t &ipmt);    TString GetPMTName(Int_t ind, Int_t &iplane, Int_t &ipaddle,Int_t &ipmt);
289    Int_t GetPaddleIdOfTrack(Float_t xtr, Float_t ytr, Int_t plane); // gf Apr 07    Int_t GetPaddleIdOfTrack(Float_t xtr, Float_t ytr, Int_t plane); // gf Apr 07
290      Int_t GetPaddleIdOfTrack(Float_t xtr, Float_t ytr, Int_t plane, Float_t margin); // wm jun 2008
291    void GetPMTPaddle(Int_t pmt_id, Int_t &plane, Int_t &paddle); // gf Apr 07    void GetPMTPaddle(Int_t pmt_id, Int_t &plane, Int_t &paddle); // gf Apr 07
292    void GetPaddlePMT(Int_t paddle, Int_t &pmtleft, Int_t &pmtright); // gf Apr 07    void GetPaddlePMT(Int_t paddle, Int_t &pmtleft, Int_t &pmtright); // gf Apr 07
293    void GetPaddleGeometry(Int_t plane, Int_t paddle, Float_t &xleft, Float_t &xright, Float_t &yleft, Float_t &yright); // gf Apr 07    void GetPaddleGeometry(Int_t plane, Int_t paddle, Float_t &xleft, Float_t &xright, Float_t &yleft, Float_t &yright); // gf Apr 07

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.23