]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ZDC/AliZDCReconstructor.h
Updated raw streaming class, scalers+trigger card+PU included
[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
73bc3a3f 51 static const AliZDCRecoParam* GetRecoParam() {return fRecoParam;}
42d8b8d5 52
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
73bc3a3f 67 void WritePbPbRecoParamInOCDB() const;
68
8309c1ab 69private:
cc2abffd 70 AliZDCReconstructor(const AliZDCReconstructor&);
71 AliZDCReconstructor& operator =(const AliZDCReconstructor&);
8309c1ab 72
7bff3766 73 void ReconstructEventpp(TTree *clustersTree,
74 Float_t* ZN1ADCCorr, Float_t* ZP1ADCCorr, Float_t* ZN2ADCCorr, Float_t* ZP2ADCCorr,
1e319f71 75 Float_t* ZEM1ADCCorr, Float_t* ZEM2ADCCorr, Float_t* PMRef1, Float_t* PMRef2,
76 Bool_t channelsOff, Bool_t chUnderflow, Bool_t chOverflow) const;
7bff3766 77 void ReconstructEventPbPb(TTree *clustersTree,
c35ed519 78 Float_t* ZN1ADCCorr, Float_t* ZP1ADCCorr, Float_t* ZN2ADCCorr, Float_t* ZP2ADCCorr,
1e319f71 79 Float_t* ZEM1ADCCorr, Float_t* ZEM2ADCCorr, Float_t* PMRef1, Float_t* PMRef2,
80 Bool_t channelsOff, Bool_t chUnderflow, Bool_t chOverflow) const;
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
8309c1ab 85
73bc3a3f 86 static AliZDCRecoParam *fRecoParam; // reconstruction parameters
42d8b8d5 87
73bc3a3f 88 AliZDCPedestals *fPedData; //! pedestal calibration data
89 AliZDCEnCalib *fEnCalibData; //! energy calibration data
90 AliZDCTowerCalib *fTowCalibData; //! equalization calibration data
91
92 Int_t fRecoMode; // =1->p-p, =2->A-A
93 Float_t fBeamEnergy; // beam energy
94 Int_t fNRun; // Run Number (from raw data)
95 Bool_t fIsCalibrationMB; // true if run type = "CALIBRATION_MB"
96 Int_t fPedSubMode; // =0->mean values, =1->from correlations
58671297 97 Float_t fSignalThreshold; // Threshold value for "triggering" in p-p
73bc3a3f 98
1e319f71 99 ClassDef(AliZDCReconstructor, 9) // class for the ZDC reconstruction
8309c1ab 100};
101
102#endif