CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
PFPhotonTranslator Class Reference
Inheritance diagram for PFPhotonTranslator:
edm::stream::EDProducer<>

Public Types

typedef std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
 
- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Public Member Functions

 PFPhotonTranslator (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PFPhotonTranslator () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

const reco::PFCandidatecorrespondingDaughterCandidate (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
 

Private Attributes

edm::InputTag barrelEcalHits_
 
std::vector< reco::CaloClusterPtrVectorbasicClusterPtr_
 
std::vector< reco::BasicClusterCollectionbasicClusters_
 
std::vector< reco::CandidatePtrCandidatePtr_
 
std::vector< int > conv1legPFCandidateIndex_
 
std::vector< int > conv2legPFCandidateIndex_
 
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcdecalMustacheSCParametersToken_
 
std::string EGPhotonCollection_
 
std::vector< reco::PhotonRefegPhotonRef_
 
std::vector< reco::SuperClusterRefegSCRef_
 
bool emptyIsOk_
 
edm::InputTag endcapEcalHits_
 
std::vector< float > energyRegression_
 
std::vector< float > energyRegressionError_
 
edm::InputTag hcalTowers_
 
double hOverEConeSize_
 
std::vector< edm::InputTaginputTagIsoVals_
 
edm::InputTag inputTagPFCandidates_
 
const EcalMustacheSCParametersmustacheSCParams_
 
std::string PFBasicClusterCollection_
 
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
 
std::vector< reco::ConversionRefVectorpfConv_
 
std::string PFConversionCollection_
 
std::string PFPhotonCollection_
 
std::string PFPhotonCoreCollection_
 
std::vector< float > pfPhotonMva_
 
std::string PFPreshowerClusterCollection_
 
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
 
std::vector< std::vector< float > > pfSingleLegConvMva_
 
std::string PFSuperClusterCollection_
 
std::vector< int > photPFCandidateIndex_
 
std::vector< reco::CaloClusterPtrVectorpreshowerClusterPtr_
 
std::vector< reco::PreshowerClusterCollectionpreshowerClusters_
 
std::vector< reco::SuperClusterCollectionsuperClusters_
 
edm::ESHandle< CaloGeometrytheCaloGeom_
 
edm::ESHandle< CaloTopologytheCaloTopo_
 
std::string vertexProducer_
 

Detailed Description

Definition at line 34 of file PFPhotonTranslator.cc.

Member Typedef Documentation

◆ IsolationValueMaps

Definition at line 41 of file PFPhotonTranslator.cc.

Constructor & Destructor Documentation

◆ PFPhotonTranslator()

PFPhotonTranslator::PFPhotonTranslator ( const edm::ParameterSet iConfig)
explicit

Definition at line 154 of file PFPhotonTranslator.cc.

References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

154  {
155  //std::cout << "PFPhotonTranslator" << std::endl;
156 
157  inputTagPFCandidates_ = iConfig.getParameter<edm::InputTag>("PFCandidate");
158 
159  edm::ParameterSet isoVals = iConfig.getParameter<edm::ParameterSet>("isolationValues");
160  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfChargedHadrons"));
161  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfPhotons"));
162  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfNeutralHadrons"));
163 
164  PFBasicClusterCollection_ = iConfig.getParameter<std::string>("PFBasicClusters");
165  PFPreshowerClusterCollection_ = iConfig.getParameter<std::string>("PFPreshowerClusters");
166  PFSuperClusterCollection_ = iConfig.getParameter<std::string>("PFSuperClusters");
167  PFConversionCollection_ = iConfig.getParameter<std::string>("PFConversionCollection");
168  PFPhotonCoreCollection_ = iConfig.getParameter<std::string>("PFPhotonCores");
169  PFPhotonCollection_ = iConfig.getParameter<std::string>("PFPhotons");
170 
171  EGPhotonCollection_ = iConfig.getParameter<std::string>("EGPhotons");
172 
173  vertexProducer_ = iConfig.getParameter<std::string>("primaryVertexProducer");
174 
175  barrelEcalHits_ = iConfig.getParameter<edm::InputTag>("barrelEcalHits");
176  endcapEcalHits_ = iConfig.getParameter<edm::InputTag>("endcapEcalHits");
177 
178  hcalTowers_ = iConfig.getParameter<edm::InputTag>("hcalTowers");
179  hOverEConeSize_ = iConfig.getParameter<double>("hOverEConeSize");
180 
181  if (iConfig.exists("emptyIsOk"))
182  emptyIsOk_ = iConfig.getParameter<bool>("emptyIsOk");
183  else
184  emptyIsOk_ = false;
185 
186  ecalMustacheSCParametersToken_ = esConsumes<EcalMustacheSCParameters, EcalMustacheSCParametersRcd>();
187 
188  produces<reco::BasicClusterCollection>(PFBasicClusterCollection_);
189  produces<reco::PreshowerClusterCollection>(PFPreshowerClusterCollection_);
190  produces<reco::SuperClusterCollection>(PFSuperClusterCollection_);
191  produces<reco::PhotonCoreCollection>(PFPhotonCoreCollection_);
192  produces<reco::PhotonCollection>(PFPhotonCollection_);
193  produces<reco::ConversionCollection>(PFConversionCollection_);
194 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::string PFPhotonCoreCollection_
std::string PFConversionCollection_
edm::InputTag hcalTowers_
bool exists(std::string const &parameterName) const
checks if a parameter exists
edm::InputTag endcapEcalHits_
std::string PFPhotonCollection_
std::vector< edm::InputTag > inputTagIsoVals_
std::string PFBasicClusterCollection_
std::string PFSuperClusterCollection_
edm::InputTag barrelEcalHits_
std::string PFPreshowerClusterCollection_
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcd > ecalMustacheSCParametersToken_
edm::InputTag inputTagPFCandidates_
std::string EGPhotonCollection_

◆ ~PFPhotonTranslator()

PFPhotonTranslator::~PFPhotonTranslator ( )
override

Definition at line 196 of file PFPhotonTranslator.cc.

196 {}

Member Function Documentation

◆ correspondingDaughterCandidate()

const reco::PFCandidate & PFPhotonTranslator::correspondingDaughterCandidate ( const reco::PFCandidate cand,
const reco::PFBlockElement pfbe 
) const
private

Definition at line 1081 of file PFPhotonTranslator.cc.

References reco::PFCandidate::elementsInBlocks(), and reco::PFBlockElement::index().

1082  {
1083  unsigned refindex = pfbe.index();
1084  // std::cout << " N daughters " << cand.numberOfDaughters() << std::endl;
1085  reco::PFCandidate::const_iterator myDaughterCandidate = cand.begin();
1087 
1088  for (; myDaughterCandidate != itend; ++myDaughterCandidate) {
1089  const reco::PFCandidate *myPFCandidate = (const reco::PFCandidate *)&*myDaughterCandidate;
1090  if (myPFCandidate->elementsInBlocks().size() != 1) {
1091  // std::cout << " Daughter with " << myPFCandidate.elementsInBlocks().size()<< " element in block " << std::endl;
1092  return cand;
1093  }
1094  if (myPFCandidate->elementsInBlocks()[0].second == refindex) {
1095  // std::cout << " Found it " << cand << std::endl;
1096  return *myPFCandidate;
1097  }
1098  }
1099  return cand;
1100 }
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:663
unsigned index() const
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41

◆ createBasicCluster()

void PFPhotonTranslator::createBasicCluster ( const reco::PFBlockElement PFBE,
reco::BasicClusterCollection basicClusters,
std::vector< const reco::PFCluster *> &  pfClusters,
const reco::PFCandidate coCandidate 
) const
private

Definition at line 597 of file PFPhotonTranslator.cc.

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().

600  {
601  const reco::PFClusterRef &myPFClusterRef = PFBE.clusterRef();
602  if (myPFClusterRef.isNull())
603  return;
604 
605  const reco::PFCluster &myPFCluster(*myPFClusterRef);
606  pfClusters.push_back(&myPFCluster);
607  //std::cout << " Creating BC " << myPFCluster.energy() << " " << coCandidate.ecalEnergy() <<" "<< coCandidate.rawEcalEnergy() <<std::endl;
608  //std::cout << " # hits " << myPFCluster.hitsAndFractions().size() << std::endl;
609 
610  // basicClusters.push_back(reco::CaloCluster(myPFCluster.energy(),
611  basicClusters.push_back(reco::CaloCluster( //coCandidate.rawEcalEnergy(),
612  myPFCluster.energy(),
613  myPFCluster.position(),
614  myPFCluster.caloID(),
615  myPFCluster.hitsAndFractions(),
616  myPFCluster.algo(),
617  myPFCluster.seed()));
618 }
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
virtual const PFClusterRef & clusterRef() const
bool isNull() const
Checks for null.
Definition: Ref.h:235

◆ createBasicClusterPtrs()

void PFPhotonTranslator::createBasicClusterPtrs ( const edm::OrphanHandle< reco::BasicClusterCollection > &  basicClustersHandle)
private

Definition at line 628 of file PFPhotonTranslator.cc.

References findQualityFiles::size.

629  {
630  unsigned size = photPFCandidateIndex_.size();
631  unsigned basicClusterCounter = 0;
632  basicClusterPtr_.resize(size);
633 
634  for (unsigned iphot = 0; iphot < size; ++iphot) // loop on tracks
635  {
636  unsigned nbc = basicClusters_[iphot].size();
637  for (unsigned ibc = 0; ibc < nbc; ++ibc) // loop on basic clusters
638  {
639  // std::cout << "Track "<< iGSF << " ref " << basicClusterCounter << std::endl;
640  reco::CaloClusterPtr bcPtr(basicClustersHandle, basicClusterCounter);
641  basicClusterPtr_[iphot].push_back(bcPtr);
642  ++basicClusterCounter;
643  }
644  }
645 }
size
Write out results.
std::vector< int > photPFCandidateIndex_
std::vector< reco::BasicClusterCollection > basicClusters_
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_

◆ createOneLegConversions()

void PFPhotonTranslator::createOneLegConversions ( const edm::OrphanHandle< reco::SuperClusterCollection > &  superClustersHandle,
reco::ConversionCollection oneLegConversions 
)
private

Definition at line 753 of file PFPhotonTranslator.cc.

References relativeConstraints::error, reco::Conversion::pflow, reco::Conversion::setOneLegMVA(), HltBtagValidation_cff::Vertex, X, BeamSpotPI::Y, and BeamSpotPI::Z.

755  {
756  //std::cout << "createOneLegConversions" << std::endl;
757 
758  unsigned nphot = photPFCandidateIndex_.size();
759  for (unsigned iphot = 0; iphot < nphot; ++iphot) {
760  //if (conv1legPFCandidateIndex_[iphot]==-1) cout << "No OneLegConversions to add"<<endl;
761  //else std::cout << "Phot "<<iphot<< " nOneLegConversions to add : "<<pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]].size()<<endl;
762 
763  if (conv1legPFCandidateIndex_[iphot] > -1) {
764  for (unsigned iConv = 0; iConv < pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]].size(); iConv++) {
766  std::vector<reco::CaloClusterPtr> matchingBC;
768  const reco::Vertex *convVtx =
769  new reco::Vertex(pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->innerPosition(), error);
770 
771  //cout << "Vtx x="<<convVtx->x() << " y="<< convVtx->y()<<" z="<<convVtx->z()<< endl;
772  //cout << "VtxError x=" << convVtx->xError() << endl;
773 
774  std::vector<reco::TrackRef> OneLegConvVector;
775  OneLegConvVector.push_back(pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]);
776 
777  std::vector<reco::TrackRef> tr = OneLegConvVector;
778  std::vector<math::XYZPointF> trackPositionAtEcalVec;
779  std::vector<math::XYZPointF> innPointVec;
780  std::vector<math::XYZVectorF> trackPinVec;
781  std::vector<math::XYZVectorF> trackPoutVec;
782  math::XYZPointF trackPositionAtEcal(
783  pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->outerPosition().X(),
784  pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->outerPosition().Y(),
785  pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->outerPosition().Z());
786  math::XYZPointF innPoint(pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->innerPosition().X(),
787  pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->innerPosition().Y(),
788  pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->innerPosition().Z());
789  math::XYZVectorF trackPin(pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->innerMomentum().X(),
790  pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->innerMomentum().Y(),
791  pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->innerMomentum().Z());
792  math::XYZVectorF trackPout(pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->outerMomentum().X(),
793  pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->outerMomentum().Y(),
794  pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->outerMomentum().Z());
795  float DCA = pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->d0();
796  trackPositionAtEcalVec.push_back(trackPositionAtEcal);
797  innPointVec.push_back(innPoint);
798  trackPinVec.push_back(trackPin);
799  trackPoutVec.push_back(trackPout);
800  std::vector<float> OneLegMvaVector;
801  reco::Conversion myOneLegConversion(scPtrVec,
802  OneLegConvVector,
803  trackPositionAtEcalVec,
804  *convVtx,
805  matchingBC,
806  DCA,
807  innPointVec,
808  trackPinVec,
809  trackPoutVec,
812  OneLegMvaVector.push_back(pfSingleLegConvMva_[conv1legPFCandidateIndex_[iphot]][iConv]);
813  myOneLegConversion.setOneLegMVA(OneLegMvaVector);
814  //reco::Conversion myOneLegConversion(scPtrVec,
815  //OneLegConvVector, *convVtx, reco::Conversion::pflow);
816 
817  /*
818  std::cout << "One leg conversion created" << endl;
819  std::vector<edm::RefToBase<reco::Track> > convtracks = myOneLegConversion.tracks();
820  const std::vector<float> mvalist = myOneLegConversion.oneLegMVA();
821 
822  cout << "nTracks="<< convtracks.size()<<endl;
823  for (unsigned int itk=0; itk<convtracks.size(); itk++){
824  //double convtrackpt = convtracks[itk]->pt();
825  std::cout << "Track pt="<< convtracks[itk]->pt() << std::endl;
826  std::cout << "Track mva="<< mvalist[itk] << std::endl;
827  }
828  */
829  oneLegConversions.push_back(myOneLegConversion);
830 
831  //cout << "OneLegConv added"<<endl;
832  }
833  }
834  }
835 }
#define X(str)
Definition: MuonsGrabber.cc:38
ErrorD< N >::type type
Definition: Error.h:32
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
std::vector< int > conv1legPFCandidateIndex_
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
Definition: Vector3D.h:16
std::vector< int > photPFCandidateIndex_
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
std::vector< std::vector< float > > pfSingleLegConvMva_

◆ createPhotonCores()

void PFPhotonTranslator::createPhotonCores ( const edm::OrphanHandle< reco::SuperClusterCollection > &  superClustersHandle,
const edm::OrphanHandle< reco::ConversionCollection > &  oneLegConversionHandle,
reco::PhotonCoreCollection photonCores 
)
private

Definition at line 837 of file PFPhotonTranslator.cc.

References reco::PhotonCore::addConversion(), reco::PhotonCore::addElectronPixelSeed(), reco::PhotonCore::addOneLegConversion(), iseed, hltEgammaHLTExtra_cfi::pixelSeeds, reco::PhotonCore::setParentSuperCluster(), reco::PhotonCore::setPFlowPhoton(), reco::PhotonCore::setStandardPhoton(), and reco::PhotonCore::setSuperCluster().

839  {
840  //std::cout << "createPhotonCores" << std::endl;
841 
842  unsigned nphot = photPFCandidateIndex_.size();
843 
844  unsigned i1legtot = 0;
845 
846  for (unsigned iphot = 0; iphot < nphot; ++iphot) {
847  //std::cout << "iphot="<<iphot<<std::endl;
848 
849  reco::PhotonCore myPhotonCore;
850 
851  reco::SuperClusterRef SCref(reco::SuperClusterRef(superClustersHandle, iphot));
852 
853  myPhotonCore.setPFlowPhoton(true);
854  myPhotonCore.setStandardPhoton(false);
855  myPhotonCore.setParentSuperCluster(SCref);
856  myPhotonCore.setSuperCluster(egSCRef_[iphot]);
857 
858  reco::ElectronSeedRefVector pixelSeeds = egPhotonRef_[iphot]->electronPixelSeeds();
859  for (unsigned iseed = 0; iseed < pixelSeeds.size(); iseed++) {
860  myPhotonCore.addElectronPixelSeed(pixelSeeds[iseed]);
861  }
862 
863  //cout << "PhotonCores : SC OK" << endl;
864 
865  //cout << "conv1legPFCandidateIndex_[iphot]="<<conv1legPFCandidateIndex_[iphot]<<endl;
866  //cout << "conv2legPFCandidateIndex_[iphot]="<<conv2legPFCandidateIndex_[iphot]<<endl;
867 
868  if (conv1legPFCandidateIndex_[iphot] > -1) {
869  for (unsigned int iConv = 0; iConv < pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]].size(); iConv++) {
870  const reco::ConversionRef &OneLegRef(reco::ConversionRef(oneLegConversionHandle, i1legtot));
871  myPhotonCore.addOneLegConversion(OneLegRef);
872 
873  //cout << "PhotonCores : 1-leg OK" << endl;
874  /*
875  cout << "Testing 1-leg :"<<endl;
876  const reco::ConversionRefVector & conv = myPhotonCore.conversionsOneLeg();
877  for (unsigned int iconv=0; iconv<conv.size(); iconv++){
878  cout << "Testing 1-leg : iconv="<<iconv<<endl;
879  cout << "Testing 1-leg : nTracks="<<conv[iconv]->nTracks()<<endl;
880  cout << "Testing 1-leg : EoverP="<<conv[iconv]->EoverP()<<endl;
881  std::vector<edm::RefToBase<reco::Track> > convtracks = conv[iconv]->tracks();
882  for (unsigned int itk=0; itk<convtracks.size(); itk++){
883  //double convtrackpt = convtracks[itk]->pt();
884  std::cout << "Testing 1-leg : Track pt="<< convtracks[itk]->pt() << std::endl;
885  // std::cout << "Track mva="<< mvalist[itk] << std::endl;
886  }
887  }
888  */
889 
890  i1legtot++;
891  }
892  }
893 
894  if (conv2legPFCandidateIndex_[iphot] > -1) {
895  for (unsigned int iConv = 0; iConv < pfConv_[conv2legPFCandidateIndex_[iphot]].size(); iConv++) {
896  const reco::ConversionRef &TwoLegRef(pfConv_[conv2legPFCandidateIndex_[iphot]][iConv]);
897  myPhotonCore.addConversion(TwoLegRef);
898  }
899  //cout << "PhotonCores : 2-leg OK" << endl;
900 
901  /*
902  cout << "Testing 2-leg :"<<endl;
903  const reco::ConversionRefVector & conv = myPhotonCore.conversions();
904  for (unsigned int iconv=0; iconv<conv.size(); iconv++){
905  cout << "Testing 2-leg : iconv="<<iconv<<endl;
906  cout << "Testing 2-leg : nTracks="<<conv[iconv]->nTracks()<<endl;
907  cout << "Testing 2-leg : EoverP="<<conv[iconv]->EoverP()<<endl;
908  std::vector<edm::RefToBase<reco::Track> > convtracks = conv[iconv]->tracks();
909  for (unsigned int itk=0; itk<convtracks.size(); itk++){
910  //double convtrackpt = convtracks[itk]->pt();
911  std::cout << "Testing 2-leg : Track pt="<< convtracks[itk]->pt() << std::endl;
912  // std::cout << "Track mva="<< mvalist[itk] << std::endl;
913  }
914  }
915  */
916  }
917 
918  photonCores.push_back(myPhotonCore);
919  }
920 
921  //std::cout << "end of createPhotonCores"<<std::endl;
922 }
void setSuperCluster(const reco::SuperClusterRef &r)
set reference to SuperCluster
Definition: PhotonCore.h:48
void addOneLegConversion(const reco::ConversionRef &r)
add single ConversionRef to the vector of Refs
Definition: PhotonCore.h:54
void addConversion(const reco::ConversionRef &r)
add single ConversionRef to the vector of Refs
Definition: PhotonCore.h:52
std::vector< reco::ConversionRefVector > pfConv_
std::vector< int > conv2legPFCandidateIndex_
std::vector< reco::PhotonRef > egPhotonRef_
std::vector< reco::SuperClusterRef > egSCRef_
void setParentSuperCluster(const reco::SuperClusterRef &r)
set reference to PFlow SuperCluster
Definition: PhotonCore.h:50
void setStandardPhoton(const bool prov)
Definition: PhotonCore.h:59
std::vector< int > conv1legPFCandidateIndex_
void setPFlowPhoton(const bool prov)
set the provenance
Definition: PhotonCore.h:58
std::vector< int > photPFCandidateIndex_
int iseed
Definition: AMPTWrapper.h:134
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
void addElectronPixelSeed(const reco::ElectronSeedRef &r)
set electron pixel seed ref
Definition: PhotonCore.h:56

◆ createPhotons()

void PFPhotonTranslator::createPhotons ( reco::VertexCollection vertexCollection,
edm::Handle< reco::PhotonCollection > &  egPhotons,
const edm::OrphanHandle< reco::PhotonCoreCollection > &  photonCoresHandle,
const IsolationValueMaps isolationValues,
reco::PhotonCollection photons 
)
private

Definition at line 924 of file PFPhotonTranslator.cc.

References reco::Photon::PflowIsolationVariables::chargedHadronIso, reco::Photon::IsolationVariables::ecalRecHitSumEt, reco::Photon::PflowIDVariables::etOutsideMustache, reco::Photon::IsolationVariables::hcalRecHitSumEt, l1ctLayer2EG_cff::id, 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, displacedMuonProducer_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, parallelization::uint, spclusmultinvestigator_cfi::vertexCollection, and extraflags_cff::vtx.

928  {
929  //cout << "createPhotons" << endl;
930 
931  unsigned nphot = photPFCandidateIndex_.size();
932 
933  for (unsigned iphot = 0; iphot < nphot; ++iphot) {
934  //std::cout << "iphot="<<iphot<<std::endl;
935 
936  reco::PhotonCoreRef PCref(reco::PhotonCoreRef(photonCoresHandle, iphot));
937 
938  math::XYZPoint vtx(0., 0., 0.);
939  if (!vertexCollection.empty())
940  vtx = vertexCollection.begin()->position();
941  //std::cout << "vtx made" << std::endl;
942 
943  math::XYZVector direction = PCref->parentSuperCluster()->position() - vtx;
944 
945  //It could be that pfSC energy gives not the best resolution : use smaller agregates for some cases ?
946  math::XYZVector P3 = direction.unit() * PCref->parentSuperCluster()->energy();
947  LorentzVector P4(P3.x(), P3.y(), P3.z(), PCref->parentSuperCluster()->energy());
948 
949  reco::Photon myPhoton(P4, PCref->parentSuperCluster()->position(), PCref, vtx);
950  //cout << "photon created"<<endl;
951 
952  reco::Photon::ShowerShape showerShape;
953  reco::Photon::SaturationInfo saturationInfo;
954  reco::Photon::FiducialFlags fiducialFlags;
955  reco::Photon::IsolationVariables isolationVariables03;
956  reco::Photon::IsolationVariables isolationVariables04;
957 
958  showerShape.e1x5 = egPhotonRef_[iphot]->e1x5();
959  showerShape.e2x5 = egPhotonRef_[iphot]->e2x5();
960  showerShape.e3x3 = egPhotonRef_[iphot]->e3x3();
961  showerShape.e5x5 = egPhotonRef_[iphot]->e5x5();
962  showerShape.maxEnergyXtal = egPhotonRef_[iphot]->maxEnergyXtal();
963  showerShape.sigmaEtaEta = egPhotonRef_[iphot]->sigmaEtaEta();
964  showerShape.sigmaIetaIeta = egPhotonRef_[iphot]->sigmaIetaIeta();
965  for (uint id = 0; id < showerShape.hcalOverEcal.size(); ++id) {
966  showerShape.hcalOverEcal[id] = egPhotonRef_[iphot]->hcalOverEcal(id + 1);
967  }
968  myPhoton.setShowerShapeVariables(showerShape);
969 
970  saturationInfo.nSaturatedXtals = egPhotonRef_[iphot]->nSaturatedXtals();
971  saturationInfo.isSeedSaturated = egPhotonRef_[iphot]->isSeedSaturated();
972  myPhoton.setSaturationInfo(saturationInfo);
973 
974  fiducialFlags.isEB = egPhotonRef_[iphot]->isEB();
975  fiducialFlags.isEE = egPhotonRef_[iphot]->isEE();
976  fiducialFlags.isEBEtaGap = egPhotonRef_[iphot]->isEBEtaGap();
977  fiducialFlags.isEBPhiGap = egPhotonRef_[iphot]->isEBPhiGap();
978  fiducialFlags.isEERingGap = egPhotonRef_[iphot]->isEERingGap();
979  fiducialFlags.isEEDeeGap = egPhotonRef_[iphot]->isEEDeeGap();
980  fiducialFlags.isEBEEGap = egPhotonRef_[iphot]->isEBEEGap();
981  myPhoton.setFiducialVolumeFlags(fiducialFlags);
982 
983  isolationVariables03.ecalRecHitSumEt = egPhotonRef_[iphot]->ecalRecHitSumEtConeDR03();
984  for (uint id = 0; id < isolationVariables03.hcalRecHitSumEt.size(); ++id) {
985  isolationVariables03.hcalRecHitSumEt[id] = egPhotonRef_[iphot]->hcalTowerSumEtConeDR03(id + 1);
986  }
987  isolationVariables03.trkSumPtSolidCone = egPhotonRef_[iphot]->trkSumPtSolidConeDR03();
988  isolationVariables03.trkSumPtHollowCone = egPhotonRef_[iphot]->trkSumPtHollowConeDR03();
989  isolationVariables03.nTrkSolidCone = egPhotonRef_[iphot]->nTrkSolidConeDR03();
990  isolationVariables03.nTrkHollowCone = egPhotonRef_[iphot]->nTrkHollowConeDR03();
991  isolationVariables04.ecalRecHitSumEt = egPhotonRef_[iphot]->ecalRecHitSumEtConeDR04();
992  for (uint id = 0; id < isolationVariables04.hcalRecHitSumEt.size(); ++id) {
993  isolationVariables04.hcalRecHitSumEt[id] = egPhotonRef_[iphot]->hcalTowerSumEtConeDR04(id + 1);
994  }
995  isolationVariables04.trkSumPtSolidCone = egPhotonRef_[iphot]->trkSumPtSolidConeDR04();
996  isolationVariables04.trkSumPtHollowCone = egPhotonRef_[iphot]->trkSumPtHollowConeDR04();
997  isolationVariables04.nTrkSolidCone = egPhotonRef_[iphot]->nTrkSolidConeDR04();
998  isolationVariables04.nTrkHollowCone = egPhotonRef_[iphot]->nTrkHollowConeDR04();
999  myPhoton.setIsolationVariables(isolationVariables04, isolationVariables03);
1000 
1002  myPFIso.chargedHadronIso = (*isolationValues[0])[CandidatePtr_[iphot]];
1003  myPFIso.photonIso = (*isolationValues[1])[CandidatePtr_[iphot]];
1004  myPFIso.neutralHadronIso = (*isolationValues[2])[CandidatePtr_[iphot]];
1005  myPhoton.setPflowIsolationVariables(myPFIso);
1006 
1007  reco::Photon::PflowIDVariables myPFVariables;
1008 
1009  reco::Mustache myMustache(mustacheSCParams_);
1010  myMustache.MustacheID(
1011  *(myPhoton.parentSuperCluster()), myPFVariables.nClusterOutsideMustache, myPFVariables.etOutsideMustache);
1012  myPFVariables.mva = pfPhotonMva_[iphot];
1013  myPhoton.setPflowIDVariables(myPFVariables);
1014 
1015  //cout << "chargedHadronIso="<<myPhoton.chargedHadronIso()<<" photonIso="<<myPhoton.photonIso()<<" neutralHadronIso="<<myPhoton.neutralHadronIso()<<endl;
1016 
1017  // set PF-regression energy
1018  myPhoton.setCorrectedEnergy(
1020 
1021  /*
1022  if (basicClusters_[iphot].size()>0){
1023  // Cluster shape variables
1024  //Algorithms from EcalClusterTools could be adapted to PF photons ? (not based on 5x5 BC)
1025  //It happens that energy computed in eg e5x5 is greater than pfSC energy (EcalClusterTools gathering energies from adjacent crystals even if not belonging to the SC)
1026  const EcalRecHitCollection* hits = 0 ;
1027  int subdet = PCref->parentSuperCluster()->seed()->hitsAndFractions()[0].first.subdetId();
1028  if (subdet==EcalBarrel) hits = barrelRecHits;
1029  else if (subdet==EcalEndcap) hits = endcapRecHits;
1030  const CaloGeometry* geometry = theCaloGeom_.product();
1031 
1032  float maxXtal = EcalClusterTools::eMax( *(PCref->parentSuperCluster()->seed()), &(*hits) );
1033  //cout << "maxXtal="<<maxXtal<<endl;
1034  float e1x5 = EcalClusterTools::e1x5( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology));
1035  //cout << "e1x5="<<e1x5<<endl;
1036  float e2x5 = EcalClusterTools::e2x5Max( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology));
1037  //cout << "e2x5="<<e2x5<<endl;
1038  float e3x3 = EcalClusterTools::e3x3( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology));
1039  //cout << "e3x3="<<e3x3<<endl;
1040  float e5x5 = EcalClusterTools::e5x5( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology));
1041  //cout << "e5x5="<<e5x5<<endl;
1042  std::vector<float> cov = EcalClusterTools::covariances( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology), geometry);
1043  float sigmaEtaEta = sqrt(cov[0]);
1044  //cout << "sigmaEtaEta="<<sigmaEtaEta<<endl;
1045  std::vector<float> locCov = EcalClusterTools::localCovariances( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology));
1046  float sigmaIetaIeta = sqrt(locCov[0]);
1047  //cout << "sigmaIetaIeta="<<sigmaIetaIeta<<endl;
1048  //float r9 =e3x3/(PCref->parentSuperCluster()->rawEnergy());
1049 
1050 
1051  // calculate HoE
1052  const CaloTowerCollection* hcalTowersColl = hcalTowersHandle.product();
1053  EgammaTowerIsolation towerIso1(hOverEConeSize_,0.,0.,1,hcalTowersColl) ;
1054  EgammaTowerIsolation towerIso2(hOverEConeSize_,0.,0.,2,hcalTowersColl) ;
1055  double HoE1=towerIso1.getTowerESum(&(*PCref->parentSuperCluster()))/PCref->pfSuperCluster()->energy();
1056  double HoE2=towerIso2.getTowerESum(&(*PCref->parentSuperCluster()))/PCref->pfSuperCluster()->energy();
1057  //cout << "HoE1="<<HoE1<<endl;
1058  //cout << "HoE2="<<HoE2<<endl;
1059 
1060  reco::Photon::ShowerShape showerShape;
1061  showerShape.e1x5= e1x5;
1062  showerShape.e2x5= e2x5;
1063  showerShape.e3x3= e3x3;
1064  showerShape.e5x5= e5x5;
1065  showerShape.maxEnergyXtal = maxXtal;
1066  showerShape.sigmaEtaEta = sigmaEtaEta;
1067  showerShape.sigmaIetaIeta = sigmaIetaIeta;
1068  showerShape.hcalDepth1OverEcal = HoE1;
1069  showerShape.hcalDepth2OverEcal = HoE2;
1070  myPhoton.setShowerShapeVariables ( showerShape );
1071  //cout << "shower shape variables filled"<<endl;
1072  }
1073  */
1074 
1075  photons.push_back(myPhoton);
1076  }
1077 
1078  //std::cout << "end of createPhotons"<<std::endl;
1079 }
std::vector< float > pfPhotonMva_
std::vector< reco::PhotonRef > egPhotonRef_
const EcalMustacheSCParameters * mustacheSCParams_
math::XYZTLorentzVector LorentzVector
std::vector< int > photPFCandidateIndex_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::array< float, 7 > hcalRecHitSumEt
Definition: Photon.h:419
std::vector< float > energyRegression_
std::vector< reco::CandidatePtr > CandidatePtr_
std::vector< float > energyRegressionError_

◆ createPreshowerCluster()

void PFPhotonTranslator::createPreshowerCluster ( const reco::PFBlockElement PFBE,
reco::PreshowerClusterCollection preshowerClusters,
unsigned  plane 
) const
private

Definition at line 620 of file PFPhotonTranslator.cc.

References reco::PFBlockElement::clusterRef().

622  {
623  const reco::PFClusterRef &myPFClusterRef = PFBE.clusterRef();
624  preshowerClusters.push_back(reco::PreshowerCluster(
625  myPFClusterRef->energy(), myPFClusterRef->position(), myPFClusterRef->hitsAndFractions(), plane));
626 }
virtual const PFClusterRef & clusterRef() const

◆ createPreshowerClusterPtrs()

void PFPhotonTranslator::createPreshowerClusterPtrs ( const edm::OrphanHandle< reco::PreshowerClusterCollection > &  preshowerClustersHandle)
private

Definition at line 647 of file PFPhotonTranslator.cc.

References findQualityFiles::size.

648  {
649  unsigned size = photPFCandidateIndex_.size();
650  unsigned psClusterCounter = 0;
651  preshowerClusterPtr_.resize(size);
652 
653  for (unsigned iphot = 0; iphot < size; ++iphot) // loop on tracks
654  {
655  unsigned nbc = preshowerClusters_[iphot].size();
656  for (unsigned ibc = 0; ibc < nbc; ++ibc) // loop on basic clusters
657  {
658  // std::cout << "Track "<< iGSF << " ref " << basicClusterCounter << std::endl;
659  reco::CaloClusterPtr psPtr(preshowerClustersHandle, psClusterCounter);
660  preshowerClusterPtr_[iphot].push_back(psPtr);
661  ++psClusterCounter;
662  }
663  }
664 }
size
Write out results.
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
std::vector< int > photPFCandidateIndex_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_

◆ createSuperClusters()

void PFPhotonTranslator::createSuperClusters ( const reco::PFCandidateCollection pfCand,
reco::SuperClusterCollection superClusters 
) const
private

Definition at line 666 of file PFPhotonTranslator.cc.

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(), HLT_2022v15_cff::superClusters, and trackerHitRTTI::vector.

667  {
668  unsigned nphot = photPFCandidateIndex_.size();
669  for (unsigned iphot = 0; iphot < nphot; ++iphot) {
670  //cout << "SC iphot=" << iphot << endl;
671 
672  // Computes energy position a la e/gamma
673  double sclusterE = 0;
674  double posX = 0.;
675  double posY = 0.;
676  double posZ = 0.;
677 
678  unsigned nbasics = basicClusters_[iphot].size();
679  for (unsigned ibc = 0; ibc < nbasics; ++ibc) {
680  //cout << "BC in SC : iphot="<<iphot<<endl;
681 
682  double e = basicClusters_[iphot][ibc].energy();
683  sclusterE += e;
684  posX += e * basicClusters_[iphot][ibc].position().X();
685  posY += e * basicClusters_[iphot][ibc].position().Y();
686  posZ += e * basicClusters_[iphot][ibc].position().Z();
687  }
688  posX /= sclusterE;
689  posY /= sclusterE;
690  posZ /= sclusterE;
691 
692  /*
693  if(pfCand[gsfPFCandidateIndex_[iphot]].gsfTrackRef()!=GsfTrackRef_[iphot])
694  {
695  edm::LogError("PFElectronTranslator") << " Major problem in PFElectron Translator" << std::endl;
696  }
697  */
698 
699  // compute the width
700  PFClusterWidthAlgo pfwidth(pfClusters_[iphot]);
701 
702  double correctedEnergy = pfCand[photPFCandidateIndex_[iphot]].ecalEnergy();
703  reco::SuperCluster mySuperCluster(correctedEnergy, math::XYZPoint(posX, posY, posZ));
704  // protection against empty basic cluster collection ; the value is -2 in this case
705  if (nbasics) {
706  // std::cout << "SuperCluster creation; energy " << pfCand[gsfPFCandidateIndex_[iphot]].ecalEnergy();
707  // std::cout << " " << pfCand[gsfPFCandidateIndex_[iphot]].rawEcalEnergy() << std::endl;
708  // std::cout << "Seed energy from basic " << basicClusters_[iphot][0].energy() << std::endl;
709  mySuperCluster.setSeed(basicClusterPtr_[iphot][0]);
710  } else {
711  // std::cout << "SuperCluster creation ; seed energy " << 0 << std::endl;
712  //std::cout << "SuperCluster creation ; energy " << pfCand[photPFCandidateIndex_[iphot]].ecalEnergy();
713  //std::cout << " " << pfCand[photPFCandidateIndex_[iphot]].rawEcalEnergy() << std::endl;
714  // std::cout << " No seed found " << 0 << std::endl;
715  // std::cout << " MVA " << pfCand[gsfPFCandidateIndex_[iphot]].mva_e_pi() << std::endl;
716  mySuperCluster.setSeed(reco::CaloClusterPtr());
717  }
718  // the seed should be the first basic cluster
719 
720  for (unsigned ibc = 0; ibc < nbasics; ++ibc) {
721  mySuperCluster.addCluster(basicClusterPtr_[iphot][ibc]);
722  // std::cout <<"Adding Ref to SC " << basicClusterPtr_[iphot][ibc].index() << std::endl;
723  const std::vector<std::pair<DetId, float> > &v1 = basicClusters_[iphot][ibc].hitsAndFractions();
724  // std::cout << " Number of cells " << v1.size() << std::endl;
725  for (std::vector<std::pair<DetId, float> >::const_iterator diIt = v1.begin(); diIt != v1.end(); ++diIt) {
726  // std::cout << " Adding DetId " << (diIt->first).rawId() << " " << diIt->second << std::endl;
727  mySuperCluster.addHitAndFraction(diIt->first, diIt->second);
728  } // loop over rechits
729  }
730 
731  unsigned nps = preshowerClusterPtr_[iphot].size();
732  for (unsigned ips = 0; ips < nps; ++ips) {
733  mySuperCluster.addPreshowerCluster(preshowerClusterPtr_[iphot][ips]);
734  }
735 
736  // Set the preshower energy
737  mySuperCluster.setPreshowerEnergy(pfCand[photPFCandidateIndex_[iphot]].pS1Energy() +
738  pfCand[photPFCandidateIndex_[iphot]].pS2Energy());
739 
740  // Set the cluster width
741  mySuperCluster.setEtaWidth(pfwidth.pflowEtaWidth());
742  mySuperCluster.setPhiWidth(pfwidth.pflowPhiWidth());
743  // Force the computation of rawEnergy_ of the reco::SuperCluster
744  mySuperCluster.rawEnergy();
745 
746  //cout << "SC energy="<< mySuperCluster.energy()<<endl;
747 
748  superClusters.push_back(mySuperCluster);
749  //std::cout << "nb super clusters in collection : "<<superClusters.size()<<std::endl;
750  }
751 }
std::vector< int > photPFCandidateIndex_
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< reco::BasicClusterCollection > basicClusters_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_

◆ fetchCandidateCollection()

bool PFPhotonTranslator::fetchCandidateCollection ( edm::Handle< reco::PFCandidateCollection > &  c,
const edm::InputTag tag,
const edm::Event iEvent 
) const
private

Definition at line 581 of file PFPhotonTranslator.cc.

References c, submitPVResolutionJobs::err, newFWLiteAna::found, iEvent, and makeGlobalPositionRcd_cfg::tag.

583  {
584  bool found = iEvent.getByLabel(tag, c);
585 
586  if (!found && !emptyIsOk_) {
587  std::ostringstream err;
588  err << " cannot get PFCandidates: " << tag << std::endl;
589  edm::LogError("PFPhotonTranslator") << err.str();
590  }
591  return found;
592 }
Log< level::Error, false > LogError
int iEvent
Definition: GenABIO.cc:224

◆ produce()

void PFPhotonTranslator::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 198 of file PFPhotonTranslator.cc.

References reco::PFBlockElement::ECAL, bookConverter::elements, reco::PFCandidate::gamma, edm::EventSetup::getData(), mps_fire::i, iEvent, edm::Ref< C, T, F >::isNull(), displacedMuonProducer_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.

198  {
199  //cout << "NEW EVENT"<<endl;
201 
202  auto basicClusters_p = std::make_unique<reco::BasicClusterCollection>();
203 
204  auto psClusters_p = std::make_unique<reco::PreshowerClusterCollection>();
205 
206  /*
207  auto SingleLeg_p = std::make_unique<reco::ConversionCollection>();
208  */
209 
210  reco::SuperClusterCollection outputSuperClusterCollection;
211  reco::ConversionCollection outputOneLegConversionCollection;
212  reco::PhotonCoreCollection outputPhotonCoreCollection;
214 
215  outputSuperClusterCollection.clear();
216  outputOneLegConversionCollection.clear();
217  outputPhotonCoreCollection.clear();
218  outputPhotonCollection.clear();
219 
222 
224  iEvent.getByLabel(EGPhotonCollection_, egPhotons);
225 
226  Handle<reco::VertexCollection> vertexHandle;
227 
229  for (size_t j = 0; j < inputTagIsoVals_.size(); ++j) {
230  iEvent.getByLabel(inputTagIsoVals_[j], isolationValues[j]);
231  }
232 
233  // clear the vectors
234  photPFCandidateIndex_.clear();
235  basicClusters_.clear();
236  pfClusters_.clear();
237  preshowerClusters_.clear();
238  superClusters_.clear();
239  basicClusterPtr_.clear();
240  preshowerClusterPtr_.clear();
241  CandidatePtr_.clear();
242  egSCRef_.clear();
243  egPhotonRef_.clear();
244  pfPhotonMva_.clear();
245  energyRegression_.clear();
246  energyRegressionError_.clear();
247  pfConv_.clear();
248  pfSingleLegConv_.clear();
249  pfSingleLegConvMva_.clear();
252 
253  // loop on the candidates
254  //CC@@
255  // we need first to create AND put the SuperCluster,
256  // basic clusters and presh clusters collection
257  // in order to get a working Handle
258  unsigned ncand = (status) ? pfCandidates->size() : 0;
259 
260  unsigned iphot = 0;
261  unsigned iconv1leg = 0;
262  unsigned iconv2leg = 0;
263 
264  for (unsigned i = 0; i < ncand; ++i) {
265  const reco::PFCandidate &cand = (*pfCandidates)[i];
266  if (cand.particleId() != reco::PFCandidate::gamma)
267  continue;
268  //cout << "cand.mva_nothing_gamma()="<<cand. mva_nothing_gamma()<<endl;
269  if (cand.mva_nothing_gamma() > 0.001) //Found PFPhoton with PFPhoton Extras saved
270  {
271  //cout << "NEW PHOTON" << endl;
272 
273  //std::cout << "nDoubleLegConv="<<cand.photonExtraRef()->conversionRef().size()<<std::endl;
274 
275  if (!cand.photonExtraRef()->conversionRef().empty()) {
276  pfConv_.push_back(reco::ConversionRefVector());
277 
278  const reco::ConversionRefVector &doubleLegConvColl = cand.photonExtraRef()->conversionRef();
279  for (unsigned int iconv = 0; iconv < doubleLegConvColl.size(); iconv++) {
280  pfConv_[iconv2leg].push_back(doubleLegConvColl[iconv]);
281  }
282 
283  conv2legPFCandidateIndex_.push_back(iconv2leg);
284  iconv2leg++;
285  } else
286  conv2legPFCandidateIndex_.push_back(-1);
287 
288  const std::vector<reco::TrackRef> &singleLegConvColl = cand.photonExtraRef()->singleLegConvTrackRef();
289  const std::vector<float> &singleLegConvCollMva = cand.photonExtraRef()->singleLegConvMva();
290 
291  //std::cout << "nSingleLegConv=" <<singleLegConvColl.size() << std::endl;
292 
293  if (!singleLegConvColl.empty()) {
294  pfSingleLegConv_.push_back(std::vector<reco::TrackRef>());
295  pfSingleLegConvMva_.push_back(std::vector<float>());
296 
297  //cout << "nTracks="<< singleLegConvColl.size()<<endl;
298  for (unsigned int itk = 0; itk < singleLegConvColl.size(); itk++) {
299  //cout << "Track pt="<< singleLegConvColl[itk]->pt() <<endl;
300 
301  pfSingleLegConv_[iconv1leg].push_back(singleLegConvColl[itk]);
302  pfSingleLegConvMva_[iconv1leg].push_back(singleLegConvCollMva[itk]);
303  }
304 
305  conv1legPFCandidateIndex_.push_back(iconv1leg);
306 
307  iconv1leg++;
308  } else
309  conv1legPFCandidateIndex_.push_back(-1);
310  }
311 
312  photPFCandidateIndex_.push_back(i);
313  pfPhotonMva_.push_back(cand.mva_nothing_gamma());
314  energyRegression_.push_back(cand.photonExtraRef()->MVAGlobalCorrE());
315  energyRegressionError_.push_back(cand.photonExtraRef()->MVAGlobalCorrEError());
317  pfClusters_.push_back(std::vector<const reco::PFCluster *>());
320 
321  reco::PFCandidatePtr ptrToPFPhoton(pfCandidates, i);
322  CandidatePtr_.push_back(ptrToPFPhoton);
323  egSCRef_.push_back(cand.superClusterRef());
324  //std::cout << "PFPhoton cand " << iphot << std::endl;
325 
326  int iegphot = 0;
327  for (reco::PhotonCollection::const_iterator gamIter = egPhotons->begin(); gamIter != egPhotons->end(); ++gamIter) {
328  if (cand.superClusterRef() == gamIter->superCluster()) {
329  reco::PhotonRef PhotRef(reco::PhotonRef(egPhotons, iegphot));
330  egPhotonRef_.push_back(PhotRef);
331  }
332  iegphot++;
333  }
334 
335  //std::cout << "Cand elements in blocks : " << cand.elementsInBlocks().size() << std::endl;
336 
337  for (unsigned iele = 0; iele < cand.elementsInBlocks().size(); ++iele) {
338  // first get the block
339  reco::PFBlockRef blockRef = cand.elementsInBlocks()[iele].first;
340  //
341  unsigned elementIndex = cand.elementsInBlocks()[iele].second;
342  // check it actually exists
343  if (blockRef.isNull())
344  continue;
345 
346  // then get the elements of the block
347  const edm::OwnVector<reco::PFBlockElement> &elements = (*blockRef).elements();
348 
349  const reco::PFBlockElement &pfbe(elements[elementIndex]);
350  // The first ECAL element should be the cluster associated to the GSF; defined as the seed
351  if (pfbe.type() == reco::PFBlockElement::ECAL) {
352  //std::cout << "BlockElement ECAL" << std::endl;
353  // the Brem photons are saved as daughter PFCandidate; this
354  // is convenient to access the corrected energy
355  // std::cout << " Found candidate " << correspondingDaughterCandidate(coCandidate,pfbe) << " " << coCandidate << std::endl;
357  }
358  if (pfbe.type() == reco::PFBlockElement::PS1) {
359  //std::cout << "BlockElement PS1" << std::endl;
361  }
362  if (pfbe.type() == reco::PFBlockElement::PS2) {
363  //std::cout << "BlockElement PS2" << std::endl;
365  }
366 
367  } // loop on the elements
368 
369  // save the basic clusters
370  basicClusters_p->insert(basicClusters_p->end(), basicClusters_[iphot].begin(), basicClusters_[iphot].end());
371  // save the preshower clusters
372  psClusters_p->insert(psClusters_p->end(), preshowerClusters_[iphot].begin(), preshowerClusters_[iphot].end());
373 
374  ++iphot;
375 
376  } // loop on PFCandidates
377 
378  //Save the basic clusters and get an handle as to be able to create valid Refs (thanks to Claude)
379  // std::cout << " Number of basic clusters " << basicClusters_p->size() << std::endl;
381  iEvent.put(std::move(basicClusters_p), PFBasicClusterCollection_);
382 
383  //preshower clusters
385  iEvent.put(std::move(psClusters_p), PFPreshowerClusterCollection_);
386 
387  // now that the Basic clusters are in the event, the Ref can be created
388  createBasicClusterPtrs(bcRefProd);
389  // now that the preshower clusters are in the event, the Ref can be created
390  createPreshowerClusterPtrs(psRefProd);
391 
392  // and now the Super cluster can be created with valid references
393  //if(status) createSuperClusters(*pfCandidates,*superClusters_p);
394  if (status)
395  createSuperClusters(*pfCandidates, outputSuperClusterCollection);
396 
397  //std::cout << "nb superclusters in collection : "<<outputSuperClusterCollection.size()<<std::endl;
398 
399  // Let's put the super clusters in the event
400  auto superClusters_p = std::make_unique<reco::SuperClusterCollection>(outputSuperClusterCollection);
402  iEvent.put(std::move(superClusters_p), PFSuperClusterCollection_);
403 
404  /*
405  int ipho=0;
406  for (reco::SuperClusterCollection::const_iterator gamIter = scRefProd->begin(); gamIter != scRefProd->end(); ++gamIter){
407  std::cout << "SC i="<<ipho<<" energy="<<gamIter->energy()<<std::endl;
408  ipho++;
409  }
410  */
411 
412  //1-leg conversions
413 
414  if (status)
415  createOneLegConversions(scRefProd, outputOneLegConversionCollection);
416 
417  auto SingleLeg_p = std::make_unique<reco::ConversionCollection>(outputOneLegConversionCollection);
419  iEvent.put(std::move(SingleLeg_p), PFConversionCollection_);
420  /*
421  int iconv = 0;
422  for (reco::ConversionCollection::const_iterator convIter = ConvRefProd->begin(); convIter != ConvRefProd->end(); ++convIter){
423 
424  std::cout << "OneLegConv i="<<iconv<<" nTracks="<<convIter->nTracks()<<" EoverP="<<convIter->EoverP() <<std::endl;
425  std::vector<edm::RefToBase<reco::Track> > convtracks = convIter->tracks();
426  for (unsigned int itk=0; itk<convtracks.size(); itk++){
427  std::cout << "Track pt="<< convtracks[itk]->pt() << std::endl;
428  }
429 
430  iconv++;
431  }
432  */
433 
434  //create photon cores
435  //if(status) createPhotonCores(pfCandidates, scRefProd, *photonCores_p);
436  if (status)
437  createPhotonCores(scRefProd, ConvRefProd, outputPhotonCoreCollection);
438 
439  //std::cout << "nb photoncores in collection : "<<outputPhotonCoreCollection.size()<<std::endl;
440 
441  // Put the photon cores in the event
442  auto photonCores_p = std::make_unique<reco::PhotonCoreCollection>(outputPhotonCoreCollection);
443  //std::cout << "photon core collection put in unique_ptr"<<std::endl;
445  iEvent.put(std::move(photonCores_p), PFPhotonCoreCollection_);
446 
447  //std::cout << "photon core have been put in the event"<<std::endl;
448  /*
449  int ipho=0;
450  for (reco::PhotonCoreCollection::const_iterator gamIter = pcRefProd->begin(); gamIter != pcRefProd->end(); ++gamIter){
451  std::cout << "PhotonCore i="<<ipho<<" energy="<<gamIter->parentSuperCluster()->energy()<<std::endl;
452  //for (unsigned int i=0; i<)
453 
454  std::cout << "PhotonCore i="<<ipho<<" nconv2leg="<<gamIter->conversions().size()<<" nconv1leg="<<gamIter->conversionsOneLeg().size()<<std::endl;
455 
456  const reco::ConversionRefVector & conv = gamIter->conversions();
457  for (unsigned int iconv=0; iconv<conv.size(); iconv++){
458  cout << "2-leg iconv="<<iconv<<endl;
459  cout << "2-leg nTracks="<<conv[iconv]->nTracks()<<endl;
460  cout << "2-leg EoverP="<<conv[iconv]->EoverP()<<endl;
461  cout << "2-leg ConvAlgorithm="<<conv[iconv]->algo()<<endl;
462  }
463 
464  const reco::ConversionRefVector & convbis = gamIter->conversionsOneLeg();
465  for (unsigned int iconv=0; iconv<convbis.size(); iconv++){
466  cout << "1-leg iconv="<<iconv<<endl;
467  cout << "1-leg nTracks="<<convbis[iconv]->nTracks()<<endl;
468  cout << "1-leg EoverP="<<convbis[iconv]->EoverP()<<endl;
469  cout << "1-leg ConvAlgorithm="<<convbis[iconv]->algo()<<endl;
470  }
471 
472  ipho++;
473  }
474  */
475 
476  //load vertices
478  bool validVertex = true;
479  iEvent.getByLabel(vertexProducer_, vertexHandle);
480  if (!vertexHandle.isValid()) {
481  edm::LogWarning("PhotonProducer") << "Error! Can't get the product primary Vertex Collection "
482  << "\n";
483  validVertex = false;
484  }
485  if (validVertex)
486  vertexCollection = *(vertexHandle.product());
487 
488  /*
489  //load Ecal rechits
490  bool validEcalRecHits=true;
491  Handle<EcalRecHitCollection> barrelHitHandle;
492  EcalRecHitCollection barrelRecHits;
493  iEvent.getByLabel(barrelEcalHits_, barrelHitHandle);
494  if (!barrelHitHandle.isValid()) {
495  edm::LogError("PhotonProducer") << "Error! Can't get the product "<<barrelEcalHits_.label();
496  validEcalRecHits=false;
497  }
498  if ( validEcalRecHits) barrelRecHits = *(barrelHitHandle.product());
499 
500  Handle<EcalRecHitCollection> endcapHitHandle;
501  iEvent.getByLabel(endcapEcalHits_, endcapHitHandle);
502  EcalRecHitCollection endcapRecHits;
503  if (!endcapHitHandle.isValid()) {
504  edm::LogError("PhotonProducer") << "Error! Can't get the product "<<endcapEcalHits_.label();
505  validEcalRecHits=false;
506  }
507  if( validEcalRecHits) endcapRecHits = *(endcapHitHandle.product());
508 
509  //load detector topology & geometry
510  iSetup.get<CaloGeometryRecord>().get(theCaloGeom_);
511 
512  edm::ESHandle<CaloTopology> pTopology;
513  iSetup.get<CaloTopologyRecord>().get(theCaloTopo_);
514  const CaloTopology *topology = theCaloTopo_.product();
515 
516  // get Hcal rechits collection
517  Handle<CaloTowerCollection> hcalTowersHandle;
518  iEvent.getByLabel(hcalTowers_, hcalTowersHandle);
519  */
520 
521  //create photon collection
522  //if(status) createPhotons(vertexCollection, pcRefProd, topology, &barrelRecHits, &endcapRecHits, hcalRecHitsHandle, isolationValues, outputPhotonCollection);
523  if (status)
525 
526  // Put the photons in the event
527  auto photons_p = std::make_unique<reco::PhotonCollection>(outputPhotonCollection);
528  //std::cout << "photon collection put in unique_ptr"<<std::endl;
529  const edm::OrphanHandle<reco::PhotonCollection> photonRefProd = iEvent.put(std::move(photons_p), PFPhotonCollection_);
530  //std::cout << "photons have been put in the event"<<std::endl;
531 
532  /*
533  ipho=0;
534  for (reco::PhotonCollection::const_iterator gamIter = photonRefProd->begin(); gamIter != photonRefProd->end(); ++gamIter){
535  std::cout << "Photon i="<<ipho<<" pfEnergy="<<gamIter->parentSuperCluster()->energy()<<std::endl;
536 
537  const reco::ConversionRefVector & conv = gamIter->conversions();
538  cout << "conversions obtained : conv.size()="<< conv.size()<<endl;
539  for (unsigned int iconv=0; iconv<conv.size(); iconv++){
540  cout << "iconv="<<iconv<<endl;
541  cout << "nTracks="<<conv[iconv]->nTracks()<<endl;
542  cout << "EoverP="<<conv[iconv]->EoverP()<<endl;
543 
544  cout << "Vtx x="<<conv[iconv]->conversionVertex().x() << " y="<< conv[iconv]->conversionVertex().y()<<" z="<<conv[iconv]->conversionVertex().z()<< endl;
545  cout << "VtxError x=" << conv[iconv]->conversionVertex().xError() << endl;
546 
547  std::vector<edm::RefToBase<reco::Track> > convtracks = conv[iconv]->tracks();
548  //cout << "nTracks="<< convtracks.size()<<endl;
549  for (unsigned int itk=0; itk<convtracks.size(); itk++){
550  double convtrackpt = convtracks[itk]->pt();
551  const edm::RefToBase<reco::Track> & mytrack = convtracks[itk];
552  cout << "Track pt="<< convtrackpt <<endl;
553  cout << "Track origin="<<gamIter->conversionTrackOrigin(mytrack)<<endl;
554  }
555  }
556 
557  //1-leg
558  const reco::ConversionRefVector & convbis = gamIter->conversionsOneLeg();
559  cout << "conversions obtained : conv.size()="<< convbis.size()<<endl;
560  for (unsigned int iconv=0; iconv<convbis.size(); iconv++){
561  cout << "iconv="<<iconv<<endl;
562  cout << "nTracks="<<convbis[iconv]->nTracks()<<endl;
563  cout << "EoverP="<<convbis[iconv]->EoverP()<<endl;
564 
565  cout << "Vtx x="<<convbis[iconv]->conversionVertex().x() << " y="<< convbis[iconv]->conversionVertex().y()<<" z="<<convbis[iconv]->conversionVertex().z()<< endl;
566  cout << "VtxError x=" << convbis[iconv]->conversionVertex().xError() << endl;
567 
568  std::vector<edm::RefToBase<reco::Track> > convtracks = convbis[iconv]->tracks();
569  //cout << "nTracks="<< convtracks.size()<<endl;
570  for (unsigned int itk=0; itk<convtracks.size(); itk++){
571  double convtrackpt = convtracks[itk]->pt();
572  cout << "Track pt="<< convtrackpt <<endl;
573  cout << "Track origin="<<gamIter->conversionTrackOrigin((convtracks[itk]))<<endl;
574  }
575  }
576  ipho++;
577  }
578  */
579 }
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 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
Definition: Handle.h:70
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
Definition: VertexFwd.h:9
std::string PFPhotonCollection_
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
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_
int iEvent
Definition: GenABIO.cc:224
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
Definition: EventSetup.h:122
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.
Definition: Ref.h:235
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.
Definition: RefVector.h:102
edm::InputTag inputTagPFCandidates_
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
std::vector< reco::BasicClusterCollection > basicClusters_
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
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)
bool isValid() const
Definition: HandleBase.h:70
std::vector< PhotonCore > PhotonCoreCollection
collectin of PhotonCore objects
Definition: PhotonCoreFwd.h:9
std::vector< float > energyRegression_
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
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
def move(src, dest)
Definition: eostools.py:511
std::vector< std::vector< float > > pfSingleLegConvMva_

Member Data Documentation

◆ barrelEcalHits_

edm::InputTag PFPhotonTranslator::barrelEcalHits_
private

Definition at line 96 of file PFPhotonTranslator.cc.

◆ basicClusterPtr_

std::vector<reco::CaloClusterPtrVector> PFPhotonTranslator::basicClusterPtr_
private

Definition at line 110 of file PFPhotonTranslator.cc.

◆ basicClusters_

std::vector<reco::BasicClusterCollection> PFPhotonTranslator::basicClusters_
private

Definition at line 102 of file PFPhotonTranslator.cc.

◆ CandidatePtr_

std::vector<reco::CandidatePtr> PFPhotonTranslator::CandidatePtr_
private

Definition at line 116 of file PFPhotonTranslator.cc.

◆ conv1legPFCandidateIndex_

std::vector<int> PFPhotonTranslator::conv1legPFCandidateIndex_
private

Definition at line 131 of file PFPhotonTranslator.cc.

◆ conv2legPFCandidateIndex_

std::vector<int> PFPhotonTranslator::conv2legPFCandidateIndex_
private

Definition at line 132 of file PFPhotonTranslator.cc.

◆ ecalMustacheSCParametersToken_

edm::ESGetToken<EcalMustacheSCParameters, EcalMustacheSCParametersRcd> PFPhotonTranslator::ecalMustacheSCParametersToken_
private

Definition at line 138 of file PFPhotonTranslator.cc.

◆ EGPhotonCollection_

std::string PFPhotonTranslator::EGPhotonCollection_
private

Definition at line 94 of file PFPhotonTranslator.cc.

◆ egPhotonRef_

std::vector<reco::PhotonRef> PFPhotonTranslator::egPhotonRef_
private

Definition at line 120 of file PFPhotonTranslator.cc.

◆ egSCRef_

std::vector<reco::SuperClusterRef> PFPhotonTranslator::egSCRef_
private

Definition at line 118 of file PFPhotonTranslator.cc.

◆ emptyIsOk_

bool PFPhotonTranslator::emptyIsOk_
private

Definition at line 141 of file PFPhotonTranslator.cc.

◆ endcapEcalHits_

edm::InputTag PFPhotonTranslator::endcapEcalHits_
private

Definition at line 97 of file PFPhotonTranslator.cc.

◆ energyRegression_

std::vector<float> PFPhotonTranslator::energyRegression_
private

Definition at line 123 of file PFPhotonTranslator.cc.

◆ energyRegressionError_

std::vector<float> PFPhotonTranslator::energyRegressionError_
private

Definition at line 124 of file PFPhotonTranslator.cc.

◆ hcalTowers_

edm::InputTag PFPhotonTranslator::hcalTowers_
private

Definition at line 98 of file PFPhotonTranslator.cc.

◆ hOverEConeSize_

double PFPhotonTranslator::hOverEConeSize_
private

Definition at line 99 of file PFPhotonTranslator.cc.

◆ inputTagIsoVals_

std::vector<edm::InputTag> PFPhotonTranslator::inputTagIsoVals_
private

Definition at line 87 of file PFPhotonTranslator.cc.

◆ inputTagPFCandidates_

edm::InputTag PFPhotonTranslator::inputTagPFCandidates_
private

Definition at line 86 of file PFPhotonTranslator.cc.

◆ mustacheSCParams_

const EcalMustacheSCParameters* PFPhotonTranslator::mustacheSCParams_
private

Definition at line 139 of file PFPhotonTranslator.cc.

◆ PFBasicClusterCollection_

std::string PFPhotonTranslator::PFBasicClusterCollection_
private

Definition at line 88 of file PFPhotonTranslator.cc.

◆ pfClusters_

std::vector<std::vector<const reco::PFCluster *> > PFPhotonTranslator::pfClusters_
private

Definition at line 104 of file PFPhotonTranslator.cc.

◆ pfConv_

std::vector<reco::ConversionRefVector> PFPhotonTranslator::pfConv_
private

Definition at line 127 of file PFPhotonTranslator.cc.

◆ PFConversionCollection_

std::string PFPhotonTranslator::PFConversionCollection_
private

Definition at line 93 of file PFPhotonTranslator.cc.

◆ PFPhotonCollection_

std::string PFPhotonTranslator::PFPhotonCollection_
private

Definition at line 92 of file PFPhotonTranslator.cc.

◆ PFPhotonCoreCollection_

std::string PFPhotonTranslator::PFPhotonCoreCollection_
private

Definition at line 91 of file PFPhotonTranslator.cc.

◆ pfPhotonMva_

std::vector<float> PFPhotonTranslator::pfPhotonMva_
private

Definition at line 122 of file PFPhotonTranslator.cc.

◆ PFPreshowerClusterCollection_

std::string PFPhotonTranslator::PFPreshowerClusterCollection_
private

Definition at line 89 of file PFPhotonTranslator.cc.

◆ pfSingleLegConv_

std::vector<std::vector<reco::TrackRef> > PFPhotonTranslator::pfSingleLegConv_
private

Definition at line 128 of file PFPhotonTranslator.cc.

◆ pfSingleLegConvMva_

std::vector<std::vector<float> > PFPhotonTranslator::pfSingleLegConvMva_
private

Definition at line 129 of file PFPhotonTranslator.cc.

◆ PFSuperClusterCollection_

std::string PFPhotonTranslator::PFSuperClusterCollection_
private

Definition at line 90 of file PFPhotonTranslator.cc.

◆ photPFCandidateIndex_

std::vector<int> PFPhotonTranslator::photPFCandidateIndex_
private

Definition at line 114 of file PFPhotonTranslator.cc.

◆ preshowerClusterPtr_

std::vector<reco::CaloClusterPtrVector> PFPhotonTranslator::preshowerClusterPtr_
private

Definition at line 112 of file PFPhotonTranslator.cc.

◆ preshowerClusters_

std::vector<reco::PreshowerClusterCollection> PFPhotonTranslator::preshowerClusters_
private

Definition at line 106 of file PFPhotonTranslator.cc.

◆ superClusters_

std::vector<reco::SuperClusterCollection> PFPhotonTranslator::superClusters_
private

Definition at line 108 of file PFPhotonTranslator.cc.

◆ theCaloGeom_

edm::ESHandle<CaloGeometry> PFPhotonTranslator::theCaloGeom_
private

Definition at line 135 of file PFPhotonTranslator.cc.

◆ theCaloTopo_

edm::ESHandle<CaloTopology> PFPhotonTranslator::theCaloTopo_
private

Definition at line 134 of file PFPhotonTranslator.cc.

◆ vertexProducer_

std::string PFPhotonTranslator::vertexProducer_
private

Definition at line 95 of file PFPhotonTranslator.cc.