112 auto basicClusters_p = std::make_unique<reco::BasicClusterCollection>();
114 auto psClusters_p = std::make_unique<reco::PreshowerClusterCollection>();
125 outputSuperClusterCollection.clear();
126 outputOneLegConversionCollection.clear();
127 outputPhotonCoreCollection.clear();
128 outputPhotonCollection.clear();
174 unsigned ncand=(
status)?pfCandidates->size():0;
177 unsigned iconv1leg=0;
178 unsigned iconv2leg=0;
180 for(
unsigned i=0;
i<ncand; ++
i ) {
185 if(cand. mva_nothing_gamma()>0.001)
197 for (
unsigned int iconv=0; iconv<doubleLegConvColl.
size(); iconv++){
198 pfConv_[iconv2leg].push_back(doubleLegConvColl[iconv]);
206 const std::vector<reco::TrackRef> & singleLegConvColl = cand.
photonExtraRef()->singleLegConvTrackRef();
207 const std::vector<float>& singleLegConvCollMva = cand.
photonExtraRef()->singleLegConvMva();
211 if (singleLegConvColl.size()>0){
217 for (
unsigned int itk=0; itk<singleLegConvColl.size(); itk++){
238 pfClusters_.push_back(std::vector<const reco::PFCluster *>());
248 for (reco::PhotonCollection::const_iterator gamIter = egPhotons->begin(); gamIter != egPhotons->end(); ++gamIter){
265 if(blockRef.
isNull())
continue;
326 auto superClusters_p = std::make_unique<reco::SuperClusterCollection>(outputSuperClusterCollection);
345 auto SingleLeg_p = std::make_unique<reco::ConversionCollection>(outputOneLegConversionCollection);
363 if(status)
createPhotonCores(scRefProd, ConvRefProd, outputPhotonCoreCollection);
368 auto photonCores_p = std::make_unique<reco::PhotonCoreCollection>(outputPhotonCoreCollection);
403 bool validVertex=
true;
406 edm::LogWarning(
"PhotonProducer") <<
"Error! Can't get the product primary Vertex Collection "<<
"\n";
409 if (validVertex) vertexCollection = *(vertexHandle.
product());
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_
std::vector< reco::ConversionRefVector > pfConv_
float mva_nothing_gamma() const
mva for gamma detection
std::vector< float > pfPhotonMva_
std::string PFConversionCollection_
std::vector< int > conv2legPFCandidateIndex_
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_
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
std::vector< reco::SuperClusterCollection > superClusters_
std::string PFBasicClusterCollection_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
std::string PFSuperClusterCollection_
std::vector< std::vector< float > > pfSingleLegConvMva_
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::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< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
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< 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_
virtual ParticleType particleId() const
const ElementsInBlocks & elementsInBlocks() const
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any