]>
Commit | Line | Data |
---|---|---|
6d3c5222 | 1 | #ifndef ALITRDCALIBTASK_H |
2 | #define ALITRDCALIBTASK_H | |
3 | ||
4 | /////////////////////////////////////////////////////////////////////////////// | |
5 | // // | |
6 | // TRD calibration task for offline calibration // | |
7 | // // | |
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | ||
11 | class TList; | |
12 | class TObject; | |
13 | class TObjArray; | |
14 | class TH2F; | |
15 | class TH1F; | |
16 | class TH1I; | |
17 | class TProfile2D; | |
18 | class TH2I; | |
19 | class TTree; | |
20 | class AliESDEvent; | |
21 | class AliESDfriend; | |
22 | class AliESDtrack; | |
23 | class AliESDfriendTrack; | |
24 | class AliTRDtrackV1; | |
25 | class AliTRDCalibraFillHisto; | |
26 | class AliTRDcluster; | |
27 | class AliESDtrackCuts; | |
28 | class AliTRDCalDet; | |
29 | ||
30 | #include "TObjString.h" | |
98937691 | 31 | #include "AliAnalysisTaskSE.h" |
32 | #include "TMath.h" | |
6d3c5222 | 33 | |
34 | class AliTRDCalibTask : public AliAnalysisTask { | |
35 | public: | |
36 | AliTRDCalibTask(const char *name = "AliTRDCalibTask"); | |
37 | virtual ~AliTRDCalibTask(); | |
38 | ||
39 | virtual void ConnectInputData(Option_t *); | |
40 | virtual void CreateOutputObjects(); | |
98937691 | 41 | virtual void Exec(Option_t *); |
6d3c5222 | 42 | virtual void Terminate(Option_t *); |
43 | virtual Bool_t Load(const Char_t *filename); | |
44 | void Plot(); | |
45 | ||
46 | void SetHisto2d(Bool_t histo2d) {fHisto2d=histo2d;}; | |
47 | void SetVector2d(Bool_t vector2d) {fVector2d=vector2d;}; | |
48 | void SetVdriftLinear(Bool_t vdriftLinear) {fVdriftLinear = vdriftLinear;}; | |
49 | void SetNbTimeBins(Int_t nbTimeBins) {fNbTimeBins=nbTimeBins;}; | |
50 | ||
51 | void SetNz(Short_t nz, Int_t i) {fNz[i]=nz;}; | |
52 | void SetNrphi(Short_t nrphi, Int_t i) {fNrphi[i]=nrphi;}; | |
53 | ||
54 | void AddSelectedTriggerClass(const char*name) {fSelectedTrigger->Add(new TObjString(name));}; | |
55 | void SetReject(Bool_t rejected) {fRejected = rejected;}; | |
56 | ||
98937691 | 57 | void SetESDtrackCuts(AliESDtrackCuts * const esdtrackCuts) {fEsdTrackCuts = esdtrackCuts;}; |
6d3c5222 | 58 | void SetRequirePrimaryVertex(Bool_t requirePrimaryVertex) {fRequirePrimaryVertex = requirePrimaryVertex;}; |
59 | void SetUseTPCVertex() {fVtxTPC=kTRUE ; fVtxSPD=kFALSE;} | |
60 | void SetUseSPDVertex() {fVtxTPC=kFALSE; fVtxSPD=kTRUE ;} | |
61 | void SetMinNbOfContributors(Int_t minNbOfContributors) {fMinNbContributors = minNbOfContributors;}; | |
98937691 | 62 | void SetRangePrimaryVertexZ(Double_t rangePrimaryVertexZ) {fRangePrimaryVertexZ = TMath::Abs(rangePrimaryVertexZ);}; |
6d3c5222 | 63 | |
64 | void SetLow(Int_t low) {fLow=low;}; | |
65 | void SetHigh(Int_t high) {fHigh=high;}; | |
66 | void SetFillZero(Bool_t fillZero) {fFillZero = fillZero;}; | |
67 | void SetNormalizeNbOfCluster(Bool_t normalizeNbOfCluster = kTRUE) {fNormalizeNbOfCluster = normalizeNbOfCluster;}; | |
68 | void SetMaxCluster(Float_t maxCluster) {fMaxCluster = maxCluster; }; | |
69 | void SetNbMaxCluster(Short_t nbMaxCluster) {fNbMaxCluster = nbMaxCluster; }; | |
70 | void SetOfflineTracks() {fOfflineTracks=kTRUE; fStandaloneTracks=kFALSE; }; | |
71 | void SetStandaloneTracks() {fStandaloneTracks=kTRUE; fOfflineTracks=kFALSE; }; | |
72 | ||
73 | void SetCalDetGain(AliTRDCalDet * const calDetGain) {fCalDetGain = calDetGain;}; | |
74 | ||
75 | void SetMaxEvent(Int_t nbevents) { fMaxEvent = nbevents; }; | |
76 | void SetDebug(Int_t debug) { fDebug = debug; }; | |
77 | ||
78 | private: | |
79 | AliESDEvent *fESD; //! ESD object | |
80 | AliESDfriend *fESDfriend; //! ESD friend | |
81 | const AliESDtrack *fkEsdTrack; //! ESD track | |
82 | AliESDfriendTrack *fFriendTrack; //! ESD friend track | |
83 | TObject *fCalibObject; //! calibration objects attached to the ESD friend | |
84 | AliTRDtrackV1 *fTrdTrack; //! trdtrack | |
85 | AliTRDcluster *fCl; //! cluster | |
86 | ||
87 | TList *fListHist; //! list of histograms | |
88 | ||
89 | AliTRDCalibraFillHisto *fTRDCalibraFillHisto; //! calibration analyse object | |
90 | ||
91 | TH1I *fNEvents; //! counter | |
92 | ||
93 | TH1F *fNbTRDTrack; //! nb ESD tracks with TRD clusters | |
94 | TH1F *fNbTRDTrackOffline; //! nb ESD tracks with TRD clusters | |
95 | TH1F *fNbTRDTrackStandalone; //! nb ESD tracks with TRD clusters | |
96 | TH2F *fNbTPCTRDtrack; //! nb TPC and TRD tracks when problems | |
97 | ||
98 | TH1F *fNbTimeBin; //! nb Time Bin | |
99 | TH1F *fNbTimeBinOffline; //! nb Time Bin offline | |
100 | TH1F *fNbTimeBinStandalone; //! nb Time Bin standalone | |
101 | TH1F *fNbClusters; //! nb Clusters | |
102 | TH1F *fNbClustersOffline; //! nb Clusters offline | |
103 | TH1F *fNbClustersStandalone; //! nb Clusters standalone | |
104 | TH1F *fNbTracklets; //! nb Tracklets | |
105 | TH1F *fNbTrackletsOffline; //! nb Tracklets offline | |
106 | TH1F *fNbTrackletsStandalone; //! nb Tracklets standalone | |
107 | ||
98937691 | 108 | TH2F *fAbsoluteGain; //! Absolute Gain without AliESDfriend |
6d3c5222 | 109 | TH2I *fCH2dSum; //! CH2d charge all |
110 | TProfile2D *fPH2dSum; //! PH2d PH all | |
111 | TH2I *fCH2dSM; //! CH2d per SM | |
112 | TProfile2D *fPH2dSM; //! PH2d per SM | |
113 | ||
98937691 | 114 | Bool_t fHisto2d; // histo |
115 | Bool_t fVector2d; // vector | |
116 | Bool_t fVdriftLinear; // vdrift Linear | |
6d3c5222 | 117 | |
98937691 | 118 | Int_t fNbTimeBins; // number of timebins |
6d3c5222 | 119 | |
120 | Short_t fNz[3]; // Nz mode | |
121 | Short_t fNrphi[3]; // Nrphi mode | |
122 | ||
123 | TObjArray *fSelectedTrigger; // Trigger class names accepted/rejected | |
124 | Bool_t fRejected; // Reject the selected trigger class | |
125 | ||
126 | AliESDtrackCuts *fEsdTrackCuts; // Quality cut on the AliESDtrack | |
127 | Bool_t fRequirePrimaryVertex; // Primary Vertex | |
128 | Bool_t fVtxTPC; // Flag for use of TPC vertex | |
129 | Bool_t fVtxSPD; // Flag for use of SPD vertex | |
130 | Int_t fMinNbContributors; // Min number of contributors | |
98937691 | 131 | Double_t fRangePrimaryVertexZ; // Were the primary vertex is |
6d3c5222 | 132 | |
133 | Int_t fLow; // lower limit of nb of TRD clusters per tracklet | |
134 | Int_t fHigh; // higher limit of nb of TRD clusters per tracklet | |
135 | Bool_t fFillZero; // fill zero | |
136 | Bool_t fNormalizeNbOfCluster; // normalize with number of clusters (per default not) | |
137 | Float_t fRelativeScale; // relative scale for gas gain | |
138 | Float_t fMaxCluster; // Maxcluster | |
139 | Short_t fNbMaxCluster; // Number of tb at the end | |
140 | Bool_t fOfflineTracks; // Only Offline refitted tracks | |
141 | Bool_t fStandaloneTracks; // Take only standalone tracks | |
142 | ||
143 | AliTRDCalDet *fCalDetGain; // Calib object gain | |
144 | ||
145 | Int_t fMaxEvent; // max events | |
146 | Int_t fCounter; // max events | |
98937691 | 147 | Int_t fDebug; // fDebug |
6d3c5222 | 148 | |
149 | AliTRDCalibTask(const AliTRDCalibTask&); | |
150 | AliTRDCalibTask& operator=(const AliTRDCalibTask&); | |
151 | ||
152 | ClassDef(AliTRDCalibTask, 1); | |
153 | }; | |
154 | ||
21185a48 | 155 | #endif |
156 | ||
157 |