]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ZDC/AliZDCReconstructor.h
Bug fix - array non initialized in certain conditions (Marian)
[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"
48642b09 15#include "AliCDBManager.h"
16#include "AliCDBStorage.h"
6024ec85 17#include "AliZDCPedestals.h"
73bc3a3f 18#include "AliZDCEnCalib.h"
19#include "AliZDCTowerCalib.h"
7bff3766 20#include "AliZDCRecoParam.h"
21#include "AliZDCRecoParampp.h"
22#include "AliZDCRecoParamPbPb.h"
70f04f6d 23#include "AliLog.h"
8309c1ab 24
8309c1ab 25class AliLoader;
26
8309c1ab 27class AliZDCReconstructor: public AliReconstructor {
28public:
29 AliZDCReconstructor();
30 virtual ~AliZDCReconstructor();
31
73bc3a3f 32 virtual void Init();
a4cab348 33 virtual Bool_t HasDigitConversion() const {return kFALSE;};
73bc3a3f 34
1e319f71 35 virtual void Reconstruct(TTree* digitsTree, TTree* clustersTree) const;
36 virtual void Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const;
70f04f6d 37
70f04f6d 38 virtual void FillESD(TTree* /*digitsTree*/, TTree* clustersTree, AliESDEvent* esd) const
73bc3a3f 39 {FillZDCintoESD(clustersTree, esd);}
70f04f6d 40 virtual void FillESD(AliRawReader* /*rawReader*/, TTree* clustersTree, AliESDEvent* esd) const
73bc3a3f 41 {FillZDCintoESD(clustersTree, esd);}
42
7bff3766 43 // parameter settings for reconstruction
03be9e4f 44 void SetRecoMode(Int_t recoMode, Float_t beamEnergy)
73bc3a3f 45 {fRecoMode=recoMode; fBeamEnergy=beamEnergy;}
7bff3766 46 static void SetRecoParam(AliZDCRecoParam * param){fRecoParam = param;}
fd9afd60 47
48 Int_t GetRecoMode() {return fRecoMode;}
42d8b8d5 49 Float_t GetBeamEnergy() {return fBeamEnergy;}
50
4a72fbdb 51 static const AliZDCRecoParam* GetRecoParam() {return dynamic_cast<const AliZDCRecoParam*>(AliReconstructor::GetRecoParam(9));}
81f09162 52
42d8b8d5 53 void SetPedSubMode(Int_t pedsubMode) {fPedSubMode=pedsubMode;}
54 Int_t GetPedSubMode() {return fPedSubMode;}
7bff3766 55
58671297 56 void SetSignalThreshold(Float_t val) {fSignalThreshold=val;}
57 Float_t GetSignalThreshold() {return fSignalThreshold;}
58
7bff3766 59 // OCDB objects for reconstruction
1e319f71 60 AliCDBStorage *SetStorage(const char* uri);
61 AliZDCPedestals *GetPedestalData() const;
62 AliZDCEnCalib *GetEnergyCalibData() const;
63 AliZDCTowerCalib *GetTowerCalibData() const;
73bc3a3f 64 AliZDCRecoParampp *GetppRecoParamFromOCDB() const;
65 AliZDCRecoParamPbPb *GetPbPbRecoParamFromOCDB() const;
646f1679 66
8309c1ab 67private:
3abc001d 68 AliZDCReconstructor(const AliZDCReconstructor&); //Not implemented
69 AliZDCReconstructor& operator =(const AliZDCReconstructor&); //Not implemented
8309c1ab 70
7bff3766 71 void ReconstructEventpp(TTree *clustersTree,
72 Float_t* ZN1ADCCorr, Float_t* ZP1ADCCorr, Float_t* ZN2ADCCorr, Float_t* ZP2ADCCorr,
1e319f71 73 Float_t* ZEM1ADCCorr, Float_t* ZEM2ADCCorr, Float_t* PMRef1, Float_t* PMRef2,
81f09162 74 Bool_t isScalerOn, UInt_t* scaler,
75 Int_t* evQualityBlock, Int_t* triggerBlock, Int_t* chBlock, UInt_t puBits) const;
7bff3766 76 void ReconstructEventPbPb(TTree *clustersTree,
c35ed519 77 Float_t* ZN1ADCCorr, Float_t* ZP1ADCCorr, Float_t* ZN2ADCCorr, Float_t* ZP2ADCCorr,
1e319f71 78 Float_t* ZEM1ADCCorr, Float_t* ZEM2ADCCorr, Float_t* PMRef1, Float_t* PMRef2,
81f09162 79 Bool_t isScalerOn, UInt_t* scaler,
80 Int_t* evQualityBlock, Int_t* triggerBlock, Int_t* chBlock, UInt_t puBits) const;
1e319f71 81 void BuildRecoParam(Float_t ZDCC, Float_t ZDCA, Float_t ZEM) const;
82
73bc3a3f 83 void FillZDCintoESD(TTree *clustersTree, AliESDEvent*esd) const;
7bff3766 84
73bc3a3f 85 static AliZDCRecoParam *fRecoParam; // reconstruction parameters
42d8b8d5 86
73bc3a3f 87 AliZDCPedestals *fPedData; //! pedestal calibration data
88 AliZDCEnCalib *fEnCalibData; //! energy calibration data
89 AliZDCTowerCalib *fTowCalibData; //! equalization calibration data
90
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
58671297 96 Float_t fSignalThreshold; // Threshold value for "triggering" in p-p
73bc3a3f 97
1e319f71 98 ClassDef(AliZDCReconstructor, 9) // class for the ZDC reconstruction
8309c1ab 99};
100
101#endif