]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/TenderSupplies/AliTRDTenderSupply.h
make macros compatible with centrality train
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliTRDTenderSupply.h
1 #ifndef ALITRDTENDERSUPPLY_H
2 #define ALITRDTENDERSUPPLY_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 //  TRD tender, reapply pid on the fly                                //
10 //                                                                    //
11 ////////////////////////////////////////////////////////////////////////
12
13
14
15 #include <AliTenderSupply.h>
16
17 class AliTRDCalDet;
18
19 class AliTRDTenderSupply: public AliTenderSupply {
20   
21 public:
22   enum{
23     kNNpid = 0,
24     k1DLQpid = 1,
25     k2DLQpid = 2
26   };
27   AliTRDTenderSupply();
28   AliTRDTenderSupply(const char *name, const AliTender *tender=NULL);
29   virtual ~AliTRDTenderSupply();
30
31   void SetPIDmethod(Int_t pidMethod) { fPIDmethod = pidMethod; }
32   void SetCalibLowpThreshold(Double_t pmin) { fPthreshold = pmin; };
33   
34   virtual void              Init();
35   virtual void              ProcessEvent();
36   
37   void SwitchOnGainCorrection() { fGainCorrection = kTRUE; }
38   void SwitchOffGainCorrection() { fGainCorrection = kFALSE; }
39   void AddBadChamber(Int_t chamberID){fBadChamberID[fNBadChambers++] = chamberID;};
40   
41 private:
42   enum{
43     kNPlanes = 6,
44     kNStacks = 5,
45     kNChambers = 540
46   };
47
48   Bool_t GetTRDchamberID(AliESDtrack * const track, Int_t *detectors);
49   void SetChamberGain();
50   void ApplyGainCorrection(AliESDtrack *track);
51   
52   AliESDEvent           *fESD;       //! the ESD Event
53   AliESDpid             *fESDpid;    //! ESD PID object
54
55   AliTRDCalDet *fChamberGainOld;     // TRD Chamber Gain Factor used for producing the ESD
56   AliTRDCalDet *fChamberGainNew;     // New TRD Chamber Gain Factor
57   AliTRDCalDet *fChamberVdriftOld;   // Old drift velocity calibration
58   AliTRDCalDet *fChamberVdriftNew;   // New drift velocity calibration
59
60   Int_t fPIDmethod;                  // PID method
61   Double_t fPthreshold;              // Low Momentum threshold for calibration
62   Int_t fBadChamberID[kNChambers];   // List of Bad Chambers
63   UInt_t fNBadChambers;              // Number of bad chambers
64   Bool_t fGainCorrection;            // Apply gain correction 
65   
66   AliTRDTenderSupply(const AliTRDTenderSupply&c);
67   AliTRDTenderSupply& operator= (const AliTRDTenderSupply&c);
68   
69   ClassDef(AliTRDTenderSupply, 1);  // TRD tender task
70 };
71 #endif
72