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<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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_
 
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_
 
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 41 of file PFPhotonTranslator.cc.

Member Typedef Documentation

Definition at line 48 of file PFPhotonTranslator.cc.

Constructor & Destructor Documentation

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

Definition at line 157 of file PFPhotonTranslator.cc.

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

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

Definition at line 197 of file PFPhotonTranslator.cc.

197 {}

Member Function Documentation

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

Definition at line 1080 of file PFPhotonTranslator.cc.

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

1081  {
1082  unsigned refindex = pfbe.index();
1083  // std::cout << " N daughters " << cand.numberOfDaughters() << std::endl;
1084  reco::PFCandidate::const_iterator myDaughterCandidate = cand.begin();
1085  reco::PFCandidate::const_iterator itend = cand.end();
1086 
1087  for (; myDaughterCandidate != itend; ++myDaughterCandidate) {
1088  const reco::PFCandidate *myPFCandidate = (const reco::PFCandidate *)&*myDaughterCandidate;
1089  if (myPFCandidate->elementsInBlocks().size() != 1) {
1090  // std::cout << " Daughter with " << myPFCandidate.elementsInBlocks().size()<< " element in block " << std::endl;
1091  return cand;
1092  }
1093  if (myPFCandidate->elementsInBlocks()[0].second == refindex) {
1094  // std::cout << " Found it " << cand << std::endl;
1095  return *myPFCandidate;
1096  }
1097  }
1098  return cand;
1099 }
unsigned index() const
const_iterator end() const
last daughter const_iterator
Definition: Candidate.h:146
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
const_iterator begin() const
first daughter const_iterator
Definition: Candidate.h:144
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:636
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:46
virtual const PFClusterRef & clusterRef() const
bool isNull() const
Checks for null.
Definition: Ref.h:235
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_
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, DOFs::Y, and DOFs::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_
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, reco::PhotonCore::setParentSuperCluster(), reco::PhotonCore::setPFlowPhoton(), reco::PhotonCore::setStandardPhoton(), reco::PhotonCore::setSuperCluster(), and edm::RefVector< C, T, F >::size().

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_
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
void addElectronPixelSeed(const reco::ElectronSeedRef &r)
set electron pixel seed ref
Definition: PhotonCore.h:56
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::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, 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, reco::Photon::regression2, reco::Photon::IsolationVariables::trkSumPtHollowCone, reco::Photon::IsolationVariables::trkSumPtSolidCone, and badGlobalMuonTaggersAOD_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  showerShape.hcalDepth1OverEcal = egPhotonRef_[iphot]->hadronicDepth1OverEm();
966  showerShape.hcalDepth2OverEcal = egPhotonRef_[iphot]->hadronicDepth2OverEm();
967  myPhoton.setShowerShapeVariables(showerShape);
968 
969  saturationInfo.nSaturatedXtals = egPhotonRef_[iphot]->nSaturatedXtals();
970  saturationInfo.isSeedSaturated = egPhotonRef_[iphot]->isSeedSaturated();
971  myPhoton.setSaturationInfo(saturationInfo);
972 
973  fiducialFlags.isEB = egPhotonRef_[iphot]->isEB();
974  fiducialFlags.isEE = egPhotonRef_[iphot]->isEE();
975  fiducialFlags.isEBEtaGap = egPhotonRef_[iphot]->isEBEtaGap();
976  fiducialFlags.isEBPhiGap = egPhotonRef_[iphot]->isEBPhiGap();
977  fiducialFlags.isEERingGap = egPhotonRef_[iphot]->isEERingGap();
978  fiducialFlags.isEEDeeGap = egPhotonRef_[iphot]->isEEDeeGap();
979  fiducialFlags.isEBEEGap = egPhotonRef_[iphot]->isEBEEGap();
980  myPhoton.setFiducialVolumeFlags(fiducialFlags);
981 
982  isolationVariables03.ecalRecHitSumEt = egPhotonRef_[iphot]->ecalRecHitSumEtConeDR03();
983  isolationVariables03.hcalTowerSumEt = egPhotonRef_[iphot]->hcalTowerSumEtConeDR03();
984  isolationVariables03.hcalDepth1TowerSumEt = egPhotonRef_[iphot]->hcalDepth1TowerSumEtConeDR03();
985  isolationVariables03.hcalDepth2TowerSumEt = egPhotonRef_[iphot]->hcalDepth2TowerSumEtConeDR03();
986  isolationVariables03.trkSumPtSolidCone = egPhotonRef_[iphot]->trkSumPtSolidConeDR03();
987  isolationVariables03.trkSumPtHollowCone = egPhotonRef_[iphot]->trkSumPtHollowConeDR03();
988  isolationVariables03.nTrkSolidCone = egPhotonRef_[iphot]->nTrkSolidConeDR03();
989  isolationVariables03.nTrkHollowCone = egPhotonRef_[iphot]->nTrkHollowConeDR03();
990  isolationVariables04.ecalRecHitSumEt = egPhotonRef_[iphot]->ecalRecHitSumEtConeDR04();
991  isolationVariables04.hcalTowerSumEt = egPhotonRef_[iphot]->hcalTowerSumEtConeDR04();
992  isolationVariables04.hcalDepth1TowerSumEt = egPhotonRef_[iphot]->hcalDepth1TowerSumEtConeDR04();
993  isolationVariables04.hcalDepth2TowerSumEt = egPhotonRef_[iphot]->hcalDepth2TowerSumEtConeDR04();
994  isolationVariables04.trkSumPtSolidCone = egPhotonRef_[iphot]->trkSumPtSolidConeDR04();
995  isolationVariables04.trkSumPtHollowCone = egPhotonRef_[iphot]->trkSumPtHollowConeDR04();
996  isolationVariables04.nTrkSolidCone = egPhotonRef_[iphot]->nTrkSolidConeDR04();
997  isolationVariables04.nTrkHollowCone = egPhotonRef_[iphot]->nTrkHollowConeDR04();
998  myPhoton.setIsolationVariables(isolationVariables04, isolationVariables03);
999 
1001  myPFIso.chargedHadronIso = (*isolationValues[0])[CandidatePtr_[iphot]];
1002  myPFIso.photonIso = (*isolationValues[1])[CandidatePtr_[iphot]];
1003  myPFIso.neutralHadronIso = (*isolationValues[2])[CandidatePtr_[iphot]];
1004  myPhoton.setPflowIsolationVariables(myPFIso);
1005 
1006  reco::Photon::PflowIDVariables myPFVariables;
1007 
1008  reco::Mustache myMustache;
1009  myMustache.MustacheID(
1010  *(myPhoton.parentSuperCluster()), myPFVariables.nClusterOutsideMustache, myPFVariables.etOutsideMustache);
1011  myPFVariables.mva = pfPhotonMva_[iphot];
1012  myPhoton.setPflowIDVariables(myPFVariables);
1013 
1014  //cout << "chargedHadronIso="<<myPhoton.chargedHadronIso()<<" photonIso="<<myPhoton.photonIso()<<" neutralHadronIso="<<myPhoton.neutralHadronIso()<<endl;
1015 
1016  // set PF-regression energy
1017  myPhoton.setCorrectedEnergy(
1019 
1020  /*
1021  if (basicClusters_[iphot].size()>0){
1022  // Cluster shape variables
1023  //Algorithms from EcalClusterTools could be adapted to PF photons ? (not based on 5x5 BC)
1024  //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)
1025  const EcalRecHitCollection* hits = 0 ;
1026  int subdet = PCref->parentSuperCluster()->seed()->hitsAndFractions()[0].first.subdetId();
1027  if (subdet==EcalBarrel) hits = barrelRecHits;
1028  else if (subdet==EcalEndcap) hits = endcapRecHits;
1029  const CaloGeometry* geometry = theCaloGeom_.product();
1030 
1031  float maxXtal = EcalClusterTools::eMax( *(PCref->parentSuperCluster()->seed()), &(*hits) );
1032  //cout << "maxXtal="<<maxXtal<<endl;
1033  float e1x5 = EcalClusterTools::e1x5( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology));
1034  //cout << "e1x5="<<e1x5<<endl;
1035  float e2x5 = EcalClusterTools::e2x5Max( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology));
1036  //cout << "e2x5="<<e2x5<<endl;
1037  float e3x3 = EcalClusterTools::e3x3( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology));
1038  //cout << "e3x3="<<e3x3<<endl;
1039  float e5x5 = EcalClusterTools::e5x5( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology));
1040  //cout << "e5x5="<<e5x5<<endl;
1041  std::vector<float> cov = EcalClusterTools::covariances( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology), geometry);
1042  float sigmaEtaEta = sqrt(cov[0]);
1043  //cout << "sigmaEtaEta="<<sigmaEtaEta<<endl;
1044  std::vector<float> locCov = EcalClusterTools::localCovariances( *(PCref->parentSuperCluster()->seed()), &(*hits), &(*topology));
1045  float sigmaIetaIeta = sqrt(locCov[0]);
1046  //cout << "sigmaIetaIeta="<<sigmaIetaIeta<<endl;
1047  //float r9 =e3x3/(PCref->parentSuperCluster()->rawEnergy());
1048 
1049 
1050  // calculate HoE
1051  const CaloTowerCollection* hcalTowersColl = hcalTowersHandle.product();
1052  EgammaTowerIsolation towerIso1(hOverEConeSize_,0.,0.,1,hcalTowersColl) ;
1053  EgammaTowerIsolation towerIso2(hOverEConeSize_,0.,0.,2,hcalTowersColl) ;
1054  double HoE1=towerIso1.getTowerESum(&(*PCref->parentSuperCluster()))/PCref->pfSuperCluster()->energy();
1055  double HoE2=towerIso2.getTowerESum(&(*PCref->parentSuperCluster()))/PCref->pfSuperCluster()->energy();
1056  //cout << "HoE1="<<HoE1<<endl;
1057  //cout << "HoE2="<<HoE2<<endl;
1058 
1059  reco::Photon::ShowerShape showerShape;
1060  showerShape.e1x5= e1x5;
1061  showerShape.e2x5= e2x5;
1062  showerShape.e3x3= e3x3;
1063  showerShape.e5x5= e5x5;
1064  showerShape.maxEnergyXtal = maxXtal;
1065  showerShape.sigmaEtaEta = sigmaEtaEta;
1066  showerShape.sigmaIetaIeta = sigmaIetaIeta;
1067  showerShape.hcalDepth1OverEcal = HoE1;
1068  showerShape.hcalDepth2OverEcal = HoE2;
1069  myPhoton.setShowerShapeVariables ( showerShape );
1070  //cout << "shower shape variables filled"<<endl;
1071  }
1072  */
1073 
1074  photons.push_back(myPhoton);
1075  }
1076 
1077  //std::cout << "end of createPhotons"<<std::endl;
1078 }
void MustacheID(const CaloClusterPtrVector &clusters, int &nclusters, float &EoutsideMustache)
Definition: Mustache.cc:148
std::vector< float > pfPhotonMva_
std::vector< reco::PhotonRef > egPhotonRef_
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::vector< float > energyRegression_
std::vector< reco::CandidatePtr > CandidatePtr_
std::vector< float > energyRegressionError_
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
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_
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(), and reco::SuperCluster::setSeed().

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_
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 runTheMatrix::err, newFWLiteAna::found, and edm::Event::getByLabel().

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 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:488
void PFPhotonTranslator::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 199 of file PFPhotonTranslator.cc.

References reco::PFBlockElement::ECAL, bookConverter::elements, reco::PFCandidate::elementsInBlocks(), reco::PFCandidate::gamma, edm::Event::getByLabel(), mps_fire::i, edm::Ref< C, T, F >::isNull(), electronProducer_cff::isolationValues, edm::HandleBase::isValid(), dqmiolumiharvest::j, eostools::move(), reco::PFCandidate::mva_nothing_gamma(), gedPhotons_cfi::outputPhotonCollection, reco::PFCandidate::particleId(), zmumugammaAnalyzer_cfi::pfCandidates, reco::PFCandidate::photonExtraRef(), edm::Handle< T >::product(), reco::PFBlockElement::PS1, reco::PFBlockElement::PS2, edm::Event::put(), edm::RefVector< C, T, F >::size(), mps_update::status, reco::PFCandidate::superClusterRef(), reco::PFBlockElement::type(), and spclusmultinvestigator_cfi::vertexCollection.

199  {
200  //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 
221  bool status = fetchCandidateCollection(pfCandidates, inputTagPFCandidates_, iEvent);
222 
224  iEvent.getByLabel(EGPhotonCollection_, egPhotons);
225 
226  Handle<reco::VertexCollection> vertexHandle;
227 
229  for (size_t j = 0; j < inputTagIsoVals_.size(); ++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 towers 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, hcalTowersHandle, isolationValues, outputPhotonCollection);
523  if (status)
524  createPhotons(vertexCollection, egPhotons, pcRefProd, isolationValues, outputPhotonCollection);
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_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
void createBasicClusterPtrs(const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
std::string PFPhotonCoreCollection_
float mva_nothing_gamma() const
mva for gamma detection
Definition: PFCandidate.h:334
std::vector< float > pfPhotonMva_
std::string PFConversionCollection_
std::vector< reco::ConversionRefVector > pfConv_
std::vector< int > conv2legPFCandidateIndex_
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::string PFPhotonCollection_
void createSuperClusters(const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const
reco::PFCandidatePhotonExtraRef photonExtraRef() const
return a reference to the photon extra
Definition: PFCandidate.cc:550
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
Definition: ConversionFwd.h:9
std::vector< edm::InputTag > inputTagIsoVals_
std::vector< reco::PhotonRef > egPhotonRef_
std::vector< reco::SuperClusterRef > egSCRef_
std::vector< reco::SuperClusterCollection > superClusters_
std::string PFBasicClusterCollection_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
std::string PFSuperClusterCollection_
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
void createPhotonCores(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, const edm::OrphanHandle< reco::ConversionCollection > &oneLegConversionHandle, reco::PhotonCoreCollection &photonCores)
std::vector< int > conv1legPFCandidateIndex_
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
bool isValid() const
Definition: HandleBase.h:70
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:488
bool isNull() const
Checks for null.
Definition: Ref.h:235
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
Definition: Handle.h:69
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)
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:40
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
std::vector< reco::CandidatePtr > CandidatePtr_
std::string EGPhotonCollection_
std::vector< float > energyRegressionError_
virtual ParticleType particleId() const
Definition: PFCandidate.h:366
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:636
def move(src, dest)
Definition: eostools.py:511
std::vector< std::vector< float > > pfSingleLegConvMva_
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
Definition: PFCandidate.cc:558

Member Data Documentation

edm::InputTag PFPhotonTranslator::barrelEcalHits_
private

Definition at line 103 of file PFPhotonTranslator.cc.

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

Definition at line 117 of file PFPhotonTranslator.cc.

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

Definition at line 109 of file PFPhotonTranslator.cc.

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

Definition at line 123 of file PFPhotonTranslator.cc.

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

Definition at line 138 of file PFPhotonTranslator.cc.

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

Definition at line 139 of file PFPhotonTranslator.cc.

std::string PFPhotonTranslator::EGPhotonCollection_
private

Definition at line 101 of file PFPhotonTranslator.cc.

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

Definition at line 127 of file PFPhotonTranslator.cc.

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

Definition at line 125 of file PFPhotonTranslator.cc.

bool PFPhotonTranslator::emptyIsOk_
private

Definition at line 144 of file PFPhotonTranslator.cc.

edm::InputTag PFPhotonTranslator::endcapEcalHits_
private

Definition at line 104 of file PFPhotonTranslator.cc.

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

Definition at line 130 of file PFPhotonTranslator.cc.

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

Definition at line 131 of file PFPhotonTranslator.cc.

edm::InputTag PFPhotonTranslator::hcalTowers_
private

Definition at line 105 of file PFPhotonTranslator.cc.

double PFPhotonTranslator::hOverEConeSize_
private

Definition at line 106 of file PFPhotonTranslator.cc.

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

Definition at line 94 of file PFPhotonTranslator.cc.

edm::InputTag PFPhotonTranslator::inputTagPFCandidates_
private

Definition at line 93 of file PFPhotonTranslator.cc.

std::string PFPhotonTranslator::PFBasicClusterCollection_
private

Definition at line 95 of file PFPhotonTranslator.cc.

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

Definition at line 111 of file PFPhotonTranslator.cc.

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

Definition at line 134 of file PFPhotonTranslator.cc.

std::string PFPhotonTranslator::PFConversionCollection_
private

Definition at line 100 of file PFPhotonTranslator.cc.

std::string PFPhotonTranslator::PFPhotonCollection_
private

Definition at line 99 of file PFPhotonTranslator.cc.

std::string PFPhotonTranslator::PFPhotonCoreCollection_
private

Definition at line 98 of file PFPhotonTranslator.cc.

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

Definition at line 129 of file PFPhotonTranslator.cc.

std::string PFPhotonTranslator::PFPreshowerClusterCollection_
private

Definition at line 96 of file PFPhotonTranslator.cc.

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

Definition at line 135 of file PFPhotonTranslator.cc.

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

Definition at line 136 of file PFPhotonTranslator.cc.

std::string PFPhotonTranslator::PFSuperClusterCollection_
private

Definition at line 97 of file PFPhotonTranslator.cc.

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

Definition at line 121 of file PFPhotonTranslator.cc.

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

Definition at line 119 of file PFPhotonTranslator.cc.

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

Definition at line 113 of file PFPhotonTranslator.cc.

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

Definition at line 115 of file PFPhotonTranslator.cc.

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

Definition at line 142 of file PFPhotonTranslator.cc.

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

Definition at line 141 of file PFPhotonTranslator.cc.

std::string PFPhotonTranslator::vertexProducer_
private

Definition at line 102 of file PFPhotonTranslator.cc.