// -*- mode: c++ -*- // // $Id: BrTofTdcGainCalModule.h,v 1.4 2001/10/02 01:53:28 ouerdane Exp $ // $Author: ouerdane $ // $Date: 2001/10/02 01:53:28 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrTofTdcGainCalModule #define BRAT_BrTofTdcGainCalModule #ifndef BRAT_BrModule #include "BrTofCalModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef ROOT_TH1 #include "TH1.h" #endif #ifndef ROOT_TF1 #include "TF1.h" #endif class BrTofTdcGainCalModule : public BrTofCalModule { private: Float_t fMinGain; // reasonable lower limit Float_t fMaxGain; // reasonable upper limit Float_t fTimeStep; // time step of pulser TH1F** fTTdc; TH1F** fBTdc; TH1F** fTGain; TH1F** fBGain; TH1F* fTSum; TH1F* fBSum; virtual void SaveAscii(); virtual void ReadAscii(); void FindMax(TH1F* h, TH1F* p); public: BrTofTdcGainCalModule(); BrTofTdcGainCalModule(const Char_t* name, const Char_t* title); virtual ~BrTofTdcGainCalModule () {} virtual void DefineHistograms(); virtual void Init(); virtual void Begin(); virtual void Event(BrEventNode* inNode, BrEventNode* outNode); virtual void Finish(); virtual void Print(Option_t* option="B") const; // *MENU* void SetTimeStep(Float_t step = 10) { fTimeStep = step;} void SetMinGain(Float_t min = 0.020) { fMinGain = min;} void SetMaxGain(Float_t max = 0.030) { fMaxGain = max;} ClassDef(BrTofTdcGainCalModule,0) // TDC gain calibration module }; #endif //____________________________________________________________________ // // $Log: BrTofTdcGainCalModule.h,v $ // Revision 1.4 2001/10/02 01:53:28 ouerdane // Added SetSaveAscii, SetLoadAscii, SetCommitAscii and updated the way parameters are tagged for Use // // Revision 1.3 2001/07/31 09:22:15 ouerdane // Removed all references to a TList member, replaced // by histogram members, declare ntuple if fNtuple is true (set // via SetNtuple) // // Revision 1.2 2001/07/18 16:14:42 ouerdane // Updated this module: // - in Event: fill histograms only when tdc (top or bot) is > 1 and < 4095 // - added methods SetMinGain and SetMaxGain (with corresponding private members) // to set some reasonable limits to what the gains should be) // if the calculated gain is beyond this range, the // BrTofCalibration::kCalException is assigned. The range by default is // [0.023, 0.027] ns. // - added SetTimeStep and fTimeStep so that the user can set the time step of // the pulser (10 ns by default) // - made it compatible with brat2 and tested it (script available in // brahms_app/do_app/tof/mm_scripts/tofTdcGain.C and commitTdcGain.C) // // Revision 1.1.1.1 2001/06/21 14:55:06 hagel // Initial revision of brat2 // // Revision 1.1 2001/06/19 12:44:58 ouerdane // Added calibration classes and reconstruction classes. // Brat compiles but these classes haven't been tested in this // context. Be careful if you use them before I (DO) check if // all is ok. // //