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();
261 unsigned iconv1leg = 0;
262 unsigned iconv2leg = 0;
264 for (
unsigned i = 0;
i < ncand; ++
i) {
269 if (
cand.mva_nothing_gamma() > 0.001)
275 if (!
cand.photonExtraRef()->conversionRef().empty()) {
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) {
328 if (
cand.superClusterRef() == gamIter->superCluster()) {
337 for (
unsigned iele = 0; iele <
cand.elementsInBlocks().size(); ++iele) {
341 unsigned elementIndex =
cand.elementsInBlocks()[iele].second;
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 " Abstract base class for a PFBlock element (track, cluster...)
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
void createBasicClusterPtrs(const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
std::string vertexProducer_
std::string PFPhotonCoreCollection_
void createBasicCluster(const reco::PFBlockElement &, reco::BasicClusterCollection &basicClusters, std::vector< const reco::PFCluster *> &, const reco::PFCandidate &coCandidate) const
std::vector< float > pfPhotonMva_
std::string PFConversionCollection_
T const * product() const
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 createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
std::vector< edm::InputTag > inputTagIsoVals_
std::vector< reco::PhotonRef > egPhotonRef_
std::vector< reco::SuperClusterRef > egSCRef_
const reco::PFCandidate & correspondingDaughterCandidate(const reco::PFCandidate &cand, const reco::PFBlockElement &pfbe) 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
bool getData(T &iHolder) const
void createPhotonCores(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, const edm::OrphanHandle< reco::ConversionCollection > &oneLegConversionHandle, reco::PhotonCoreCollection &photonCores)
std::vector< int > conv1legPFCandidateIndex_
bool isNull() const
Checks for null.
void createPreshowerClusterPtrs(const edm::OrphanHandle< reco::PreshowerClusterCollection > &preshowerClustersHandle)
std::string PFPreshowerClusterCollection_
std::vector< int > photPFCandidateIndex_
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcd > ecalMustacheSCParametersToken_
size_type size() const
Size of the RefVector.
edm::InputTag inputTagPFCandidates_
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.
void createSuperClusters(const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
std::vector< reco::CandidatePtr > CandidatePtr_
std::string EGPhotonCollection_
std::vector< float > energyRegressionError_
Log< level::Warning, false > LogWarning
std::vector< std::vector< float > > pfSingleLegConvMva_