CMS 3D CMS Logo

TTStubAlgorithm_cbc3.h
Go to the documentation of this file.
1 
11 #ifndef L1_TRACK_TRIGGER_STUB_ALGO_CBC3_H
12 #define L1_TRACK_TRIGGER_STUB_ALGO_CBC3_H
13 
18 
21 
24 
25 #include <memory>
26 #include <string>
27 #include <map>
28 #include <typeinfo>
29 
30 template< typename T >
32 {
33  private:
37 
38  public:
40  TTStubAlgorithm_cbc3( const TrackerGeometry* const theTrackerGeom, const TrackerTopology* const theTrackerTopo, bool aPerformZMatching2S ):
41  TTStubAlgorithm< T >( theTrackerGeom, theTrackerTopo, __func__ )
42  {
43  mPerformZMatching2S = aPerformZMatching2S;
44  }
45 
47  ~TTStubAlgorithm_cbc3() override{}
48 
50  void PatternHitCorrelation( bool &aConfirmation,
51  int &aDisplacement,
52  int &anOffset,
53  float &anROffset,
54  float &anHardBend,
55  const TTStub< T > &aTTStub ) const override;
56 
57 };
58 
66 template< >
69  int &aDisplacement,
70  int &anOffset,
71  float &anROffset,
72  float &anHardBend,
73  const TTStub< Ref_Phase2TrackerDigi_ > &aTTStub ) const;
74 
83 template< typename T >
85 {
86  private:
88 
91 
92  public:
95  {
96  mPerformZMatching2S = p.getParameter< bool >("zMatching2S");
97  setWhatProduced( this );
98  }
99 
102 
104  std::unique_ptr< TTStubAlgorithm< T > > produce( const TTStubAlgorithmRecord & record )
105  {
107  record.getRecord< TrackerDigiGeometryRecord >().get( tGeomHandle );
108  const TrackerGeometry* const theTrackerGeom = tGeomHandle.product();
109  edm::ESHandle<TrackerTopology> tTopoHandle;
110  record.getRecord<TrackerTopologyRcd>().get(tTopoHandle);
111  const TrackerTopology* const theTrackerTopo = tTopoHandle.product();
112 
113  TTStubAlgorithm< T >* TTStubAlgo = new TTStubAlgorithm_cbc3< T >( theTrackerGeom, theTrackerTopo, mPerformZMatching2S );
114  return std::unique_ptr< TTStubAlgorithm< T > >( TTStubAlgo );
115  }
116 
117 };
118 
119 #endif
120 
TTStubAlgorithm_cbc3(const TrackerGeometry *const theTrackerGeom, const TrackerTopology *const theTrackerTopo, bool aPerformZMatching2S)
Constructor.
T getParameter(std::string const &) const
Class to declare the algorithm to the framework.
Base class for any algorithm to be used in TTStubBuilder.
JetCorrectorParameters::Record record
Definition: classes.h:7
~ES_TTStubAlgorithm_cbc3() override
Destructor.
std::unique_ptr< TTStubAlgorithm< T > > produce(const TTStubAlgorithmRecord &record)
Implement the producer.
void PatternHitCorrelation(bool &aConfirmation, int &aDisplacement, int &anOffset, float &anROffset, float &anHardBend, const TTStub< T > &aTTStub) const override
Matching operations.
bool mPerformZMatching2S
Data members.
Class for "cbc3" algorithm to be used in TTStubBuilder.
ES_TTStubAlgorithm_cbc3(const edm::ParameterSet &p)
Constructor.
Class to store the TTStubAlgorithm used in TTStubBuilder.
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
bool mPerformZMatching2S
Data members.
~TTStubAlgorithm_cbc3() override
Destructor.
long double T
T const * product() const
Definition: ESHandle.h:86