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 
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  virtual void beginRun( const edm::Run& run, const edm::EventSetup& iSetup );
79  virtual void endRun( const edm::Run& run, const edm::EventSetup& iSetup );
80  virtual void produce( edm::Event& iEvent, const edm::EventSetup& iSetup );
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  {
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.
edm::Handle< edm::SimTrackContainer > theSimTrackHandle
T getParameter(std::string const &) const
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > thePixelDigiSimLinkHandle
Data members.
edm::Handle< std::vector< TrackingParticle > > TrackingParticleHandle
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
TTClusterAssociator(const edm::ParameterSet &iConfig)
Constructors.
int iEvent
Definition: GenABIO.cc:230
~TTClusterAssociator()
Destructor.
virtual void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
Mandatory methods.
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:55
edm::EDGetTokenT< std::vector< TrackingParticle > > tpToken
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > digisimLinkToken
edm::ESHandle< TrackerTopology > theTrackerTopology
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
edm::ESHandle< TrackerGeometry > theTrackerGeometry
Definition: Run.h:42
virtual void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
End run.