CMS 3D CMS Logo

TTClusterAssociator.h
Go to the documentation of this file.
1 
13 #ifndef L1_TRACK_TRIGGER_CLUSTER_ASSOCIATOR_H
14 #define L1_TRACK_TRIGGER_CLUSTER_ASSOCIATOR_H
15 
23 
29 
30 
33 
38 
39 #include <memory>
40 #include <map>
41 #include <vector>
42 
43 template< typename T >
45 {
48  public:
50  explicit TTClusterAssociator( const edm::ParameterSet& iConfig );
51 
53  ~TTClusterAssociator() override;
54 
55  private:
60 
61  std::vector< edm::InputTag > TTClustersInputTags;
62 
66  //std::vector< edm::EDGetTokenT< edm::DetSetVector< TTCluster< T > > > > TTClustersTokens;
67  std::vector<edm::EDGetTokenT< edmNew::DetSetVector< TTCluster< T > > > > TTClustersTokens;
68 
69  // const StackedTrackerGeometry *theStackedTrackers;
70  //unsigned int ADCThreshold;
71 
72 
75 
76 
78  void beginRun( const edm::Run& run, const edm::EventSetup& iSetup ) override;
79  void endRun( const edm::Run& run, const edm::EventSetup& iSetup ) override;
80  void produce( edm::Event& iEvent, const edm::EventSetup& iSetup ) override;
81 
82 };
83 
91 template< typename T >
94 {
95  simTrackToken = consumes< edm::SimTrackContainer >(iConfig.getParameter< edm::InputTag >( "simTrackHits" ));
96  digisimLinkToken = consumes< edm::DetSetVector< PixelDigiSimLink > >(iConfig.getParameter< edm::InputTag >( "digiSimLinks" ));
97  tpToken = consumes< std::vector< TrackingParticle > >(iConfig.getParameter< edm::InputTag >( "trackingParts" ));
98 
99 
100  TTClustersInputTags = iConfig.getParameter< std::vector< edm::InputTag > >( "TTClusters" );
101 
102  for ( auto iTag = TTClustersInputTags.begin(); iTag!= TTClustersInputTags.end(); iTag++ )
103  {
104  TTClustersTokens.push_back(consumes< edmNew::DetSetVector< TTCluster< T > > >(*iTag));
105 
106  produces< TTClusterAssociationMap< T > >( (*iTag).instance() );
107  }
108 }
109 
111 template< typename T >
113 
115 template< typename T >
117 {
121 
123  edm::LogInfo("TTClusterAssociator< ") << templateNameFinder< T >() << " > loaded.";
124 }
125 
127 template< typename T >
129 
131 template< >
133 
134 #endif
135 
Plugin to create the MC truth for TTClusters.
void endRun(const edm::Run &run, const edm::EventSetup &iSetup) override
End run.
edm::Handle< edm::SimTrackContainer > theSimTrackHandle
T getParameter(std::string const &) const
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > thePixelDigiSimLinkHandle
Data members.
edm::Handle< std::vector< TrackingParticle > > TrackingParticleHandle
TTClusterAssociator(const edm::ParameterSet &iConfig)
Constructors.
int iEvent
Definition: GenABIO.cc:230
std::vector< edm::InputTag > TTClustersInputTags
std::vector< edm::EDGetTokenT< edmNew::DetSetVector< TTCluster< T > > > > TTClustersTokens
edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken
NOTE: this is needed even if it seems not.
Definition: TTCluster.h:27
const T & get() const
Definition: EventSetup.h:59
edm::EDGetTokenT< std::vector< TrackingParticle > > tpToken
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > digisimLinkToken
~TTClusterAssociator() override
Destructor.
edm::ESHandle< TrackerTopology > theTrackerTopology
edm::ESHandle< TrackerGeometry > theTrackerGeometry
Definition: Run.h:43