StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMtdTrackingMaskMaker.h
1 
10 #ifndef STMTDTRACKINGMASKMAKER_HH
11 #define STMTDTRACKINGMASKMAKER_HH
12 
13 #include "StMaker.h"
14 #include "StMtdUtil/StMtdConstants.h"
15 
16 class TH1F;
17 class TH2F;
18 
19 class StEvent;
20 class StTriggerData;
21 class StMtdHit;
22 
23 class StMuDst;
24 class StMuMtdHit;
25 
27  public:
28 
29  StMtdTrackingMaskMaker(const Char_t *name = "StMtdTrackingMaskMaker");
31 
32  Int_t Init();
33  Int_t InitRun(const Int_t runNumber);
34  void Clear(Option_t *option="");
35  Int_t Make();
36  void setSaveHistos(const bool save) { mSaveHistos = save; }
37 
38  UInt_t getTrackingMask() { return mTpcSectorsForTracking; }
39 
40  void processTriggerData();
41  void findFriedTpcSector();
42 
43  bool isMtdHitFiredTrigger(const StMtdHit *hit);
44  bool isMtdHitFiredTrigger(const StMuMtdHit *hit);
45  bool isQTFiredTrigger(const int qt, const int pos);
46 
47  void determineTpcTrackingMask();
48  void findTpcSectorsForTracking(const double hit_phi, const int hit_module);
49 
50  typedef vector<int> IntVec;
51  IntVec findWestTpcSectors(const double hit_phi);
52  IntVec findEastTpcSectors(const double hit_phi);
53 
54  virtual const char *GetCVS() const {
55  static const char cvs[]="Tag $Name: $Id: built " __DATE__ " " __TIME__ ; return cvs;}
56 
57  private:
58  Int_t processStEvent();
59  Int_t processMuDst();
60  void bookHistos();
61 
62  double getMtdHitGlobalPhi(const int backleg, const int module, const int cell);
63  double rotatePhi(const double phi);
64 
65  StEvent *mStEvent; // StEvent pointer
66  StMuDst *mMuDst; // MuDst pointer
67  IntVec mTriggerIDs; // Di-muon trigger id
68  bool mIsDiMuon; // Flag if a event is triggered by di-muon trigger
69  StTriggerData *mTrigData; // Trigger data pointer
70 
71  int mModuleToQT[gMtdNBacklegs][gMtdNModules]; // Map from module to QT board index
72  int mModuleToQTPos[gMtdNBacklegs][gMtdNModules]; // Map from module to the position on QT board
73  int mQTtoModule[4][8]; // Map from QA board to module index
74  int mQTSlewBinEdge[4][16][8]; // Bin edges for online slewing correction for QT
75  int mQTSlewCorr[4][16][8]; // Slewing correction values for QT
76  int mTrigQTpos[4][2]; // Channel fires trigger in each QT
77 
78  IntVec mFiredSectors;
79  UInt_t mTpcSectorsForTracking; // 24-bit mask for partial tracking (sector 1 is least significant bit)
80 
81 
82  // List of histograms for QA
83  bool mSaveHistos;
84  TH1F *mhEventStat;
85  TH1F *mhNQTsignals;
86  TH1F *mhNMIXsignals;
87  TH1F *mhNMuons;
88  TH1F *mhNMtdHits;
89  TH1F *mhNTrigMtdHits;
90  TH1F *mhNTpcSectorForTracking;
91 
92  ClassDef(StMtdTrackingMaskMaker, 0)
93 };
94 
95 
96 #endif
97 
98 
99 // $Id: StMtdTrackingMaskMaker.h,v 1.3 2015/07/29 01:11:16 smirnovd Exp $
100 // $Log: StMtdTrackingMaskMaker.h,v $
101 // Revision 1.3 2015/07/29 01:11:16 smirnovd
102 // C++11 requires a space between user-defined and string literals
103 //
104 // Revision 1.2 2015/05/01 21:37:21 marr
105 // Apply online slewing correction and position correction to QT data to make
106 // sure the correct trigger patches are found offline.
107 //
108 // Revision 1.1 2015/04/07 14:10:37 jeromel
109 // First version of StMtdEvtFilterMaker - R.Ma - review closed 2015/04/06
110 //
111 //
IntVec findEastTpcSectors(const double hit_phi)
This class finds the MTD hits that actually fire the trigger, and mask the correponding TPC sectors f...
void findTpcSectorsForTracking(const double hit_phi, const int hit_module)
bool isMtdHitFiredTrigger(const StMtdHit *hit)
bool isQTFiredTrigger(const int qt, const int pos)
IntVec findWestTpcSectors(const double hit_phi)
void Clear(Option_t *option="")
User defined functions.