//-*-mode:c++-*- #ifndef BRAT_BrDCTrackingModule #define BRAT_BrDCTrackingModule #ifndef __IOSTREAM_H #include #endif // $Id: BrDCTrackingModule.h,v 1.16 2002/05/29 12:24:50 ufstasze Exp $ // /////////////////////////////////////////////////////////////////////// // // // BrDCTrackingModule // // // // Author : Kris Hagel (hagel@comp.tamu.edu) // // Created : 19-May-2000 (Adapted from BrLocalTrackDC // // Version : 1.0 // // Changed : // // // /////////////////////////////////////////////////////////////////////// //ROOT Includes #ifndef ROOT_TH1 #include "TH1.h" #endif #ifndef ROOT_TString #include "TStrong.h" #endif //BRAT Includes #ifndef BRAT_BrLocalTrackingModule #include "BrLocalTrackingModule.h" #endif #ifndef BRAT_BrDCClusterFinder #include "BrDCClusterFinder.h" #endif #ifndef BRAT_BrDC2DTrackFinder #include "BrDC2DTrackFinder.h" #endif #ifndef BRAT_BrDCViewCombiner #include "BrDCViewCombiner.h" #endif #ifndef BRAT_BrDCViewList #include "BrDCViewList.h" #endif #ifndef BRAT_BrDetectorTrack #include "BrDetectorTrack.h" #endif #ifndef BRAT_BrClonesArray #include "BrClonesArray.h" #endif #ifndef BRAT_BrDcCalibration #include "BrDcCalibration.h" #endif #ifndef BRAT_BrRunInfoManager #include "BrRunInfoManager.h" #endif //Definitions for fClusterMode const Int_t kPairsWhenTogether = 0; const Int_t kAllSinglePlanes = 1; class BrDetectorParamsDC; class BrDetectorVolume; class BrTrackHit2D; class BrDetectorDC; enum EBrTable { kRawData=1, kRedData, kDigitized }; class BrDCTrackingModule : public BrLocalTrackingModule { public: BrDCTrackingModule(); //BrDCTrackingModule(Char_t *Name,Char_t *Title); BrDCTrackingModule(Char_t *Name,Char_t *Title,Bool_t EventByEvent=kFALSE); virtual ~BrDCTrackingModule(); virtual void Init(); virtual void Begin(); virtual void DefineHistograms(); void InitVol(); virtual void Event(BrEventNode* InputTable,BrEventNode* OutputTable); virtual BrDetectorVolume* GetDetectorVolume(const Char_t *name); virtual void ListDetectorVolume(); void UseMySql() { fUseMySql = kTRUE; } void UseOwnCalib(Bool_t bvalue) { fUseOwnCalib = bvalue;} void SetUseShrink(Bool_t val) {fUseShrink = val;} void SetMainView(Int_t mainview) {fMainView = mainview;} void SetSubView (Int_t subview ) {fSubView = subview;} void SetAsigma(Float_t sigma) {fAsigma = sigma;} void SetClusDx(Float_t dx) {fClusDx = dx;} void SetClusDy(Float_t dy) {fClusDy = dy;} void SetDCCutMatchDx(Float_t dx) {fDCCutMatchDx = dx;} void SetDCCutMatchDy(Float_t dy) {fDCCutMatchDy = dy;} void SetDCCutMaxMissMain (Int_t miss) {fDCCutMaxMissMain = miss;} void SetDCCutMaxMissSub (Int_t miss) {fDCCutMaxMissSub = miss;} void SetDCCutMaxMissOther(Int_t miss) {fDCCutMaxMissOther = miss;} void SetPlaneCombineMode(Int_t mode) {fPlaneCombineMode = mode;} void SetClusterFinderParams(Float_t ClustDx, Float_t ClustDy, Float_t TrioChisq); void SetClusterFinderParams(Float_t MaxAngle, Float_t posRes, Int_t Asigma); void Set2DTrackFinderParams(Float_t CutMatchDx,Float_t CutMatchDy,Float_t Asigma); void SetViewCombinerParams(Int_t MissMain,Int_t MissSub,Int_t MissOther, Float_t UVDx, Float_t UVDy); void SetMode(EBrTable bit){ // case bit=kRawData assume raw data table, // case bit=kRedData assume reduced data table and // case bit=kDigitize assume digitize table (result of simulation). fTableMode=bit; } void SetBFSMatchingMode(Bool_t matching=kFALSE) { // when fBFSMatching is set to TRUE the we atempt to track in // T3 and T5 only when there is any reconstucted track in T4. // In such a case it is important to add T4 tracking module to // the main module before T3 nad T5 modules. fBFSMatching = matching; } void SetFSMatchingMode(Bool_t matching=kFALSE) { // when fFSMatching is set to TRUE the we atempt to track in // T3, T4 and T5 only when there is any reconstucted track in T2. fFSMatching = matching; } void SetAssociatedHitsMode(Bool_t AssoHits=kFALSE) { // when fAssociatedHits is set to TRUE the AssociatedHits DataTable is // created and hits are writen to the // OutputTable(=OutputNode). This impose a more data in the outputfile. fAssoHits = AssoHits; } void SetMinWidth(Int_t MinWidth) {fMinWidth=MinWidth;} void SetMinTdc(Int_t MinTdc) {fMinTdc=MinTdc;} void SetMaxTdc(Int_t MaxTdc) {fMaxTdc=MaxTdc;} void SetDriftTime(Int_t DriftTime) {fDriftTime=DriftTime;} void SetGlobalTdcOffset(Int_t globalTdcOffset = 0) {fGlobalTdcOffset=globalTdcOffset;} void SetOffsetFile(TString OffsetFile) {fOffsetFile=OffsetFile;} void SetCalibFile(TString CalibFile) {fCalibFile=CalibFile;} void SetPromptDelay(Int_t PromptDelay) {fPromptDelay=PromptDelay;} void SetHitNumberLimit(Int_t lowLimit=10, Int_t upLimit=200) { fLowLimit=lowLimit; fUpLimit=upLimit; } Int_t GetMainView() {return fMainView;} Int_t GetSubView() {return fSubView;} Bool_t GetUseShrink() {return fUseShrink;} Int_t GetMode() {return fTableMode;} const Char_t* GetTableName(); BrDCClusterFinder* GetClusterFinder() {return fClusterFinder;} void DrawLocalTracks(); BrClonesArray* GetLocalTracks(){return fLocalTracks;} BrDetectorDC *fDetectorNode; private: void Clear(); Int_t TrackLocalElement(); void FillDCHits(BrEventNode *OutputTable); void FillDetectorHits(); void FitLocalDCTrack(BrLocalTrack* loctra_p, Float_t *sol, Float_t *covar, Float_t &chisq, Int_t &ifail); Float_t GetChisq(BrLocalTrack* loctra_p, Float_t *sol); Int_t GetTof1TimeRef(); virtual void SetDetectorVolume(BrDetectorVolume *vol); BrDCClusterFinder *fClusterFinder; BrDC2DTrackFinder *f2DTrackFinder; BrDCViewCombiner *fViewCombiner; BrDriverDC *fDCDriver; BrClonesArray *fDetectorHits; BrClonesArray *TrackHits2D; TObjArray *fTrackHits2D; //List of 2D track hits TObjArray *fTrackHits; //List of track hits BrDCViewList *fViewList; //View list BrDataTable *fAssociatedHits; // table of associated hits BrDcCalibration* fCalibration; Bool_t fUseMySql; Bool_t fUseOwnCalib; Bool_t fUseShrink; //Turn on/off expansion of clones arrays BrDetectorVolume *fVolumeParams_p[4]; Int_t fNumVol; //Need for sub volumes etc. Int_t fMainView; //main view parameter; usually 0 Int_t fSubView; //sub view parameter, default to -90 Int_t fPlaneCombineMode; //Specifies how BrCombinedHits generated. Float_t fClusDx; //Cluster x matching parameter Float_t fClusDy; //Cluster y matching parameter Float_t fDCCutMatchDx; //DC Cut x matching parameter Float_t fDCCutMatchDy; //DC Cut y matching parameter Int_t fDCCutMaxMissMain; //Maximum number of misses in main view planes Int_t fDCCutMaxMissSub; //Maximum number of misses in sub view planes Int_t fDCCutMaxMissOther; //Maximum number of misses in other view planes. Float_t fAsigma; //Sigma for cuts in intermediate plane matching. Float_t fUVDx; //Dx for cuts in intermediate plane matching Float_t fUVDy; //Dy for cuts in intermediate plane matching Float_t fTrioChisqWin; //chisq window for cluster matching in DCTrio Float_t fPosRes; Int_t fMinTdc; //This parameter can be set from script Int_t fPromptDelay; Int_t fMaxTdc; Int_t fMinTdcPP; //This are used when using a data base Int_t fPromptDelayPP; Int_t fMaxTdcPP; Int_t fMinWidth; Int_t fDriftTime; Int_t fGlobalTdcOffset; TString fOffsetFile; TString fCalibFile; Int_t fLowLimit; Int_t fUpLimit; Bool_t fBFSMatching; Bool_t fFSMatching; Bool_t fEventByEvent; Bool_t fAssoHits; Int_t fTableMode; // Diagnostic histograms TH1F *h_NumTra2DInit; TH1F *h_NumTra2DInter; TH1F *h_NumLoctraInit; TH1F *h_Ddu; TH1F *h_Duc; TH1F *h_Chisq; TH1F *fhAssoHitsPerPlane; // tof time ref. Double_t fTof1Time[100]; Int_t fTof1GoodHits; Int_t fTrigger; public: ClassDef(BrDCTrackingModule,0) // BRAHMS Local Track interface }; #endif // $Log: BrDCTrackingModule.h,v $ // Revision 1.16 2002/05/29 12:24:50 ufstasze // Removed member fRunMan // // Revision 1.15 2002/05/27 13:03:13 ufstasze // Added new member: fRunMan // // Revision 1.14 2002/05/07 17:32:20 ouerdane // added driftTime db parameter // // Revision 1.13 2002/05/02 15:10:33 ufstasze // Added public UseOwnCalib(Bool) which allows to support case // when the own calibration is used (and not from pp run 6618). // // Revision 1.12 2002/03/08 16:27:47 ufstasze // Changes that have to do with introducing the readout of global Tdc offset form the data base // // Revision 1.11 2002/03/07 17:50:49 ouerdane // added possibility to retrieve the DC global tdc offset from the DB if the user uses UseMySql() method // // Revision 1.10 2002/02/15 15:36:29 ufstasze // Changed definition of fClusDy // // Revision 1.9 2001/11/12 10:33:02 ufstasze // Added new diagnostic histogram fhAssoHitsPerPlane and pointer to BrDriverDC (fDCDriver). // // Revision 1.8 2001/10/31 15:51:23 staszel // Added SetAssociatedHitsMode(Bool_t) method. // // Revision 1.7 2001/08/30 13:32:28 staszel // Added tof1 and trigger stuff. // // Revision 1.6 2001/08/23 11:11:36 staszel // Changes that have to do with introduction of CheckSingleHits option, // plus introduction of FSMatchingMode and BFSMatchingMode. // // Revision 1.5 2001/08/07 13:48:46 ouerdane // Cleaned up a lot the DC tracking modules and utilities: // Made all utilities deriving from BrModule // Set the class version number to 0 (NOT 1 like before) // Removed + in the LinkDef file for all modules // Added ClassDef in the View Combiner class (didn't exist) // Structurized the histogramming section in TDirectories // // Revision 1.4 2001/08/07 10:57:03 staszel // Inline method SetMatchingMode(Bool_t) has been added. // // Revision 1.3 2001/08/03 13:25:46 staszel // low and up limits on number of hits added. // // Revision 1.2 2001/07/30 11:56:58 staszel // New method SetPromptDelay that allows fPromptDelay to be // sent to BrDCClusterFinder. // // Revision 1.1.1.1 2001/06/21 14:55:11 hagel // Initial revision of brat2 // // Revision 1.7 2001/06/20 12:28:01 staszel // BrDetectorHit replaced by BrDCHit. // // Revision 1.6 2001/06/15 15:46:34 staszel // Changes having to do with development of dc local tracking package // // Revision 1.5 2001/06/13 13:26:06 staszel // father development of dc tracking // // Revision 1.4 2001/01/19 17:58:14 staszel // Changes having to do with development of BrDCTrackingModule // // Revision 1.3 2000/10/05 02:21:29 hagel // Further development of BrDCTrackingModule // // Revision 1.2 2000/09/29 02:15:57 hagel // Changes having to do with development of BrDCTrackingModule // // Revision 1.1 2000/09/19 21:11:51 hagel // Initial placeholder revision // //