]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/extra/AliRsnTOFT0maker.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / extra / AliRsnTOFT0maker.h
CommitLineData
659ef4f0 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///////////////////////////////////////////////
7356f978 9// //
659ef4f0 10// Manager class for time zero evaluation //
11// with TOF informations //
7356f978 12// //
659ef4f0 13///////////////////////////////////////////////
14
15
16#include "TObject.h"
17#include "TString.h"
18#include "AliESDEvent.h"
19#include "AliStack.h"
20#include "TH1F.h"
21
22class AliTOFcalibHisto;
23class AliTOFT0v1;
24
25class AliRsnTOFT0maker : public TObject {
26public:
27
7356f978 28 enum ESettings {
29 kNone,
30 kPass2,
31 kPass4,
32 kLHC09d10
33 };
34
35 ESettings fSettings;
36 TString Settings() {
37 TString out;
38 switch (fSettings) {
39 case kPass2: out = "pass 2"; break;
40 case kPass4: out = "pass 4"; break;
41 case kLHC09d10: out = "LHC09d10"; break;
42 default: out = "none specific"; break;
43 }
44 return out;
45 }
46
47
48 AliRsnTOFT0maker() ;
49 virtual ~AliRsnTOFT0maker() ; // dtor
50 AliRsnTOFT0maker(const AliRsnTOFT0maker & t);
51 AliRsnTOFT0maker & operator=(const AliRsnTOFT0maker & t);
52
53 void SetESDdata(Bool_t val = kTRUE) {fESDswitch = val;};
54
55 // 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
56 Double_t *RemakePID(AliESDEvent *esd, Double_t t0time = 0., Double_t t0sigma = 1000.); // t0time and t0sigma in ps
57
58 void SetTimeResolution(Double_t timeresolution) {fTimeResolution = timeresolution;}; // TOF timeresolution in [s] e.g. for 120 ps -> 1.2e-10
59 Double_t GetTimeResolution() const {return fTimeResolution;}
60
61 void LoadChannelMap(char *filename = "$ALICE_ROOT/TOF/enableMap.104892.root"); //load the enable channel map
62 void ApplyMask(AliESDEvent *esd);
63
64 void SetNoTOFT0(Bool_t status = kTRUE) {fNoTOFT0 = status;}; // disable the TOF T0 info
65 void SetMaskOffChannel(Bool_t status = kTRUE) {fKmask = status;}; // swith for the map off channel
66
67private:
68 void TakeTimeRawCorrection(AliESDEvent * const esd);
69 void RemakeTOFpid(AliESDEvent *esd, Float_t timezero);
70 Double_t GetT0Fill(Int_t nrun) const ;
71
72 AliTOFcalibHisto *fCalib; // TOF calibration object pointer
73
74 Bool_t fESDswitch; // if you want take the ESD time instead of the raw + time slewing correction
75
76 Double_t fCalculated[4]; // contains the parameters with the event time
77 Double_t fTimeResolution; // global time resolution used to calculate T0
78
79 Float_t fT0sigma; // T0 resolution
80
81 TH1F *fHmapChannel; // histo with the channel map
82 Bool_t fKmask;
83 Bool_t fNoTOFT0;
84
85 ClassDef(AliRsnTOFT0maker, 1); // Calculate the time zero using TOF detector */
86
659ef4f0 87};
88
89#endif // ALITOFT0MAKERANA_H