]>
Commit | Line | Data |
---|---|---|
ee981ab3 | 1 | #ifndef ALITOFTENDERSUPPLY_H |
2 | #define ALITOFTENDERSUPPLY_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //////////////////////////////////////////////////////////////////////// | |
8 | // // | |
88ccd4cf | 9 | // TOF tender, reapply pid on the fly // |
ee981ab3 | 10 | // // |
11 | //////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | #include <AliTenderSupply.h> | |
dc369c13 | 14 | #include <AliLog.h> |
15 | #include <AliESDpid.h> | |
ee981ab3 | 16 | |
17 | class AliESDpid; | |
18 | class AliTOFcalib; | |
19 | class AliTOFT0maker; | |
88ccd4cf | 20 | class AliESDEevent; |
21 | class AliESDtrack; | |
ee981ab3 | 22 | class AliTOFTenderSupply: public AliTenderSupply { |
23 | ||
24 | public: | |
25 | AliTOFTenderSupply(); | |
26 | AliTOFTenderSupply(const char *name, const AliTender *tender=NULL); | |
27 | ||
28 | virtual ~AliTOFTenderSupply(){;} | |
29 | ||
30 | virtual void Init(); | |
31 | virtual void ProcessEvent(); | |
32 | ||
dc369c13 | 33 | // TOF tender methods |
dc369c13 | 34 | void SetIsMC(Bool_t flag=kFALSE){fIsMC=flag;} |
88ccd4cf | 35 | void SetCorrectExpTimes(Bool_t flag=kTRUE){fCorrectExpTimes=flag;} |
3eb060be | 36 | void SetT0DetectorAdjust(Bool_t flag=kFALSE){fT0DetectorAdjust=flag;} |
dc369c13 | 37 | void SetDebugLevel(Int_t flag=0){fDebugLevel=flag;} |
88ccd4cf | 38 | void SetLHC10dPatch(Bool_t flag=kFALSE){ |
39 | if (flag == kTRUE) { | |
dc369c13 | 40 | AliInfo(" **** TOF Tender: special setting LHC10d patch is ON"); |
41 | AliInfo(" **** TOF Tender: this setting is valid only on LHC10d pass2"); | |
88ccd4cf | 42 | } |
43 | fLHC10dPatch=flag; | |
44 | return; | |
45 | } | |
63f693ef | 46 | void SetAutomaticSettings(Bool_t flag=kTRUE){fAutomaticSettings=flag;} |
b60e825c | 47 | void SetForceCorrectTRDBug(Bool_t flag=kTRUE){fForceCorrectTRDBug=flag;} |
fd611537 | 48 | void SetUserRecoPass(Int_t flag=0){fUserRecoPass=flag;} |
49 | Int_t GetRecoPass(void){return fRecoPass;} | |
50 | void DetectRecoPass(); | |
ee981ab3 | 51 | |
dc369c13 | 52 | /* theoretical expected time: related stuff for LHC10d patch */ |
88ccd4cf | 53 | static Float_t GetBetaTh(Float_t m, Float_t p) {return TMath::Sqrt(1. / (1. + m * m / (p * p)));}; // get beta th |
54 | static Float_t GetExpTimeTh(Float_t m, Float_t p, Float_t L) {return L / 2.99792457999999984e-02 / GetBetaTh(m, p);}; // get exp time th | |
55 | void RecomputeTExp(AliESDEvent *event) const; | |
56 | void RecomputeTExp(AliESDtrack *track) const; | |
fd611537 | 57 | void FixTRDBug(AliESDEvent *event); |
58 | void FixTRDBug(AliESDtrack *track); | |
59 | void InitGeom(); | |
60 | void FindTRDFix(AliESDtrack *track,Double_t *corr); | |
61 | Double_t EstimateLengthInTRD1(AliESDtrack *track); | |
62 | Double_t EstimateLengthInTRD2(AliESDtrack *track); | |
63 | Double_t EstimateLengthOutTRD(AliESDtrack *track); | |
64 | void CorrectDeltaTimes(Double_t pT, Double_t length, Bool_t isTRDout, Double_t *corrections); | |
65 | Double_t CorrectExpectedProtonTime(Double_t pT,Double_t length, Bool_t isTRDout); | |
66 | Double_t CorrectExpectedKaonTime(Double_t pT,Double_t length, Bool_t isTRDout); | |
67 | Double_t CorrectExpectedPionTime(Double_t pT,Double_t length, Bool_t isTRDout); | |
3fbc4ebf | 68 | Int_t GetOCDBVersion(Int_t runNumber); |
86acb87b | 69 | void LoadTOFPIDParams(Int_t runNumber); |
88ccd4cf | 70 | |
ee981ab3 | 71 | private: |
72 | AliESDpid *fESDpid; //! ESD pid object | |
73 | ||
fd611537 | 74 | |
86acb87b | 75 | Bool_t fTenderNoAction; // flag for periods when tender action is not requested/not supported |
ee981ab3 | 76 | Bool_t fIsMC; // flag for MC data |
ee981ab3 | 77 | Bool_t fCorrectExpTimes; // flag to apply Expected Time correction |
fd611537 | 78 | Bool_t fCorrectTRDBug; // flag to fix wrong dE/dx inside TRD |
88ccd4cf | 79 | Bool_t fLHC10dPatch; // flag to apply special patch for LHC10d (reconstructed with wrong geometry) |
3eb060be | 80 | Bool_t fT0DetectorAdjust; // flag to apply offsets to T0 data (works only on some periods) |
dc369c13 | 81 | Int_t fDebugLevel; // debug purposes 0= no output, 1 Info, 2 lot of info.... |
63f693ef | 82 | Bool_t fAutomaticSettings; // enable/disable automatic (per run) settings |
fd611537 | 83 | Int_t fRecoPass; // reconstruction pass: the tender applies different recipes depending on the pass |
84 | Int_t fUserRecoPass; // when reco pass is selected by user | |
b60e825c | 85 | Bool_t fForceCorrectTRDBug; // force TRD bug correction (for some bad MC production...) |
3eb060be | 86 | |
86acb87b | 87 | |
dc369c13 | 88 | // variables for TOF calibrations and timeZero setup |
86acb87b | 89 | AliTOFPIDParams *fTOFPIDParams; //! TOF PID Params - period depending (OADB loaded) |
dc369c13 | 90 | AliTOFcalib *fTOFCalib; // recalibrate TOF signal with OCDB |
91 | AliTOFT0maker *fTOFT0maker; // computation of TOF-T0 | |
dc369c13 | 92 | Float_t fT0shift[4]; // T0 detector correction from OCDB |
63f693ef | 93 | Float_t fT0IntercalibrationShift; // extra-shift to adjust TOF/TO intercalibration issue in some period |
dc369c13 | 94 | |
95 | // variables to parametrize MC | |
96 | static Float_t fgT0Aresolution; // T0 resolution A-Side (MC) | |
97 | static Float_t fgT0Cresolution; // T0 resolution C-Side (MC) | |
ee981ab3 | 98 | |
fd611537 | 99 | // variables to steer TRD bug fix |
100 | Bool_t fGeomSet; // steer loading GRP entry | |
101 | Bool_t fIsEnteringInTRD; | |
102 | Bool_t fInTRD; | |
103 | Bool_t fIsComingOutTRD; | |
104 | Bool_t fOutTRD; | |
105 | Float_t fRhoTRDin; // cm | |
106 | Float_t fRhoTRDout; // cm | |
107 | Float_t fStep; // cm | |
108 | Double_t fMagField; // magnetic field value [kGauss] | |
6fc2efbf | 109 | ULong64_t fCDBkey; |
ee981ab3 | 110 | |
111 | AliTOFTenderSupply(const AliTOFTenderSupply&c); | |
112 | AliTOFTenderSupply& operator= (const AliTOFTenderSupply&c); | |
113 | ||
6fc2efbf | 114 | ClassDef(AliTOFTenderSupply, 11); |
ee981ab3 | 115 | }; |
116 | ||
117 | ||
118 | #endif |