add static functions for external configuration
[u/mrichter/AliRoot.git] / TOF / AliTOFAnalysisTaskCalibPass0.h
CommitLineData
3c8efc07 1#ifndef ALITOFANALYSISTASKCALIBPASS0_H
2#define ALITOFANALYSISTASKCALIBPASS0_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// //
9// This class provides TOF pass0/passX calibration tools //
10// //
11///////////////////////////////////////////////////////////////
12
13#include "AliAnalysisTaskSE.h"
14
15class AliESDtrack;
16class AliESDEvent;
17class AliPhysicsSelection;
18class AliESDtrackCuts;
19class AliESDVertex;
20class AliGRPManager;
21class AliGRPObject;
22class AliTOFcalib;
23class TList;
24class TH2F;
25class TF1;
26class TH1D;
27
28class AliTOFAnalysisTaskCalibPass0 :
29public AliAnalysisTaskSE
30{
31
32 public:
33
34 AliTOFAnalysisTaskCalibPass0(); // default constructor
35 virtual ~AliTOFAnalysisTaskCalibPass0(); // default destructor
36
37 virtual void UserCreateOutputObjects(); // user create output objects
38 virtual void UserExec(Option_t *); // user exec
39
40 /* getters */
41 AliPhysicsSelection *GetEventCuts() const {return fEventCuts;}; // getter
42 AliESDtrackCuts *GetTrackCuts() const {return fTrackCuts;}; // getter
43 AliTOFcalib *GetTOFcalib() const {return fTOFcalib;}; // getter
44
45 /* setters */
46 void SetEventSelectionFlag(Bool_t value = kTRUE) {fEventSelectionFlag = value;}; // setter
47 void SetVertexSelectionFlag(Bool_t value = kTRUE) {fVertexSelectionFlag = value;}; // setter
48 void SetVertexCut(Double_t value) {fVertexCut = value;}; // setter
49
50 /* post-processing methods */
51 Bool_t ProcessOutput(const Char_t *filename, const Char_t *dbString); // process output
d501ffec 52
53 /* static setters */
54 static void SetMinVertexIntegral(Double_t value) {fgMinVertexIntegral = value;}; // setter
55 static void SetMinDeltatIntegal(Double_t value) {fgMinDeltatIntegral = value;}; // setter
56 static void SetMinVertexIntegralSample (Double_t value) {fgMinVertexIntegralSample = value;}; // setter
57 static void SetMinDeltatIntegralSample (Double_t value) {fgMinDeltatIntegralSample = value;}; // setter
3c8efc07 58
59 protected:
60
61 AliTOFAnalysisTaskCalibPass0(const AliTOFAnalysisTaskCalibPass0 &); // copy constructor
62 AliTOFAnalysisTaskCalibPass0 &operator=(const AliTOFAnalysisTaskCalibPass0 &); // operator=
63
64 /* methods */
65 Bool_t InitRun(); // init run
66 Bool_t InitEvent(); // init event
67 Bool_t HasTOFMeasurement(const AliESDtrack *track) const ; // has TOF measurement
68
69 /* post-processing methods */
70 Bool_t CheckMatchingPerformance(const TH2F *histoDeltazEta, const TH2F *histoAcceptedTracksEtaPt, const TH2F *histoMatchedTracksEtaPt) const; // check matching efficiency
71 Bool_t CalibrateAndStore(TH2F *histoVertexTimestamp, TH2F *histoDeltatTimestamp, const Char_t *dbString); // calibrate and store
72 Int_t FitPeak(TF1 *fitFunc, TH1D *h, Float_t startSigma, Float_t nSigmaMin, Float_t nSigmaMax); // fit peak
73
74 /* flags and cuts */
75 Bool_t fInitFlag; // init flag
76 Bool_t fEventSelectionFlag; // event selection flag
77 Bool_t fVertexSelectionFlag; // vertex selection flag
78 Double_t fVertexCut; // vertex cut
79
80 /* ESD analysis */
81 Int_t fRunNumber; // run number
82 AliESDEvent *fESDEvent; // ESD event
83 AliPhysicsSelection *fEventCuts; // event cuts
84 AliESDtrackCuts *fTrackCuts; // track cuts
85 UInt_t fStartTime; // start time
86 UInt_t fEndTime; // end time
87 UInt_t fEventTime; // event time
88 UInt_t fElapsedTime; // event time since start
89 const AliESDVertex *fkVertex; // vertex
90
91 /* GRP related stuff */
92 AliGRPManager *fGRPManager; // GRP manager
93 const AliGRPObject *fkGRPObject; // GRP object
94
95 /* TOF related stuff */
96 AliTOFcalib *fTOFcalib; // TOF calib
97
98 /* lists and histos */
99 TList *fHistoList; // list of histograms
100 TH2F *fHistoVertexTimestamp; // vertex-timestamp histo
101 TH2F *fHistoDeltatTimestamp; // deltat-timestamp histo
102 TH2F *fHistoDeltazEta; // deltaz-eta histo
103 TH2F *fHistoDeltazCosTheta; // deltaz-costheta histo
104 TH2F *fHistoAcceptedTracksEtaPt; // accepted tracks eta-pt histo
105 TH2F *fHistoMatchedTracksEtaPt; // matched tracks eta-pt histo
106
107 /* post-processing variables */
108 static const Int_t fgkMaxNumberOfPoints; // max number of points
d501ffec 109 static Double_t fgMinVertexIntegral; // min vertex integral
110 static Double_t fgMinDeltatIntegral; // min vertex integral
111 static Double_t fgMinVertexIntegralSample; // min vertex integral sample
112 static Double_t fgMinDeltatIntegralSample; // min vertex integral sample
3c8efc07 113
114
115 ClassDef(AliTOFAnalysisTaskCalibPass0, 1);
116};
117
118#endif /* ALIANALYSISTASKEVENTTIME_H */