]>
Commit | Line | Data |
---|---|---|
b9bbd271 | 1 | #ifndef ALITOFT0MAKERANA_H |
2 | #define ALITOFT0MAKERANA_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: AliRsnTOFT0maker.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 | #include "TString.h" | |
18 | #include "AliESDEvent.h" | |
19 | #include "AliStack.h" | |
20 | #include "TH1F.h" | |
21 | ||
22 | class AliTOFcalibHisto; | |
23 | class AliTOFT0v1; | |
24 | ||
25 | class AliRsnTOFT0maker : public TObject { | |
26 | public: | |
27 | ||
28 | enum ESettings | |
29 | { | |
30 | kNone, | |
31 | kPass2, | |
32 | kPass4, | |
33 | kLHC09d10 | |
34 | }; | |
35 | ||
36 | ESettings fSettings; | |
37 | TString Settings() | |
38 | { | |
39 | TString out; | |
40 | switch (fSettings) | |
41 | { | |
42 | case kPass2: out = "pass 2"; break; | |
43 | case kPass4: out = "pass 4"; break; | |
44 | case kLHC09d10: out = "LHC09d10"; break; | |
45 | default: out = "none specific"; break; | |
46 | } | |
47 | return out; | |
48 | } | |
49 | ||
50 | ||
51 | AliRsnTOFT0maker() ; | |
52 | virtual ~AliRsnTOFT0maker() ; // dtor | |
53 | AliRsnTOFT0maker(const AliRsnTOFT0maker & t); | |
54 | AliRsnTOFT0maker & operator=(const AliRsnTOFT0maker & t); | |
55 | ||
56 | void SetESDdata(Bool_t val=kTRUE){fESDswitch=val;}; | |
57 | ||
58 | // 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 | |
59 | Double_t *RemakePID(AliESDEvent *esd,Double_t t0time=0.,Double_t t0sigma=1000.); // t0time and t0sigma in ps | |
60 | ||
61 | void SetTimeResolution(Double_t timeresolution){fTimeResolution=timeresolution;};// TOF timeresolution in [s] e.g. for 120 ps -> 1.2e-10 | |
62 | Double_t GetTimeResolution() const {return fTimeResolution;} | |
63 | ||
64 | void LoadChannelMap(char *filename="$ALICE_ROOT/TOF/enableMap.104892.root"); //load the enable channel map | |
65 | void ApplyMask(AliESDEvent *esd); | |
66 | ||
67 | void SetNoTOFT0(Bool_t status=kTRUE){fNoTOFT0=status;}; // disable the TOF T0 info | |
68 | void SetMaskOffChannel(Bool_t status=kTRUE){fKmask=status;}; // swith for the map off channel | |
69 | ||
70 | private: | |
71 | void TakeTimeRawCorrection(AliESDEvent * const esd); | |
72 | void RemakeTOFpid(AliESDEvent *esd,Float_t timezero); | |
73 | Double_t GetT0Fill(Int_t nrun) const ; | |
74 | ||
75 | AliTOFcalibHisto *fCalib; // TOF calibration object pointer | |
76 | ||
77 | Bool_t fESDswitch; // if you want take the ESD time instead of the raw + time slewing correction | |
78 | ||
79 | Double_t fCalculated[4]; // contains the parameters with the event time | |
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; | |
86 | Bool_t fNoTOFT0; | |
87 | ||
88 | ClassDef(AliRsnTOFT0maker,1); // Calculate the time zero using TOF detector */ | |
89 | ||
90 | }; | |
91 | ||
92 | #endif // ALITOFT0MAKERANA_H |