]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCcalibTimeGain.h
Forgotten commit
[u/mrichter/AliRoot.git] / TPC / AliTPCcalibTimeGain.h
1 #ifndef ALITPCCALIBTIMEGAIN_H
2 #define ALITPCCALIBTIMEGAIN_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 #include "AliTPCcalibBase.h"
8 #include "TH2F.h"
9 #include "TF1.h"
10 #include "TArrayD.h"
11 #include "TObjArray.h"
12 #include "AliSplineFit.h"
13
14 class TH1F;
15 class TH3F;
16 class TH2F;
17 class THnSparse;
18 class TList;
19 class TGraphErrors;
20 class AliESDEvent;
21 class AliESDtrack;
22 class AliTPCcalibLaser;
23 class AliTPCseed;
24
25 #include "TTreeStream.h"
26
27
28 class AliTPCcalibTimeGain:public AliTPCcalibBase {
29 public:
30   AliTPCcalibTimeGain(); 
31   AliTPCcalibTimeGain(const Text_t *name, const Text_t *title, UInt_t StartTime, UInt_t EndTime, Int_t deltaIntegrationTimeGain);
32   virtual ~AliTPCcalibTimeGain();
33   //
34   virtual void           Process(AliESDEvent *event);
35   virtual Long64_t       Merge(TCollection *li);
36   virtual void           AnalyzeRun(Int_t minEntries);
37   //
38   void                   ProcessCosmicEvent(AliESDEvent *event);
39   void                   ProcessBeamEvent(AliESDEvent *event);
40   //
41   void                   CalculateBetheAlephParams(TH2F *hist, Double_t * ini);
42   static void            BinLogX(THnSparse *h, Int_t axisDim);
43   static void            BinLogX(TH1 *h);
44   //
45   THnSparse *            GetHistGainTime(){return (THnSparse*) fHistGainTime;};
46   TH2F      *            GetHistDeDxTotal(){return (TH2F*) fHistDeDxTotal;};
47   //
48   TGraphErrors *         GetGraphGainVsTime(Int_t runNumber = 0, Int_t minEntries = 2000);
49   static AliSplineFit *  MakeSplineFit(TGraphErrors * graph);
50   //
51   void SetMIP(Float_t MIP){fMIP = MIP;};
52   void SetUseMax(Bool_t UseMax){fUseMax = UseMax;};
53   void SetLowerTrunc(Float_t LowerTrunc){fLowerTrunc = LowerTrunc;};
54   void SetUpperTrunc(Float_t UpperTrunc){fUpperTrunc = UpperTrunc;};
55   void SetUseShapeNorm(Bool_t UseShapeNorm){fUseShapeNorm = UseShapeNorm;};
56   void SetUsePosNorm(Bool_t UsePosNorm){fUsePosNorm = UsePosNorm;};
57   void SetUsePadNorm(Int_t UsePadNorm){fUsePadNorm = UsePadNorm;};
58   void SetIsCosmic(Bool_t IsCosmic){fIsCosmic = IsCosmic;};
59   void SetLowMemoryConsumption(Bool_t LowMemoryConsumption){fLowMemoryConsumption = LowMemoryConsumption;};
60   void SetUseCookAnalytical(Bool_t UseCookAnalytical){fUseCookAnalytical = UseCookAnalytical;};
61
62 private:
63   //
64   Float_t GetTPCdEdx(AliTPCseed * seed);   // wrapper for CookdEdxNorm or analytical
65   //
66   THnSparse    * fHistGainTime;            // dEdx vs. time, type, Driftlength, momentum P
67   TGraphErrors * fGainVsTime;              // multiplication factor vs. time
68   TH2F         * fHistDeDxTotal;           // dEdx vs. momentum for quality assurance
69   //
70   Float_t fIntegrationTimeDeDx;         // required statistics for each dEdx time bin
71   //
72   Float_t fMIP;                         // rough MIP position in order to have scaleable histograms
73   //
74   Bool_t  fUseMax;                      // true: use max charge for dE/dx calculation, false: use total charge for dE/dx calculation
75   Float_t fLowerTrunc;                  // lower truncation of dE/dx ; at most 5%
76   Float_t fUpperTrunc;                  // upper truncation of dE/dx ; ca. 70%
77   Bool_t  fUseShapeNorm;                // use empirical correction of dependencies
78   Bool_t  fUsePosNorm;                  // charge correction (analytical?)
79   Int_t   fUsePadNorm;                  // normalization of pad geometries
80   Bool_t  fUseCookAnalytical;           // true if CookdEdxAnalytical should be used
81   //
82   Bool_t  fIsCosmic;                    // kTRUE if the analyzed runs contain cosmic events
83   Bool_t  fLowMemoryConsumption;        // set this option kTRUE if the momenta information should not be stored in order to save memory
84   //
85   AliTPCcalibTimeGain(const AliTPCcalibTimeGain&); 
86   AliTPCcalibTimeGain& operator=(const AliTPCcalibTimeGain&); 
87   void     Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);};
88   void     Process(AliTPCseed *track){return AliTPCcalibBase::Process(track);}
89
90   ClassDef(AliTPCcalibTimeGain, 1); 
91 };
92
93 #endif
94
95