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 */
8 /////////////////////////////////////////////
10 // class for ZDC reconstruction //
12 /////////////////////////////////////////////
14 #include "AliReconstructor.h"
15 #include "AliCDBManager.h"
16 #include "AliCDBStorage.h"
17 #include "AliZDCPedestals.h"
18 #include "AliZDCEnCalib.h"
19 #include "AliZDCTowerCalib.h"
20 #include "AliZDCRecoParam.h"
21 #include "AliZDCRecoParampp.h"
22 #include "AliZDCRecoParamPbPb.h"
27 class AliZDCReconstructor: public AliReconstructor {
29 AliZDCReconstructor();
30 virtual ~AliZDCReconstructor();
33 virtual Bool_t HasDigitConversion() const {return kFALSE;};
35 virtual void Reconstruct(TTree* digitsTree, TTree* clustersTree) const;
36 virtual void Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const;
38 virtual void FillESD(TTree* /*digitsTree*/, TTree* clustersTree, AliESDEvent* esd) const
39 {FillZDCintoESD(clustersTree, esd);}
40 virtual void FillESD(AliRawReader* /*rawReader*/, TTree* clustersTree, AliESDEvent* esd) const
41 {FillZDCintoESD(clustersTree, esd);}
43 // parameter settings for reconstruction
44 void SetRecoMode(Int_t recoMode, Float_t beamEnergy)
45 {fRecoMode=recoMode; fBeamEnergy=beamEnergy;}
46 static void SetRecoParam(AliZDCRecoParam * param){fRecoParam = param;}
48 Int_t GetRecoMode() {return fRecoMode;}
49 Float_t GetBeamEnergy() {return fBeamEnergy;}
51 static const AliZDCRecoParam* GetRecoParam() {return dynamic_cast<const AliZDCRecoParam*>(AliReconstructor::GetRecoParam(9));}
53 void SetPedSubMode(Int_t pedsubMode) {fPedSubMode=pedsubMode;}
54 Int_t GetPedSubMode() {return fPedSubMode;}
56 void SetSignalThreshold(Float_t val) {fSignalThreshold=val;}
57 Float_t GetSignalThreshold() {return fSignalThreshold;}
59 // OCDB objects for reconstruction
60 AliCDBStorage *SetStorage(const char* uri);
61 AliZDCPedestals *GetPedestalData() const;
62 AliZDCEnCalib *GetEnergyCalibData() const;
63 AliZDCTowerCalib *GetTowerCalibData() const;
64 AliZDCRecoParampp *GetppRecoParamFromOCDB() const;
65 AliZDCRecoParamPbPb *GetPbPbRecoParamFromOCDB() const;
68 AliZDCReconstructor(const AliZDCReconstructor&); //Not implemented
69 AliZDCReconstructor& operator =(const AliZDCReconstructor&); //Not implemented
71 void ReconstructEventpp(TTree *clustersTree,
72 Float_t* ZN1ADCCorr, Float_t* ZP1ADCCorr, Float_t* ZN2ADCCorr, Float_t* ZP2ADCCorr,
73 Float_t* ZEM1ADCCorr, Float_t* ZEM2ADCCorr, Float_t* PMRef1, Float_t* PMRef2,
74 Bool_t isScalerOn, UInt_t* scaler,
75 Int_t* evQualityBlock, Int_t* triggerBlock, Int_t* chBlock, UInt_t puBits) const;
76 void ReconstructEventPbPb(TTree *clustersTree,
77 Float_t* ZN1ADCCorr, Float_t* ZP1ADCCorr, Float_t* ZN2ADCCorr, Float_t* ZP2ADCCorr,
78 Float_t* ZEM1ADCCorr, Float_t* ZEM2ADCCorr, Float_t* PMRef1, Float_t* PMRef2,
79 Bool_t isScalerOn, UInt_t* scaler,
80 Int_t* evQualityBlock, Int_t* triggerBlock, Int_t* chBlock, UInt_t puBits) const;
81 void BuildRecoParam(Float_t ZDCC, Float_t ZDCA, Float_t ZEM) const;
83 void FillZDCintoESD(TTree *clustersTree, AliESDEvent*esd) const;
85 static AliZDCRecoParam *fRecoParam; // reconstruction parameters
87 AliZDCPedestals *fPedData; //! pedestal calibration data
88 AliZDCEnCalib *fEnCalibData; //! energy calibration data
89 AliZDCTowerCalib *fTowCalibData; //! equalization calibration data
91 Int_t fRecoMode; // =1->p-p, =2->A-A
92 Float_t fBeamEnergy; // beam energy
93 Int_t fNRun; // Run Number (from raw data)
94 Bool_t fIsCalibrationMB; // true if run type = "CALIBRATION_MB"
95 Int_t fPedSubMode; // =0->mean values, =1->from correlations
96 Float_t fSignalThreshold; // Threshold value for "triggering" in p-p
98 ClassDef(AliZDCReconstructor, 9) // class for the ZDC reconstruction