// -*- mode: c++ -*- #ifndef BRAT_BrBbCalHitsModule #define BRAT_BrBbCalHitsModule // $Id: BrBbCalHitsModule.h,v 1.2 2001/11/04 01:56:12 ouerdane Exp $ // $Author: ouerdane $ // $Date: 2001/11/04 01:56:12 $ // // //___________________________________________________________________// // // // BrBbCalHitsModule // // // // Take digit data and give rdo object (BbRdoNew) // // // // Author : D. Ouerdane // // Created : August 2001 // // Version : 1.0 // // // //___________________________________________________________________// #ifndef ROOT_TTree #include "TTree.h" #endif #ifndef ROOT_TH1 #include "TH1.h" #endif #ifndef ROOT_TString #include "TString.h" #endif #ifndef ROOT_TProfile #include "TProfile.h" #endif #ifndef ROOT_TH2 #include "TH2.h" #endif #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrEventNode #include #endif #ifndef BRAT_BrBbCalibration #include #endif #ifndef BRAT_BrMagnetVolume #include "BrMagnetVolume.h" #endif #ifndef BRAT_BrDetectorParamsBB #include "BrDetectorParamsBB.h" #endif #ifndef BRAT_BrBbCalHits #include "BrBbCalHits.h" #endif class BrBbCalHitsModule : public BrModule { private: // needed stuff BrDetectorParamsBB* fParams; // detector parameters BrBbCalibration* fLCalib; // left array calibration BrBbCalibration* fRCalib; // right array calibration BrBbCalHits* fBblCalHits; // List of valid hits (Left) BrBbCalHits* fBbrCalHits; // same for right Double_t fEnergyThreshold; // cut on energy for hit selection Double_t fMaxEnergy; // cut on energy for hit selection Double_t fMaxTdc; // idem with tdc Double_t fMinTdc; // idem with tdc Float_t* fDist; // distance from beam-line Bool_t fTreeOn; Bool_t fUseOldCal; Bool_t fLoadDumpCal; Int_t fAccEvt; // number of successful events (both arrays) Int_t fUsedEvt; // number of analyzed events Int_t fLStat; // left array event stat Int_t fRStat; // right array event stat Int_t fSmallRef; // Bool_t fNoSlewing; // if no slewing calibration, try without // histograms TTree* fBbData; // all information (if switched on) TH1F* fHits; // calibrated hits distributions TH1F* fLMult; // left array multiplicity TH1F* fRMult; // right array multiplicity TH2F* fEner; // calibrated energy TH2F* fTof; // calibrated tof TH1F* fFast; // fastest tube TH2F* fMult; // left mult vs right mult TString fBblDumpFile; TString fBbrDumpFile; Float_t Reconstruct(BrDataTable*, BrBbCalibration*, BrBbCalHits*); void ReadDumpCal(const Char_t* file, Int_t tubes, BrBbCalibration* cal); public: // constructors and destructors // BrBbCalHitsModule(); BrBbCalHitsModule(const Char_t* Name, const Char_t *Title); virtual ~BrBbCalHitsModule(); // // Methods // virtual void Init(); virtual void Begin(); virtual void DefineHistograms(); virtual void Event(BrEventNode*, BrEventNode*); virtual void Finish(); void SetTreeOn(Bool_t n = kFALSE) { fTreeOn = n; } void SetSmallRef(Int_t t = 4) { fSmallRef = t; } void SetLoadDumpCal (Bool_t b = kFALSE) { fLoadDumpCal = b; } void SetEnergyThreshold (Double_t e = 0.7) { fEnergyThreshold = e; } void SetMinTdc (Double_t t = 10) { fMinTdc = t; } void SetMaxTdc (Double_t t = 4000) { fMaxTdc = t; } void SetUseOldCal (Bool_t b = kTRUE) { fUseOldCal = b; } void SetDefaultParameters(); void SetDumpCalFiles (const Char_t* bbl = '\0', const Char_t* bbr = '\0') { fBblDumpFile = bbl; fBbrDumpFile = bbr; } void Print(Option_t* option="B") const; ClassDef(BrBbCalHitsModule, 0) // BRAHMS BB hit recontruction module }; #endif // ______________________________________________________________________ // // $Log: BrBbCalHitsModule.h,v $ // Revision 1.2 2001/11/04 01:56:12 ouerdane // Added method to be able to load an ascii calibration dumped from the SQL db. An example is in brat/scripts/calib/bb/BbTestLoadDumpCal.C // // Revision 1.1 2001/09/23 01:40:59 videbaek // // Added the module to creatre the BbCalHits data. Implemented based on // DOs classes. //