1 #ifndef ALITRDTENDERSUPPLY_H
2 #define ALITRDTENDERSUPPLY_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 ////////////////////////////////////////////////////////////////////////
9 // TRD tender, reapply pid on the fly //
11 ////////////////////////////////////////////////////////////////////////
15 #include <AliTenderSupply.h>
19 class AliOADBContainer;
20 class AliTRDonlineTrackMatching;
22 class AliTRDTenderSupply: public AliTenderSupply {
31 AliTRDTenderSupply(const char *name, const AliTender *tender=NULL);
32 virtual ~AliTRDTenderSupply();
34 void SetRunByRunCorrection(const char *filename) { fNameRunByRunCorrection = filename; }
35 // void SetLoadReferencesFromCDB() { fLoadReferences = kTRUE; fLoadReferencesFromCDB = kTRUE; }
36 // void SetLoadReferencesFromFile() { fLoadReferences = kTRUE; fLoadReferencesFromCDB = kFALSE; }
37 void SetLoadDeadChambersFromCDB(){ fLoadDeadChambers = kTRUE;} ;
38 void SetPIDmethod(Int_t pidMethod) { fPIDmethod = pidMethod; }
39 void SetNormalizationFactor(Double_t norm, Int_t runMin, Int_t runMax);
40 void SetNormalizationFactor(Double_t norm) { fNormalizationFactor = norm; }
41 void SetCalibLowpThreshold(Double_t pmin) { fPthreshold = pmin; };
42 void SetGeoFile(const char *filename) { fGeoFile = filename; }
43 void SetDebugMode() { fDebugMode = kTRUE; }
44 void SetRedoTRDMatching(Bool_t redo = kTRUE) {fRedoTrdMatching = redo;}
47 virtual void ProcessEvent();
49 void SwitchOnGainCorrection() { fGainCorrection = kTRUE; }
50 void SwitchOffGainCorrection() { fGainCorrection = kFALSE; }
51 void SetSlicesForPID(UInt_t min, UInt_t max) { fSlicesForPID[0] = min; fSlicesForPID[1] = max;}
52 void AddBadChamber(Int_t chamberID){fBadChamberID[fNBadChambers++] = chamberID;};
61 Bool_t GetTRDchamberID(AliESDtrack * const track, Int_t *detectors);
62 void SetChamberGain();
63 void ApplyGainCorrection(AliESDtrack *track, const Int_t * const detectors);
64 void ApplyRunByRunCorrection(AliESDtrack *const track);
65 void MaskChambers(AliESDtrack * const track, const Int_t * const detectors);
66 void LoadReferences();
67 void LoadDeadChambersFromCDB();
68 void LoadRunByRunCorrection(const char *filename);
69 Bool_t IsBadChamber(Int_t chamberID);
70 Double_t GetNormalizationFactor(Int_t runnumber);
72 AliESDEvent *fESD; //! the ESD Event
73 AliESDpid *fESDpid; //! ESD PID object
74 AliTRDonlineTrackMatching *fTrdOnlineTrackMatcher; //! TRD online track matcher
76 AliTRDCalDet *fChamberGainOld; // TRD Chamber Gain Factor used for producing the ESD
77 AliTRDCalDet *fChamberGainNew; // New TRD Chamber Gain Factor
78 AliTRDCalDet *fChamberVdriftOld; // Old drift velocity calibration
79 AliTRDCalDet *fChamberVdriftNew; // New drift velocity calibration
80 AliOADBContainer *fRunByRunCorrection; // Run by run gain correction
82 Int_t fPIDmethod; // PID method
83 Double_t fNormalizationFactor; // dE/dx Normalization Factor
84 Double_t fPthreshold; // Low Momentum threshold for calibration
85 Int_t fBadChamberID[kNChambers]; // List of Bad Chambers
86 UInt_t fSlicesForPID[2]; // Select range of slices used in the PID response
87 UInt_t fNBadChambers; // Number of bad chambers
88 const char *fGeoFile; // File with geometry.root
89 Bool_t fGainCorrection; // Apply gain correction
90 // Bool_t fLoadReferences; // Tender Load references
91 // Bool_t fLoadReferencesFromCDB; // Load References from CDB
92 Bool_t fLoadDeadChambers; // Load dead chambers
93 Bool_t fHasReferences; // has references loaded
94 Bool_t fHasNewCalibration; // has new calibration
95 Bool_t fDebugMode; // Run in debug mode
96 Bool_t fRedoTrdMatching; // Redo Track Matching
97 TString fNameRunByRunCorrection; // filename with the run-by-run gain correction
98 TObjArray *fNormalizationFactorArray; // Array with normalisation Factors
100 AliTRDTenderSupply(const AliTRDTenderSupply&c);
101 AliTRDTenderSupply& operator= (const AliTRDTenderSupply&c);
103 ClassDef(AliTRDTenderSupply, 1); // TRD tender task