]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFCalibTask.h
Corrected a bug in kalman tracking (final parameters and covariances
[u/mrichter/AliRoot.git] / TOF / AliTOFCalibTask.h
CommitLineData
1ed77580 1#ifndef ALITOFCALIBTASK_H
2#define ALITOFCALIBTASK_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// task for TOF calibration //
9// C.Zampolli //
10////////////////////////////////////////////
11
12/* $Id$ */
13
e26353e8 14#define TOFCHANNELS 157248 // number TOF channels
1ed77580 15#define CHENTRIES 500 // number of entries per TOF channel per run
16 // (to be divided by 5 to get the
17 // real number of entries), bigarray
18#define CHENTRIESSMALL 300 // number of entries per TOF channel per run
19 // (to be divided by 3 to get the
20 // real number of entries), smallarray
1ed77580 21#define LOWERMOMBOUND 1.0 // [GeV/c] default value Pb-Pb
22#define UPPERMOMBOUND 1.8 // [GeV/c] default value Pb-Pb
e26353e8 23#define MINTIME 5 // min delta time of flight value (ns)
1ed77580 24#define NIDX 5 // number of values stored
25 // in big/smallarray per ESD track
26#define NIDXSMALL 3 // number of values stored
27 // after Comb PID per ESD track
28#define DELTAIDXTOT 0 // index for ToT in bigarray
29#define DELTAIDXTIME 1 // index for TOF time in big/smallarray
e26353e8 30#define DELTAIDXEXTIMEPI 2 // index for Exp Time Pi in bigarray, will
31 // be the same element in the array where
32 // the assigned time after Comb PID will
33 // be stored
1ed77580 34#define DELTAIDXEXTIMEKA 3 // index for Exp Time Ka in bigarray
35#define DELTAIDXEXTIMEPR 4 // index for Exp Time Pr in bigarray
1ed77580 36#define TRACKERROR 90*1E-3 // error on the tracks for
37 // Combinatorial PID (ns)
1ed77580 38
39#include "AliAnalysisTask.h"
40
41class TTree;
42class AliESDtrack ;
43class TFile;
44class TH1F ;
45class TH1I ;
46class TH1D ;
47class TH2F ;
70ddd0ee 48class AliESDEvent ;
1ed77580 49
50class AliTOFCalibTask : public AliAnalysisTask {
51
52public:
53 AliTOFCalibTask(const char *name) ; //ctor
54 AliTOFCalibTask(const AliTOFCalibTask & calibtask); // copy constructor
55 AliTOFCalibTask& operator=(const AliTOFCalibTask & calibtask); // assignment operator
56 virtual ~AliTOFCalibTask(); //dtor
57 virtual void Exec(Option_t * opt="") ;
58 virtual void ConnectInputData(Option_t *) ;
59 virtual void CreateOutputObjects();
60 virtual void Terminate(Option_t * opt = "") ;
70ddd0ee 61 virtual Bool_t Notify();
e26353e8 62 void SetRun(Int_t irun){frun=irun;}
63 Int_t GetRun() const {return frun;}
1ed77580 64
65private:
66 Bool_t Select(AliESDtrack *t);
e26353e8 67 Int_t SelectOnTime(Float_t *charray, Int_t ntracks, Int_t ich);
1ed77580 68 Bool_t CombPID(Float_t *smallarray, Int_t size);
69 void BookHistos();
70 void DrawHistos();
e26353e8 71 Float_t LoopCombPID(Int_t itrkinset, Int_t ntrkinset, Float_t **exptof, Float_t *texp, Float_t *timeofflight, Int_t *index, Float_t chisquarebest);
1ed77580 72
73 const Char_t *fdir; // initial directory
74 TTree* fChain ; //!pointer to the analyzed TTree or TChain
75 //leaf types
70ddd0ee 76 AliESDEvent* fESD ; //! Declaration of leave types
1ed77580 77 Float_t fToT; // Time over Threshold, ns
78 Float_t fTime; // TOF time, ns
79 Float_t fExpTimePi; // exp time, Pions, ns
80 Float_t fExpTimeKa; // exp time, Kaons, ns
81 Float_t fExpTimePr; // exp time, Protons, ns
1ed77580 82 Float_t fMinTime; // min TOF time for track selection; not used
83 Float_t** fbigarray; // big array for calibration
84 Int_t* findexarray; // array for entry index in each channel
85 Int_t fnESD; // number of analyzed ESD tracks
86 Int_t fnESDselected; // number of selected ESD tracks
87 Int_t fnESDkTOFout; // number of ESD tracks with kTOFout
88 Int_t fnESDkTIME; // number of ESD tracks with kTIME
89 Int_t fnESDassTOFcl; // number of ESD tracks with assigned TOF cluster
90 Int_t fnESDTIMEcut; // number of ESD tracks with TOF time < 17 ns
91 Int_t fnESDTRDcut; // number of ESD tracks with TRD ok
92
93 // Histos
94 TH1F* fhToT; // ToT histo
95 TH1F* fhTime; // Time histo
96 TH1F* fhExpTimePi; // Exp Time Pi histo
97 TH1F* fhExpTimeKa; // Exp Time Ka histo
98 TH1F* fhExpTimePr; // Exp Time Pr histo
99 TH1I* fhPID; // PID histo
100 TH1D* fhch; // TOF channel histo
101
102 TObjArray * fOutputContainer ; //! output data container
e26353e8 103 Int_t frun; // number of current run
104 Int_t fassparticle[11]; // array for assigned identities
1ed77580 105
e26353e8 106 ClassDef(AliTOFCalibTask, 2); // TOF Calib task
1ed77580 107};
108#endif // ALITOFCALIBTASK_H
109