Line data Source code
1 : #ifndef ALITOFT0MAKER_H
2 : #define ALITOFT0MAKER_H
3 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 : /* $Id: AliTOFT0maker.h,v 1.8 2010/01/19 16:32:20 noferini Exp $ */
7 :
8 : ///////////////////////////////////////////////
9 : // //
10 : // Manager class for time zero evaluation //
11 : // with TOF informations //
12 : // //
13 : ///////////////////////////////////////////////
14 :
15 :
16 : #include "TObject.h"
17 :
18 : class TH1F;
19 : class AliESDEvent;
20 :
21 : class AliESDpid;
22 : class AliTOFT0v1;
23 : class AliTOFcalib;
24 :
25 : class AliTOFT0maker : public TObject {
26 : public:
27 :
28 : AliTOFT0maker() ; // default constructor
29 : AliTOFT0maker(AliESDpid *externalPID, AliTOFcalib *tofCalib=NULL); // overloaded constructor
30 : virtual ~AliTOFT0maker() ; // dtor
31 :
32 : // return (fCalculated[0]=event time -- fCalculated[1]=sigma event time in ps -- fCalculated[2]=mean event time for each fill -- fCalculated[3]=number of tracks at the TOF level) if you can subtruct the event time; return NULL if there is no event time
33 : Double_t *ComputeT0TOF(AliESDEvent *esd,Double_t t0time=0.,Double_t t0sigma=1000.); // t0time and t0sigma in ps
34 : void ApplyT0TOF(AliESDEvent *esd);
35 : Float_t GetExpectedSigma(Float_t mom, Float_t tof, Float_t mass);
36 : Double_t *GetT0p(Float_t p);
37 :
38 0 : void SetTimeResolution(Double_t timeresolution){fTimeResolution=timeresolution;SetTOFResponse();};// TOF timeresolution in [ps]
39 0 : Double_t GetTimeResolution() const {return fTimeResolution;} // Get TOF Time Resolution
40 32 : void SetT0FillWidth(Float_t width){if(width > 50) fT0width = width; else fT0width=150;}; // in ps
41 :
42 : void LoadChannelMap(const char *filename="$ALICE_ROOT/TOF/enableMap.104892.root"); //load the enable channel map
43 : void ApplyMask(AliESDEvent * const esd); // Apply the channel mask
44 :
45 0 : void SetNoTOFT0(Bool_t status=kTRUE){fNoTOFT0=status;}; // disable the TOF T0 info
46 0 : void SetMaskOffChannel(Bool_t status=kTRUE){fKmask=status;}; // switch for the map off channel
47 :
48 : Float_t TuneForMC(AliESDEvent *esd); // set enabled channeld, add a smeared t0, add a TOF smearing, return true(smeared) T0 event
49 :
50 0 : void SetT0spread(Float_t t0spread){fT0spreadExt=t0spread;}; // get T0spread
51 0 : Float_t GetT0spread() const {return fT0spreadExt;} // get T0spread
52 :
53 0 : void SetT0fill(Float_t t0fill){fT0fillExt=t0fill;};
54 :
55 : void WriteInESD(AliESDEvent *esd);
56 :
57 0 : void SetTOFT0algorithm(Int_t flag=1){fTOFT0algorithm=flag;};
58 0 : Int_t GetTOFT0algorithm() const {return fTOFT0algorithm;};
59 :
60 : private:
61 :
62 : AliTOFT0maker(const AliTOFT0maker &);
63 : AliTOFT0maker & operator=(const AliTOFT0maker &);
64 :
65 : void SetTOFResponse();
66 :
67 : AliTOFT0v1 *fT0TOF; // T0-TOF
68 : AliESDpid *fPIDesd; // PID esd
69 : Bool_t fExternalPIDFlag; // external PID flag
70 : AliTOFcalib *fTOFcalib; // TOF calibration
71 :
72 : Bool_t fNoTOFT0; // switch to avoid T0-TOF is used
73 :
74 : Int_t fNmomBins;
75 :
76 : Double_t fCalculated[10]; // contains the parameters with the event time
77 :
78 : Double_t fT0cur[2]; // current T0 and T0 sigma
79 :
80 : Double_t fTimeResolution; // global time resolution used to calculate T0
81 :
82 : Float_t fT0sigma; // T0 resolution
83 :
84 : TH1F *fHmapChannel; // histo with the channel map
85 : Bool_t fKmask; // switch if you want apply a channel filter
86 :
87 : Float_t fT0width; // T0 FILL width
88 :
89 : Float_t fT0spreadExt;
90 : Float_t fT0fillExt; // t0spread if set
91 : Int_t fTOFT0algorithm; // select algorithm (1 default, 2 speed up)
92 :
93 144 : ClassDef(AliTOFT0maker,3); // Calculate the time zero using TOF detector */
94 :
95 : };
96 :
97 : #endif // ALITOFT0MAKER_H
|