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 
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  std::shared_ptr< TTStubAlgorithm< T > > _theAlgo;
89 
92 
93  public:
96  {
97  mPerformZMatching2S = p.getParameter< bool >("zMatching2S");
98  setWhatProduced( this );
99  }
100 
103 
105  std::shared_ptr< TTStubAlgorithm< T > > produce( const TTStubAlgorithmRecord & record )
106  {
108  record.getRecord< TrackerDigiGeometryRecord >().get( tGeomHandle );
109  const TrackerGeometry* const theTrackerGeom = tGeomHandle.product();
110  edm::ESHandle<TrackerTopology> tTopoHandle;
111  record.getRecord<TrackerTopologyRcd>().get(tTopoHandle);
112  const TrackerTopology* const theTrackerTopo = tTopoHandle.product();
113 
114  TTStubAlgorithm< T >* TTStubAlgo = new TTStubAlgorithm_cbc3< T >( theTrackerGeom, theTrackerTopo, mPerformZMatching2S );
115  _theAlgo = std::shared_ptr< TTStubAlgorithm< T > >( TTStubAlgo );
116  return _theAlgo;
117  }
118 
119 };
120 
121 #endif
122 
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
std::shared_ptr< TTStubAlgorithm< T > > _theAlgo
Data members.
void PatternHitCorrelation(bool &aConfirmation, int &aDisplacement, int &anOffset, float &anROffset, float &anHardBend, const TTStub< T > &aTTStub) const override
Matching operations.
bool mPerformZMatching2S
Z-matching.
~TTStubAlgorithm_cbc3()
Destructor.
Class for "cbc3" algorithm to be used in TTStubBuilder.
ES_TTStubAlgorithm_cbc3(const edm::ParameterSet &p)
Constructor.
std::shared_ptr< TTStubAlgorithm< T > > produce(const TTStubAlgorithmRecord &record)
Implement the producer.
Class to store the TTStubAlgorithm used in TTStubBuilder.
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
virtual ~ES_TTStubAlgorithm_cbc3()
Destructor.
bool mPerformZMatching2S
Data members.
long double T
T const * product() const
Definition: ESHandle.h:86