31 #include <Math/VectorUtil.h> 33 #include "TLorentzVector.h" 68 auto outputPhotonCoreCollection_p = std::make_unique<reco::PhotonCoreCollection>();
73 if (!pfCandidateHandle.isValid()) {
75 <<
"Error! Can't get the pfEgammaCandidates";
84 if (!pixelSeedHandle.
isValid()) {
94 for(
unsigned int lCand=0; lCand < pfCandidateHandle->size(); lCand++) {
117 for(
unsigned int lConv=0; lConv < doubleLegConv.
size(); lConv++) {
121 for(
unsigned int lConv=0; lConv < singleLegConv.
size(); lConv++) {
130 for(
unsigned int icp = 0; icp < pixelSeedHandle->size(); icp++) {
132 if ( boxSC.
isNonnull() && boxSC.
id() == cpRef->caloCluster().
id() && boxSC.
key() == cpRef->caloCluster().
key() ) {
138 outputPhotonCoreCollection.push_back(newCandidate);
143 outputPhotonCoreCollection_p->assign(outputPhotonCoreCollection.begin(),outputPhotonCoreCollection.end());
T getParameter(std::string const &) const
void setSuperCluster(const reco::SuperClusterRef &r)
set reference to SuperCluster
void addOneLegConversion(const reco::ConversionRef &r)
add single ConversionRef to the vector of Refs
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void addConversion(const reco::ConversionRef &r)
add single ConversionRef to the vector of Refs
bool isNonnull() const
Checks for non-null.
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
key_type key() const
Accessor for product key.
edm::EDGetTokenT< reco::ElectronSeedCollection > pixelSeedProducer_
~GEDPhotonCoreProducer() override
ProductID id() const
Accessor for product ID.
void setParentSuperCluster(const reco::SuperClusterRef &r)
set reference to PFlow SuperCluster
void setStandardPhoton(const bool prov)
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
void produce(edm::Event &evt, const edm::EventSetup &es) override
void setPFlowPhoton(const bool prov)
set the provenance
std::vector< PhotonCore > PhotonCoreCollection
collectin of PhotonCore objects
GEDPhotonCoreProducer(const edm::ParameterSet &ps)
std::string GEDPhotonCoreCollection_
size_type size() const
Size of the RefVector.
void addElectronPixelSeed(const reco::ElectronSeedRef &r)
set electron pixel seed ref
edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_