]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/TenderSupplies/AliTOFTenderSupply.h
o Add temporary fix for the geometry problem in 10d (Pietro)
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliTOFTenderSupply.h
CommitLineData
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>
14#include "AliESDpid.h"
15
16class AliESDpid;
17class AliTOFcalib;
18class AliTOFT0maker;
88ccd4cf 19class AliESDEevent;
20class AliESDtrack;
ee981ab3 21class AliTOFTenderSupply: public AliTenderSupply {
22
23public:
24 AliTOFTenderSupply();
25 AliTOFTenderSupply(const char *name, const AliTender *tender=NULL);
26
27 virtual ~AliTOFTenderSupply(){;}
28
29 virtual void Init();
30 virtual void ProcessEvent();
31
32 // TOF method
33 void SetTOFres(Float_t res){fTOFres=res;}
88ccd4cf 34 void SetApplyT0(Bool_t flag=kTRUE){fApplyT0=flag;}
35 void SetCorrectExpTimes(Bool_t flag=kTRUE){fCorrectExpTimes=flag;}
36 void SetLHC10dPatch(Bool_t flag=kFALSE){
37 if (flag == kTRUE) {
38 Print(" **** TOF Tender: special setting LHC10d patch is ON");
39 Print(" **** TOF Tender: this setting is valid only on LHC10d pass2");
40 }
41 fLHC10dPatch=flag;
42 return;
43 }
ee981ab3 44
45 virtual void SetTimeZeroType(AliESDpid::EStartTimeType_t tofTimeZeroType) {fTimeZeroType = tofTimeZeroType;}
46
88ccd4cf 47 /* theoretical expected time related stuff for LHC10d patch */
48 static Float_t GetBetaTh(Float_t m, Float_t p) {return TMath::Sqrt(1. / (1. + m * m / (p * p)));}; // get beta th
49 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
50 void RecomputeTExp(AliESDEvent *event) const;
51 void RecomputeTExp(AliESDtrack *track) const;
52
ee981ab3 53private:
54 AliESDpid *fESDpid; //! ESD pid object
55
56 Bool_t fIsMC; // flag for MC data
57 Bool_t fApplyT0; // flag to subtract the T0-TOF (deprecated)
58 Int_t fTimeZeroType; // flag to discriminate the time zero type
59 Bool_t fCorrectExpTimes; // flag to apply Expected Time correction
88ccd4cf 60 Bool_t fLHC10dPatch; // flag to apply special patch for LHC10d (reconstructed with wrong geometry)
ee981ab3 61
62 // variables for TOF calibrations
63 AliTOFcalib *fTOFCalib; //! recalibrate TOF signal with OCDB
64 AliTOFT0maker *fTOFT0maker; //! TOF maker objects (apply all the correction for T0)
65
66 Float_t fTOFres; // TOF resolution
67 Float_t fT0shift[4]; // T0 detector correction from OCDB
68
69 AliTOFTenderSupply(const AliTOFTenderSupply&c);
70 AliTOFTenderSupply& operator= (const AliTOFTenderSupply&c);
71
88ccd4cf 72 ClassDef(AliTOFTenderSupply, 3);
ee981ab3 73};
74
75
76#endif