- run dependent settings automatically in the initialisation
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliTRDTenderSupply.h
CommitLineData
e75408ba 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
00685073 17class AliTRDCalDet;
8d458e7c 18class AliESDtrack;
19class AliESDEvent;
00685073 20
e75408ba 21class AliTRDTenderSupply: public AliTenderSupply {
22
23public:
00685073 24 enum{
25 kNNpid = 0,
26 k1DLQpid = 1,
27 k2DLQpid = 2
28 };
e75408ba 29 AliTRDTenderSupply();
30 AliTRDTenderSupply(const char *name, const AliTender *tender=NULL);
31 virtual ~AliTRDTenderSupply();
32
9daf22f8 33 void SetNNref(const char* file) {fFileNNref=file;}
e75408ba 34 void SetPIDmethod(Int_t pidMethod) { fPIDmethod = pidMethod; }
00685073 35 void SetCalibLowpThreshold(Double_t pmin) { fPthreshold = pmin; };
e75408ba 36
37 virtual void Init();
38 virtual void ProcessEvent();
39
00685073 40 void SwitchOnGainCorrection() { fGainCorrection = kTRUE; }
41 void SwitchOffGainCorrection() { fGainCorrection = kFALSE; }
42 void AddBadChamber(Int_t chamberID){fBadChamberID[fNBadChambers++] = chamberID;};
e75408ba 43
44private:
45 enum{
00685073 46 kNPlanes = 6,
47 kNStacks = 5,
48 kNChambers = 540
e75408ba 49 };
00685073 50
51 Bool_t GetTRDchamberID(AliESDtrack * const track, Int_t *detectors);
52 void SetChamberGain();
53 void ApplyGainCorrection(AliESDtrack *track);
54
55 AliESDEvent *fESD; //! the ESD Event
56 AliESDpid *fESDpid; //! ESD PID object
57
58 AliTRDCalDet *fChamberGainOld; // TRD Chamber Gain Factor used for producing the ESD
59 AliTRDCalDet *fChamberGainNew; // New TRD Chamber Gain Factor
60 AliTRDCalDet *fChamberVdriftOld; // Old drift velocity calibration
61 AliTRDCalDet *fChamberVdriftNew; // New drift velocity calibration
e75408ba 62
9daf22f8 63 TString fFileNNref; // path and name to the NNref file
e75408ba 64 Int_t fPIDmethod; // PID method
00685073 65 Double_t fPthreshold; // Low Momentum threshold for calibration
66 Int_t fBadChamberID[kNChambers]; // List of Bad Chambers
67 UInt_t fNBadChambers; // Number of bad chambers
68 Bool_t fGainCorrection; // Apply gain correction
e75408ba 69
70 AliTRDTenderSupply(const AliTRDTenderSupply&c);
71 AliTRDTenderSupply& operator= (const AliTRDTenderSupply&c);
72
73 ClassDef(AliTRDTenderSupply, 1); // TRD tender task
74};
e75408ba 75#endif
76