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