| 35 |
#define toftrk toftrk_ |
#define toftrk toftrk_ |
| 36 |
extern "C" int toftrk(); |
extern "C" int toftrk(); |
| 37 |
#define rdtofcal rdtofcal_ |
#define rdtofcal rdtofcal_ |
| 38 |
extern "C" int rdtofcal(char [], int *); |
//extern "C" int rdtofcal(char [], int *); |
| 39 |
|
extern "C" int rdtofcal(const char *, int *); |
| 40 |
|
|
| 41 |
// |
// |
| 42 |
// class which contains track related variables |
// class which contains track related variables |
| 94 |
Float_t adc; ///<raw ADC value for this PMT |
Float_t adc; ///<raw ADC value for this PMT |
| 95 |
Float_t tdc; ///<raw TDC value for this PMT |
Float_t tdc; ///<raw TDC value for this PMT |
| 96 |
Float_t tdc_tw; ///<time-walk corrected TDC value for this PMT |
Float_t tdc_tw; ///<time-walk corrected TDC value for this PMT |
| 97 |
|
Float_t l0flag_adc; ///< warning flags from unpacking |
| 98 |
|
Float_t l0flag_tdc; ///< warning flags from unpacking |
| 99 |
// |
// |
| 100 |
ToFPMT(); |
ToFPMT(); |
| 101 |
ToFPMT(const ToFPMT&); |
ToFPMT(const ToFPMT&); |
| 103 |
ToFPMT* GetToFPMT(){return this;}; |
ToFPMT* GetToFPMT(){return this;}; |
| 104 |
void Clear(Option_t *t=""); |
void Clear(Option_t *t=""); |
| 105 |
|
|
| 106 |
ClassDef(ToFPMT,2); |
ClassDef(ToFPMT,3); |
| 107 |
}; |
}; |
| 108 |
|
|
| 109 |
/** |
/** |
| 118 |
ToFGeom eGeom; // ToF geometry |
ToFGeom eGeom; // ToF geometry |
| 119 |
// |
// |
| 120 |
Float_t adc_he; |
Float_t adc_he; |
| 121 |
TArrayF eDEDXpmt; // 0-47 pmt dEdx |
TArrayF *eDEDXpmt; // 0-47 pmt dEdx |
| 122 |
// parameters: |
// parameters: |
| 123 |
TArrayF PMTsat; // 0-47 saturation parameters |
TArrayF PMTsat; // 0-47 saturation parameters |
| 124 |
Float_t adc[48]; |
Float_t adc[48]; |
| 149 |
|
|
| 150 |
public: |
public: |
| 151 |
ToFdEdx(); // class constructor |
ToFdEdx(); // class constructor |
| 152 |
~ToFdEdx(){ Delete(); }; // class distructor |
~ToFdEdx(); // class distructor |
| 153 |
// |
// |
| 154 |
void Clear(Option_t *option=""); |
void Clear(Option_t *option=""); |
| 155 |
void Delete(Option_t *option="") { Clear(); } |
void Delete(Option_t *option=""); |
| 156 |
|
|
| 157 |
void Init(pamela::tof::TofEvent *tofl0 ); // init parameters |
void Init(pamela::tof::TofEvent *tofl0 ); // init parameters |
| 158 |
void Init(Int_t i, Int_t j, Float_t adce); |
void Init(Int_t i, Int_t j, Float_t adce); |
| 166 |
|
|
| 167 |
void CheckConnectors(UInt_t atime, GL_PARAM *glparam, TSQLServer *dbc); |
void CheckConnectors(UInt_t atime, GL_PARAM *glparam, TSQLServer *dbc); |
| 168 |
|
|
| 169 |
void Process( UInt_t atime, Float_t betamean, Float_t *xtr_tof, Float_t *ytr_tof); // |
void Process( UInt_t atime, Float_t betamean, Float_t *xtr_tof, Float_t *ytr_tof, Int_t exitat=-1); // |
| 170 |
void Print(Option_t *option=""); |
void Print(Option_t *option=""); |
| 171 |
|
|
| 172 |
Float_t GetdEdx_pmt(Int_t ipmt) { return eDEDXpmt[ipmt]; } // 0-47 dEdx for each PMT for tracked events |
// Float_t GetdEdx_pmt(Int_t ipmt) { return (Float_t)eDEDXpmt[ipmt]; } // 0-47 dEdx for each PMT for tracked events |
| 173 |
|
Float_t GetdEdx_pmt(Int_t ipmt) { return eDEDXpmt->At(ipmt); } // 0-47 dEdx for each PMT for tracked events |
| 174 |
// |
// |
| 175 |
ToFdEdx* GetToFdEdx(){return this;}; |
ToFdEdx* GetToFdEdx(){return this;}; |
| 176 |
ClassDef(ToFdEdx,2); |
ClassDef(ToFdEdx,3); |
| 177 |
}; |
}; |
| 178 |
|
|
| 179 |
|
|
| 258 |
TClonesArray *ToFTrk; ///<track related variable class |
TClonesArray *ToFTrk; ///<track related variable class |
| 259 |
Int_t tof_j_flag[6]; ///<number of hitted paddle(s) for each ToF layer: flag = flag + 2**(paddlenumber-1) |
Int_t tof_j_flag[6]; ///<number of hitted paddle(s) for each ToF layer: flag = flag + 2**(paddlenumber-1) |
| 260 |
// |
// |
| 261 |
Int_t unpackError;///< zero if no error presente |
Int_t unpackError;///< zero if no errors |
| 262 |
|
Int_t unpackWarning;///< zero if no warnings | bitwise: ... 3 2 1 0 --> bit 0 = discharging flag on at least one PMT (adc OR tdc), bit 1 = there is at least one PMT off (no tdc nor adc) which is included in the patterntrig, bit 2 = PMTs hit are not enough to match trigger configuration, bit 3 = pattern trig does not match trigger configuration |
| 263 |
Int_t default_calib; ///< one if the default calibration has been used to process the data, zero otherwise |
Int_t default_calib; ///< one if the default calibration has been used to process the data, zero otherwise |
| 264 |
// |
// |
| 265 |
Float_t GetdEdx(Int_t notrack, Int_t plane, Int_t adcfl); // gf Apr 07 |
Float_t GetdEdx(Int_t notrack, Int_t plane, Int_t adcfl); // gf Apr 07 |
| 289 |
// gf Apr 07 |
// gf Apr 07 |
| 290 |
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 |
| 291 |
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); |
| 292 |
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 //EMXX |
| 293 |
Int_t GetPaddleIdOfTrack(Float_t xtr, Float_t ytr, Int_t plane, Float_t margin); // wm jun 2008 |
Int_t GetPaddleIdOfTrack(Float_t xtr, Float_t ytr, Int_t plane, Float_t margin); // wm jun 2008 |
| 294 |
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 |
| 295 |
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 |
| 301 |
// |
// |
| 302 |
// |
// |
| 303 |
Int_t Process(TrkLevel2 *trk, TrigLevel2 *trg, GL_RUN *run, OrbitalInfo *orb, Bool_t force); // Emiliano |
Int_t Process(TrkLevel2 *trk, TrigLevel2 *trg, GL_RUN *run, OrbitalInfo *orb, Bool_t force); // Emiliano |
| 304 |
|
|
| 305 |
|
// |
| 306 |
|
// |
| 307 |
|
bool bit(int decimal, char pos); |
| 308 |
|
bool checkPMT(TString givenpmt); |
| 309 |
|
bool checkPMTpatternPMThit(TrigLevel2 *trg, int &pmtpattern, int &pmtnosignal); |
| 310 |
|
bool checkPMTpmttrig(TrigLevel2 *trg); |
| 311 |
|
void printPMT(); |
| 312 |
|
|
| 313 |
// |
// |
| 314 |
// constructor |
// constructor |
| 315 |
// |
// |
| 351 |
|
|
| 352 |
Int_t GetToFPlaneID(Int_t ip); |
Int_t GetToFPlaneID(Int_t ip); |
| 353 |
Int_t GetToFPlaneIndex(Int_t plane_id); |
Int_t GetToFPlaneIndex(Int_t plane_id); |
| 354 |
Bool_t HitPaddle(Int_t ,Int_t); |
Bool_t HitPaddle(Int_t ,Int_t); // EMXX |
| 355 |
Int_t GetNHitPaddles(Int_t plane); |
Int_t GetNHitPaddles(Int_t plane); |
| 356 |
|
Int_t GetTrueNHitPaddles(Int_t plane); |
| 357 |
void Clear(Option_t *t=""); |
void Clear(Option_t *t=""); |
| 358 |
// |
// |
| 359 |
ClassDef(ToFLevel2,4); |
ClassDef(ToFLevel2,5); |
| 360 |
}; |
}; |
| 361 |
|
|
| 362 |
#endif |
#endif |