// -*- mode: c++ -*- // // $Id: BrBfsTofMatchingModule.h,v 1.6 2002/04/09 02:10:07 ouerdane Exp $ // $Author: ouerdane $ // $Date: 2002/04/09 02:10:07 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrBfsTofMatchingModule #define BRAT_BrBfsTofMatchingModule #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 ROOT_TDirectory #include "TDirectory.h" #endif #ifndef BRAT_BrDetectorParamsTof #include "BrDetectorParamsTof.h" #endif #ifndef BRAT_BrVector3D #include "BrVector3D.h" #endif #ifndef BRAT_BrTofCalibration #include "BrTofCalibration.h" #endif #ifndef BRAT_BrDetectorTrack #include "BrDetectorTrack.h" #endif #ifndef BRAT_BrTofDig #include "BrTofDig.h" #endif #ifndef BRAT_BrTofTrackMatch #include "BrTofTrackMatch.h" #endif #ifndef BRAT_BrTofTrackMatch #include "BrTofTrackMatch.h" #endif class BrBfsTofMatchingModule : public BrModule { private: enum ETofId { kH2 = 0, kH1 = 1 }; // matching parameters Float_t fMaxDX[2]; Float_t fXOffset[2]; Float_t fT2H1XOffset; Float_t fT3H1XOffset; // tof parameters & volumes BrTofCalibration* fCalib[2]; // calibration parameter elements BrDetectorParamsTof* fTofPar[2]; // detector parameters TString fTofName[2]; Double_t fNoPedWidth; // for matching between hit and tracks only Double_t fMaxAdc; // for hit selection Double_t fMaxTdc; // idem Double_t fMinTdc; // idem Bool_t fNtuple; Bool_t* fValidSlat[2]; Bool_t fUseFfs; // if ffs and bfs are aligned // histograms TNtuple* fNtMatch[2]; TH1F* fDxAll[2]; TH1F* fDxMatch[2]; TH2F* f2dXAll[2]; TH2F* f2dXMatch[2]; TH1F* fMatchStat[2]; TH1F** fTopEff; TH1F** fBotEff; TH1F* fTrkEff; TH1F* fSlatCheck; TDirectory* fHistDir[2]; void InitParams(); void CheckTofCal(); Int_t SelectHits(ETofId, BrDataTable*, BrTofDig**); Int_t MatchTof(ETofId, BrDataTable*, BrDataTable*, Int_t*, BrTofDig**, Int_t* id = 0); // check calibration parameter validity Bool_t IsValid(Double_t x) { if (x == BrTofCalibration::kCalException) return kFALSE; return kTRUE; } void CheckEfficiency(BrDataTable* trks, BrDataTable* hits); public: BrBfsTofMatchingModule(); BrBfsTofMatchingModule(const Char_t* name, const Char_t* title); virtual ~BrBfsTofMatchingModule () {} void SetDefaultParameters(); void SetTdcRange(Double_t min = 10, Double_t max = 4000) { fMinTdc = min; fMaxTdc = max; } 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 SetMaxH1DX(Float_t dx = 0.5) { fMaxDX[kH1] = dx; } void SetMaxH2DX(Float_t dx = 0.75) { fMaxDX[kH2] = dx; } void SetT5H2XOffset(Float_t x = 0) { fXOffset[kH2] = x; } void SetT2H1XOffset(Float_t x = 0) { fT2H1XOffset = x; } void SetT3H1XOffset(Float_t x = 0) { fT3H1XOffset = x; } virtual void DefineHistograms(); virtual void Init(); virtual void Begin(); virtual void Event(BrEventNode* inNode, BrEventNode* outNode); virtual void Print(Option_t* option="B") const; // *MENU* ClassDef(BrBfsTofMatchingModule,0) // module getting glb tracks for tof cal }; #endif //____________________________________________________________________ // // $Log: BrBfsTofMatchingModule.h,v $ // Revision 1.6 2002/04/09 02:10:07 ouerdane // updated to reflect latest changes in BrBfsTrack // // Revision 1.5 2001/11/07 10:32:14 ouerdane // updated matching module for H2 recontruction and PID // // Revision 1.4 2001/11/05 07:11:40 ouerdane // changed FFS to Ffs, BFS to Bfs, MRS to Mrs. Fixed bugs in BFS module // // Revision 1.3 2001/10/07 13:36:49 ouerdane // Allowed to set true or false the use of H1 even if the arms are aligned // // 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 // //