70 event.getByToken(token,handle);
76 return GlobalPoint(orgPoint.x(),orgPoint.y(),orgPoint.z());
84 return trackerTopo.
pxfDisk(detId);
93 int layerOrDisk = getLayerOrDiskNr(matchInfo.
detId,trackerTopo);
111 const auto superClusTags = pset.
getParameter<std::vector<edm::InputTag> >(
"superClusters");
112 for(
const auto& scTag : superClusTags){
115 produces<reco::ElectronSeedCollection>() ;
125 desc.
add<std::vector<edm::InputTag> >(
"superClusters",std::vector<edm::InputTag>{
edm::InputTag{
"hltEgammaSuperClustersToPixelMatch"}});
128 descriptions.
add(
"electronNHitSeedProducer",desc);
139 auto eleSeeds = std::make_unique<reco::ElectronSeedCollection>();
144 GlobalPoint primVtxPos = convertToGP(beamSpotHandle->position());
147 auto superClustersHandle = getHandle(iEvent,superClustersToken);
148 for(
auto& superClusRef : *superClustersHandle){
153 superClusRef->position().phi(),
154 superClusRef->position().r()));
157 const std::vector<TrajSeedMatcher::SeedWithInfo> matchedSeeds =
159 primVtxPos,superClusRef->energy());
161 for(
auto& matchedSeed : matchedSeeds){
164 eleSeed.setCaloCluster(caloClusRef);
165 eleSeed.setNrLayersAlongTraj(matchedSeed.nrValidLayers());
166 for(
auto& matchInfo : matchedSeed.matches()){
167 eleSeed.addHitInfo(makeSeedPixelVar(matchInfo,*trackerTopoHandle));
169 eleSeeds->emplace_back(eleSeed);
T getParameter(std::string const &) const
void doEventSetup(const edm::EventSetup &iSetup)
std::vector< TrajSeedMatcher::SeedWithInfo > compatibleSeeds(const TrajectorySeedCollection &seeds, const GlobalPoint &candPos, const GlobalPoint &vprim, const float energy)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< TrajectorySeedCollection > initialSeedsToken_
#define DEFINE_FWK_MODULE(type)
unsigned int pxfDisk(const DetId &id) const
Global3DPoint GlobalPoint
void setDPhi(float pos, float neg)
void produce(edm::Event &, const edm::EventSetup &) final
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
void setMeasTkEvtHandle(edm::Handle< MeasurementTrackerEvent > handle)
static edm::ParameterSetDescription makePSetDescription()
std::vector< TrajectorySeed > TrajectorySeedCollection
ElectronNHitSeedProducer(const edm::ParameterSet &)
void setDet(int iDetId, int iLayerOrDiskNr)
edm::EDGetTokenT< std::vector< reco::Vertex > > verticesToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
~ElectronNHitSeedProducer() override=default
unsigned int pxbLayer(const DetId &id) const
std::vector< edm::EDGetTokenT< std::vector< reco::SuperClusterRef > > > superClustersTokens_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< MeasurementTrackerEvent > measTkEvtToken_
void setDRZ(float pos, float neg)