CMS 3D CMS Logo

MuonPathAnalyticAnalyzer.h
Go to the documentation of this file.
1 #ifndef L1Trigger_DTTriggerPhase2_MuonPathAnalyticAnalyzer_h
2 #define L1Trigger_DTTriggerPhase2_MuonPathAnalyticAnalyzer_h
3 
5 
6 // ===============================================================================
7 // Previous definitions and declarations
8 // ===============================================================================
9 
10 struct MAGNITUDE {
11  int add;
12  int coeff[4];
13  int mult;
14 };
15 
16 struct CONSTANTS {
21 };
22 
24  int latcomb;
26 };
27 
30  int valid[4];
31 };
32 
36 };
37 
38 // ===============================================================================
39 // Class declarations
40 // ===============================================================================
41 
43 public:
44  // Constructors and destructor
47  std::shared_ptr<GlobalCoordsObtainer> &globalcoordsobtainer);
48  ~MuonPathAnalyticAnalyzer() override;
49 
50  // Main methods
51  void initialise(const edm::EventSetup &iEventSetup) override;
52  void run(edm::Event &iEvent,
53  const edm::EventSetup &iEventSetup,
54  MuonPathPtrs &inMpath,
55  std::vector<cmsdt::metaPrimitive> &metaPrimitives) override;
57  const edm::EventSetup &iEventSetup,
58  MuonPathPtrs &inMpath,
59  std::vector<lat_vector> &lateralities,
60  std::vector<cmsdt::metaPrimitive> &metaPrimitives) override {};
62  const edm::EventSetup &iEventSetup,
63  std::vector<cmsdt::metaPrimitive> &inMPaths,
64  std::vector<cmsdt::metaPrimitive> &outMPaths) override {};
66  const edm::EventSetup &iEventSetup,
67  MuonPathPtrs &inMpath,
68  MuonPathPtrs &outMPath) override {};
69 
70  void finish() override;
71 
72  // Other public methods
73 
74  bool hasPosRF(int wh, int sec) { return wh > 0 || (wh == 0 && sec % 4 > 1); };
75 
76  // Public attributes
77  DTGeometry const *dtGeo_;
79 
80  //shift
82  std::map<int, float> shiftinfo_;
83 
84  //shift theta
86  std::map<int, float> shiftthetainfo_;
87 
89 
90 private:
91  // Private methods
92  void analyze(MuonPathPtr &inMPath, std::vector<cmsdt::metaPrimitive> &metaPrimitives);
94  void segment_fitter(DTSuperLayerId MuonPathSLId,
95  int wires[4],
96  int t0s[4],
97  int valid[4],
98  int reduced_times[4],
99  int cell_horiz_layout[4],
100  LATCOMB_CONSTANTS latcomb_consts,
101  int xwire_mm[4],
102  int coarse_pos,
103  int coarse_offset,
104  std::vector<cmsdt::metaPrimitive> &metaPrimitives);
105  int compute_parameter(MAGNITUDE constants, int t0s[4], int DIV_SHR_BITS, int INCREASED_RES);
106  std::vector<int> getLateralityCombination(int latcomb);
107 
108  // Private attributes
109 
110  const bool debug_;
111  double chi2Th_;
112  double tanPhiTh_;
117  double tanPhiThw0_;
119  std::vector<CELL_VALID_LAYOUT_CONSTANTS> LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER;
120 
121  // global coordinates
122  std::shared_ptr<GlobalCoordsObtainer> globalcoordsobtainer_;
123 };
124 
125 #endif
std::vector< CELL_VALID_LAYOUT_CONSTANTS > LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER
std::vector< MuonPathPtr > MuonPathPtrs
Definition: MuonPath.h:132
std::map< int, float > shiftthetainfo_
bool hasPosRF(int wh, int sec)
std::vector< short > latcomb
int iEvent
Definition: GenABIO.cc:224
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, MuonPathPtrs &inMpath, MuonPathPtrs &outMPath) override
LATCOMB_CONSTANTS latcomb_constants[6]
MuonPathAnalyticAnalyzer(const edm::ParameterSet &pset, edm::ConsumesCollector &iC, std::shared_ptr< GlobalCoordsObtainer > &globalcoordsobtainer)
void segment_fitter(DTSuperLayerId MuonPathSLId, int wires[4], int t0s[4], int valid[4], int reduced_times[4], int cell_horiz_layout[4], LATCOMB_CONSTANTS latcomb_consts, int xwire_mm[4], int coarse_pos, int coarse_offset, std::vector< cmsdt::metaPrimitive > &metaPrimitives)
std::vector< int > getLateralityCombination(int latcomb)
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, MuonPathPtrs &inMpath, std::vector< cmsdt::metaPrimitive > &metaPrimitives) override
void initialise(const edm::EventSetup &iEventSetup) override
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomH
int cellLayout_[cmsdt::NUM_LAYERS]
void analyze(MuonPathPtr &inMPath, std::vector< cmsdt::metaPrimitive > &metaPrimitives)
std::map< int, float > shiftinfo_
std::shared_ptr< MuonPath > MuonPathPtr
Definition: MuonPath.h:131
constexpr int NUM_LAYERS
Definition: constants.h:358
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, MuonPathPtrs &inMpath, std::vector< lat_vector > &lateralities, std::vector< cmsdt::metaPrimitive > &metaPrimitives) override
std::shared_ptr< GlobalCoordsObtainer > globalcoordsobtainer_
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, std::vector< cmsdt::metaPrimitive > &inMPaths, std::vector< cmsdt::metaPrimitive > &outMPaths) override
int compute_parameter(MAGNITUDE constants, int t0s[4], int DIV_SHR_BITS, int INCREASED_RES)