CMS 3D CMS Logo

TTClusterBuilder.h
Go to the documentation of this file.
1 
14 #ifndef L1_TRACK_TRIGGER_CLUSTER_BUILDER_H
15 #define L1_TRACK_TRIGGER_CLUSTER_BUILDER_H
16 
25 
31 
36 
37 #include <memory>
38 #include <map>
39 #include <vector>
40 
41 template <typename T>
45 public:
47  explicit TTClusterBuilder(const edm::ParameterSet& iConfig);
49  ~TTClusterBuilder() override;
50 
51 private:
56  std::vector<edm::EDGetTokenT<edm::DetSetVector<Phase2TrackerDigi> > > rawHitTokens;
57  unsigned int ADCThreshold;
59 
61  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
62  void endRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
63  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
64 
66  void RetrieveRawHits(std::map<DetId, std::vector<T> >& mRawHits, const edm::Event& iEvent);
67 
68 };
69 
77 template <typename T>
80  ADCThreshold = iConfig.getParameter<unsigned int>("ADCThreshold");
81  storeLocalCoord = iConfig.getParameter<bool>("storeLocalCoord");
82  tTopoToken = esConsumes<TrackerTopology, TrackerTopologyRcd>();
83  tGeomToken = esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>();
84 
85  std::vector<edm::InputTag> rawHitInputTags = iConfig.getParameter<std::vector<edm::InputTag> >("rawHits");
86  for (auto it = rawHitInputTags.begin(); it != rawHitInputTags.end(); ++it) {
87  rawHitTokens.push_back(consumes<edm::DetSetVector<Phase2TrackerDigi> >(*it));
88  }
89 
90  produces<edmNew::DetSetVector<TTCluster<T> > >("ClusterInclusive");
91 }
92 
94 template <typename T>
96 
98 template <typename T>
101  iSetup.get<TTClusterAlgorithmRecord>().get(theClusterFindingAlgoHandle);
102 }
103 
105 template <typename T>
107 
109 template <>
111 
113 template <>
115  std::map<DetId, std::vector<Ref_Phase2TrackerDigi_> >& mRawHits, const edm::Event& iEvent);
116 
117 #endif
edm::DetSetVector< Phase2TrackerDigi >
TTClusterBuilder::~TTClusterBuilder
~TTClusterBuilder() override
Destructor.
Definition: TTClusterBuilder.h:95
TTClusterBuilder::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
TTClusterAlgorithmRecord
Class to store the TTClusterAlgorithm used in TTClusterBuilder.
Definition: TTClusterAlgorithmRecord.h:20
TTClusterBuilder::ADCThreshold
unsigned int ADCThreshold
Definition: TTClusterBuilder.h:57
TrackerGeometry.h
PixelTopology.h
TTClusterBuilder::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
Definition: TTClusterBuilder.h:99
ESHandle.h
TTCluster_cfi.ADCThreshold
ADCThreshold
Definition: TTCluster_cfi.py:5
edm::Run
Definition: Run.h:45
TTClusterBuilder::rawHitTokens
std::vector< edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > > rawHitTokens
Definition: TTClusterBuilder.h:56
TTClusterBuilder::TTClusterBuilder
TTClusterBuilder(const edm::ParameterSet &iConfig)
Constructors.
Definition: TTClusterBuilder.h:79
EDProducer.h
ESGetToken.h
TTClusterAlgorithm.h
DetId
Definition: DetId.h:17
MakerMacros.h
TrackerTopology.h
TTClusterBuilder::theClusterFindingAlgoHandle
edm::ESHandle< TTClusterAlgorithm< T > > theClusterFindingAlgoHandle
Data members.
Definition: TTClusterBuilder.h:53
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
TTClusterBuilder::tTopoToken
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken
Definition: TTClusterBuilder.h:54
TTClusterBuilder::tGeomToken
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomToken
Definition: TTClusterBuilder.h:55
TTClusterBuilder::storeLocalCoord
bool storeLocalCoord
Definition: TTClusterBuilder.h:58
edm::ESHandle
Definition: DTSurvey.h:22
TTClusterAlgorithmRecord.h
Phase2TrackerDigi.h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition: GenABIO.cc:224
TTClusterBuilder::RetrieveRawHits
void RetrieveRawHits(std::map< DetId, std::vector< T > > &mRawHits, const edm::Event &iEvent)
Get hits.
edm::stream::EDProducer
Definition: EDProducer.h:36
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd >
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Frameworkfwd.h
PixelGeomDetUnit.h
TTClusterBuilder::endRun
void endRun(const edm::Run &run, const edm::EventSetup &iSetup) override
End run.
Definition: TTClusterBuilder.h:106
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
genParticles_cff.map
map
Definition: genParticles_cff.py:11
ParameterSet.h
edm::Event
Definition: Event.h:73
TTCluster_cfi.storeLocalCoord
storeLocalCoord
Definition: TTCluster_cfi.py:6
Topology.h
DetSetVectorNew.h
TTClusterBuilder
Plugin to load the Clustering algorithm and produce the collection of Clusters that goes in the event...
Definition: TTClusterBuilder.h:42