Using detector quality flag (taken from ALICE logbook) to decide whether to rpodcue...
[u/mrichter/AliRoot.git] / ZDC / AliZDCReconstructor.h
CommitLineData
8309c1ab 1#ifndef ALIZDCRECONSTRUCTOR_H
2#define ALIZDCRECONSTRUCTOR_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
58671297 8/////////////////////////////////////////////
9// //
10// class for ZDC reconstruction //
11// //
12/////////////////////////////////////////////
8309c1ab 13
14#include "AliReconstructor.h"
7bff3766 15#include "AliZDCRecoParam.h"
af6f24c9 16#include "AliESDZDC.h"
8309c1ab 17
90936733 18class AliCDBManager;
19class AliCDBStorage;
20class AliZDCPedestals;
21class AliZDCEnCalib;
960c5431 22class AliZDCSaturationCalib;
90936733 23class AliZDCTowerCalib;
24class AliZDCMBCalib;
27d1ff1f 25class AliZDCTDCCalib;
90936733 26class AliZDCRecoParampp;
27class AliZDCRecoParamPbPb;
28class AliLog;
8309c1ab 29class AliLoader;
30
8309c1ab 31class AliZDCReconstructor: public AliReconstructor {
32public:
33 AliZDCReconstructor();
34 virtual ~AliZDCReconstructor();
35
73bc3a3f 36 virtual void Init();
af6f24c9 37 virtual void Init(TString beamType, Float_t beamEnergy);
a4cab348 38 virtual Bool_t HasDigitConversion() const {return kFALSE;};
73bc3a3f 39
90936733 40 virtual void Reconstruct(TTree*digitsTree, TTree* clustersTree) const;
1e319f71 41 virtual void Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const;
70f04f6d 42
90936733 43 virtual void FillESD(TTree* /*digitsTree*/, TTree* clustersTree,
44 AliESDEvent* esd) const {FillZDCintoESD(clustersTree, esd);}
45 virtual void FillESD(AliRawReader* /*rawReader*/, TTree* clustersTree,
46 AliESDEvent* esd) const {FillZDCintoESD(clustersTree, esd);}
73bc3a3f 47
af6f24c9 48 void FillZDCintoESD(TTree *clustersTree, AliESDEvent *esd) const;
49
7bff3766 50 // parameter settings for reconstruction
03be9e4f 51 void SetRecoMode(Int_t recoMode, Float_t beamEnergy)
90936733 52 {fRecoMode=recoMode; fBeamEnergy=beamEnergy;}
53 static void SetRecoParam(AliZDCRecoParam * const param)
54 {fgRecoParam = param;}
fd9afd60 55
90936733 56 Int_t GetRecoMode() const {return fRecoMode;}
57 Float_t GetBeamEnergy() const {return fBeamEnergy;}
42d8b8d5 58
af6f24c9 59 AliESDZDC* GetZDCESDData() const {return fESDZDC;}
60
90936733 61 static const AliZDCRecoParam* GetRecoParam()
62 {return dynamic_cast<const AliZDCRecoParam*>(AliReconstructor::GetRecoParam(9));}
81f09162 63
42d8b8d5 64 void SetPedSubMode(Int_t pedsubMode) {fPedSubMode=pedsubMode;}
90936733 65 Int_t GetPedSubMode() const {return fPedSubMode;}
7bff3766 66
58671297 67 void SetSignalThreshold(Float_t val) {fSignalThreshold=val;}
90936733 68 Float_t GetSignalThreshold() const {return fSignalThreshold;}
58671297 69
7bff3766 70 // OCDB objects for reconstruction
1e319f71 71 AliCDBStorage *SetStorage(const char* uri);
72 AliZDCPedestals *GetPedestalData() const;
73 AliZDCEnCalib *GetEnergyCalibData() const;
960c5431 74 AliZDCSaturationCalib *GetSaturationCalibData() const;
1e319f71 75 AliZDCTowerCalib *GetTowerCalibData() const;
0d579f58 76 AliZDCMBCalib *GetMBCalibData() const;
27d1ff1f 77 AliZDCTDCCalib *GetTDCCalibData() const;
646f1679 78
8309c1ab 79private:
3abc001d 80 AliZDCReconstructor(const AliZDCReconstructor&); //Not implemented
81 AliZDCReconstructor& operator =(const AliZDCReconstructor&); //Not implemented
8309c1ab 82
7bff3766 83 void ReconstructEventpp(TTree *clustersTree,
90936733 84 const Float_t* const corrADCZN1, const Float_t* const corrADCZP1,
85 const Float_t* const corrADCZN2, const Float_t* const corrADCZP2,
86 const Float_t* const corrADCZEM1, const Float_t* const corrADCZEM2,
87 Float_t* sPMRef1, Float_t* sPMRef2, Bool_t isScalerOn, UInt_t* scaler,
f53e5ecb 88 Int_t tdcData[32][4], const Int_t* const evQualityBlock,
82dffa48 89 const Int_t* const triggerBlock, const Int_t* const chBlock, UInt_t puBits) const;
7bff3766 90 void ReconstructEventPbPb(TTree *clustersTree,
90936733 91 const Float_t* const corrADCZN1, const Float_t* const corrADCZP1,
92 const Float_t* const corrADCZN2, const Float_t* const corrADCZP2,
93 const Float_t* const corrADCZEM1, const Float_t* const corrADCZEM2,
94 Float_t* sPMRef1, Float_t* sPMRef2, Bool_t isScalerOn, UInt_t* scaler,
f53e5ecb 95 Int_t tdcData[32][4], const Int_t* const evQualityBlock,
82dffa48 96 const Int_t* const triggerBlock, const Int_t* const chBlock, UInt_t puBits) const;
7bff3766 97
90936733 98 static AliZDCRecoParam *fgRecoParam; // reconstruction parameters
42d8b8d5 99
90936733 100 static AliZDCMBCalib *fgMBCalibData; //! mb calibration data
91debfd4 101 AliZDCPedestals *fPedData; //! pedestal calibration data
102 AliZDCEnCalib *fEnCalibData; //! energy calibration data
960c5431 103 AliZDCSaturationCalib *fSatCalibData; //! energy calibration data
91debfd4 104 AliZDCTowerCalib *fTowCalibData; //! equalization calibration data
27d1ff1f 105 AliZDCTDCCalib *fTDCCalibData; //! TDC offset data
73bc3a3f 106
9e05925b 107 Int_t fRecoMode; // =1->p-p, =2->A-A
108 Float_t fBeamEnergy; // beam energy
109 Int_t fNRun; // Run Number (from raw data)
110 Bool_t fIsCalibrationMB; // true if run type = "CALIBRATION_MB"
111 Int_t fPedSubMode; // =0->mean values, =1->from correlations
112 Float_t fSignalThreshold; // Threshold value for "triggering" in p-p
113 Double_t fMeanPhase; // LHC clock phase
af6f24c9 114
115 AliESDZDC* fESDZDC; // ESD output object
73bc3a3f 116
960c5431 117 ClassDef(AliZDCReconstructor, 14) // class for the ZDC reconstruction
8309c1ab 118};
119
120#endif