202 auto basicClusters_p = std::make_unique<reco::BasicClusterCollection>();
204 auto psClusters_p = std::make_unique<reco::PreshowerClusterCollection>();
215 outputSuperClusterCollection.clear();
216 outputOneLegConversionCollection.clear();
217 outputPhotonCoreCollection.clear();
218 outputPhotonCollection.clear();
258 unsigned ncand = (
status) ? pfCandidates->size() : 0;
261 unsigned iconv1leg = 0;
262 unsigned iconv2leg = 0;
264 for (
unsigned i = 0;
i < ncand; ++
i) {
279 for (
unsigned int iconv = 0; iconv < doubleLegConvColl.
size(); iconv++) {
280 pfConv_[iconv2leg].push_back(doubleLegConvColl[iconv]);
288 const std::vector<reco::TrackRef> &singleLegConvColl = cand.
photonExtraRef()->singleLegConvTrackRef();
289 const std::vector<float> &singleLegConvCollMva = cand.
photonExtraRef()->singleLegConvMva();
293 if (!singleLegConvColl.empty()) {
298 for (
unsigned int itk = 0; itk < singleLegConvColl.size(); itk++) {
317 pfClusters_.push_back(std::vector<const reco::PFCluster *>());
327 for (reco::PhotonCollection::const_iterator gamIter = egPhotons->begin(); gamIter != egPhotons->end(); ++gamIter) {
400 auto superClusters_p = std::make_unique<reco::SuperClusterCollection>(outputSuperClusterCollection);
417 auto SingleLeg_p = std::make_unique<reco::ConversionCollection>(outputOneLegConversionCollection);
442 auto photonCores_p = std::make_unique<reco::PhotonCoreCollection>(outputPhotonCoreCollection);
478 bool validVertex =
true;
481 edm::LogWarning(
"PhotonProducer") <<
"Error! Can't get the product primary Vertex Collection "
486 vertexCollection = *(vertexHandle.
product());
524 createPhotons(vertexCollection, egPhotons, pcRefProd, isolationValues, outputPhotonCollection);
527 auto photons_p = std::make_unique<reco::PhotonCollection>(outputPhotonCollection);
Abstract base class for a PFBlock element (track, cluster...)
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void createBasicClusterPtrs(const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
std::string vertexProducer_
std::string PFPhotonCoreCollection_
float mva_nothing_gamma() const
mva for gamma detection
std::vector< float > pfPhotonMva_
std::string PFConversionCollection_
std::vector< reco::ConversionRefVector > pfConv_
std::vector< int > conv2legPFCandidateIndex_
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
std::vector< Vertex > VertexCollection
collection of Vertex objects
std::string PFPhotonCollection_
void createSuperClusters(const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const
reco::PFCandidatePhotonExtraRef photonExtraRef() const
return a reference to the photon extra
void createBasicCluster(const reco::PFBlockElement &, reco::BasicClusterCollection &basicClusters, std::vector< const reco::PFCluster * > &, const reco::PFCandidate &coCandidate) const
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
std::vector< edm::InputTag > inputTagIsoVals_
std::vector< reco::PhotonRef > egPhotonRef_
std::vector< reco::SuperClusterRef > egSCRef_
bool getData(T &iHolder) const
std::vector< reco::SuperClusterCollection > superClusters_
std::string PFBasicClusterCollection_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
const EcalMustacheSCParameters * mustacheSCParams_
std::string PFSuperClusterCollection_
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
void createPhotonCores(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, const edm::OrphanHandle< reco::ConversionCollection > &oneLegConversionHandle, reco::PhotonCoreCollection &photonCores)
std::vector< int > conv1legPFCandidateIndex_
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool isNull() const
Checks for null.
void createPreshowerClusterPtrs(const edm::OrphanHandle< reco::PreshowerClusterCollection > &preshowerClustersHandle)
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
std::string PFPreshowerClusterCollection_
std::vector< int > photPFCandidateIndex_
const reco::PFCandidate & correspondingDaughterCandidate(const reco::PFCandidate &cand, const reco::PFBlockElement &pfbe) const
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcd > ecalMustacheSCParametersToken_
edm::InputTag inputTagPFCandidates_
T const * product() const
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
std::vector< reco::BasicClusterCollection > basicClusters_
std::vector< Photon > PhotonCollection
collectin of Photon objects
void createPhotons(reco::VertexCollection &vertexCollection, edm::Handle< reco::PhotonCollection > &egPhotons, const edm::OrphanHandle< reco::PhotonCoreCollection > &photonCoresHandle, const IsolationValueMaps &isolationValues, reco::PhotonCollection &photons)
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
void createOneLegConversions(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, reco::ConversionCollection &oneLegConversions)
std::vector< PhotonCore > PhotonCoreCollection
collectin of PhotonCore objects
std::vector< float > energyRegression_
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
Particle reconstructed by the particle flow algorithm.
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
size_type size() const
Size of the RefVector.
std::vector< reco::CandidatePtr > CandidatePtr_
std::string EGPhotonCollection_
std::vector< float > energyRegressionError_
Log< level::Warning, false > LogWarning
virtual ParticleType particleId() const
const ElementsInBlocks & elementsInBlocks() const
std::vector< std::vector< float > > pfSingleLegConvMva_
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any