// -*- mode: c++ -*- // // $Id: BrTofCalModule.h,v 1.7 2002/03/21 15:04:25 ouerdane Exp $ // $Author: ouerdane $ // $Date: 2002/03/21 15:04:25 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrTofCalModule #define BRAT_BrTofCalModule #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef ROOT_TString #include "TString.h" #endif #ifndef ROOT_BrTofCalibration #include "BrTofCalibration.h" #endif #ifndef ROOT_BrDetectorParamsTof #include "BrDetectorParamsTof.h" #endif #ifndef ROOT_TDirectory #include "TDirectory.h" #endif #ifndef BRAT_BrMagnetVolume #include "BrMagnetVolume.h" #endif #ifndef BRAT_BrDetectorVolume #include "BrDetectorVolume.h" #endif class BrTofCalModule : public BrModule { protected: virtual void SaveAscii(); virtual void ReadAscii(); virtual void InitGeo(); void CheckFsAngles(); public: BrTofCalModule(); BrTofCalModule(const Char_t* name, const Char_t* title); virtual ~BrTofCalModule () {} virtual void Init(); virtual void Begin(); virtual void Event(BrEventNode*, BrEventNode*); void SetDefaultParameters(); void SetSaveAscii(Bool_t s = kFALSE) { fSaveAscii = s; } void SetLoadAscii(Bool_t s = kFALSE) { fLoadAscii = s; } void SetCommitAscii(Bool_t s = kFALSE) { fCommitAscii = s; } void SetCalibFile(const Char_t* name) { fCalibFile = name; } void SetComment(const Char_t* name) { fComment = name; } void SetNoPedWidth(Int_t n = 50) { fNoPedWidth = n; } void SetEnergyThreshold(Double_t t = 0.7) { fEnergyThreshold = t; } void SetMaxTdcLimit(Double_t l = 3500) { fMaxTdcLimit = l; } void SetMinTdcLimit(Double_t l = 10) { fMinTdcLimit = l; } // check calibration parameter validity Bool_t IsValid(Double_t x) { if (x == BrTofCalibration::kCalException) return kFALSE; return kTRUE; } void SetNtuple(Bool_t n = kFALSE) { fNtuple = n; } protected: // parameters BrTofCalibration* fCalibration; // calibration parameter element BrDetectorParamsTof* fParamsTof; // detector parameters BrDetectorVolume* fTpc1Vol; // front tpc volume BrDetectorVolume* fTpc2Vol; // back tpc volume BrDetectorVolume* fTofVol; // tof volume BrDetectorVolume** fPanelVol; // same for individual panel (TOFW) BrDetectorParamsTof** fPanelPar; // panel parameters BrMagnetVolume* fMag1Vol; // first magnet BrMagnetVolume* fMag2Vol; // second magnet Double_t fNominalL; // nominal distance for time calib: // H1: 9m, H2: 18m, TOFW: 4.5m Double_t fNoPedWidth; // for matching between hit and tracks only Double_t fEnergyThreshold; // for hit selection Double_t fMaxTdcLimit; // idem Double_t fMinTdcLimit; // idem Bool_t fNtuple; Bool_t fSaveAscii; Bool_t fCommitAscii; Bool_t fLoadAscii; Bool_t* fValidSlat; Bool_t* fValidSlat2; // Temp: for H1 in BFS Bool_t fInFfs; Bool_t fInBfs; Bool_t fInMrs; Bool_t fFsLined; TString fMatchName; TString fCalibFile; TString fComment; TDirectory* fHistDir; // Pointer to histogram directory public: ClassDef(BrTofCalModule,0) // Base class for a tof calibration module }; #endif //____________________________________________________________________ // // $Log: BrTofCalModule.h,v $ // Revision 1.7 2002/03/21 15:04:25 ouerdane // added fComment member to base class module and method SetComment so that the user can set comments about the calibration at commit time. Removed mean momentum stuff in slewing cal module // // Revision 1.6 2001/11/07 10:30:55 ouerdane // updated module for H2 cal. and PID // // Revision 1.5 2001/11/05 06:59:44 ouerdane // changed to deal with new track classes and fixed some bugs // // Revision 1.4 2001/10/20 00:07:17 ouerdane // removed useless old member fNoPanel // // Revision 1.3 2001/10/02 01:53:28 ouerdane // Added SetSaveAscii, SetLoadAscii, SetCommitAscii and updated the way parameters are tagged for Use // // Revision 1.2 2001/07/31 09:21:32 ouerdane // Removed all references to a TList member, replaced // by histogram members, declare ntuple if fNtuple is true (set // via SetNtuple) // // Revision 1.1.1.1 2001/06/21 14:55:05 hagel // Initial revision of brat2 // // Revision 1.3 2001/06/21 12:59:56 ouerdane // See implementation files last log // // Revision 1.2 2001/06/20 09:12:29 ouerdane // Changed value of BrTofCalibration::kCalException to 999999 // Removed the old exception in BrTofCalModule // // Revision 1.1 2001/06/19 12:44:48 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. // // Revision 1.1 2001/06/01 10:07:07 ouerdane // Made a base class for TOF calibration modules. // It basically contains the calibration and parameter objects // and methods for reading from or saving to ascii files // //