]>
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 |
ee981ab3 | 34 | void SetTOFres(Float_t res){fTOFres=res;} |
dc369c13 | 35 | void SetIsMC(Bool_t flag=kFALSE){fIsMC=flag;} |
88ccd4cf | 36 | void SetCorrectExpTimes(Bool_t flag=kTRUE){fCorrectExpTimes=flag;} |
3eb060be | 37 | void SetT0DetectorAdjust(Bool_t flag=kFALSE){fT0DetectorAdjust=flag;} |
dc369c13 | 38 | void SetDebugLevel(Int_t flag=0){fDebugLevel=flag;} |
88ccd4cf | 39 | void SetLHC10dPatch(Bool_t flag=kFALSE){ |
40 | if (flag == kTRUE) { | |
dc369c13 | 41 | AliInfo(" **** TOF Tender: special setting LHC10d patch is ON"); |
42 | AliInfo(" **** TOF Tender: this setting is valid only on LHC10d pass2"); | |
88ccd4cf | 43 | } |
44 | fLHC10dPatch=flag; | |
45 | return; | |
46 | } | |
63f693ef | 47 | void SetAutomaticSettings(Bool_t flag=kTRUE){fAutomaticSettings=flag;} |
ee981ab3 | 48 | virtual void SetTimeZeroType(AliESDpid::EStartTimeType_t tofTimeZeroType) {fTimeZeroType = tofTimeZeroType;} |
49 | ||
dc369c13 | 50 | /* theoretical expected time: related stuff for LHC10d patch */ |
88ccd4cf | 51 | static Float_t GetBetaTh(Float_t m, Float_t p) {return TMath::Sqrt(1. / (1. + m * m / (p * p)));}; // get beta th |
52 | 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 | |
53 | void RecomputeTExp(AliESDEvent *event) const; | |
54 | void RecomputeTExp(AliESDtrack *track) const; | |
55 | ||
ee981ab3 | 56 | private: |
57 | AliESDpid *fESDpid; //! ESD pid object | |
58 | ||
59 | Bool_t fIsMC; // flag for MC data | |
dc369c13 | 60 | Int_t fTimeZeroType; // flag to select timeZero type |
ee981ab3 | 61 | Bool_t fCorrectExpTimes; // flag to apply Expected Time correction |
88ccd4cf | 62 | Bool_t fLHC10dPatch; // flag to apply special patch for LHC10d (reconstructed with wrong geometry) |
3eb060be | 63 | Bool_t fT0DetectorAdjust; // flag to apply offsets to T0 data (works only on some periods) |
dc369c13 | 64 | Int_t fDebugLevel; // debug purposes 0= no output, 1 Info, 2 lot of info.... |
63f693ef | 65 | Bool_t fAutomaticSettings; // enable/disable automatic (per run) settings |
ee981ab3 | 66 | |
3eb060be | 67 | |
dc369c13 | 68 | // variables for TOF calibrations and timeZero setup |
69 | AliTOFcalib *fTOFCalib; // recalibrate TOF signal with OCDB | |
70 | AliTOFT0maker *fTOFT0maker; // computation of TOF-T0 | |
71 | Float_t fTOFres; // TOF resolution | |
72 | Float_t fT0shift[4]; // T0 detector correction from OCDB | |
63f693ef | 73 | Float_t fT0IntercalibrationShift; // extra-shift to adjust TOF/TO intercalibration issue in some period |
dc369c13 | 74 | |
75 | // variables to parametrize MC | |
76 | static Float_t fgT0Aresolution; // T0 resolution A-Side (MC) | |
77 | static Float_t fgT0Cresolution; // T0 resolution C-Side (MC) | |
ee981ab3 | 78 | |
ee981ab3 | 79 | |
80 | AliTOFTenderSupply(const AliTOFTenderSupply&c); | |
81 | AliTOFTenderSupply& operator= (const AliTOFTenderSupply&c); | |
82 | ||
3eb060be | 83 | ClassDef(AliTOFTenderSupply, 7); |
ee981ab3 | 84 | }; |
85 | ||
86 | ||
87 | #endif |