CMS 3D CMS Logo

MuonPathAnalyzerInChamber.h
Go to the documentation of this file.
1 #ifndef L1Trigger_DTTriggerPhase2_MuonPathAnalyzerInChamber_h
2 #define L1Trigger_DTTriggerPhase2_MuonPathAnalyzerInChamber_h
3 
5 
6 // ===============================================================================
7 // Previous definitions and declarations
8 // ===============================================================================
9 namespace {
10  typedef std::array<cmsdt::LATERAL_CASES, cmsdt::NUM_LAYERS_2SL> TLateralities;
11 } // namespace
12 // ===============================================================================
13 // Class declarations
14 // ===============================================================================
15 
17 public:
18  // Constructors and destructor
21  std::shared_ptr<GlobalCoordsObtainer> &globalcoordsobtainer);
22  ~MuonPathAnalyzerInChamber() override;
23 
24  // Main methods
25  void initialise(const edm::EventSetup &iEventSetup) override;
27  const edm::EventSetup &iEventSetup,
28  MuonPathPtrs &inMpath,
29  std::vector<cmsdt::metaPrimitive> &metaPrimitives) override{};
31  const edm::EventSetup &iEventSetup,
32  MuonPathPtrs &inMpath,
33  std::vector<lat_vector> &lateralities,
34  std::vector<cmsdt::metaPrimitive> &metaPrimitives) override{};
36  const edm::EventSetup &iEventSetup,
37  std::vector<cmsdt::metaPrimitive> &inMPaths,
38  std::vector<cmsdt::metaPrimitive> &outMPaths) override{};
39  void run(edm::Event &iEvent,
40  const edm::EventSetup &iEventSetup,
41  MuonPathPtrs &inMpath,
42  MuonPathPtrs &outMPath) override;
43 
44  void finish() override;
45 
46  // Other public methods
47  void setBxTolerance(int t) { bxTolerance_ = t; };
48  void setMinHits4Fit(int h) { minHits4Fit_ = h; };
49  void setChiSquareThreshold(float ch2Thr) { chiSquareThreshold_ = ch2Thr; };
51  if (minQuality_ >= cmsdt::LOWQ)
52  minQuality_ = q;
53  };
54 
55  int bxTolerance(void) { return bxTolerance_; };
56  int minHits4Fit(void) { return minHits4Fit_; };
58 
59  bool hasPosRF(int wh, int sec) { return wh > 0 || (wh == 0 && sec % 4 > 1); };
60 
61  // Public attributes
62  DTGeometry const *dtGeo_;
64 
65  //shift
66  std::map<int, float> shiftinfo_;
67 
68 private:
69  // Private methods
70  void analyze(MuonPathPtr &inMPath, MuonPathPtrs &outMPaths);
71 
72  void setCellLayout(MuonPathPtr &mpath);
73  void buildLateralities(MuonPathPtr &mpath);
74  void setLateralitiesInMP(MuonPathPtr &mpath, TLateralities lat);
77  TLateralities lat,
78  int present_layer[cmsdt::NUM_LAYERS_2SL],
79  int &lat_added);
80 
81  void evaluateQuality(MuonPathPtr &mPath);
83  std::vector<TLateralities> lateralities_;
84  std::vector<cmsdt::LATQ_TYPE> latQuality_;
85 
86  const bool debug_;
87  double chi2Th_;
92  short minHits4Fit_;
95 
96  // global coordinates
97  std::shared_ptr<GlobalCoordsObtainer> globalcoordsobtainer_;
98 };
99 
100 #endif
void setChiSquareThreshold(float ch2Thr)
MuonPathAnalyzerInChamber(const edm::ParameterSet &pset, edm::ConsumesCollector &iC, std::shared_ptr< GlobalCoordsObtainer > &globalcoordsobtainer)
void setCellLayout(MuonPathPtr &mpath)
std::vector< MuonPathPtr > MuonPathPtrs
Definition: MuonPath.h:132
void setWirePosAndTimeInMP(MuonPathPtr &mpath)
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomH
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, MuonPathPtrs &inMpath, std::vector< lat_vector > &lateralities, std::vector< cmsdt::metaPrimitive > &metaPrimitives) override
void evaluateQuality(MuonPathPtr &mPath)
int iEvent
Definition: GenABIO.cc:224
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, std::vector< cmsdt::metaPrimitive > &inMPaths, std::vector< cmsdt::metaPrimitive > &outMPaths) override
void buildLateralities(MuonPathPtr &mpath)
void setLateralitiesInMP(MuonPathPtr &mpath, TLateralities lat)
std::map< int, float > shiftinfo_
void initialise(const edm::EventSetup &iEventSetup) override
std::vector< TLateralities > lateralities_
MP_QUALITY
Definition: constants.h:44
void calculateFitParameters(MuonPathPtr &mpath, TLateralities lat, int present_layer[cmsdt::NUM_LAYERS_2SL], int &lat_added)
cmsdt::MP_QUALITY minQuality(void)
constexpr int NUM_LAYERS_2SL
Definition: constants.h:393
std::vector< cmsdt::LATQ_TYPE > latQuality_
void analyze(MuonPathPtr &inMPath, MuonPathPtrs &outMPaths)
std::shared_ptr< MuonPath > MuonPathPtr
Definition: MuonPath.h:131
std::shared_ptr< GlobalCoordsObtainer > globalcoordsobtainer_
void setMinimumQuality(cmsdt::MP_QUALITY q)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, MuonPathPtrs &inMpath, std::vector< cmsdt::metaPrimitive > &metaPrimitives) override
int cellLayout_[cmsdt::NUM_LAYERS_2SL]