CMS 3D CMS Logo

TTStubAlgorithm_official.h
Go to the documentation of this file.
1 
16 #ifndef L1_TRACK_TRIGGER_STUB_ALGO_official_H
17 #define L1_TRACK_TRIGGER_STUB_ALGO_official_H
18 
22 
25 
30 
31 #include <memory>
32 #include <string>
33 #include <map>
34 #include <typeinfo>
35 
36 template <typename T>
38 private:
42  bool m_tilted;
44 
45  std::vector<double> barrelCut;
46  std::vector<std::vector<double>> ringCut;
47  std::vector<std::vector<double>> tiltedCut;
48  std::vector<double> barrelNTilt;
49 
50 public:
52  TTStubAlgorithm_official(const TrackerGeometry *const theTrackerGeom,
53  const TrackerTopology *const theTrackerTopo,
54  std::vector<double> setBarrelCut,
55  std::vector<std::vector<double>> setRingCut,
56  std::vector<std::vector<double>> setTiltedCut,
57  std::vector<double> setBarrelNTilt,
58  bool aPerformZMatchingPS,
59  bool aPerformZMatching2S)
60  : TTStubAlgorithm<T>(theTrackerGeom, theTrackerTopo, __func__) {
61  barrelCut = setBarrelCut;
62  ringCut = setRingCut;
63  tiltedCut = setTiltedCut;
64  barrelNTilt = setBarrelNTilt;
65  mPerformZMatchingPS = aPerformZMatchingPS;
66  mPerformZMatching2S = aPerformZMatching2S;
67  }
68 
71 
73  void PatternHitCorrelation(bool &aConfirmation,
74  int &aDisplacement,
75  int &anOffset,
76  float &anHardBend,
77  const TTStub<T> &aTTStub) const override;
78 
79  float degradeBend(bool psModule, int window, int bend) const;
80 
81 };
82 
90 template <>
93  bool &aConfirmation,
94  int &aDisplacement,
95  int &anOffset,
96  float &anHardBend,
97  const TTStub<Ref_Phase2TrackerDigi_> &aTTStub) const;
98 
99 template <>
100 float TTStubAlgorithm_official<Ref_Phase2TrackerDigi_>::degradeBend(bool psModule, int window, int bend) const;
101 
110 template <typename T>
112 private:
116 
118  std::vector<double> setBarrelCut;
119  std::vector<std::vector<double>> setRingCut;
120  std::vector<std::vector<double>> setTiltedCut;
121 
122  std::vector<double> setBarrelNTilt;
123 
127 
128 public:
131  mPerformZMatchingPS = p.getParameter<bool>("zMatchingPS");
132  mPerformZMatching2S = p.getParameter<bool>("zMatching2S");
133  setBarrelCut = p.getParameter<std::vector<double>>("BarrelCut");
134  setBarrelNTilt = p.getParameter<std::vector<double>>("NTiltedRings");
135 
136  std::vector<edm::ParameterSet> vPSet = p.getParameter<std::vector<edm::ParameterSet>>("EndcapCutSet");
137  std::vector<edm::ParameterSet> vPSet2 = p.getParameter<std::vector<edm::ParameterSet>>("TiltedBarrelCutSet");
138 
139  std::vector<edm::ParameterSet>::const_iterator iPSet;
140  for (iPSet = vPSet.begin(); iPSet != vPSet.end(); iPSet++) {
141  setRingCut.push_back(iPSet->getParameter<std::vector<double>>("EndcapCut"));
142  }
143 
144  for (iPSet = vPSet2.begin(); iPSet != vPSet2.end(); iPSet++) {
145  setTiltedCut.push_back(iPSet->getParameter<std::vector<double>>("TiltedCut"));
146  }
147 
148  auto cc = setWhatProduced(this);
149  mGeomToken = cc.consumes();
150  mTopoToken = cc.consumes();
151  }
152 
155 
157  std::unique_ptr<TTStubAlgorithm<T>> produce(const TTStubAlgorithmRecord &record) {
158  return std::make_unique<TTStubAlgorithm_official<T>>(&record.get(mGeomToken),
159  &record.get(mTopoToken),
160  setBarrelCut,
161  setRingCut,
162  setTiltedCut,
166  }
167 };
168 
169 #endif
TTStubAlgorithmRecord.h
TTStubAlgorithm_official::className_
std::string className_
Definition: TTStubAlgorithm_official.h:43
TTStubAlgorithm
Base class for any algorithm to be used in TTStubBuilder.
Definition: TTStubAlgorithm.h:29
PixelTopology.h
TTStubAlgorithm_official::ringCut
std::vector< std::vector< double > > ringCut
Definition: TTStubAlgorithm_official.h:46
TTStubAlgorithm.h
TrackerTopology
Definition: TrackerTopology.h:16
TTStubAlgorithm_official::mPerformZMatching2S
bool mPerformZMatching2S
Definition: TTStubAlgorithm_official.h:41
ES_TTStubAlgorithm_official::mPerformZMatchingPS
bool mPerformZMatchingPS
Z-matching.
Definition: TTStubAlgorithm_official.h:125
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ES_TTStubAlgorithm_official::mGeomToken
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > mGeomToken
Data members.
Definition: TTStubAlgorithm_official.h:114
ESProducer.h
svgfig.window
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
TTStubAlgorithm_official::degradeBend
float degradeBend(bool psModule, int window, int bend) const
ES_TTStubAlgorithm_official
Class to declare the algorithm to the framework.
Definition: TTStubAlgorithm_official.h:111
ES_TTStubAlgorithm_official::ES_TTStubAlgorithm_official
ES_TTStubAlgorithm_official(const edm::ParameterSet &p)
Constructor.
Definition: TTStubAlgorithm_official.h:130
TTStubAlgorithm_official
Class for "official" algorithm to be used in TTStubBuilder.
Definition: TTStubAlgorithm_official.h:37
ES_TTStubAlgorithm_official::produce
std::unique_ptr< TTStubAlgorithm< T > > produce(const TTStubAlgorithmRecord &record)
Implement the producer.
Definition: TTStubAlgorithm_official.h:157
ES_TTStubAlgorithm_official::mPerformZMatching2S
bool mPerformZMatching2S
Definition: TTStubAlgorithm_official.h:126
TTStubAlgorithm_official::tiltedCut
std::vector< std::vector< double > > tiltedCut
Definition: TTStubAlgorithm_official.h:47
ES_TTStubAlgorithm_official::setBarrelCut
std::vector< double > setBarrelCut
Windows.
Definition: TTStubAlgorithm_official.h:118
ES_TTStubAlgorithm_official::~ES_TTStubAlgorithm_official
~ES_TTStubAlgorithm_official() override
Destructor.
Definition: TTStubAlgorithm_official.h:154
TTStub
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
TTStubAlgorithm_official::barrelNTilt
std::vector< double > barrelNTilt
Definition: TTStubAlgorithm_official.h:48
ES_TTStubAlgorithm_official::setTiltedCut
std::vector< std::vector< double > > setTiltedCut
Definition: TTStubAlgorithm_official.h:120
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TTStubAlgorithm_official::TTStubAlgorithm_official
TTStubAlgorithm_official(const TrackerGeometry *const theTrackerGeom, const TrackerTopology *const theTrackerTopo, std::vector< double > setBarrelCut, std::vector< std::vector< double >> setRingCut, std::vector< std::vector< double >> setTiltedCut, std::vector< double > setBarrelNTilt, bool aPerformZMatchingPS, bool aPerformZMatching2S)
Constructor.
Definition: TTStubAlgorithm_official.h:52
ES_TTStubAlgorithm_official::setRingCut
std::vector< std::vector< double > > setRingCut
Definition: TTStubAlgorithm_official.h:119
MeasurementPoint.h
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
AlCaHarvesting_cff.record
record
Definition: AlCaHarvesting_cff.py:42
cc
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TTStubAlgorithm_official::m_tilted
bool m_tilted
Definition: TTStubAlgorithm_official.h:42
TTStubAlgorithmRecord
Class to store the TTStubAlgorithm used in TTStubBuilder.
Definition: TTStubAlgorithmRecord.h:23
ModuleFactory.h
T
long double T
Definition: Basic3DVectorLD.h:48
PixelGeomDetUnit.h
EventSetup.h
TTStubAlgorithm_official::~TTStubAlgorithm_official
~TTStubAlgorithm_official() override
Destructor.
Definition: TTStubAlgorithm_official.h:70
edm::ESProducer
Definition: ESProducer.h:104
TTStubAlgorithm_official::mPerformZMatchingPS
bool mPerformZMatchingPS
Data members.
Definition: TTStubAlgorithm_official.h:40
TTStubAlgorithm_official::barrelCut
std::vector< double > barrelCut
Definition: TTStubAlgorithm_official.h:45
TTStubAlgorithm_official::PatternHitCorrelation
void PatternHitCorrelation(bool &aConfirmation, int &aDisplacement, int &anOffset, float &anHardBend, const TTStub< T > &aTTStub) const override
Matching operations.
Topology.h
ES_TTStubAlgorithm_official::setBarrelNTilt
std::vector< double > setBarrelNTilt
Definition: TTStubAlgorithm_official.h:122
TrackerGeometry
Definition: TrackerGeometry.h:14
ES_TTStubAlgorithm_official::mTopoToken
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > mTopoToken
Definition: TTStubAlgorithm_official.h:115