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 
24 
30 
35 
36 #include <memory>
37 #include <map>
38 #include <vector>
39 
40 template <typename T>
44 public:
46  explicit TTClusterBuilder(const edm::ParameterSet& iConfig);
48  ~TTClusterBuilder() override;
49 
50 private:
53  std::vector<edm::EDGetTokenT<edm::DetSetVector<Phase2TrackerDigi> > > rawHitTokens;
54  unsigned int ADCThreshold;
56 
58  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
59  void endRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
60  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
61 
63  void RetrieveRawHits(std::map<DetId, std::vector<T> >& mRawHits, const edm::Event& iEvent);
64 
65 };
66 
74 template <typename T>
77  ADCThreshold = iConfig.getParameter<unsigned int>("ADCThreshold");
78  storeLocalCoord = iConfig.getParameter<bool>("storeLocalCoord");
79 
80  std::vector<edm::InputTag> rawHitInputTags = iConfig.getParameter<std::vector<edm::InputTag> >("rawHits");
81  for (auto it = rawHitInputTags.begin(); it != rawHitInputTags.end(); ++it) {
82  rawHitTokens.push_back(consumes<edm::DetSetVector<Phase2TrackerDigi> >(*it));
83  }
84 
85  produces<edmNew::DetSetVector<TTCluster<T> > >("ClusterInclusive");
86 }
87 
89 template <typename T>
91 
93 template <typename T>
96  iSetup.get<TTClusterAlgorithmRecord>().get(theClusterFindingAlgoHandle);
97 }
98 
100 template <typename T>
102 
104 template <>
106 
108 template <>
110  std::map<DetId, std::vector<Ref_Phase2TrackerDigi_> >& mRawHits, const edm::Event& iEvent);
111 
112 #endif
edm::DetSetVector
Definition: DetSetVector.h:61
TTClusterBuilder::~TTClusterBuilder
~TTClusterBuilder() override
Destructor.
Definition: TTClusterBuilder.h:90
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:54
TrackerGeometry.h
PixelTopology.h
EDProducer.h
TTClusterBuilder::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Mandatory methods.
Definition: TTClusterBuilder.h:94
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:53
TTClusterBuilder::TTClusterBuilder
TTClusterBuilder(const edm::ParameterSet &iConfig)
Constructors.
Definition: TTClusterBuilder.h:76
TTClusterAlgorithm.h
DetId
Definition: DetId.h:17
MakerMacros.h
TrackerTopology.h
TTClusterBuilder::theClusterFindingAlgoHandle
edm::ESHandle< TTClusterAlgorithm< T > > theClusterFindingAlgoHandle
Data members.
Definition: TTClusterBuilder.h:52
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
TTClusterBuilder::storeLocalCoord
bool storeLocalCoord
Definition: TTClusterBuilder.h:55
edm::ESHandle
Definition: DTSurvey.h:22
TTClusterAlgorithmRecord.h
Phase2TrackerDigi.h
edm::ParameterSet
Definition: ParameterSet.h:36
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::EventSetup
Definition: EventSetup.h:57
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
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:101
EventSetup.h
edm::EDProducer
Definition: EDProducer.h:36
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:41