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  const TTStub< T > &aTTStub ) const override;
54 
55 };
56 
64 template< >
67  int &aDisplacement,
68  int &anOffset,
69  const TTStub< Ref_Phase2TrackerDigi_ > &aTTStub ) const;
70 
79 template< typename T >
81 {
82  private:
84  std::shared_ptr< TTStubAlgorithm< T > > _theAlgo;
85 
88 
89  public:
92  {
93  mPerformZMatching2S = p.getParameter< bool >("zMatching2S");
94  setWhatProduced( this );
95  }
96 
99 
101  std::shared_ptr< TTStubAlgorithm< T > > produce( const TTStubAlgorithmRecord & record )
102  {
104  record.getRecord< TrackerDigiGeometryRecord >().get( tGeomHandle );
105  const TrackerGeometry* const theTrackerGeom = tGeomHandle.product();
106  edm::ESHandle<TrackerTopology> tTopoHandle;
107  record.getRecord<TrackerTopologyRcd>().get(tTopoHandle);
108  const TrackerTopology* const theTrackerTopo = tTopoHandle.product();
109 
110  TTStubAlgorithm< T >* TTStubAlgo = new TTStubAlgorithm_cbc3< T >( theTrackerGeom, theTrackerTopo, mPerformZMatching2S );
111  _theAlgo = std::shared_ptr< TTStubAlgorithm< T > >( TTStubAlgo );
112  return _theAlgo;
113  }
114 
115 };
116 
117 #endif
118 
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::shared_ptr< TTStubAlgorithm< T > > _theAlgo
Data members.
bool mPerformZMatching2S
Z-matching.
void PatternHitCorrelation(bool &aConfirmation, int &aDisplacement, int &anOffset, const TTStub< T > &aTTStub) const override
Matching operations.
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
bool mPerformZMatching2S
Data members.
~TTStubAlgorithm_cbc3() override
Destructor.
long double T
T const * product() const
Definition: ESHandle.h:86