// -*- mode: c++ -*- // // $Id: BrBbCalModule.h,v 1.5 2002/03/21 15:02:17 ouerdane Exp $ // $Author: ouerdane $ // $Datek$: 2001/07/22 19:02:50 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrBbCalModule #define BRAT_BrBbCalModule #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef ROOT_TString #include "TString.h" #endif #ifndef ROOT_BrBbCalibration #include "BrBbCalibration.h" #endif #ifndef ROOT_BrDetectorParamsBB #include "BrDetectorParamsBB.h" #endif #ifndef ROOT_TDirectory #include "TDirectory.h" #endif class BrBbCalModule : public BrModule { protected: virtual void SaveAscii(); virtual void ReadAscii(); Bool_t* fValidTube; // parameters BrBbCalibration* fCalibration; BrDetectorParamsBB* fParamsBb; Int_t fRef; Char_t fDigName[12]; Int_t fNoTubes; Int_t fNoBigTubes; Int_t fNoSmallTubes; Int_t fBigRef; Int_t fSmallRef; Int_t fBigT; Bool_t fSaveAscii; // Used when saving new calibration Files Bool_t fCommitAscii; // Used when checking in into DB. Bool_t fLoadAscii; // Used when reading (at Begin). Bool_t fIsBb; // Indicates if real BB or Inel counter. Use only internaly TString fCalibFile; TString fComment; // comment string given at check in time TDirectory* fHistDir; // Pointer to histogram directory Bool_t IsValid(Float_t val) { if (val == BrBbCalibration::kCalException) return kFALSE; return kTRUE; } public: BrBbCalModule(); BrBbCalModule(const Char_t* name, const Char_t* title); virtual ~BrBbCalModule () {} virtual void Init(); void SetSaveAscii(Bool_t s = kFALSE) { fSaveAscii = s; } void SetCommitAscii(Bool_t s = kFALSE) { fCommitAscii = s; } void SetLoadAscii(Bool_t s = kFALSE) { fLoadAscii = s; } void SetCalibFile(const Char_t* name) { fCalibFile = name; } void SetComment(const Char_t* comm) { fComment = comm; } void SetRef(Int_t t = -1) { fRef = t; } void SetBigRef(Int_t t = -1) { fBigRef = t; } void SetSmallRef(Int_t t = -1) { fSmallRef = t; } ClassDef(BrBbCalModule,0) // Base class for a BB array calibration module }; #endif //____________________________________________________________________ // // $Log: BrBbCalModule.h,v $ // Revision 1.5 2002/03/21 15:02:17 ouerdane // added fComment member to base class module and method SetComment so that the user can set comments about the calibration at commit time // // Revision 1.4 2002/03/20 19:30:52 videbaek // Add the INL and INR counters to be dealt with for calibration and timing // In the 2002 pp run there were not really of BB kind since they only have // td information, but it is most convinientn to deal with them as BB calibration // data. // // Revision 1.3 2001/10/15 00:35:08 ouerdane // Updated all Beam-Beam counter calibration modules (like I did for the TOF // some weeks ago): // // Common changes: // added methods Set[Save,Commit,Load]Ascii(Bool_t) // removed methods Set[ReadFrom,LoadFrom,SaveTo]File // // BrBbGainCalModule: // cleaned up a lot the code, added diagnostic histograms showing calibrated // ADC after the 1st MIP peak was found. // Still at a stage where the 1st MIP peak is the only one to be checked. // Later on, will add algorithm to find other peaks. // // Added BrBbSlewingCalModule in Makefile.am, etc // The fit function introduced is dT = a + b/sqrt(dE) + c/dE (where dE = ADC/Gain0) // // Revision 1.2 2001/09/23 01:51:51 videbaek // Added prototype Gain calibration module. Updated others to deal with // Load from File. This may be temporary, but does not break any code as far as // I can tell. // // Revision 1.1 2001/07/23 11:39:56 ouerdane // Added calibration modules for Beam-Beam counters // BrBbCalModule: base class // BrBbPedCalModule: pedestals // BrBbTdcGaincalModule tdc gains // // Updated Makefile.am, LinkDef.h, Include.h //