|
|
|
const reco::PFCandidate & | correspondingDaughterCandidate (const reco::PFCandidate &cand, const reco::PFBlockElement &pfbe) const |
|
void | createBasicCluster (const reco::PFBlockElement &, reco::BasicClusterCollection &basicClusters, std::vector< const reco::PFCluster * > &, const reco::PFCandidate &coCandidate) const |
|
void | createBasicClusterPtrs (const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle) |
|
void | createOneLegConversions (const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, reco::ConversionCollection &oneLegConversions) |
|
void | createPhotonCores (const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, const edm::OrphanHandle< reco::ConversionCollection > &oneLegConversionHandle, reco::PhotonCoreCollection &photonCores) |
|
void | createPhotons (reco::VertexCollection &vertexCollection, edm::Handle< reco::PhotonCollection > &egPhotons, const edm::OrphanHandle< reco::PhotonCoreCollection > &photonCoresHandle, const IsolationValueMaps &isolationValues, reco::PhotonCollection &photons) |
|
void | createPreshowerCluster (const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const |
|
void | createPreshowerClusterPtrs (const edm::OrphanHandle< reco::PreshowerClusterCollection > &preshowerClustersHandle) |
|
void | createSuperClusters (const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const |
|
bool | fetchCandidateCollection (edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const |
|
Definition at line 32 of file PFPhotonTranslator.cc.
◆ IsolationValueMaps
◆ PFPhotonTranslator()
◆ ~PFPhotonTranslator()
PFPhotonTranslator::~PFPhotonTranslator |
( |
| ) |
|
|
override |
◆ correspondingDaughterCandidate()
◆ createBasicCluster()
Definition at line 588 of file PFPhotonTranslator.cc.
593 if (myPFClusterRef.
isNull())
597 pfClusters.push_back(&myPFCluster);
603 myPFCluster.energy(),
604 myPFCluster.position(),
605 myPFCluster.caloID(),
606 myPFCluster.hitsAndFractions(),
608 myPFCluster.seed()));
References reco::CaloCluster::algo(), reco::CaloCluster::caloID(), reco::PFBlockElement::clusterRef(), reco::PFCluster::energy(), reco::CaloCluster::hitsAndFractions(), edm::Ref< C, T, F >::isNull(), reco::CaloCluster::position(), and reco::CaloCluster::seed().
◆ createBasicClusterPtrs()
Definition at line 619 of file PFPhotonTranslator.cc.
622 unsigned basicClusterCounter = 0;
625 for (
unsigned iphot = 0; iphot <
size; ++iphot)
628 for (
unsigned ibc = 0; ibc < nbc; ++ibc)
633 ++basicClusterCounter;
References findQualityFiles::size.
◆ createOneLegConversions()
Definition at line 744 of file PFPhotonTranslator.cc.
750 for (
unsigned iphot = 0; iphot < nphot; ++iphot) {
757 std::vector<reco::CaloClusterPtr> matchingBC;
765 std::vector<reco::TrackRef> OneLegConvVector;
768 std::vector<reco::TrackRef> tr = OneLegConvVector;
769 std::vector<math::XYZPointF> trackPositionAtEcalVec;
770 std::vector<math::XYZPointF> innPointVec;
771 std::vector<math::XYZVectorF> trackPinVec;
772 std::vector<math::XYZVectorF> trackPoutVec;
787 trackPositionAtEcalVec.push_back(trackPositionAtEcal);
788 innPointVec.push_back(innPoint);
789 trackPinVec.push_back(trackPin);
790 trackPoutVec.push_back(trackPout);
791 std::vector<float> OneLegMvaVector;
794 trackPositionAtEcalVec,
804 myOneLegConversion.setOneLegMVA(OneLegMvaVector);
820 oneLegConversions.push_back(myOneLegConversion);
References relativeConstraints::error, reco::Conversion::pflow, reco::Conversion::setOneLegMVA(), HltBtagValidation_cff::Vertex, X, DOFs::Y, and DOFs::Z.
◆ createPhotonCores()
◆ createPhotons()
Definition at line 915 of file PFPhotonTranslator.cc.
924 for (
unsigned iphot = 0; iphot < nphot; ++iphot) {
937 math::XYZVector P3 = direction.unit() * PCref->parentSuperCluster()->energy();
938 LorentzVector P4(P3.x(), P3.y(), P3.z(), PCref->parentSuperCluster()->energy());
940 reco::Photon myPhoton(P4, PCref->parentSuperCluster()->position(), PCref,
vtx);
953 showerShape.maxEnergyXtal =
egPhotonRef_[iphot]->maxEnergyXtal();
954 showerShape.sigmaEtaEta =
egPhotonRef_[iphot]->sigmaEtaEta();
955 showerShape.sigmaIetaIeta =
egPhotonRef_[iphot]->sigmaIetaIeta();
956 showerShape.hcalDepth1OverEcal =
egPhotonRef_[iphot]->hadronicDepth1OverEm();
957 showerShape.hcalDepth2OverEcal =
egPhotonRef_[iphot]->hadronicDepth2OverEm();
958 myPhoton.setShowerShapeVariables(showerShape);
962 myPhoton.setSaturationInfo(saturationInfo);
971 myPhoton.setFiducialVolumeFlags(fiducialFlags);
989 myPhoton.setIsolationVariables(isolationVariables04, isolationVariables03);
995 myPhoton.setPflowIsolationVariables(myPFIso);
1003 myPhoton.setPflowIDVariables(myPFVariables);
1008 myPhoton.setCorrectedEnergy(
References reco::Photon::PflowIsolationVariables::chargedHadronIso, reco::Photon::IsolationVariables::ecalRecHitSumEt, reco::Photon::PflowIDVariables::etOutsideMustache, reco::Photon::IsolationVariables::hcalDepth1TowerSumEt, reco::Photon::IsolationVariables::hcalDepth2TowerSumEt, reco::Photon::IsolationVariables::hcalTowerSumEt, reco::Photon::FiducialFlags::isEB, reco::Photon::FiducialFlags::isEBEEGap, reco::Photon::FiducialFlags::isEBEtaGap, reco::Photon::FiducialFlags::isEBPhiGap, reco::Photon::FiducialFlags::isEE, reco::Photon::FiducialFlags::isEEDeeGap, reco::Photon::FiducialFlags::isEERingGap, electronProducer_cff::isolationValues, reco::Photon::SaturationInfo::isSeedSaturated, reco::Mustache::MustacheID(), reco::Photon::PflowIDVariables::mva, reco::Photon::PflowIDVariables::nClusterOutsideMustache, reco::Photon::PflowIsolationVariables::neutralHadronIso, reco::Photon::SaturationInfo::nSaturatedXtals, reco::Photon::IsolationVariables::nTrkHollowCone, reco::Photon::IsolationVariables::nTrkSolidCone, reco::Photon::PflowIsolationVariables::photonIso, BPHMonitor_cfi::photons, reco::Photon::regression2, reco::Photon::IsolationVariables::trkSumPtHollowCone, reco::Photon::IsolationVariables::trkSumPtSolidCone, spclusmultinvestigator_cfi::vertexCollection, and badGlobalMuonTaggersAOD_cff::vtx.
◆ createPreshowerCluster()
◆ createPreshowerClusterPtrs()
◆ createSuperClusters()
Definition at line 657 of file PFPhotonTranslator.cc.
660 for (
unsigned iphot = 0; iphot < nphot; ++iphot) {
664 double sclusterE = 0;
670 for (
unsigned ibc = 0; ibc < nbasics; ++ibc) {
711 for (
unsigned ibc = 0; ibc < nbasics; ++ibc) {
714 const std::vector<std::pair<DetId, float> > &v1 =
basicClusters_[iphot][ibc].hitsAndFractions();
716 for (std::vector<std::pair<DetId, float> >::const_iterator diIt = v1.begin(); diIt != v1.end(); ++diIt) {
718 mySuperCluster.addHitAndFraction(diIt->first, diIt->second);
723 for (
unsigned ips = 0; ips < nps; ++ips) {
732 mySuperCluster.setEtaWidth(pfwidth.pflowEtaWidth());
733 mySuperCluster.setPhiWidth(pfwidth.pflowPhiWidth());
735 mySuperCluster.rawEnergy();
References reco::SuperCluster::addCluster(), reco::CaloCluster::addHitAndFraction(), reco::SuperCluster::addPreshowerCluster(), MillePedeFileConverter_cfg::e, PFClusterWidthAlgo::pflowEtaWidth(), PFClusterWidthAlgo::pflowPhiWidth(), RecoTauValidation_cfi::posX, RecoTauValidation_cfi::posY, reco::SuperCluster::rawEnergy(), reco::SuperCluster::setEtaWidth(), reco::SuperCluster::setPhiWidth(), reco::SuperCluster::setPreshowerEnergy(), reco::SuperCluster::setSeed(), and HLT_2018_cff::superClusters.
◆ fetchCandidateCollection()
◆ produce()
Definition at line 190 of file PFPhotonTranslator.cc.
193 auto basicClusters_p = std::make_unique<reco::BasicClusterCollection>();
195 auto psClusters_p = std::make_unique<reco::PreshowerClusterCollection>();
206 outputSuperClusterCollection.clear();
207 outputOneLegConversionCollection.clear();
208 outputPhotonCoreCollection.clear();
252 unsigned iconv1leg = 0;
253 unsigned iconv2leg = 0;
255 for (
unsigned i = 0;
i < ncand; ++
i) {
260 if (
cand.mva_nothing_gamma() > 0.001)
266 if (!
cand.photonExtraRef()->conversionRef().empty()) {
270 for (
unsigned int iconv = 0; iconv < doubleLegConvColl.
size(); iconv++) {
271 pfConv_[iconv2leg].push_back(doubleLegConvColl[iconv]);
279 const std::vector<reco::TrackRef> &singleLegConvColl =
cand.photonExtraRef()->singleLegConvTrackRef();
280 const std::vector<float> &singleLegConvCollMva =
cand.photonExtraRef()->singleLegConvMva();
284 if (!singleLegConvColl.empty()) {
289 for (
unsigned int itk = 0; itk < singleLegConvColl.size(); itk++) {
308 pfClusters_.push_back(std::vector<const reco::PFCluster *>());
318 for (reco::PhotonCollection::const_iterator gamIter = egPhotons->begin(); gamIter != egPhotons->end(); ++gamIter) {
319 if (
cand.superClusterRef() == gamIter->superCluster()) {
328 for (
unsigned iele = 0; iele <
cand.elementsInBlocks().size(); ++iele) {
332 unsigned elementIndex =
cand.elementsInBlocks()[iele].second;
391 auto superClusters_p = std::make_unique<reco::SuperClusterCollection>(outputSuperClusterCollection);
408 auto SingleLeg_p = std::make_unique<reco::ConversionCollection>(outputOneLegConversionCollection);
433 auto photonCores_p = std::make_unique<reco::PhotonCoreCollection>(outputPhotonCoreCollection);
469 bool validVertex =
true;
472 edm::LogWarning(
"PhotonProducer") <<
"Error! Can't get the product primary Vertex Collection "
References reco::PFBlockElement::ECAL, bookConverter::elements, reco::PFCandidate::gamma, mps_fire::i, iEvent, edm::Ref< C, T, F >::isNull(), electronProducer_cff::isolationValues, edm::HandleBase::isValid(), dqmiolumiharvest::j, eostools::move(), gedPhotons_cfi::outputPhotonCollection, zmumugammaAnalyzer_cfi::pfCandidates, edm::Handle< T >::product(), reco::PFBlockElement::PS1, reco::PFBlockElement::PS2, edm::RefVector< C, T, F >::size(), mps_update::status, reco::PFBlockElement::type(), and spclusmultinvestigator_cfi::vertexCollection.
◆ barrelEcalHits_
◆ basicClusterPtr_
◆ basicClusters_
◆ CandidatePtr_
◆ conv1legPFCandidateIndex_
std::vector<int> PFPhotonTranslator::conv1legPFCandidateIndex_ |
|
private |
◆ conv2legPFCandidateIndex_
std::vector<int> PFPhotonTranslator::conv2legPFCandidateIndex_ |
|
private |
◆ EGPhotonCollection_
std::string PFPhotonTranslator::EGPhotonCollection_ |
|
private |
◆ egPhotonRef_
◆ egSCRef_
◆ emptyIsOk_
bool PFPhotonTranslator::emptyIsOk_ |
|
private |
◆ endcapEcalHits_
◆ energyRegression_
std::vector<float> PFPhotonTranslator::energyRegression_ |
|
private |
◆ energyRegressionError_
std::vector<float> PFPhotonTranslator::energyRegressionError_ |
|
private |
◆ hcalTowers_
◆ hOverEConeSize_
double PFPhotonTranslator::hOverEConeSize_ |
|
private |
◆ inputTagIsoVals_
◆ inputTagPFCandidates_
◆ PFBasicClusterCollection_
std::string PFPhotonTranslator::PFBasicClusterCollection_ |
|
private |
◆ pfClusters_
std::vector<std::vector<const reco::PFCluster *> > PFPhotonTranslator::pfClusters_ |
|
private |
◆ pfConv_
◆ PFConversionCollection_
std::string PFPhotonTranslator::PFConversionCollection_ |
|
private |
◆ PFPhotonCollection_
std::string PFPhotonTranslator::PFPhotonCollection_ |
|
private |
◆ PFPhotonCoreCollection_
std::string PFPhotonTranslator::PFPhotonCoreCollection_ |
|
private |
◆ pfPhotonMva_
std::vector<float> PFPhotonTranslator::pfPhotonMva_ |
|
private |
◆ PFPreshowerClusterCollection_
std::string PFPhotonTranslator::PFPreshowerClusterCollection_ |
|
private |
◆ pfSingleLegConv_
std::vector<std::vector<reco::TrackRef> > PFPhotonTranslator::pfSingleLegConv_ |
|
private |
◆ pfSingleLegConvMva_
std::vector<std::vector<float> > PFPhotonTranslator::pfSingleLegConvMva_ |
|
private |
◆ PFSuperClusterCollection_
std::string PFPhotonTranslator::PFSuperClusterCollection_ |
|
private |
◆ photPFCandidateIndex_
std::vector<int> PFPhotonTranslator::photPFCandidateIndex_ |
|
private |
◆ preshowerClusterPtr_
◆ preshowerClusters_
◆ superClusters_
◆ theCaloGeom_
◆ theCaloTopo_
◆ vertexProducer_
std::string PFPhotonTranslator::vertexProducer_ |
|
private |
std::string PFPreshowerClusterCollection_
std::string EGPhotonCollection_
void setPFlowPhoton(const bool prov)
set the provenance
void setSuperCluster(const reco::SuperClusterRef &r)
set reference to SuperCluster
T const * product() const
std::vector< float > energyRegressionError_
bool isNull() const
Checks for null.
edm::InputTag hcalTowers_
std::vector< Vertex > VertexCollection
collection of Vertex objects
std::string PFConversionCollection_
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
std::vector< reco::SuperClusterCollection > superClusters_
void addConversion(const reco::ConversionRef &r)
add single ConversionRef to the vector of Refs
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
std::vector< std::vector< float > > pfSingleLegConvMva_
std::vector< int > conv2legPFCandidateIndex_
const reco::PFCandidate & correspondingDaughterCandidate(const reco::PFCandidate &cand, const reco::PFBlockElement &pfbe) const
const ElementsInBlocks & elementsInBlocks() const
std::string PFPhotonCollection_
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
std::string vertexProducer_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
edm::InputTag endcapEcalHits_
void setStandardPhoton(const bool prov)
std::vector< int > photPFCandidateIndex_
edm::InputTag barrelEcalHits_
void addElectronPixelSeed(const reco::ElectronSeedRef &r)
set electron pixel seed ref
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
std::vector< reco::BasicClusterCollection > basicClusters_
void addOneLegConversion(const reco::ConversionRef &r)
add single ConversionRef to the vector of Refs
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
edm::InputTag inputTagPFCandidates_
std::vector< PhotonCore > PhotonCoreCollection
collectin of PhotonCore objects
bool exists(std::string const ¶meterName) const
checks if a parameter exists
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< edm::InputTag > inputTagIsoVals_
void createBasicCluster(const reco::PFBlockElement &, reco::BasicClusterCollection &basicClusters, std::vector< const reco::PFCluster * > &, const reco::PFCandidate &coCandidate) const
std::vector< reco::CandidatePtr > CandidatePtr_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void MustacheID(const CaloClusterPtrVector &clusters, int &nclusters, float &EoutsideMustache)
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
void createSuperClusters(const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const
std::string PFSuperClusterCollection_
Abstract base class for a PFBlock element (track, cluster...)
T getParameter(std::string const &) const
void createPreshowerClusterPtrs(const edm::OrphanHandle< reco::PreshowerClusterCollection > &preshowerClustersHandle)
void createOneLegConversions(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, reco::ConversionCollection &oneLegConversions)
void createPhotonCores(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, const edm::OrphanHandle< reco::ConversionCollection > &oneLegConversionHandle, reco::PhotonCoreCollection &photonCores)
std::vector< float > pfPhotonMva_
std::vector< reco::SuperClusterRef > egSCRef_
math::XYZTLorentzVector LorentzVector
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
int nClusterOutsideMustache
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
std::vector< reco::ConversionRefVector > pfConv_
void createPhotons(reco::VertexCollection &vertexCollection, edm::Handle< reco::PhotonCollection > &egPhotons, const edm::OrphanHandle< reco::PhotonCoreCollection > &photonCoresHandle, const IsolationValueMaps &isolationValues, reco::PhotonCollection &photons)
Particle reconstructed by the particle flow algorithm.
std::vector< Photon > PhotonCollection
collectin of Photon objects
float hcalDepth1TowerSumEt
void createBasicClusterPtrs(const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
float hcalDepth2TowerSumEt
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
size_type size() const
Size of the RefVector.
std::vector< reco::PhotonRef > egPhotonRef_
void setParentSuperCluster(const reco::SuperClusterRef &r)
set reference to PFlow SuperCluster
std::string PFBasicClusterCollection_
std::vector< float > energyRegression_
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
std::vector< int > conv1legPFCandidateIndex_
virtual const PFClusterRef & clusterRef() const
std::string PFPhotonCoreCollection_