CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  constexpr int NLayers = 8;
11  typedef std::array<cmsdt::LATERAL_CASES, NLayers> TLateralities;
12 } // namespace
13 // ===============================================================================
14 // Class declarations
15 // ===============================================================================
16 
18 public:
19  // Constructors and destructor
22  std::shared_ptr<GlobalCoordsObtainer> &globalcoordsobtainer);
23  ~MuonPathAnalyzerInChamber() override;
24 
25  // Main methods
26  void initialise(const edm::EventSetup &iEventSetup) override;
28  const edm::EventSetup &iEventSetup,
29  MuonPathPtrs &inMpath,
30  std::vector<cmsdt::metaPrimitive> &metaPrimitives) override{};
31  void run(edm::Event &iEvent,
32  const edm::EventSetup &iEventSetup,
33  MuonPathPtrs &inMpath,
34  MuonPathPtrs &outMPath) override;
35 
36  void finish() override;
37 
38  // Other public methods
39  void setBxTolerance(int t) { bxTolerance_ = t; };
40  void setMinHits4Fit(int h) { minHits4Fit_ = h; };
41  void setChiSquareThreshold(float ch2Thr) { chiSquareThreshold_ = ch2Thr; };
43  if (minQuality_ >= cmsdt::LOWQ)
44  minQuality_ = q;
45  };
46 
47  int bxTolerance(void) { return bxTolerance_; };
48  int minHits4Fit(void) { return minHits4Fit_; };
50 
51  bool hasPosRF(int wh, int sec) { return wh > 0 || (wh == 0 && sec % 4 > 1); };
52 
53  // Public attributes
54  DTGeometry const *dtGeo_;
56 
57  //shift
58  std::map<int, float> shiftinfo_;
59 
60 private:
61  // Private methods
62  void analyze(MuonPathPtr &inMPath, MuonPathPtrs &outMPaths);
63 
64  void setCellLayout(MuonPathPtr &mpath);
65  void buildLateralities(MuonPathPtr &mpath);
66  void setLateralitiesInMP(MuonPathPtr &mpath, TLateralities lat);
68  void calculateFitParameters(MuonPathPtr &mpath, TLateralities lat, int present_layer[NLayers], int &lat_added);
69 
70  void evaluateQuality(MuonPathPtr &mPath);
72  std::vector<TLateralities> lateralities_;
73  std::vector<cmsdt::LATQ_TYPE> latQuality_;
74 
75  bool debug_;
76  double chi2Th_;
81  short minHits4Fit_;
82  int cellLayout_[NLayers];
84 
85  // global coordinates
86  std::shared_ptr<GlobalCoordsObtainer> globalcoordsobtainer_;
87 };
88 
89 #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:128
void setWirePosAndTimeInMP(MuonPathPtr &mpath)
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomH
void evaluateQuality(MuonPathPtr &mPath)
int iEvent
Definition: GenABIO.cc:224
void buildLateralities(MuonPathPtr &mpath)
void setLateralitiesInMP(MuonPathPtr &mpath, TLateralities lat)
std::map< int, float > shiftinfo_
void initialise(const edm::EventSetup &iEventSetup) override
void calculateFitParameters(MuonPathPtr &mpath, TLateralities lat, int present_layer[NLayers], int &lat_added)
std::vector< TLateralities > lateralities_
MP_QUALITY
Definition: constants.h:42
cmsdt::MP_QUALITY minQuality(void)
std::vector< cmsdt::LATQ_TYPE > latQuality_
void analyze(MuonPathPtr &inMPath, MuonPathPtrs &outMPaths)
std::shared_ptr< MuonPath > MuonPathPtr
Definition: MuonPath.h:127
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