CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
PFPhotonTranslator Class Reference

#include <PFPhotonTranslator.h>

Inheritance diagram for PFPhotonTranslator:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef std::vector
< edm::Handle< edm::ValueMap
< double > > > 
IsolationValueMaps
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 

Public Member Functions

 PFPhotonTranslator (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PFPhotonTranslator ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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::CaloClusterPtrVector
basicClusterPtr_
 
std::vector
< reco::BasicClusterCollection
basicClusters_
 
std::vector< reco::CandidatePtrCandidatePtr_
 
std::vector< int > conv1legPFCandidateIndex_
 
std::vector< int > conv2legPFCandidateIndex_
 
std::string EGPhotonCollection_
 
std::vector< reco::PhotonRefegPhotonRef_
 
std::vector
< reco::SuperClusterRef
egSCRef_
 
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::ConversionRefVector
pfConv_
 
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::CaloClusterPtrVector
preshowerClusterPtr_
 
std::vector
< reco::PreshowerClusterCollection
preshowerClusters_
 
std::vector
< reco::SuperClusterCollection
superClusters_
 
edm::ESHandle< CaloGeometrytheCaloGeom_
 
edm::ESHandle< CaloTopologytheCaloTopo_
 
std::string vertexProducer_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 60 of file PFPhotonTranslator.h.

Member Typedef Documentation

Definition at line 68 of file PFPhotonTranslator.h.

Constructor & Destructor Documentation

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

Definition at line 64 of file PFPhotonTranslator.cc.

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

64  {
65 
66  //std::cout << "PFPhotonTranslator" << std::endl;
67 
69  = iConfig.getParameter<edm::InputTag>("PFCandidate");
70 
71  edm::ParameterSet isoVals = iConfig.getParameter<edm::ParameterSet> ("isolationValues");
72  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfChargedHadrons"));
73  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfPhotons"));
74  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfNeutralHadrons"));
75 
76 
77  PFBasicClusterCollection_ = iConfig.getParameter<std::string>("PFBasicClusters");
78  PFPreshowerClusterCollection_ = iConfig.getParameter<std::string>("PFPreshowerClusters");
79  PFSuperClusterCollection_ = iConfig.getParameter<std::string>("PFSuperClusters");
80  PFConversionCollection_ = iConfig.getParameter<std::string>("PFConversionCollection");
81  PFPhotonCoreCollection_ = iConfig.getParameter<std::string>("PFPhotonCores");
82  PFPhotonCollection_ = iConfig.getParameter<std::string>("PFPhotons");
83 
84  EGPhotonCollection_ = iConfig.getParameter<std::string>("EGPhotons");
85 
86  vertexProducer_ = iConfig.getParameter<std::string>("primaryVertexProducer");
87 
88  barrelEcalHits_ = iConfig.getParameter<edm::InputTag>("barrelEcalHits");
89  endcapEcalHits_ = iConfig.getParameter<edm::InputTag>("endcapEcalHits");
90 
91  hcalTowers_ = iConfig.getParameter<edm::InputTag>("hcalTowers");
92  hOverEConeSize_ = iConfig.getParameter<double>("hOverEConeSize");
93 
94  if (iConfig.exists("emptyIsOk")) emptyIsOk_ = iConfig.getParameter<bool>("emptyIsOk");
95  else emptyIsOk_=false;
96 
97  produces<reco::BasicClusterCollection>(PFBasicClusterCollection_);
98  produces<reco::PreshowerClusterCollection>(PFPreshowerClusterCollection_);
99  produces<reco::SuperClusterCollection>(PFSuperClusterCollection_);
100  produces<reco::PhotonCoreCollection>(PFPhotonCoreCollection_);
101  produces<reco::PhotonCollection>(PFPhotonCollection_);
102  produces<reco::ConversionCollection>(PFConversionCollection_);
103 }
T getParameter(std::string const &) const
std::string PFPhotonCoreCollection_
std::string PFConversionCollection_
edm::InputTag hcalTowers_
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 ( )

Definition at line 105 of file PFPhotonTranslator.cc.

105 {}

Member Function Documentation

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

Definition at line 1044 of file PFPhotonTranslator.cc.

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

1045 {
1046  unsigned refindex=pfbe.index();
1047  // std::cout << " N daughters " << cand.numberOfDaughters() << std::endl;
1048  reco::PFCandidate::const_iterator myDaughterCandidate=cand.begin();
1050 
1051  for(;myDaughterCandidate!=itend;++myDaughterCandidate)
1052  {
1053  const reco::PFCandidate * myPFCandidate = (const reco::PFCandidate*)&*myDaughterCandidate;
1054  if(myPFCandidate->elementsInBlocks().size()!=1)
1055  {
1056  // std::cout << " Daughter with " << myPFCandidate.elementsInBlocks().size()<< " element in block " << std::endl;
1057  return cand;
1058  }
1059  if(myPFCandidate->elementsInBlocks()[0].second==refindex)
1060  {
1061  // std::cout << " Found it " << cand << std::endl;
1062  return *myPFCandidate;
1063  }
1064  }
1065  return cand;
1066 }
virtual const_iterator end() const
last daughter const_iterator
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.h:365
unsigned index() const
virtual const_iterator begin() const
first daughter const_iterator
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:35
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 526 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().

530 {
531  reco::PFClusterRef myPFClusterRef = PFBE.clusterRef();
532  if(myPFClusterRef.isNull()) return;
533 
534  const reco::PFCluster & myPFCluster (*myPFClusterRef);
535  pfClusters.push_back(&myPFCluster);
536  //std::cout << " Creating BC " << myPFCluster.energy() << " " << coCandidate.ecalEnergy() <<" "<< coCandidate.rawEcalEnergy() <<std::endl;
537  //std::cout << " # hits " << myPFCluster.hitsAndFractions().size() << std::endl;
538 
539 // basicClusters.push_back(reco::CaloCluster(myPFCluster.energy(),
540  basicClusters.push_back(reco::CaloCluster(//coCandidate.rawEcalEnergy(),
541  myPFCluster.energy(),
542  myPFCluster.position(),
543  myPFCluster.caloID(),
544  myPFCluster.hitsAndFractions(),
545  myPFCluster.algo(),
546  myPFCluster.seed()));
547 }
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
bool isNull() const
Checks for null.
Definition: Ref.h:247
virtual PFClusterRef clusterRef() const
void PFPhotonTranslator::createBasicClusterPtrs ( const edm::OrphanHandle< reco::BasicClusterCollection > &  basicClustersHandle)
private

Definition at line 556 of file PFPhotonTranslator.cc.

References findQualityFiles::size.

557 {
558  unsigned size=photPFCandidateIndex_.size();
559  unsigned basicClusterCounter=0;
560  basicClusterPtr_.resize(size);
561 
562  for(unsigned iphot=0;iphot<size;++iphot) // loop on tracks
563  {
564  unsigned nbc=basicClusters_[iphot].size();
565  for(unsigned ibc=0;ibc<nbc;++ibc) // loop on basic clusters
566  {
567  // std::cout << "Track "<< iGSF << " ref " << basicClusterCounter << std::endl;
568  reco::CaloClusterPtr bcPtr(basicClustersHandle,basicClusterCounter);
569  basicClusterPtr_[iphot].push_back(bcPtr);
570  ++basicClusterCounter;
571  }
572  }
573 }
std::vector< int > photPFCandidateIndex_
std::vector< reco::BasicClusterCollection > basicClusters_
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
tuple size
Write out results.
void PFPhotonTranslator::createOneLegConversions ( const edm::OrphanHandle< reco::SuperClusterCollection > &  superClustersHandle,
reco::ConversionCollection oneLegConversions 
)
private

Definition at line 693 of file PFPhotonTranslator.cc.

References error, reco::Conversion::pflow, reco::Conversion::setOneLegMVA(), X, and Gflash::Z.

694 {
695 
696  //std::cout << "createOneLegConversions" << std::endl;
697 
698  unsigned nphot=photPFCandidateIndex_.size();
699  for(unsigned iphot=0;iphot<nphot;++iphot)
700  {
701 
702  //if (conv1legPFCandidateIndex_[iphot]==-1) cout << "No OneLegConversions to add"<<endl;
703  //else std::cout << "Phot "<<iphot<< " nOneLegConversions to add : "<<pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]].size()<<endl;
704 
705 
706  if (conv1legPFCandidateIndex_[iphot]>-1){
707 
708  for (unsigned iConv=0; iConv<pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]].size(); iConv++){
709 
711  std::vector<reco::CaloClusterPtr>matchingBC;
713  const reco::Vertex * convVtx = new reco::Vertex(pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->innerPosition(), error);
714 
715  //cout << "Vtx x="<<convVtx->x() << " y="<< convVtx->y()<<" z="<<convVtx->z()<< endl;
716  //cout << "VtxError x=" << convVtx->xError() << endl;
717 
718  std::vector<reco::TrackRef> OneLegConvVector;
719  OneLegConvVector.push_back(pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]);
720 
721  reco::CaloClusterPtrVector clu=scPtrVec;
722  std::vector<reco::TrackRef> tr=OneLegConvVector;
723  std::vector<math::XYZPointF>trackPositionAtEcalVec;
724  std::vector<math::XYZPointF>innPointVec;
725  std::vector<math::XYZVectorF>trackPinVec;
726  std::vector<math::XYZVectorF>trackPoutVec;
727  math::XYZPointF trackPositionAtEcal(pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->
728  outerPosition().X(),
730  outerPosition().Y(),
732  outerPosition().Z());
734  innerPosition().X(),
736  innerPosition().Y(),
738  innerPosition().Z());
740  innerMomentum().X(),
742  innerMomentum().Y(),
744  innerMomentum().Z());
746  outerMomentum().X(),
748  outerMomentum().Y(),
750  outerMomentum().Z());
751  float DCA=pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]][iConv]->d0();
752  trackPositionAtEcalVec.push_back(trackPositionAtEcal);
753  innPointVec.push_back(innPoint);
754  trackPinVec.push_back(trackPin);
755  trackPoutVec.push_back(trackPout);
756  std::vector< float > OneLegMvaVector;
757  reco::Conversion myOneLegConversion(scPtrVec,
758  OneLegConvVector,
759  trackPositionAtEcalVec,
760  *convVtx,
761  matchingBC,
762  DCA,
763  innPointVec,
764  trackPinVec,
765  trackPoutVec,
768  OneLegMvaVector.push_back(pfSingleLegConvMva_[conv1legPFCandidateIndex_[iphot]][iConv]);
769  myOneLegConversion.setOneLegMVA(OneLegMvaVector);
770  //reco::Conversion myOneLegConversion(scPtrVec,
771  //OneLegConvVector, *convVtx, reco::Conversion::pflow);
772 
773  /*
774  std::cout << "One leg conversion created" << endl;
775  std::vector<edm::RefToBase<reco::Track> > convtracks = myOneLegConversion.tracks();
776  const std::vector<float> mvalist = myOneLegConversion.oneLegMVA();
777 
778  cout << "nTracks="<< convtracks.size()<<endl;
779  for (unsigned int itk=0; itk<convtracks.size(); itk++){
780  //double convtrackpt = convtracks[itk]->pt();
781  std::cout << "Track pt="<< convtracks[itk]->pt() << std::endl;
782  std::cout << "Track mva="<< mvalist[itk] << std::endl;
783  }
784  */
785  oneLegConversions.push_back(myOneLegConversion);
786 
787  //cout << "OneLegConv added"<<endl;
788 
789  }
790  }
791  }
792 }
const double Z[kNumberCalorimeter]
#define X(str)
Definition: MuonsGrabber.cc:49
ErrorD< N >::type type
Definition: Error.h:30
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:11
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
std::vector< std::vector< float > > pfSingleLegConvMva_
std::vector< int > conv1legPFCandidateIndex_
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
Definition: Vector3D.h:18
std::vector< int > photPFCandidateIndex_
void PFPhotonTranslator::createPhotonCores ( const edm::OrphanHandle< reco::SuperClusterCollection > &  superClustersHandle,
const edm::OrphanHandle< reco::ConversionCollection > &  oneLegConversionHandle,
reco::PhotonCoreCollection photonCores 
)
private

Definition at line 795 of file PFPhotonTranslator.cc.

References reco::PhotonCore::addConversion(), reco::PhotonCore::addElectronPixelSeed(), reco::PhotonCore::addOneLegConversion(), iseed, reco::PhotonCore::setPFlowPhoton(), reco::PhotonCore::setPflowSuperCluster(), reco::PhotonCore::setStandardPhoton(), reco::PhotonCore::setSuperCluster(), and edm::RefVector< C, T, F >::size().

796 {
797 
798  //std::cout << "createPhotonCores" << std::endl;
799 
800  unsigned nphot=photPFCandidateIndex_.size();
801 
802  unsigned i1legtot = 0;
803 
804  for(unsigned iphot=0;iphot<nphot;++iphot)
805  {
806  //std::cout << "iphot="<<iphot<<std::endl;
807 
808  reco::PhotonCore myPhotonCore;
809 
810  reco::SuperClusterRef SCref(reco::SuperClusterRef(superClustersHandle, iphot));
811 
812  myPhotonCore.setPFlowPhoton(true);
813  myPhotonCore.setStandardPhoton(false);
814  myPhotonCore.setPflowSuperCluster(SCref);
815  myPhotonCore.setSuperCluster(egSCRef_[iphot]);
816 
817  reco::ElectronSeedRefVector pixelSeeds = egPhotonRef_[iphot]->electronPixelSeeds();
818  for (unsigned iseed=0; iseed<pixelSeeds.size(); iseed++){
819  myPhotonCore.addElectronPixelSeed(pixelSeeds[iseed]);
820  }
821 
822  //cout << "PhotonCores : SC OK" << endl;
823 
824  //cout << "conv1legPFCandidateIndex_[iphot]="<<conv1legPFCandidateIndex_[iphot]<<endl;
825  //cout << "conv2legPFCandidateIndex_[iphot]="<<conv2legPFCandidateIndex_[iphot]<<endl;
826 
827  if (conv1legPFCandidateIndex_[iphot]>-1){
828  for (unsigned int iConv=0; iConv<pfSingleLegConv_[conv1legPFCandidateIndex_[iphot]].size(); iConv++){
829 
830  const reco::ConversionRef & OneLegRef(reco::ConversionRef(oneLegConversionHandle, i1legtot));
831  myPhotonCore.addOneLegConversion(OneLegRef);
832 
833  //cout << "PhotonCores : 1-leg OK" << endl;
834  /*
835  cout << "Testing 1-leg :"<<endl;
836  const reco::ConversionRefVector & conv = myPhotonCore.conversionsOneLeg();
837  for (unsigned int iconv=0; iconv<conv.size(); iconv++){
838  cout << "Testing 1-leg : iconv="<<iconv<<endl;
839  cout << "Testing 1-leg : nTracks="<<conv[iconv]->nTracks()<<endl;
840  cout << "Testing 1-leg : EoverP="<<conv[iconv]->EoverP()<<endl;
841  std::vector<edm::RefToBase<reco::Track> > convtracks = conv[iconv]->tracks();
842  for (unsigned int itk=0; itk<convtracks.size(); itk++){
843  //double convtrackpt = convtracks[itk]->pt();
844  std::cout << "Testing 1-leg : Track pt="<< convtracks[itk]->pt() << std::endl;
845  // std::cout << "Track mva="<< mvalist[itk] << std::endl;
846  }
847  }
848  */
849 
850  i1legtot++;
851  }
852  }
853 
854  if (conv2legPFCandidateIndex_[iphot]>-1){
855  for(unsigned int iConv=0; iConv<pfConv_[conv2legPFCandidateIndex_[iphot]].size(); iConv++) {
856 
857  const reco::ConversionRef & TwoLegRef(pfConv_[conv2legPFCandidateIndex_[iphot]][iConv]);
858  myPhotonCore.addConversion(TwoLegRef);
859 
860  }
861  //cout << "PhotonCores : 2-leg OK" << endl;
862 
863  /*
864  cout << "Testing 2-leg :"<<endl;
865  const reco::ConversionRefVector & conv = myPhotonCore.conversions();
866  for (unsigned int iconv=0; iconv<conv.size(); iconv++){
867  cout << "Testing 2-leg : iconv="<<iconv<<endl;
868  cout << "Testing 2-leg : nTracks="<<conv[iconv]->nTracks()<<endl;
869  cout << "Testing 2-leg : EoverP="<<conv[iconv]->EoverP()<<endl;
870  std::vector<edm::RefToBase<reco::Track> > convtracks = conv[iconv]->tracks();
871  for (unsigned int itk=0; itk<convtracks.size(); itk++){
872  //double convtrackpt = convtracks[itk]->pt();
873  std::cout << "Testing 2-leg : Track pt="<< convtracks[itk]->pt() << std::endl;
874  // std::cout << "Track mva="<< mvalist[itk] << std::endl;
875  }
876  }
877  */
878  }
879 
880  photonCores.push_back(myPhotonCore);
881 
882  }
883 
884  //std::cout << "end of createPhotonCores"<<std::endl;
885 }
void setPflowSuperCluster(const reco::SuperClusterRef &r)
set reference to PFlow SuperCluster
Definition: PhotonCore.h:53
void setSuperCluster(const reco::SuperClusterRef &r)
set reference to SuperCluster
Definition: PhotonCore.h:51
void addOneLegConversion(const reco::ConversionRef &r)
add single ConversionRef to the vector of Refs
Definition: PhotonCore.h:57
void addConversion(const reco::ConversionRef &r)
add single ConversionRef to the vector of Refs
Definition: PhotonCore.h:55
std::vector< reco::ConversionRefVector > pfConv_
std::vector< int > conv2legPFCandidateIndex_
std::vector< reco::PhotonRef > egPhotonRef_
std::vector< reco::SuperClusterRef > egSCRef_
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
void setStandardPhoton(const bool prov)
Definition: PhotonCore.h:62
std::vector< int > conv1legPFCandidateIndex_
void setPFlowPhoton(const bool prov)
set the provenance
Definition: PhotonCore.h:61
std::vector< int > photPFCandidateIndex_
int iseed
Definition: AMPTWrapper.h:124
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
void addElectronPixelSeed(const reco::ElectronSeedRef &r)
set electron pixel seed ref
Definition: PhotonCore.h:59
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 888 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::Mustache::MustacheID(), reco::Photon::PflowIDVariables::mva, reco::Photon::PflowIDVariables::nClusterOutsideMustache, reco::Photon::PflowIsolationVariables::neutralHadronIso, reco::Photon::IsolationVariables::nTrkHollowCone, reco::Photon::IsolationVariables::nTrkSolidCone, reco::Photon::PflowIsolationVariables::photonIso, reco::Photon::regression2, reco::Photon::IsolationVariables::trkSumPtHollowCone, and reco::Photon::IsolationVariables::trkSumPtSolidCone.

889 {
890 
891  //cout << "createPhotons" << endl;
892 
893  unsigned nphot=photPFCandidateIndex_.size();
894 
895  for(unsigned iphot=0;iphot<nphot;++iphot)
896  {
897  //std::cout << "iphot="<<iphot<<std::endl;
898 
899  reco::PhotonCoreRef PCref(reco::PhotonCoreRef(photonCoresHandle, iphot));
900 
901  math::XYZPoint vtx(0.,0.,0.);
902  if (vertexCollection.size()>0) vtx = vertexCollection.begin()->position();
903  //std::cout << "vtx made" << std::endl;
904 
905  math::XYZVector direction = PCref->pfSuperCluster()->position() - vtx;
906 
907  //It could be that pfSC energy gives not the best resolution : use smaller agregates for some cases ?
908  math::XYZVector P3 = direction.unit() * PCref->pfSuperCluster()->energy();
909  LorentzVector P4(P3.x(), P3.y(), P3.z(), PCref->pfSuperCluster()->energy());
910 
911  reco::Photon myPhoton(P4, PCref->pfSuperCluster()->position(), PCref, vtx);
912  //cout << "photon created"<<endl;
913 
914 
915 
916  reco::Photon::ShowerShape showerShape;
917  reco::Photon::FiducialFlags fiducialFlags;
918  reco::Photon::IsolationVariables isolationVariables03;
919  reco::Photon::IsolationVariables isolationVariables04;
920 
921  showerShape.e1x5= egPhotonRef_[iphot]->e1x5();
922  showerShape.e2x5= egPhotonRef_[iphot]->e2x5();
923  showerShape.e3x3= egPhotonRef_[iphot]->e3x3();
924  showerShape.e5x5= egPhotonRef_[iphot]->e5x5();
925  showerShape.maxEnergyXtal = egPhotonRef_[iphot]->maxEnergyXtal();
926  showerShape.sigmaEtaEta = egPhotonRef_[iphot]->sigmaEtaEta();
927  showerShape.sigmaIetaIeta = egPhotonRef_[iphot]->sigmaIetaIeta();
928  showerShape.hcalDepth1OverEcal = egPhotonRef_[iphot]->hadronicDepth1OverEm();
929  showerShape.hcalDepth2OverEcal = egPhotonRef_[iphot]->hadronicDepth2OverEm();
930  myPhoton.setShowerShapeVariables ( showerShape );
931 
932  fiducialFlags.isEB = egPhotonRef_[iphot]->isEB();
933  fiducialFlags.isEE = egPhotonRef_[iphot]->isEE();
934  fiducialFlags.isEBEtaGap = egPhotonRef_[iphot]->isEBEtaGap();
935  fiducialFlags.isEBPhiGap = egPhotonRef_[iphot]->isEBPhiGap();
936  fiducialFlags.isEERingGap = egPhotonRef_[iphot]->isEERingGap();
937  fiducialFlags.isEEDeeGap = egPhotonRef_[iphot]->isEEDeeGap();
938  fiducialFlags.isEBEEGap = egPhotonRef_[iphot]->isEBEEGap();
939  myPhoton.setFiducialVolumeFlags ( fiducialFlags );
940 
941  isolationVariables03.ecalRecHitSumEt = egPhotonRef_[iphot]->ecalRecHitSumEtConeDR03();
942  isolationVariables03.hcalTowerSumEt = egPhotonRef_[iphot]->hcalTowerSumEtConeDR03();
943  isolationVariables03.hcalDepth1TowerSumEt = egPhotonRef_[iphot]->hcalDepth1TowerSumEtConeDR03();
944  isolationVariables03.hcalDepth2TowerSumEt = egPhotonRef_[iphot]->hcalDepth2TowerSumEtConeDR03();
945  isolationVariables03.trkSumPtSolidCone = egPhotonRef_[iphot]->trkSumPtSolidConeDR03();
946  isolationVariables03.trkSumPtHollowCone = egPhotonRef_[iphot]->trkSumPtHollowConeDR03();
947  isolationVariables03.nTrkSolidCone = egPhotonRef_[iphot]->nTrkSolidConeDR03();
948  isolationVariables03.nTrkHollowCone = egPhotonRef_[iphot]->nTrkHollowConeDR03();
949  isolationVariables04.ecalRecHitSumEt = egPhotonRef_[iphot]->ecalRecHitSumEtConeDR04();
950  isolationVariables04.hcalTowerSumEt = egPhotonRef_[iphot]->hcalTowerSumEtConeDR04();
951  isolationVariables04.hcalDepth1TowerSumEt = egPhotonRef_[iphot]->hcalDepth1TowerSumEtConeDR04();
952  isolationVariables04.hcalDepth2TowerSumEt = egPhotonRef_[iphot]->hcalDepth2TowerSumEtConeDR04();
953  isolationVariables04.trkSumPtSolidCone = egPhotonRef_[iphot]->trkSumPtSolidConeDR04();
954  isolationVariables04.trkSumPtHollowCone = egPhotonRef_[iphot]->trkSumPtHollowConeDR04();
955  isolationVariables04.nTrkSolidCone = egPhotonRef_[iphot]->nTrkSolidConeDR04();
956  isolationVariables04.nTrkHollowCone = egPhotonRef_[iphot]->nTrkHollowConeDR04();
957  myPhoton.setIsolationVariables(isolationVariables04, isolationVariables03);
958 
959 
960 
961 
963  myPFIso.chargedHadronIso=(*isolationValues[0])[CandidatePtr_[iphot]];
964  myPFIso.photonIso=(*isolationValues[1])[CandidatePtr_[iphot]];
965  myPFIso.neutralHadronIso=(*isolationValues[2])[CandidatePtr_[iphot]];
966  myPhoton.setPflowIsolationVariables(myPFIso);
967 
968  reco::Photon::PflowIDVariables myPFVariables;
969 
970  reco::Mustache myMustache;
971  myMustache.MustacheID(*(myPhoton.pfSuperCluster()), myPFVariables.nClusterOutsideMustache, myPFVariables.etOutsideMustache );
972  myPFVariables.mva = pfPhotonMva_[iphot];
973  myPhoton.setPflowIDVariables(myPFVariables);
974 
975  //cout << "chargedHadronIso="<<myPhoton.chargedHadronIso()<<" photonIso="<<myPhoton.photonIso()<<" neutralHadronIso="<<myPhoton.neutralHadronIso()<<endl;
976 
977  // set PF-regression energy
978  myPhoton.setCorrectedEnergy(reco::Photon::regression2,energyRegression_[iphot],energyRegressionError_[iphot],false);
979 
980 
981  /*
982  if (basicClusters_[iphot].size()>0){
983  // Cluster shape variables
984  //Algorithms from EcalClusterTools could be adapted to PF photons ? (not based on 5x5 BC)
985  //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)
986  const EcalRecHitCollection* hits = 0 ;
987  int subdet = PCref->pfSuperCluster()->seed()->hitsAndFractions()[0].first.subdetId();
988  if (subdet==EcalBarrel) hits = barrelRecHits;
989  else if (subdet==EcalEndcap) hits = endcapRecHits;
990  const CaloGeometry* geometry = theCaloGeom_.product();
991 
992  float maxXtal = EcalClusterTools::eMax( *(PCref->pfSuperCluster()->seed()), &(*hits) );
993  //cout << "maxXtal="<<maxXtal<<endl;
994  float e1x5 = EcalClusterTools::e1x5( *(PCref->pfSuperCluster()->seed()), &(*hits), &(*topology));
995  //cout << "e1x5="<<e1x5<<endl;
996  float e2x5 = EcalClusterTools::e2x5Max( *(PCref->pfSuperCluster()->seed()), &(*hits), &(*topology));
997  //cout << "e2x5="<<e2x5<<endl;
998  float e3x3 = EcalClusterTools::e3x3( *(PCref->pfSuperCluster()->seed()), &(*hits), &(*topology));
999  //cout << "e3x3="<<e3x3<<endl;
1000  float e5x5 = EcalClusterTools::e5x5( *(PCref->pfSuperCluster()->seed()), &(*hits), &(*topology));
1001  //cout << "e5x5="<<e5x5<<endl;
1002  std::vector<float> cov = EcalClusterTools::covariances( *(PCref->pfSuperCluster()->seed()), &(*hits), &(*topology), geometry);
1003  float sigmaEtaEta = sqrt(cov[0]);
1004  //cout << "sigmaEtaEta="<<sigmaEtaEta<<endl;
1005  std::vector<float> locCov = EcalClusterTools::localCovariances( *(PCref->pfSuperCluster()->seed()), &(*hits), &(*topology));
1006  float sigmaIetaIeta = sqrt(locCov[0]);
1007  //cout << "sigmaIetaIeta="<<sigmaIetaIeta<<endl;
1008  //float r9 =e3x3/(PCref->pfSuperCluster()->rawEnergy());
1009 
1010 
1011  // calculate HoE
1012  const CaloTowerCollection* hcalTowersColl = hcalTowersHandle.product();
1013  EgammaTowerIsolation towerIso1(hOverEConeSize_,0.,0.,1,hcalTowersColl) ;
1014  EgammaTowerIsolation towerIso2(hOverEConeSize_,0.,0.,2,hcalTowersColl) ;
1015  double HoE1=towerIso1.getTowerESum(&(*PCref->pfSuperCluster()))/PCref->pfSuperCluster()->energy();
1016  double HoE2=towerIso2.getTowerESum(&(*PCref->pfSuperCluster()))/PCref->pfSuperCluster()->energy();
1017  //cout << "HoE1="<<HoE1<<endl;
1018  //cout << "HoE2="<<HoE2<<endl;
1019 
1020  reco::Photon::ShowerShape showerShape;
1021  showerShape.e1x5= e1x5;
1022  showerShape.e2x5= e2x5;
1023  showerShape.e3x3= e3x3;
1024  showerShape.e5x5= e5x5;
1025  showerShape.maxEnergyXtal = maxXtal;
1026  showerShape.sigmaEtaEta = sigmaEtaEta;
1027  showerShape.sigmaIetaIeta = sigmaIetaIeta;
1028  showerShape.hcalDepth1OverEcal = HoE1;
1029  showerShape.hcalDepth2OverEcal = HoE2;
1030  myPhoton.setShowerShapeVariables ( showerShape );
1031  //cout << "shower shape variables filled"<<endl;
1032  }
1033  */
1034 
1035 
1036  photons.push_back(myPhoton);
1037 
1038  }
1039 
1040  //std::cout << "end of createPhotons"<<std::endl;
1041 }
void MustacheID(const CaloClusterPtrVector &clusters, int &nclusters, float &EoutsideMustache)
Definition: Mustache.cc:114
std::vector< float > pfPhotonMva_
math::XYZTLorentzVector LorentzVector
tuple vertexCollection
std::vector< reco::PhotonRef > egPhotonRef_
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:13
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 549 of file PFPhotonTranslator.cc.

References reco::PFBlockElement::clusterRef().

550 {
551  reco::PFClusterRef myPFClusterRef= PFBE.clusterRef();
552  preshowerClusters.push_back(reco::PreshowerCluster(myPFClusterRef->energy(),myPFClusterRef->position(),
553  myPFClusterRef->hitsAndFractions(),plane));
554 }
virtual PFClusterRef clusterRef() const
void PFPhotonTranslator::createPreshowerClusterPtrs ( const edm::OrphanHandle< reco::PreshowerClusterCollection > &  preshowerClustersHandle)
private

Definition at line 575 of file PFPhotonTranslator.cc.

References findQualityFiles::size.

576 {
577  unsigned size=photPFCandidateIndex_.size();
578  unsigned psClusterCounter=0;
579  preshowerClusterPtr_.resize(size);
580 
581  for(unsigned iphot=0;iphot<size;++iphot) // loop on tracks
582  {
583  unsigned nbc=preshowerClusters_[iphot].size();
584  for(unsigned ibc=0;ibc<nbc;++ibc) // loop on basic clusters
585  {
586  // std::cout << "Track "<< iGSF << " ref " << basicClusterCounter << std::endl;
587  reco::CaloClusterPtr psPtr(preshowerClustersHandle,psClusterCounter);
588  preshowerClusterPtr_[iphot].push_back(psPtr);
589  ++psClusterCounter;
590  }
591  }
592 }
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
std::vector< int > photPFCandidateIndex_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
tuple size
Write out results.
void PFPhotonTranslator::createSuperClusters ( const reco::PFCandidateCollection pfCand,
reco::SuperClusterCollection superClusters 
) const
private

Definition at line 594 of file PFPhotonTranslator.cc.

References reco::SuperCluster::addCluster(), reco::CaloCluster::addHitAndFraction(), reco::SuperCluster::addPreshowerCluster(), alignCSCRings::e, PFClusterWidthAlgo::pflowEtaWidth(), PFClusterWidthAlgo::pflowPhiWidth(), reco::SuperCluster::rawEnergy(), reco::SuperCluster::setEtaWidth(), reco::SuperCluster::setPhiWidth(), reco::SuperCluster::setPreshowerEnergy(), and reco::SuperCluster::setSeed().

596 {
597  unsigned nphot=photPFCandidateIndex_.size();
598  for(unsigned iphot=0;iphot<nphot;++iphot)
599  {
600 
601  //cout << "SC iphot=" << iphot << endl;
602 
603  // Computes energy position a la e/gamma
604  double sclusterE=0;
605  double posX=0.;
606  double posY=0.;
607  double posZ=0.;
608 
609  unsigned nbasics=basicClusters_[iphot].size();
610  for(unsigned ibc=0;ibc<nbasics;++ibc)
611  {
612  //cout << "BC in SC : iphot="<<iphot<<endl;
613 
614  double e = basicClusters_[iphot][ibc].energy();
615  sclusterE += e;
616  posX += e * basicClusters_[iphot][ibc].position().X();
617  posY += e * basicClusters_[iphot][ibc].position().Y();
618  posZ += e * basicClusters_[iphot][ibc].position().Z();
619  }
620  posX /=sclusterE;
621  posY /=sclusterE;
622  posZ /=sclusterE;
623 
624  /*
625  if(pfCand[gsfPFCandidateIndex_[iphot]].gsfTrackRef()!=GsfTrackRef_[iphot])
626  {
627  edm::LogError("PFElectronTranslator") << " Major problem in PFElectron Translator" << std::endl;
628  }
629  */
630 
631  // compute the width
632  PFClusterWidthAlgo pfwidth(pfClusters_[iphot]);
633 
634  double correctedEnergy=pfCand[photPFCandidateIndex_[iphot]].ecalEnergy();
635  reco::SuperCluster mySuperCluster(correctedEnergy,math::XYZPoint(posX,posY,posZ));
636  // protection against empty basic cluster collection ; the value is -2 in this case
637  if(nbasics)
638  {
639 // std::cout << "SuperCluster creation; energy " << pfCand[gsfPFCandidateIndex_[iphot]].ecalEnergy();
640 // std::cout << " " << pfCand[gsfPFCandidateIndex_[iphot]].rawEcalEnergy() << std::endl;
641 // std::cout << "Seed energy from basic " << basicClusters_[iphot][0].energy() << std::endl;
642  mySuperCluster.setSeed(basicClusterPtr_[iphot][0]);
643  }
644  else
645  {
646  // std::cout << "SuperCluster creation ; seed energy " << 0 << std::endl;
647  //std::cout << "SuperCluster creation ; energy " << pfCand[photPFCandidateIndex_[iphot]].ecalEnergy();
648  //std::cout << " " << pfCand[photPFCandidateIndex_[iphot]].rawEcalEnergy() << std::endl;
649 // std::cout << " No seed found " << 0 << std::endl;
650 // std::cout << " MVA " << pfCand[gsfPFCandidateIndex_[iphot]].mva_e_pi() << std::endl;
651  mySuperCluster.setSeed(reco::CaloClusterPtr());
652  }
653  // the seed should be the first basic cluster
654 
655  for(unsigned ibc=0;ibc<nbasics;++ibc)
656  {
657  mySuperCluster.addCluster(basicClusterPtr_[iphot][ibc]);
658  // std::cout <<"Adding Ref to SC " << basicClusterPtr_[iphot][ibc].index() << std::endl;
659  const std::vector< std::pair<DetId, float> > & v1 = basicClusters_[iphot][ibc].hitsAndFractions();
660  // std::cout << " Number of cells " << v1.size() << std::endl;
661  for( std::vector< std::pair<DetId, float> >::const_iterator diIt = v1.begin();
662  diIt != v1.end();
663  ++diIt ) {
664  // std::cout << " Adding DetId " << (diIt->first).rawId() << " " << diIt->second << std::endl;
665  mySuperCluster.addHitAndFraction(diIt->first,diIt->second);
666  } // loop over rechits
667  }
668 
669  unsigned nps=preshowerClusterPtr_[iphot].size();
670  for(unsigned ips=0;ips<nps;++ips)
671  {
672  mySuperCluster.addPreshowerCluster(preshowerClusterPtr_[iphot][ips]);
673  }
674 
675 
676  // Set the preshower energy
677  mySuperCluster.setPreshowerEnergy(pfCand[photPFCandidateIndex_[iphot]].pS1Energy()+
678  pfCand[photPFCandidateIndex_[iphot]].pS2Energy());
679 
680  // Set the cluster width
681  mySuperCluster.setEtaWidth(pfwidth.pflowEtaWidth());
682  mySuperCluster.setPhiWidth(pfwidth.pflowPhiWidth());
683  // Force the computation of rawEnergy_ of the reco::SuperCluster
684  mySuperCluster.rawEnergy();
685 
686  //cout << "SC energy="<< mySuperCluster.energy()<<endl;
687 
688  superClusters.push_back(mySuperCluster);
689  //std::cout << "nb super clusters in collection : "<<superClusters.size()<<std::endl;
690  }
691 }
std::vector< int > photPFCandidateIndex_
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
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 507 of file PFPhotonTranslator.cc.

References newFWLiteAna::found, and edm::Event::getByLabel().

509  {
510  bool found = iEvent.getByLabel(tag, c);
511 
512  if(!found && !emptyIsOk_)
513  {
514  std::ostringstream err;
515  err<<" cannot get PFCandidates: "
516  <<tag<<std::endl;
517  edm::LogError("PFPhotonTranslator")<<err.str();
518  }
519  return found;
520 
521 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
void PFPhotonTranslator::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 107 of file PFPhotonTranslator.cc.

References reco::PFBlockElement::ECAL, asciidump::elements, reco::PFCandidate::elementsInBlocks(), reco::PFCandidate::gamma, edm::Event::getByLabel(), i, edm::Ref< C, T, F >::isNull(), edm::HandleBase::isValid(), j, reco::PFCandidate::mva_nothing_gamma(), reco::PFCandidate::particleId(), reco::tau::pfCandidates(), reco::PFCandidate::photonExtraRef(), edm::Handle< T >::product(), reco::PFBlockElement::PS1, reco::PFBlockElement::PS2, edm::Event::put(), edm::RefVector< C, T, F >::size(), ntuplemaker::status, reco::PFCandidate::superClusterRef(), reco::PFBlockElement::type(), and GoodVertex_cfg::vertexCollection.

108  {
109 
110  //cout << "NEW EVENT"<<endl;
111 
112  std::auto_ptr<reco::BasicClusterCollection>
113  basicClusters_p(new reco::BasicClusterCollection);
114 
115  std::auto_ptr<reco::PreshowerClusterCollection>
116  psClusters_p(new reco::PreshowerClusterCollection);
117 
118  /*
119  std::auto_ptr<reco::ConversionCollection>
120  SingleLeg_p(new reco::ConversionCollection);
121  */
122 
123  reco::SuperClusterCollection outputSuperClusterCollection;
124  reco::ConversionCollection outputOneLegConversionCollection;
125  reco::PhotonCoreCollection outputPhotonCoreCollection;
126  reco::PhotonCollection outputPhotonCollection;
127 
128  outputSuperClusterCollection.clear();
129  outputOneLegConversionCollection.clear();
130  outputPhotonCoreCollection.clear();
131  outputPhotonCollection.clear();
132 
133 
135  bool status=fetchCandidateCollection(pfCandidates,
137  iEvent );
138 
140  iEvent.getByLabel(EGPhotonCollection_, egPhotons);
141 
142 
143  Handle<reco::VertexCollection> vertexHandle;
144 
145 
146  IsolationValueMaps isolationValues(inputTagIsoVals_.size());
147  for (size_t j = 0; j<inputTagIsoVals_.size(); ++j) {
148  iEvent.getByLabel(inputTagIsoVals_[j], isolationValues[j]);
149  }
150 
151 
152  // clear the vectors
153  photPFCandidateIndex_.clear();
154  basicClusters_.clear();
155  pfClusters_.clear();
156  preshowerClusters_.clear();
157  superClusters_.clear();
158  basicClusterPtr_.clear();
159  preshowerClusterPtr_.clear();
160  CandidatePtr_.clear();
161  egSCRef_.clear();
162  egPhotonRef_.clear();
163  pfPhotonMva_.clear();
164  energyRegression_.clear();
165  energyRegressionError_.clear();
166  pfConv_.clear();
167  pfSingleLegConv_.clear();
168  pfSingleLegConvMva_.clear();
171 
172  // loop on the candidates
173  //CC@@
174  // we need first to create AND put the SuperCluster,
175  // basic clusters and presh clusters collection
176  // in order to get a working Handle
177  unsigned ncand=(status)?pfCandidates->size():0;
178 
179  unsigned iphot=0;
180  unsigned iconv1leg=0;
181  unsigned iconv2leg=0;
182 
183  for( unsigned i=0; i<ncand; ++i ) {
184 
185  const reco::PFCandidate& cand = (*pfCandidates)[i];
186  if(cand.particleId()!=reco::PFCandidate::gamma) continue;
187  //cout << "cand.mva_nothing_gamma()="<<cand. mva_nothing_gamma()<<endl;
188  if(cand. mva_nothing_gamma()>0.001)//Found PFPhoton with PFPhoton Extras saved
189  {
190 
191  //cout << "NEW PHOTON" << endl;
192 
193  //std::cout << "nDoubleLegConv="<<cand.photonExtraRef()->conversionRef().size()<<std::endl;
194 
195  if (cand.photonExtraRef()->conversionRef().size()>0){
196 
197  pfConv_.push_back(reco::ConversionRefVector());
198 
199  const reco::ConversionRefVector & doubleLegConvColl = cand.photonExtraRef()->conversionRef();
200  for (unsigned int iconv=0; iconv<doubleLegConvColl.size(); iconv++){
201  pfConv_[iconv2leg].push_back(doubleLegConvColl[iconv]);
202  }
203 
204  conv2legPFCandidateIndex_.push_back(iconv2leg);
205  iconv2leg++;
206  }
207  else conv2legPFCandidateIndex_.push_back(-1);
208 
209  const std::vector<reco::TrackRef> & singleLegConvColl = cand.photonExtraRef()->singleLegConvTrackRef();
210  const std::vector<float>& singleLegConvCollMva = cand.photonExtraRef()->singleLegConvMva();
211 
212  //std::cout << "nSingleLegConv=" <<singleLegConvColl.size() << std::endl;
213 
214  if (singleLegConvColl.size()>0){
215 
216  pfSingleLegConv_.push_back(std::vector<reco::TrackRef>());
217  pfSingleLegConvMva_.push_back(std::vector<float>());
218 
219  //cout << "nTracks="<< singleLegConvColl.size()<<endl;
220  for (unsigned int itk=0; itk<singleLegConvColl.size(); itk++){
221  //cout << "Track pt="<< singleLegConvColl[itk]->pt() <<endl;
222 
223  pfSingleLegConv_[iconv1leg].push_back(singleLegConvColl[itk]);
224  pfSingleLegConvMva_[iconv1leg].push_back(singleLegConvCollMva[itk]);
225  }
226 
227 
228  conv1legPFCandidateIndex_.push_back(iconv1leg);
229 
230  iconv1leg++;
231  }
232  else conv1legPFCandidateIndex_.push_back(-1);
233 
234  }
235 
236  photPFCandidateIndex_.push_back(i);
237  pfPhotonMva_.push_back(cand.mva_nothing_gamma());
238  energyRegression_.push_back(cand.photonExtraRef()->MVAGlobalCorrE());
239  energyRegressionError_.push_back(cand.photonExtraRef()->MVAGlobalCorrEError());
241  pfClusters_.push_back(std::vector<const reco::PFCluster *>());
244 
245  reco::PFCandidatePtr ptrToPFPhoton(pfCandidates,i);
246  CandidatePtr_.push_back(ptrToPFPhoton);
247  egSCRef_.push_back(cand.superClusterRef());
248  //std::cout << "PFPhoton cand " << iphot << std::endl;
249 
250  int iegphot=0;
251  for (reco::PhotonCollection::const_iterator gamIter = egPhotons->begin(); gamIter != egPhotons->end(); ++gamIter){
252  if (cand.superClusterRef()==gamIter->superCluster()){
253  reco::PhotonRef PhotRef(reco::PhotonRef(egPhotons, iegphot));
254  egPhotonRef_.push_back(PhotRef);
255  }
256  iegphot++;
257  }
258 
259 
260  //std::cout << "Cand elements in blocks : " << cand.elementsInBlocks().size() << std::endl;
261 
262  for(unsigned iele=0; iele<cand.elementsInBlocks().size(); ++iele) {
263  // first get the block
264  reco::PFBlockRef blockRef = cand.elementsInBlocks()[iele].first;
265  //
266  unsigned elementIndex = cand.elementsInBlocks()[iele].second;
267  // check it actually exists
268  if(blockRef.isNull()) continue;
269 
270  // then get the elements of the block
271  const edm::OwnVector< reco::PFBlockElement >& elements = (*blockRef).elements();
272 
273  const reco::PFBlockElement & pfbe (elements[elementIndex]);
274  // The first ECAL element should be the cluster associated to the GSF; defined as the seed
275  if(pfbe.type()==reco::PFBlockElement::ECAL)
276  {
277 
278  //std::cout << "BlockElement ECAL" << std::endl;
279  // the Brem photons are saved as daughter PFCandidate; this
280  // is convenient to access the corrected energy
281  // std::cout << " Found candidate " << correspondingDaughterCandidate(coCandidate,pfbe) << " " << coCandidate << std::endl;
283  }
284  if(pfbe.type()==reco::PFBlockElement::PS1)
285  {
286  //std::cout << "BlockElement PS1" << std::endl;
288  }
289  if(pfbe.type()==reco::PFBlockElement::PS2)
290  {
291  //std::cout << "BlockElement PS2" << std::endl;
293  }
294 
295 
296  } // loop on the elements
297 
298  // save the basic clusters
299  basicClusters_p->insert(basicClusters_p->end(),basicClusters_[iphot].begin(), basicClusters_[iphot].end());
300  // save the preshower clusters
301  psClusters_p->insert(psClusters_p->end(),preshowerClusters_[iphot].begin(),preshowerClusters_[iphot].end());
302 
303  ++iphot;
304 
305  } // loop on PFCandidates
306 
307 
308  //Save the basic clusters and get an handle as to be able to create valid Refs (thanks to Claude)
309  // std::cout << " Number of basic clusters " << basicClusters_p->size() << std::endl;
311  iEvent.put(basicClusters_p,PFBasicClusterCollection_);
312 
313  //preshower clusters
315  iEvent.put(psClusters_p,PFPreshowerClusterCollection_);
316 
317  // now that the Basic clusters are in the event, the Ref can be created
318  createBasicClusterPtrs(bcRefProd);
319  // now that the preshower clusters are in the event, the Ref can be created
320  createPreshowerClusterPtrs(psRefProd);
321 
322  // and now the Super cluster can be created with valid references
323  //if(status) createSuperClusters(*pfCandidates,*superClusters_p);
324  if(status) createSuperClusters(*pfCandidates,outputSuperClusterCollection);
325 
326  //std::cout << "nb superclusters in collection : "<<outputSuperClusterCollection.size()<<std::endl;
327 
328  // Let's put the super clusters in the event
329  std::auto_ptr<reco::SuperClusterCollection> superClusters_p(new reco::SuperClusterCollection(outputSuperClusterCollection));
330  const edm::OrphanHandle<reco::SuperClusterCollection> scRefProd = iEvent.put(superClusters_p,PFSuperClusterCollection_);
331 
332 
333  /*
334  int ipho=0;
335  for (reco::SuperClusterCollection::const_iterator gamIter = scRefProd->begin(); gamIter != scRefProd->end(); ++gamIter){
336  std::cout << "SC i="<<ipho<<" energy="<<gamIter->energy()<<std::endl;
337  ipho++;
338  }
339  */
340 
341 
342  //1-leg conversions
343 
344 
345  if (status) createOneLegConversions(scRefProd, outputOneLegConversionCollection);
346 
347 
348  std::auto_ptr<reco::ConversionCollection> SingleLeg_p(new reco::ConversionCollection(outputOneLegConversionCollection));
349  const edm::OrphanHandle<reco::ConversionCollection> ConvRefProd = iEvent.put(SingleLeg_p,PFConversionCollection_);
350  /*
351  int iconv = 0;
352  for (reco::ConversionCollection::const_iterator convIter = ConvRefProd->begin(); convIter != ConvRefProd->end(); ++convIter){
353 
354  std::cout << "OneLegConv i="<<iconv<<" nTracks="<<convIter->nTracks()<<" EoverP="<<convIter->EoverP() <<std::endl;
355  std::vector<edm::RefToBase<reco::Track> > convtracks = convIter->tracks();
356  for (unsigned int itk=0; itk<convtracks.size(); itk++){
357  std::cout << "Track pt="<< convtracks[itk]->pt() << std::endl;
358  }
359 
360  iconv++;
361  }
362  */
363 
364  //create photon cores
365  //if(status) createPhotonCores(pfCandidates, scRefProd, *photonCores_p);
366  if(status) createPhotonCores(scRefProd, ConvRefProd, outputPhotonCoreCollection);
367 
368  //std::cout << "nb photoncores in collection : "<<outputPhotonCoreCollection.size()<<std::endl;
369 
370  // Put the photon cores in the event
371  std::auto_ptr<reco::PhotonCoreCollection> photonCores_p(new reco::PhotonCoreCollection(outputPhotonCoreCollection));
372  //std::cout << "photon core collection put in auto_ptr"<<std::endl;
373  const edm::OrphanHandle<reco::PhotonCoreCollection> pcRefProd = iEvent.put(photonCores_p,PFPhotonCoreCollection_);
374 
375  //std::cout << "photon core have been put in the event"<<std::endl;
376  /*
377  int ipho=0;
378  for (reco::PhotonCoreCollection::const_iterator gamIter = pcRefProd->begin(); gamIter != pcRefProd->end(); ++gamIter){
379  std::cout << "PhotonCore i="<<ipho<<" energy="<<gamIter->pfSuperCluster()->energy()<<std::endl;
380  //for (unsigned int i=0; i<)
381 
382  std::cout << "PhotonCore i="<<ipho<<" nconv2leg="<<gamIter->conversions().size()<<" nconv1leg="<<gamIter->conversionsOneLeg().size()<<std::endl;
383 
384  const reco::ConversionRefVector & conv = gamIter->conversions();
385  for (unsigned int iconv=0; iconv<conv.size(); iconv++){
386  cout << "2-leg iconv="<<iconv<<endl;
387  cout << "2-leg nTracks="<<conv[iconv]->nTracks()<<endl;
388  cout << "2-leg EoverP="<<conv[iconv]->EoverP()<<endl;
389  cout << "2-leg ConvAlgorithm="<<conv[iconv]->algo()<<endl;
390  }
391 
392  const reco::ConversionRefVector & convbis = gamIter->conversionsOneLeg();
393  for (unsigned int iconv=0; iconv<convbis.size(); iconv++){
394  cout << "1-leg iconv="<<iconv<<endl;
395  cout << "1-leg nTracks="<<convbis[iconv]->nTracks()<<endl;
396  cout << "1-leg EoverP="<<convbis[iconv]->EoverP()<<endl;
397  cout << "1-leg ConvAlgorithm="<<convbis[iconv]->algo()<<endl;
398  }
399 
400  ipho++;
401  }
402  */
403 
404  //load vertices
406  bool validVertex=true;
407  iEvent.getByLabel(vertexProducer_, vertexHandle);
408  if (!vertexHandle.isValid()) {
409  edm::LogWarning("PhotonProducer") << "Error! Can't get the product primary Vertex Collection "<< "\n";
410  validVertex=false;
411  }
412  if (validVertex) vertexCollection = *(vertexHandle.product());
413 
414  /*
415  //load Ecal rechits
416  bool validEcalRecHits=true;
417  Handle<EcalRecHitCollection> barrelHitHandle;
418  EcalRecHitCollection barrelRecHits;
419  iEvent.getByLabel(barrelEcalHits_, barrelHitHandle);
420  if (!barrelHitHandle.isValid()) {
421  edm::LogError("PhotonProducer") << "Error! Can't get the product "<<barrelEcalHits_.label();
422  validEcalRecHits=false;
423  }
424  if ( validEcalRecHits) barrelRecHits = *(barrelHitHandle.product());
425 
426  Handle<EcalRecHitCollection> endcapHitHandle;
427  iEvent.getByLabel(endcapEcalHits_, endcapHitHandle);
428  EcalRecHitCollection endcapRecHits;
429  if (!endcapHitHandle.isValid()) {
430  edm::LogError("PhotonProducer") << "Error! Can't get the product "<<endcapEcalHits_.label();
431  validEcalRecHits=false;
432  }
433  if( validEcalRecHits) endcapRecHits = *(endcapHitHandle.product());
434 
435  //load detector topology & geometry
436  iSetup.get<CaloGeometryRecord>().get(theCaloGeom_);
437 
438  edm::ESHandle<CaloTopology> pTopology;
439  iSetup.get<CaloTopologyRecord>().get(theCaloTopo_);
440  const CaloTopology *topology = theCaloTopo_.product();
441 
442  // get Hcal towers collection
443  Handle<CaloTowerCollection> hcalTowersHandle;
444  iEvent.getByLabel(hcalTowers_, hcalTowersHandle);
445  */
446 
447  //create photon collection
448  //if(status) createPhotons(vertexCollection, pcRefProd, topology, &barrelRecHits, &endcapRecHits, hcalTowersHandle, isolationValues, outputPhotonCollection);
449  if(status) createPhotons(vertexCollection, egPhotons, pcRefProd, isolationValues, outputPhotonCollection);
450 
451  // Put the photons in the event
452  std::auto_ptr<reco::PhotonCollection> photons_p(new reco::PhotonCollection(outputPhotonCollection));
453  //std::cout << "photon collection put in auto_ptr"<<std::endl;
454  const edm::OrphanHandle<reco::PhotonCollection> photonRefProd = iEvent.put(photons_p,PFPhotonCollection_);
455  //std::cout << "photons have been put in the event"<<std::endl;
456 
457  /*
458  ipho=0;
459  for (reco::PhotonCollection::const_iterator gamIter = photonRefProd->begin(); gamIter != photonRefProd->end(); ++gamIter){
460  std::cout << "Photon i="<<ipho<<" pfEnergy="<<gamIter->pfSuperCluster()->energy()<<std::endl;
461 
462  const reco::ConversionRefVector & conv = gamIter->conversions();
463  cout << "conversions obtained : conv.size()="<< conv.size()<<endl;
464  for (unsigned int iconv=0; iconv<conv.size(); iconv++){
465  cout << "iconv="<<iconv<<endl;
466  cout << "nTracks="<<conv[iconv]->nTracks()<<endl;
467  cout << "EoverP="<<conv[iconv]->EoverP()<<endl;
468 
469  cout << "Vtx x="<<conv[iconv]->conversionVertex().x() << " y="<< conv[iconv]->conversionVertex().y()<<" z="<<conv[iconv]->conversionVertex().z()<< endl;
470  cout << "VtxError x=" << conv[iconv]->conversionVertex().xError() << endl;
471 
472  std::vector<edm::RefToBase<reco::Track> > convtracks = conv[iconv]->tracks();
473  //cout << "nTracks="<< convtracks.size()<<endl;
474  for (unsigned int itk=0; itk<convtracks.size(); itk++){
475  double convtrackpt = convtracks[itk]->pt();
476  const edm::RefToBase<reco::Track> & mytrack = convtracks[itk];
477  cout << "Track pt="<< convtrackpt <<endl;
478  cout << "Track origin="<<gamIter->conversionTrackOrigin(mytrack)<<endl;
479  }
480  }
481 
482  //1-leg
483  const reco::ConversionRefVector & convbis = gamIter->conversionsOneLeg();
484  cout << "conversions obtained : conv.size()="<< convbis.size()<<endl;
485  for (unsigned int iconv=0; iconv<convbis.size(); iconv++){
486  cout << "iconv="<<iconv<<endl;
487  cout << "nTracks="<<convbis[iconv]->nTracks()<<endl;
488  cout << "EoverP="<<convbis[iconv]->EoverP()<<endl;
489 
490  cout << "Vtx x="<<convbis[iconv]->conversionVertex().x() << " y="<< convbis[iconv]->conversionVertex().y()<<" z="<<convbis[iconv]->conversionVertex().z()<< endl;
491  cout << "VtxError x=" << convbis[iconv]->conversionVertex().xError() << endl;
492 
493  std::vector<edm::RefToBase<reco::Track> > convtracks = convbis[iconv]->tracks();
494  //cout << "nTracks="<< convtracks.size()<<endl;
495  for (unsigned int itk=0; itk<convtracks.size(); itk++){
496  double convtrackpt = convtracks[itk]->pt();
497  cout << "Track pt="<< convtrackpt <<endl;
498  cout << "Track origin="<<gamIter->conversionTrackOrigin((convtracks[itk]))<<endl;
499  }
500  }
501  ipho++;
502  }
503  */
504 
505 }
Abstract base class for a PFBlock element (track, cluster...)
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
int i
Definition: DBlmapReader.cc:9
void createBasicClusterPtrs(const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
std::string PFPhotonCoreCollection_
std::vector< reco::ConversionRefVector > pfConv_
float mva_nothing_gamma() const
mva for gamma detection
Definition: PFCandidate.h:306
std::vector< float > pfPhotonMva_
std::string PFConversionCollection_
std::vector< int > conv2legPFCandidateIndex_
list elements
Definition: asciidump.py:414
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:508
tuple vertexCollection
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_
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.h:365
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
std::vector< reco::SuperClusterRef > egSCRef_
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
std::vector< reco::SuperClusterCollection > superClusters_
bool isNull() const
Checks for null.
Definition: Ref.h:247
std::string PFBasicClusterCollection_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
std::string PFSuperClusterCollection_
int j
Definition: DBlmapReader.cc:9
std::vector< std::vector< float > > pfSingleLegConvMva_
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
void createPhotonCores(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, const edm::OrphanHandle< reco::ConversionCollection > &oneLegConversionHandle, reco::PhotonCoreCollection &photonCores)
std::vector< int > conv1legPFCandidateIndex_
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
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_
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
std::vector< reco::BasicClusterCollection > basicClusters_
void createPhotons(reco::VertexCollection &vertexCollection, edm::Handle< reco::PhotonCollection > &egPhotons, const edm::OrphanHandle< reco::PhotonCoreCollection > &photonCoresHandle, const IsolationValueMaps &isolationValues, reco::PhotonCollection &photons)
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
void createOneLegConversions(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, reco::ConversionCollection &oneLegConversions)
T const * product() const
Definition: Handle.h:74
std::vector< PhotonCore > PhotonCoreCollection
collectin of PhotonCore objects
Definition: PhotonCoreFwd.h:9
std::vector< float > energyRegression_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:35
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
std::vector< reco::CandidatePtr > CandidatePtr_
std::string EGPhotonCollection_
std::vector< float > energyRegressionError_
tuple status
Definition: ntuplemaker.py:245
virtual ParticleType particleId() const
Definition: PFCandidate.h:347
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
Definition: PFCandidate.cc:516

Member Data Documentation

edm::InputTag PFPhotonTranslator::barrelEcalHits_
private

Definition at line 118 of file PFPhotonTranslator.h.

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

Definition at line 132 of file PFPhotonTranslator.h.

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

Definition at line 124 of file PFPhotonTranslator.h.

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

Definition at line 138 of file PFPhotonTranslator.h.

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

Definition at line 154 of file PFPhotonTranslator.h.

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

Definition at line 155 of file PFPhotonTranslator.h.

std::string PFPhotonTranslator::EGPhotonCollection_
private

Definition at line 116 of file PFPhotonTranslator.h.

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

Definition at line 142 of file PFPhotonTranslator.h.

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

Definition at line 140 of file PFPhotonTranslator.h.

bool PFPhotonTranslator::emptyIsOk_
private

Definition at line 160 of file PFPhotonTranslator.h.

edm::InputTag PFPhotonTranslator::endcapEcalHits_
private

Definition at line 119 of file PFPhotonTranslator.h.

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

Definition at line 145 of file PFPhotonTranslator.h.

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

Definition at line 146 of file PFPhotonTranslator.h.

edm::InputTag PFPhotonTranslator::hcalTowers_
private

Definition at line 120 of file PFPhotonTranslator.h.

double PFPhotonTranslator::hOverEConeSize_
private

Definition at line 121 of file PFPhotonTranslator.h.

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

Definition at line 109 of file PFPhotonTranslator.h.

edm::InputTag PFPhotonTranslator::inputTagPFCandidates_
private

Definition at line 108 of file PFPhotonTranslator.h.

std::string PFPhotonTranslator::PFBasicClusterCollection_
private

Definition at line 110 of file PFPhotonTranslator.h.

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

Definition at line 126 of file PFPhotonTranslator.h.

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

Definition at line 149 of file PFPhotonTranslator.h.

std::string PFPhotonTranslator::PFConversionCollection_
private

Definition at line 115 of file PFPhotonTranslator.h.

std::string PFPhotonTranslator::PFPhotonCollection_
private

Definition at line 114 of file PFPhotonTranslator.h.

std::string PFPhotonTranslator::PFPhotonCoreCollection_
private

Definition at line 113 of file PFPhotonTranslator.h.

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

Definition at line 144 of file PFPhotonTranslator.h.

std::string PFPhotonTranslator::PFPreshowerClusterCollection_
private

Definition at line 111 of file PFPhotonTranslator.h.

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

Definition at line 150 of file PFPhotonTranslator.h.

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

Definition at line 151 of file PFPhotonTranslator.h.

std::string PFPhotonTranslator::PFSuperClusterCollection_
private

Definition at line 112 of file PFPhotonTranslator.h.

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

Definition at line 136 of file PFPhotonTranslator.h.

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

Definition at line 134 of file PFPhotonTranslator.h.

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

Definition at line 128 of file PFPhotonTranslator.h.

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

Definition at line 130 of file PFPhotonTranslator.h.

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

Definition at line 158 of file PFPhotonTranslator.h.

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

Definition at line 157 of file PFPhotonTranslator.h.

std::string PFPhotonTranslator::vertexProducer_
private

Definition at line 117 of file PFPhotonTranslator.h.