// -*- mode: c++ -*- // // $Id: BrMrsTofMatchingModule.h,v 1.5 2002/08/30 17:00:16 hagel Exp $ // $Author: hagel $ // $Date: 2002/08/30 17:00:16 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrMrsTofMatchingModule #define BRAT_BrMrsTofMatchingModule #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef BRAT_BrDataTable #include "BrDataTable.h" #endif #ifndef ROOT_TH1 #include "TH1.h" #endif #ifndef ROOT_TNtuple #include "TNtuple.h" #endif #ifndef ROOT_TH2 #include "TH2.h" #endif #ifndef BRAT_BrDetectorVolume #include "BrDetectorVolume.h" #endif #ifndef BRAT_BrDetectorParamsTof #include "BrDetectorParamsTof.h" #endif #ifndef BRAT_BrTofCalibration #include "BrTofCalibration.h" #endif class BrMrsTofMatchingModule : public BrModule { private: Float_t fMaxDX; Float_t fTpm2PanXOffset[6]; // 6 is the max number of panels // if you scan old data, use SetNoPanels() // parameters BrTofCalibration* fTofwCalib; // TOFW calibration parameter element BrDetectorVolume* fTpm2Vol; // tracking chamber volumes BrDetectorVolume** fPanelVol; // tof volumes BrDetectorParamsTof** fPanelPar; // detector parameters BrDetectorParamsTof* fTofwPar; // detector parameters Double_t fNoPedWidth; // for matching between hit and tracks only Double_t fMaxAdc; // for hit selection Double_t fMaxTdc; // idem Double_t fMinTdc; // idem Double_t fXhitCorr; // hitcorrection for TOFW (2001/02 run) Bool_t fNtuple; Bool_t* fValidSlat; Int_t fNumMatchedSlats; // histograms TNtuple* fNtMatch; TH1F* fDxAll; TH1F* fDxMatch; TH1F** fPanelDx; TH2F** fX2dAll; TH2F** fX2dMatch; TH1F* fPanelStat; TH1F* fMatchStat; TH1F** fMatchPanStat; TH1F* fSlatDiff; TH1F* fAccptSlatDist; TH1F* fAccptMatchedSlatDist; Int_t GetPanelId(Int_t slat); void InitParams(); void InitGeo(); void CheckTofCal(); // check calibration parameter validity Bool_t IsValid(Double_t x) { if (x == BrTofCalibration::kCalException) return kFALSE; return kTRUE; } public: BrMrsTofMatchingModule(); BrMrsTofMatchingModule(const Char_t* name, const Char_t* title); virtual ~BrMrsTofMatchingModule () {} void SetDefaultParameters(); void SetTdcRange(Double_t min = 10, Double_t max = 4000) { fMinTdc = min; fMaxTdc = max; } void SetTpm2PanXOffset(Int_t pn, Float_t x = 0) { fTpm2PanXOffset[pn] = x; } void SetNoPedWidth(Int_t n = 50) { fNoPedWidth = n; } void SetNtuple(Bool_t b = kFALSE) { fNtuple = b; } void SetMaxAdc(Double_t max = 100000) { fMaxAdc = max; } void SetMaxDX(Float_t dx = 1.5) { fMaxDX = dx; } void SetXHitCorr(Float_t da = 0.0095) { fXhitCorr = da;} 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* ClassDef(BrMrsTofMatchingModule,0) // module getting glb tracks for tof cal }; #endif //____________________________________________________________________ // // $Log: BrMrsTofMatchingModule.h,v $ // Revision 1.5 2002/08/30 17:00:16 hagel // Added matched slat distribution // // Revision 1.4 2002/06/21 18:37:40 videbaek // Make the xHitcorrection an adjusteble parameter. Default is 0.0095 which should // be good for the 2001/02 analysis. // // Revision 1.3 2001/11/05 07:11:40 ouerdane // changed FFS to Ffs, BFS to Bfs, MRS to Mrs. Fixed bugs in BFS module // // Revision 1.2 2001/10/02 20:20:40 ouerdane // remove member fNoPanels and setter method since it is now part of the // tof detector parameter class. // Corrected errors due to fast rewriting of the modules. should be ok now. // // Revision 1.1 2001/10/02 02:05:25 ouerdane // Added modules combining and saving Tracks and Tof hits // //