CMS 3D CMS Logo

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

#include <GEDPhotonProducer.h>

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

Public Member Functions

virtual void beginRun (edm::Run const &r, edm::EventSetup const &es) overridefinal
 
virtual void endRun (edm::Run const &, edm::EventSetup const &) overridefinal
 
 GEDPhotonProducer (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &evt, const edm::EventSetup &es)
 
 ~GEDPhotonProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
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 ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void fillPhotonCollection (edm::Event &evt, edm::EventSetup const &es, const edm::Handle< reco::PhotonCoreCollection > &photonCoreHandle, const CaloTopology *topology, const EcalRecHitCollection *ecalBarrelHits, const EcalRecHitCollection *ecalEndcapHits, const edm::Handle< CaloTowerCollection > &hcalTowersHandle, reco::VertexCollection &pvVertices, reco::PhotonCollection &outputCollection, int &iSC)
 
void fillPhotonCollection (edm::Event &evt, edm::EventSetup const &es, const edm::Handle< reco::PhotonCollection > &photonHandle, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, const edm::Handle< reco::PFCandidateCollection > pfEGCandidateHandle, edm::ValueMap< reco::PhotonRef > pfEGCandToPhotonMap, edm::Handle< reco::VertexCollection > &pvVertices, reco::PhotonCollection &outputCollection, int &iSC)
 

Private Attributes

edm::EDGetTokenT
< EcalRecHitCollection
barrelEcalHits_
 
std::string candidateP4type_
 
edm::ParameterSet conf_
 
std::string conversionCollection_
 
std::string conversionProducer_
 
edm::EDGetTokenT
< EcalRecHitCollection
endcapEcalHits_
 
EcalClusterFunctionBaseClassenergyCorrectionF
 
std::vector< int > flagsexclEB_
 
std::vector< int > flagsexclEE_
 
edm::EDGetTokenT
< CaloTowerCollection
hcalTowers_
 
double highEt_
 
double hOverEConeSize_
 
double maxHOverE_
 
double minR9Barrel_
 
double minR9Endcap_
 
double minSCEt_
 
edm::EDGetTokenT
< reco::PFCandidateCollection
pfCandidates_
 
edm::EDGetTokenT
< reco::PFCandidateCollection
pfEgammaCandidates_
 
std::string photonCollection_
 
edm::EDGetTokenT
< reco::PhotonCoreCollection
photonCoreProducerT_
 
edm::InputTag photonProducer_
 
edm::EDGetTokenT
< reco::PhotonCollection
photonProducerT_
 
PositionCalc posCalculator_
 
std::vector< double > preselCutValuesBarrel_
 
std::vector< double > preselCutValuesEndcap_
 
std::string reconstructionStep_
 
bool runMIPTagger_
 
std::vector< int > severitiesexclEB_
 
std::vector< int > severitiesexclEE_
 
edm::ESHandle< CaloGeometrytheCaloGeom_
 
edm::ESHandle< CaloTopologytheCaloTopo_
 
PFPhotonIsolationCalculatorthePFBasedIsolationCalculator_
 
PhotonEnergyCorrectorthePhotonEnergyCorrector_
 
PhotonIsolationCalculatorthePhotonIsolationCalculator_
 
PhotonMIPHaloTaggerthePhotonMIPHaloTagger_
 
bool usePrimaryVertex_
 
bool validConversions_
 
bool validPixelSeeds_
 
std::string valueMapPFCandPhoton_
 
edm::EDGetTokenT
< reco::VertexCollection
vertexProducer_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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::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

Author
Nancy Marinelli, U. of Notre Dame, US

Definition at line 43 of file GEDPhotonProducer.h.

Constructor & Destructor Documentation

GEDPhotonProducer::GEDPhotonProducer ( const edm::ParameterSet ps)

Definition at line 53 of file GEDPhotonProducer.cc.

References barrelEcalHits_, candidateP4type_, conf_, edm::EDConsumerBase::consumesCollector(), endcapEcalHits_, edm::ParameterSet::existsAs(), flagsexclEB_, flagsexclEE_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), hcalTowers_, highEt_, hOverEConeSize_, minR9Barrel_, minR9Endcap_, pfCandidates_, pfEgammaCandidates_, photonCollection_, photonCoreProducerT_, photonProducer_, photonProducerT_, posCalculator_, preselCutValuesBarrel_, preselCutValuesEndcap_, reconstructionStep_, runMIPTagger_, severitiesexclEB_, severitiesexclEE_, AlCaHLTBitMon_QueryRunRegistry::string, thePhotonEnergyCorrector_, usePrimaryVertex_, valueMapPFCandPhoton_, and vertexProducer_.

53  :
54 
55  conf_(config)
56 {
57 
58  // use configuration file to setup input/output collection names
59  //
60  photonProducer_ = conf_.getParameter<edm::InputTag>("photonProducer");
61  reconstructionStep_ = conf_.getParameter<std::string>("reconstructionStep");
62 
63  if ( reconstructionStep_ == "final" ) {
65  consumes<reco::PhotonCollection>(photonProducer_);
66  pfCandidates_ =
67  consumes<reco::PFCandidateCollection>(conf_.getParameter<edm::InputTag>("pfCandidates"));
68 
69  } else {
70 
72  consumes<reco::PhotonCoreCollection>(photonProducer_);
73 
74  }
75 
77  consumes<reco::PFCandidateCollection>(conf_.getParameter<edm::InputTag>("pfEgammaCandidates"));
79  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("barrelEcalHits"));
81  consumes<EcalRecHitCollection>(conf_.getParameter<edm::InputTag>("endcapEcalHits"));
83  consumes<reco::VertexCollection>(conf_.getParameter<edm::InputTag>("primaryVertexProducer"));
84 
85  hcalTowers_ =
86  consumes<CaloTowerCollection>(conf_.getParameter<edm::InputTag>("hcalTowers"));
87  //
88  photonCollection_ = conf_.getParameter<std::string>("outputPhotonCollection");
89  hOverEConeSize_ = conf_.getParameter<double>("hOverEConeSize");
90  highEt_ = conf_.getParameter<double>("highEt");
91  // R9 value to decide converted/unconverted
92  minR9Barrel_ = conf_.getParameter<double>("minR9Barrel");
93  minR9Endcap_ = conf_.getParameter<double>("minR9Endcap");
94  usePrimaryVertex_ = conf_.getParameter<bool>("usePrimaryVertex");
95  runMIPTagger_ = conf_.getParameter<bool>("runMIPTagger");
96 
97  candidateP4type_ = config.getParameter<std::string>("candidateP4type") ;
98  valueMapPFCandPhoton_ = config.getParameter<std::string>("valueMapPhotons");
99 
100 
101  edm::ParameterSet posCalcParameters =
102  config.getParameter<edm::ParameterSet>("posCalcParameters");
103  posCalculator_ = PositionCalc(posCalcParameters);
104 
105 
106  //AA
107  //Flags and Severities to be excluded from photon calculations
108  const std::vector<std::string> flagnamesEB =
109  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEB");
110 
111  const std::vector<std::string> flagnamesEE =
112  config.getParameter<std::vector<std::string> >("RecHitFlagToBeExcludedEE");
113 
114  flagsexclEB_=
115  StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
116 
117  flagsexclEE_=
118  StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
119 
120  const std::vector<std::string> severitynamesEB =
121  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEB");
122 
124  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
125 
126  const std::vector<std::string> severitynamesEE =
127  config.getParameter<std::vector<std::string> >("RecHitSeverityToBeExcludedEE");
128 
130  StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
131 
134  if( config.existsAs<edm::ParameterSet>("regressionConfig") ) {
135  const edm::ParameterSet regr_conf =
136  config.getParameterSet("regressionConfig");
137  thePhotonEnergyCorrector_->gedRegression()->varCalc()->setTokens(regr_conf,consumesCollector());
138  }
139 
140  //AA
141 
142  //
143 
144  // Parameters for the position calculation:
145  // std::map<std::string,double> providedParameters;
146  // providedParameters.insert(std::make_pair("LogWeighted",conf_.getParameter<bool>("posCalc_logweight")));
147  //providedParameters.insert(std::make_pair("T0_barl",conf_.getParameter<double>("posCalc_t0_barl")));
148  //providedParameters.insert(std::make_pair("T0_endc",conf_.getParameter<double>("posCalc_t0_endc")));
149  //providedParameters.insert(std::make_pair("T0_endcPresh",conf_.getParameter<double>("posCalc_t0_endcPresh")));
150  //providedParameters.insert(std::make_pair("W0",conf_.getParameter<double>("posCalc_w0")));
151  //providedParameters.insert(std::make_pair("X0",conf_.getParameter<double>("posCalc_x0")));
152  //posCalculator_ = PositionCalc(providedParameters);
153  // cut values for pre-selection
154  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("minSCEtBarrel"));
155  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("maxHoverEBarrel"));
156  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetBarrel"));
157  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeBarrel"));
158  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetBarrel"));
159  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeBarrel"));
160  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackSolidConeBarrel"));
161  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("nTrackHollowConeBarrel"));
162  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumSolidConeBarrel"));
163  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("trackPtSumHollowConeBarrel"));
164  preselCutValuesBarrel_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutBarrel"));
165  //
166  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("minSCEtEndcap"));
167  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("maxHoverEEndcap"));
168  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtOffsetEndcap"));
169  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("ecalRecHitSumEtSlopeEndcap"));
170  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtOffsetEndcap"));
171  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("hcalTowerSumEtSlopeEndcap"));
172  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackSolidConeEndcap"));
173  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("nTrackHollowConeEndcap"));
174  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumSolidConeEndcap"));
175  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("trackPtSumHollowConeEndcap"));
176  preselCutValuesEndcap_.push_back(conf_.getParameter<double>("sigmaIetaIetaCutEndcap"));
177  //
178 
179  // Register the product
180  produces< reco::PhotonCollection >(photonCollection_);
181  produces< edm::ValueMap<reco::PhotonRef> > (valueMapPFCandPhoton_);
182 
183 
184 }
edm::InputTag photonProducer_
T getParameter(std::string const &) const
PhotonEnergyCorrector * thePhotonEnergyCorrector_
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
std::unique_ptr< PFSCRegressionCalc > & gedRegression()
std::vector< int > flagsexclEB_
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::string reconstructionStep_
std::vector< int > severitiesexclEE_
std::string photonCollection_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
PositionCalc posCalculator_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< int > flagsexclEE_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_
std::vector< int > severitiesexclEB_
std::vector< double > preselCutValuesBarrel_
edm::EDGetTokenT< reco::PhotonCollection > photonProducerT_
std::vector< double > preselCutValuesEndcap_
std::string candidateP4type_
edm::ParameterSet conf_
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
std::string valueMapPFCandPhoton_
GEDPhotonProducer::~GEDPhotonProducer ( )

Definition at line 186 of file GEDPhotonProducer.cc.

References thePhotonEnergyCorrector_.

187 {
189  //delete energyCorrectionF;
190 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_

Member Function Documentation

void GEDPhotonProducer::beginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
finaloverridevirtual

Reimplemented from edm::EDProducer.

Definition at line 194 of file GEDPhotonProducer.cc.

References conf_, flagsexclEB_, flagsexclEE_, edm::ParameterSet::getParameter(), init, reconstructionStep_, PhotonMIPHaloTagger::setup(), PhotonIsolationCalculator::setup(), PFPhotonIsolationCalculator::setup(), severitiesexclEB_, severitiesexclEE_, thePFBasedIsolationCalculator_, thePhotonEnergyCorrector_, thePhotonIsolationCalculator_, and thePhotonMIPHaloTagger_.

194  {
195 
196 
197  if ( reconstructionStep_ == "final" ) {
198 
199 
201  edm::ParameterSet pfIsolationCalculatorSet = conf_.getParameter<edm::ParameterSet>("PFIsolationCalculatorSet");
202  thePFBasedIsolationCalculator_->setup(pfIsolationCalculatorSet);
203 
204  } else {
205 
207  edm::ParameterSet isolationSumsCalculatorSet = conf_.getParameter<edm::ParameterSet>("isolationSumsCalculatorSet");
209 
210 
212  edm::ParameterSet mipVariableSet = conf_.getParameter<edm::ParameterSet>("mipVariableSet");
213  thePhotonMIPHaloTagger_->setup(mipVariableSet);
214 
215  thePhotonEnergyCorrector_ -> init(theEventSetup);
216 
217  }
218 
219 
220 }
T getParameter(std::string const &) const
PhotonEnergyCorrector * thePhotonEnergyCorrector_
PhotonMIPHaloTagger * thePhotonMIPHaloTagger_
int init
Definition: HydjetWrapper.h:62
std::vector< int > flagsexclEB_
std::string reconstructionStep_
PhotonIsolationCalculator * thePhotonIsolationCalculator_
std::vector< int > severitiesexclEE_
void setup(const edm::ParameterSet &conf)
PFPhotonIsolationCalculator * thePFBasedIsolationCalculator_
std::vector< int > flagsexclEE_
std::vector< int > severitiesexclEB_
void setup(const edm::ParameterSet &conf, std::vector< int > const &flagsEB_, std::vector< int > const &flagsEE_, std::vector< int > const &severitiesEB_, std::vector< int > const &severitiesEE_)
edm::ParameterSet conf_
void setup(const edm::ParameterSet &conf)
void GEDPhotonProducer::endRun ( edm::Run const &  r,
edm::EventSetup const &  theEventSetup 
)
finaloverridevirtual

Reimplemented from edm::EDProducer.

Definition at line 222 of file GEDPhotonProducer.cc.

References reconstructionStep_, thePFBasedIsolationCalculator_, thePhotonIsolationCalculator_, and thePhotonMIPHaloTagger_.

222  {
223 
224 if ( reconstructionStep_ == "final" ) {
226  } else {
229 
230  }
231 
232 }
PhotonMIPHaloTagger * thePhotonMIPHaloTagger_
std::string reconstructionStep_
PhotonIsolationCalculator * thePhotonIsolationCalculator_
PFPhotonIsolationCalculator * thePFBasedIsolationCalculator_
void GEDPhotonProducer::fillPhotonCollection ( edm::Event evt,
edm::EventSetup const &  es,
const edm::Handle< reco::PhotonCoreCollection > &  photonCoreHandle,
const CaloTopology topology,
const EcalRecHitCollection ecalBarrelHits,
const EcalRecHitCollection ecalEndcapHits,
const edm::Handle< CaloTowerCollection > &  hcalTowersHandle,
reco::VertexCollection pvVertices,
reco::PhotonCollection outputCollection,
int &  iSC 
)
private

fill shower shape block

get ecal photon specific corrected energy plus values from regressions and store them in the Photon

Pre-selection loose isolation cuts

Definition at line 431 of file GEDPhotonProducer.cc.

References PhotonEnergyCorrector::calculate(), candidateP4type_, EcalClusterTools::covariances(), EcalClusterTools::e1x5(), reco::Photon::ShowerShape::e1x5, reco::Photon::ShowerShape::e2x5, EcalClusterTools::e2x5Max(), EcalClusterTools::e3x3(), reco::Photon::ShowerShape::e3x3, EcalClusterTools::e5x5(), reco::Photon::ShowerShape::e5x5, reco::Photon::ecal_photons, EcalBarrel, EcalEndcap, EcalClusterTools::eMax(), flagsexclEB_, flagsexclEE_, geometry, EgammaHadTower::getDepth1HcalESum(), EgammaHadTower::getDepth2HcalESum(), EgammaTowerIsolation::getTowerESum(), reco::Photon::ShowerShape::hcalDepth1OverEcal, reco::Photon::ShowerShape::hcalDepth1OverEcalBc, reco::Photon::ShowerShape::hcalDepth2OverEcal, reco::Photon::ShowerShape::hcalDepth2OverEcalBc, reco::Photon::ShowerShape::hcalTowersBehindClusters, highEt_, hOverEConeSize_, edm::Ref< C, T, F >::isNonnull(), EcalClusterTools::localCovariances(), reco::Photon::ShowerShape::maxEnergyXtal, p4, preselCutValuesBarrel_, preselCutValuesEndcap_, edm::Handle< T >::product(), edm::ESHandle< class >::product(), reco::Photon::regression1, reco::Photon::regression2, runMIPTagger_, EgammaHadTower::setTowerCollection(), severitiesexclEB_, severitiesexclEE_, reco::Photon::ShowerShape::sigmaEtaEta, reco::Photon::ShowerShape::sigmaIetaIeta, mathSSE::sqrt(), theCaloGeom_, thePhotonEnergyCorrector_, thePhotonIsolationCalculator_, thePhotonMIPHaloTagger_, and EgammaHadTower::towersOf().

Referenced by produce().

439  {
440 
441 
443  const EcalRecHitCollection* hits = 0 ;
444  std::vector<double> preselCutValues;
445  std::vector<int> flags_, severitiesexcl_;
446 
447  for(unsigned int lSC=0; lSC < photonCoreHandle->size(); lSC++) {
448 
449  reco::PhotonCoreRef coreRef(reco::PhotonCoreRef(photonCoreHandle, lSC));
450  reco::SuperClusterRef parentSCRef = coreRef->parentSuperCluster();
451  reco::SuperClusterRef scRef=coreRef->superCluster();
452 
453 
454 
455  // const reco::SuperCluster* pClus=&(*scRef);
456  iSC++;
457 
458  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
459  if (subdet==EcalBarrel) {
460  preselCutValues = preselCutValuesBarrel_;
461  hits = ecalBarrelHits;
462  flags_ = flagsexclEB_;
463  severitiesexcl_ = severitiesexclEB_;
464  } else if (subdet==EcalEndcap) {
465  preselCutValues = preselCutValuesEndcap_;
466  hits = ecalEndcapHits;
467  flags_ = flagsexclEE_;
468  severitiesexcl_ = severitiesexclEE_;
469  } else {
470  edm::LogWarning("")<<"GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster";
471  }
472 
473 
474 
475 
476  // SC energy preselection
477  if (parentSCRef.isNonnull() &&
478  ptFast(parentSCRef->energy(),parentSCRef->position(),math::XYZPoint(0,0,0)) <= preselCutValues[0] ) continue;
479  // calculate HoE
480 
481  const CaloTowerCollection* hcalTowersColl = hcalTowersHandle.product();
482  EgammaTowerIsolation towerIso1(hOverEConeSize_,0.,0.,1,hcalTowersColl) ;
483  EgammaTowerIsolation towerIso2(hOverEConeSize_,0.,0.,2,hcalTowersColl) ;
484  double HoE1=towerIso1.getTowerESum(&(*scRef))/scRef->energy();
485  double HoE2=towerIso2.getTowerESum(&(*scRef))/scRef->energy();
486 
487  EgammaHadTower towerIsoBehindClus(es);
488  towerIsoBehindClus.setTowerCollection(hcalTowersHandle.product());
489  std::vector<CaloTowerDetId> TowersBehindClus = towerIsoBehindClus.towersOf(*scRef);
490  float hcalDepth1OverEcalBc = towerIsoBehindClus.getDepth1HcalESum(TowersBehindClus)/scRef->energy();
491  float hcalDepth2OverEcalBc = towerIsoBehindClus.getDepth2HcalESum(TowersBehindClus)/scRef->energy();
492  // std::cout << " GEDPhotonProducer calculation of HoE with towers in a cone " << HoE1 << " " << HoE2 << std::endl;
493  //std::cout << " GEDPhotonProducer calcualtion of HoE with towers behind the BCs " << hcalDepth1OverEcalBc << " " << hcalDepth2OverEcalBc << std::endl;
494 
495  float maxXtal = EcalClusterTools::eMax( *(scRef->seed()), &(*hits) );
496  //AA
497  //Change these to consider severity level of hits
498  float e1x5 = EcalClusterTools::e1x5( *(scRef->seed()), &(*hits), &(*topology));
499  float e2x5 = EcalClusterTools::e2x5Max( *(scRef->seed()), &(*hits), &(*topology));
500  float e3x3 = EcalClusterTools::e3x3( *(scRef->seed()), &(*hits), &(*topology));
501  float e5x5 = EcalClusterTools::e5x5( *(scRef->seed()), &(*hits), &(*topology));
502  std::vector<float> cov = EcalClusterTools::covariances( *(scRef->seed()), &(*hits), &(*topology), geometry);
503  std::vector<float> locCov = EcalClusterTools::localCovariances( *(scRef->seed()), &(*hits), &(*topology));
504 
505  float sigmaEtaEta = sqrt(cov[0]);
506  float sigmaIetaIeta = sqrt(locCov[0]);
507  // compute position of ECAL shower
508  math::XYZPoint caloPosition = scRef->position();
509 
510 
512  double photonEnergy=1.;
513  math::XYZPoint vtx(0.,0.,0.);
514  if (vertexCollection.size()>0) vtx = vertexCollection.begin()->position();
515  // compute momentum vector of photon from primary vertex and cluster position
516  math::XYZVector direction = caloPosition - vtx;
517  //math::XYZVector momentum = direction.unit() * photonEnergy ;
518  math::XYZVector momentum = direction.unit() ;
519 
520  // Create dummy candidate with unit momentum and zero energy to allow setting of all variables. The energy is set for last.
521  math::XYZTLorentzVectorD p4(momentum.x(), momentum.y(), momentum.z(), photonEnergy );
522  reco::Photon newCandidate(p4, caloPosition, coreRef, vtx);
523 
524  //std::cout << " standard p4 before " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
525  //std::cout << " type " <<newCandidate.getCandidateP4type() << " standard p4 after " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
526 
527  // Calculate fiducial flags and isolation variable. Blocked are filled from the isolationCalculator
528  reco::Photon::FiducialFlags fiducialFlags;
529  reco::Photon::IsolationVariables isolVarR03, isolVarR04;
530  thePhotonIsolationCalculator_-> calculate ( &newCandidate,evt,es,fiducialFlags,isolVarR04, isolVarR03);
531  newCandidate.setFiducialVolumeFlags( fiducialFlags );
532  newCandidate.setIsolationVariables(isolVarR04, isolVarR03 );
533 
534 
536  reco::Photon::ShowerShape showerShape;
537  showerShape.e1x5= e1x5;
538  showerShape.e2x5= e2x5;
539  showerShape.e3x3= e3x3;
540  showerShape.e5x5= e5x5;
541  showerShape.maxEnergyXtal = maxXtal;
542  showerShape.sigmaEtaEta = sigmaEtaEta;
543  showerShape.sigmaIetaIeta = sigmaIetaIeta;
544  showerShape.hcalDepth1OverEcal = HoE1;
545  showerShape.hcalDepth2OverEcal = HoE2;
546  showerShape.hcalDepth1OverEcalBc = hcalDepth1OverEcalBc;
547  showerShape.hcalDepth2OverEcalBc = hcalDepth2OverEcalBc;
548  showerShape.hcalTowersBehindClusters = TowersBehindClus;
549  newCandidate.setShowerShapeVariables ( showerShape );
550 
553  // Photon candidate takes by default (set in photons_cfi.py)
554  // a 4-momentum derived from the ecal photon-specific corrections.
555  thePhotonEnergyCorrector_->calculate(evt, newCandidate, subdet, vertexCollection, es);
556  if ( candidateP4type_ == "fromEcalEnergy") {
557  newCandidate.setP4( newCandidate.p4(reco::Photon::ecal_photons) );
558  newCandidate.setCandidateP4type(reco::Photon::ecal_photons);
559  } else if ( candidateP4type_ == "fromRegression1") {
560  newCandidate.setP4( newCandidate.p4(reco::Photon::regression1) );
561  newCandidate.setCandidateP4type(reco::Photon::regression1);
562  } else if ( candidateP4type_ == "fromRegression2") {
563  newCandidate.setP4( newCandidate.p4(reco::Photon::regression2) );
564  newCandidate.setCandidateP4type(reco::Photon::regression2);
565  } else if ( candidateP4type_ == "fromRefinedSCRegression" ) {
566  newCandidate.setP4( newCandidate.p4(reco::Photon::regression1) );
567  newCandidate.setCandidateP4type(reco::Photon::regression1);
568  }
569 
570  // std::cout << " final p4 " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
571 
572 
573  // std::cout << " GEDPhotonProducer from candidate HoE with towers in a cone " << newCandidate.hadronicOverEm() << " " << newCandidate.hadronicDepth1OverEm() << " " << newCandidate.hadronicDepth2OverEm() << std::endl;
574  // std::cout << " GEDPhotonProducer from candidate of HoE with towers behind the BCs " << newCandidate.hadTowOverEm() << " " << newCandidate.hadTowDepth1OverEm() << " " << newCandidate.hadTowDepth2OverEm() << std::endl;
575 
576 
577  // fill MIP Vairables for Halo: Block for MIP are filled from PhotonMIPHaloTagger
579  if(subdet==EcalBarrel && runMIPTagger_ )
580  {
581 
582  thePhotonMIPHaloTagger_-> MIPcalculate( &newCandidate,evt,es,mipVar);
583  newCandidate.setMIPVariables(mipVar);
584  }
585 
586 
587 
589  bool isLooseEM=true;
590  if ( newCandidate.pt() < highEt_) {
591  if ( newCandidate.hadronicOverEm() >= preselCutValues[1] ) isLooseEM=false;
592  if ( newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2]+ preselCutValues[3]*newCandidate.pt() ) isLooseEM=false;
593  if ( newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4]+ preselCutValues[5]*newCandidate.pt() ) isLooseEM=false;
594  if ( newCandidate.nTrkSolidConeDR04() > int(preselCutValues[6]) ) isLooseEM=false;
595  if ( newCandidate.nTrkHollowConeDR04() > int(preselCutValues[7]) ) isLooseEM=false;
596  if ( newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8] ) isLooseEM=false;
597  if ( newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9] ) isLooseEM=false;
598  if ( newCandidate.sigmaIetaIeta() > preselCutValues[10] ) isLooseEM=false;
599  }
600 
601 
602 
603  if ( isLooseEM)
604  outputPhotonCollection.push_back(newCandidate);
605 
606 
607  }
608 }
PhotonEnergyCorrector * thePhotonEnergyCorrector_
PhotonMIPHaloTagger * thePhotonMIPHaloTagger_
edm::ESHandle< CaloGeometry > theCaloGeom_
std::vector< CaloTowerDetId > hcalTowersBehindClusters
Definition: Photon.h:149
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
std::vector< int > flagsexclEB_
PhotonIsolationCalculator * thePhotonIsolationCalculator_
std::vector< int > severitiesexclEE_
tuple vertexCollection
static std::vector< float > covariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, const CaloGeometry *geometry, float w0=4.7)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
static std::vector< float > localCovariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, float w0=4.7)
T sqrt(T t)
Definition: SSEVec.h:48
double p4[4]
Definition: TauolaWrapper.h:92
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
std::vector< int > flagsexclEE_
std::vector< int > severitiesexclEB_
void calculate(edm::Event &evt, reco::Photon &, int subdet, const reco::VertexCollection &vtxcol, const edm::EventSetup &iSetup)
std::vector< double > preselCutValuesBarrel_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
static float eMax(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
std::vector< double > preselCutValuesEndcap_
T const * product() const
Definition: ESHandle.h:62
T const * product() const
Definition: Handle.h:81
std::string candidateP4type_
ESHandle< TrackerGeometry > geometry
static float e2x5Max(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e5x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e1x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
void GEDPhotonProducer::fillPhotonCollection ( edm::Event evt,
edm::EventSetup const &  es,
const edm::Handle< reco::PhotonCollection > &  photonHandle,
const edm::Handle< reco::PFCandidateCollection pfCandidateHandle,
const edm::Handle< reco::PFCandidateCollection pfEGCandidateHandle,
edm::ValueMap< reco::PhotonRef pfEGCandToPhotonMap,
edm::Handle< reco::VertexCollection > &  pvVertices,
reco::PhotonCollection outputCollection,
int &  iSC 
)
private

Pre-selection loose isolation cuts

Definition at line 613 of file GEDPhotonProducer.cc.

References PFPhotonIsolationCalculator::calculate(), EcalBarrel, EcalEndcap, reco::Photon::ecalRecHitSumEtConeDR04(), reco::Photon::hadronicOverEm(), reco::Photon::hcalTowerSumEtConeDR04(), highEt_, edm::Ref< C, T, F >::isNonnull(), reco::Photon::nTrkHollowConeDR04(), reco::Photon::nTrkSolidConeDR04(), preselCutValuesBarrel_, preselCutValuesEndcap_, reco::LeafCandidate::pt(), reco::Photon::setPflowIDVariables(), reco::Photon::setPflowIsolationVariables(), reco::Photon::sigmaIetaIeta(), thePFBasedIsolationCalculator_, reco::Photon::trkSumPtHollowConeDR04(), and reco::Photon::trkSumPtSolidConeDR04().

620  {
621 
622 
623 
624  std::vector<double> preselCutValues;
625 
626 
627  for(unsigned int lSC=0; lSC < photonHandle->size(); lSC++) {
628  reco::PhotonRef phoRef(reco::PhotonRef(photonHandle, lSC));
629  reco::SuperClusterRef parentSCRef = phoRef->parentSuperCluster();
630  reco::SuperClusterRef scRef=phoRef->superCluster();
631  int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
632  if (subdet==EcalBarrel) {
633  preselCutValues = preselCutValuesBarrel_;
634  } else if (subdet==EcalEndcap) {
635  preselCutValues = preselCutValuesEndcap_;
636  } else {
637  edm::LogWarning("")<<"GEDPhotonProducer: do not know if it is a barrel or endcap SuperCluster";
638  }
639 
640 
641 
642  // SC energy preselection
643  if (parentSCRef.isNonnull() &&
644  ptFast(parentSCRef->energy(),parentSCRef->position(),math::XYZPoint(0,0,0)) <= preselCutValues[0] ) continue;
645  reco::Photon newCandidate(*phoRef);
646  iSC++;
647 
648 
649  // Calculate the PF isolation and ID - for the time being there is no calculation. Only the setting
652  thePFBasedIsolationCalculator_->calculate (&newCandidate, pfCandidateHandle, vertexHandle, evt, es, pfIso );
653  newCandidate.setPflowIsolationVariables(pfIso);
654  newCandidate.setPflowIDVariables(pfID);
655 
656  // std::cout << " GEDPhotonProducer pf based isolation chargedHadron " << newCandidate.chargedHadronIso() << " neutralHadron " << newCandidate.neutralHadronIso() << " Photon " << newCandidate.photonIso() << std::endl;
657  //std::cout << " GEDPhotonProducer from candidate HoE with towers in a cone " << newCandidate.hadronicOverEm() << " " << newCandidate.hadronicDepth1OverEm() << " " << newCandidate.hadronicDepth2OverEm() << std::endl;
658  //std::cout << " GEDPhotonProducer from candidate of HoE with towers behind the BCs " << newCandidate.hadTowOverEm() << " " << newCandidate.hadTowDepth1OverEm() << " " << newCandidate.hadTowDepth2OverEm() << std::endl;
659  //std::cout << " standard p4 before " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
660  //std::cout << " type " <<newCandidate.getCandidateP4type() << " standard p4 after " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
661  //std::cout << " final p4 " << newCandidate.p4() << " energy " << newCandidate.energy() << std::endl;
662 
663 
664 
666  bool isLooseEM=true;
667  if ( newCandidate.pt() < highEt_) {
668  if ( newCandidate.hadronicOverEm() >= preselCutValues[1] ) isLooseEM=false;
669  if ( newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2]+ preselCutValues[3]*newCandidate.pt() ) isLooseEM=false;
670  if ( newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4]+ preselCutValues[5]*newCandidate.pt() ) isLooseEM=false;
671  if ( newCandidate.nTrkSolidConeDR04() > int(preselCutValues[6]) ) isLooseEM=false;
672  if ( newCandidate.nTrkHollowConeDR04() > int(preselCutValues[7]) ) isLooseEM=false;
673  if ( newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8] ) isLooseEM=false;
674  if ( newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9] ) isLooseEM=false;
675  if ( newCandidate.sigmaIetaIeta() > preselCutValues[10] ) isLooseEM=false;
676  }
677 
678 
679 
680  if ( isLooseEM)
681  outputPhotonCollection.push_back(newCandidate);
682 
683 
684  }
685 
686 
687 
688 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
PFPhotonIsolationCalculator * thePFBasedIsolationCalculator_
std::vector< double > preselCutValuesBarrel_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< double > preselCutValuesEndcap_
void calculate(const reco::Photon *, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, edm::Handle< reco::VertexCollection > &vertices, const edm::Event &e, const edm::EventSetup &es, reco::Photon::PflowIsolationVariables &phoisol03)
void GEDPhotonProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
virtual

Implements edm::EDProducer.

Definition at line 235 of file GEDPhotonProducer.cc.

References barrelEcalHits_, endcapEcalHits_, edm::helper::Filler< Map >::fill(), fillPhotonCollection(), edm::EventSetup::get(), edm::Event::getByToken(), hcalTowers_, edm::helper::Filler< Map >::insert(), edm::InputTag::label(), pfCandidates_, pfEgammaCandidates_, photonCollection_, photonCoreProducerT_, photonProducer_, photonProducerT_, edm::ESHandle< class >::product(), edm::Event::put(), reconstructionStep_, theCaloGeom_, theCaloTopo_, usePrimaryVertex_, valueMapPFCandPhoton_, makeHLTPrescaleTable::values, GoodVertex_cfg::vertexCollection, and vertexProducer_.

235  {
236 
237  using namespace edm;
238  // nEvt_++;
239 
240  reco::PhotonCollection outputPhotonCollection;
241  std::auto_ptr< reco::PhotonCollection > outputPhotonCollection_p(new reco::PhotonCollection);
242  edm::ValueMap<reco::PhotonRef> pfEGCandToPhotonMap;
243 
244 
245  // Get the PhotonCore collection
246  bool validPhotonCoreHandle=false;
247  Handle<reco::PhotonCoreCollection> photonCoreHandle;
248  bool validPhotonHandle= false;
249  Handle<reco::PhotonCollection> photonHandle;
250 
251  if ( reconstructionStep_ == "final" ) {
252  theEvent.getByToken(photonProducerT_,photonHandle);
253  if ( photonHandle.isValid()) {
254  validPhotonHandle=true;
255  } else {
256  edm::LogError("GEDPhotonProducer") << "Error! Can't get the product " << photonProducer_.label() << "\n";
257  }
258 
259  } else {
260 
261  theEvent.getByToken(photonCoreProducerT_,photonCoreHandle);
262  if (photonCoreHandle.isValid()) {
263  validPhotonCoreHandle=true;
264  } else {
265  edm::LogError("GEDPhotonProducer")
266  << "Error! Can't get the photonCoreProducer" << photonProducer_.label() << "\n";
267  }
268 
269 
270 
271  }
272 
273 
274  // Get EcalRecHits
275  bool validEcalRecHits=true;
276  Handle<EcalRecHitCollection> barrelHitHandle;
277  EcalRecHitCollection barrelRecHits;
278  theEvent.getByToken(barrelEcalHits_, barrelHitHandle);
279  if (!barrelHitHandle.isValid()) {
280  edm::LogError("GEDPhotonProducer")
281  << "Error! Can't get the barrelEcalHits";
282  validEcalRecHits=false;
283  }
284  if ( validEcalRecHits) barrelRecHits = *(barrelHitHandle.product());
285 
286 
287  Handle<EcalRecHitCollection> endcapHitHandle;
288  theEvent.getByToken(endcapEcalHits_, endcapHitHandle);
289  EcalRecHitCollection endcapRecHits;
290  if (!endcapHitHandle.isValid()) {
291  edm::LogError("GEDPhotonProducer")
292  << "Error! Can't get the endcapEcalHits";
293  validEcalRecHits=false;
294  }
295  if( validEcalRecHits) endcapRecHits = *(endcapHitHandle.product());
296 
297 
298 
299  Handle<reco::PFCandidateCollection> pfEGCandidateHandle;
300  // Get the PF refined cluster collection
301  theEvent.getByToken(pfEgammaCandidates_,pfEGCandidateHandle);
302  if (!pfEGCandidateHandle.isValid()) {
303  edm::LogError("GEDPhotonProducer")
304  << "Error! Can't get the pfEgammaCandidates";
305  }
306 
307  Handle<reco::PFCandidateCollection> pfCandidateHandle;
308 
309  if ( reconstructionStep_ == "final" ) {
310  // Get the PF candidates collection
311  theEvent.getByToken(pfCandidates_,pfCandidateHandle);
312  if (!pfCandidateHandle.isValid()) {
313  edm::LogError("GEDPhotonProducer")
314  << "Error! Can't get the pfCandidates";
315  }
316 
317  }
318 
319 
320 
321 
322  //AA
323  //Get the severity level object
325  theEventSetup.get<EcalSeverityLevelAlgoRcd>().get(sevLv);
326  //
327 
328 
329 // get Hcal towers collection
330  Handle<CaloTowerCollection> hcalTowersHandle;
331  theEvent.getByToken(hcalTowers_, hcalTowersHandle);
332 
333 
334  // get the geometry from the event setup:
335  theEventSetup.get<CaloGeometryRecord>().get(theCaloGeom_);
336 
337  //
338  // update energy correction function
339  // energyCorrectionF->init(theEventSetup);
340 
341  edm::ESHandle<CaloTopology> pTopology;
342  theEventSetup.get<CaloTopologyRecord>().get(theCaloTopo_);
343  const CaloTopology *topology = theCaloTopo_.product();
344 
345  // Get the primary event vertex
346  Handle<reco::VertexCollection> vertexHandle;
348  bool validVertex=true;
349  if ( usePrimaryVertex_ ) {
350  theEvent.getByToken(vertexProducer_, vertexHandle);
351  if (!vertexHandle.isValid()) {
352  edm::LogWarning("GEDPhotonProducer")
353  << "Error! Can't get the product primary Vertex Collection";
354  validVertex=false;
355  }
356  if (validVertex) vertexCollection = *(vertexHandle.product());
357  }
358  // math::XYZPoint vtx(0.,0.,0.);
359  //if (vertexCollection.size()>0) vtx = vertexCollection.begin()->position();
360 
361 
362  int iSC=0; // index in photon collection
363  // Loop over barrel and endcap SC collections and fill the photon collection
364  if ( validPhotonCoreHandle)
365  fillPhotonCollection(theEvent,
366  theEventSetup,
367  photonCoreHandle,
368  topology,
369  &barrelRecHits,
370  &endcapRecHits,
371  hcalTowersHandle,
372  //vtx,
374  outputPhotonCollection,
375  iSC);
376 
377  iSC=0;
378  if ( validPhotonHandle && reconstructionStep_ == "final" )
379  fillPhotonCollection(theEvent,
380  theEventSetup,
381  photonHandle,
382  pfCandidateHandle,
383  pfEGCandidateHandle,
384  pfEGCandToPhotonMap,
385  vertexHandle,
386  outputPhotonCollection,
387  iSC);
388 
389 
390 
391  // put the product in the event
392  edm::LogInfo("GEDPhotonProducer") << " Put in the event " << iSC << " Photon Candidates \n";
393  outputPhotonCollection_p->assign(outputPhotonCollection.begin(),outputPhotonCollection.end());
394  const edm::OrphanHandle<reco::PhotonCollection> photonOrphHandle = theEvent.put(outputPhotonCollection_p, photonCollection_);
395 
396 
397  if ( reconstructionStep_ != "final" ) {
399  std::auto_ptr<edm::ValueMap<reco::PhotonRef> > pfEGCandToPhotonMap_p(new edm::ValueMap<reco::PhotonRef>());
400  edm::ValueMap<reco::PhotonRef>::Filler filler(*pfEGCandToPhotonMap_p);
401  unsigned nObj = pfEGCandidateHandle->size();
402  std::vector<reco::PhotonRef> values(nObj);
404  for(unsigned int lCand=0; lCand < nObj; lCand++) {
405  reco::PFCandidateRef pfCandRef (reco::PFCandidateRef(pfEGCandidateHandle,lCand));
406  reco::SuperClusterRef pfScRef = pfCandRef -> superClusterRef();
407 
408  for(unsigned int lSC=0; lSC < photonOrphHandle->size(); lSC++) {
409  reco::PhotonRef photonRef(reco::PhotonRef(photonOrphHandle, lSC));
410  reco::SuperClusterRef scRef=photonRef->superCluster();
411  if ( pfScRef != scRef ) continue;
412  values[lCand] = photonRef;
413  }
414  }
415 
416 
417  filler.insert(pfEGCandidateHandle,values.begin(),values.end());
418  filler.fill();
419  theEvent.put(pfEGCandToPhotonMap_p,valueMapPFCandPhoton_);
420 
421 
422  }
423 
424 
425 
426 
427 
428 
429 }
edm::InputTag photonProducer_
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
void fillPhotonCollection(edm::Event &evt, edm::EventSetup const &es, const edm::Handle< reco::PhotonCoreCollection > &photonCoreHandle, const CaloTopology *topology, const EcalRecHitCollection *ecalBarrelHits, const EcalRecHitCollection *ecalEndcapHits, const edm::Handle< CaloTowerCollection > &hcalTowersHandle, reco::VertexCollection &pvVertices, reco::PhotonCollection &outputCollection, int &iSC)
edm::ESHandle< CaloGeometry > theCaloGeom_
edm::EDGetTokenT< CaloTowerCollection > hcalTowers_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::string reconstructionStep_
tuple vertexCollection
std::string photonCollection_
edm::ESHandle< CaloTopology > theCaloTopo_
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
edm::EDGetTokenT< reco::PhotonCoreCollection > photonCoreProducerT_
edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_
edm::EDGetTokenT< reco::PhotonCollection > photonProducerT_
T const * product() const
Definition: ESHandle.h:62
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
std::string const & label() const
Definition: InputTag.h:42
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
std::string valueMapPFCandPhoton_

Member Data Documentation

edm::EDGetTokenT<EcalRecHitCollection> GEDPhotonProducer::barrelEcalHits_
private

Definition at line 85 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

std::string GEDPhotonProducer::candidateP4type_
private

Definition at line 139 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

edm::ParameterSet GEDPhotonProducer::conf_
private

Definition at line 123 of file GEDPhotonProducer.h.

Referenced by beginRun(), and GEDPhotonProducer().

std::string GEDPhotonProducer::conversionCollection_
private

Definition at line 94 of file GEDPhotonProducer.h.

std::string GEDPhotonProducer::conversionProducer_
private

Definition at line 93 of file GEDPhotonProducer.h.

edm::EDGetTokenT<EcalRecHitCollection> GEDPhotonProducer::endcapEcalHits_
private

Definition at line 86 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

EcalClusterFunctionBaseClass* GEDPhotonProducer::energyCorrectionF
private

Definition at line 137 of file GEDPhotonProducer.h.

std::vector<int> GEDPhotonProducer::flagsexclEB_
private

Definition at line 105 of file GEDPhotonProducer.h.

Referenced by beginRun(), fillPhotonCollection(), and GEDPhotonProducer().

std::vector<int> GEDPhotonProducer::flagsexclEE_
private

Definition at line 106 of file GEDPhotonProducer.h.

Referenced by beginRun(), fillPhotonCollection(), and GEDPhotonProducer().

edm::EDGetTokenT<CaloTowerCollection> GEDPhotonProducer::hcalTowers_
private

Definition at line 89 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

double GEDPhotonProducer::highEt_
private

Definition at line 114 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

double GEDPhotonProducer::hOverEConeSize_
private

Definition at line 111 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

double GEDPhotonProducer::maxHOverE_
private

Definition at line 112 of file GEDPhotonProducer.h.

double GEDPhotonProducer::minR9Barrel_
private

Definition at line 115 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

double GEDPhotonProducer::minR9Endcap_
private

Definition at line 116 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

double GEDPhotonProducer::minSCEt_
private

Definition at line 113 of file GEDPhotonProducer.h.

edm::EDGetTokenT<reco::PFCandidateCollection> GEDPhotonProducer::pfCandidates_
private

Definition at line 88 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

edm::EDGetTokenT<reco::PFCandidateCollection> GEDPhotonProducer::pfEgammaCandidates_
private

Definition at line 87 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

std::string GEDPhotonProducer::photonCollection_
private

Definition at line 80 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

edm::EDGetTokenT<reco::PhotonCoreCollection> GEDPhotonProducer::photonCoreProducerT_
private

Definition at line 83 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

edm::InputTag GEDPhotonProducer::photonProducer_
private

Definition at line 81 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

edm::EDGetTokenT<reco::PhotonCollection> GEDPhotonProducer::photonProducerT_
private

Definition at line 84 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

PositionCalc GEDPhotonProducer::posCalculator_
private

Definition at line 124 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer().

std::vector<double> GEDPhotonProducer::preselCutValuesBarrel_
private

Definition at line 134 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

std::vector<double> GEDPhotonProducer::preselCutValuesEndcap_
private

Definition at line 135 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

std::string GEDPhotonProducer::reconstructionStep_
private

Definition at line 120 of file GEDPhotonProducer.h.

Referenced by beginRun(), endRun(), GEDPhotonProducer(), and produce().

bool GEDPhotonProducer::runMIPTagger_
private

Definition at line 117 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and GEDPhotonProducer().

std::vector<int> GEDPhotonProducer::severitiesexclEB_
private

Definition at line 107 of file GEDPhotonProducer.h.

Referenced by beginRun(), fillPhotonCollection(), and GEDPhotonProducer().

std::vector<int> GEDPhotonProducer::severitiesexclEE_
private

Definition at line 108 of file GEDPhotonProducer.h.

Referenced by beginRun(), fillPhotonCollection(), and GEDPhotonProducer().

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

Definition at line 126 of file GEDPhotonProducer.h.

Referenced by fillPhotonCollection(), and produce().

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

Definition at line 127 of file GEDPhotonProducer.h.

Referenced by produce().

PFPhotonIsolationCalculator* GEDPhotonProducer::thePFBasedIsolationCalculator_
private

Definition at line 99 of file GEDPhotonProducer.h.

Referenced by beginRun(), endRun(), and fillPhotonCollection().

PhotonEnergyCorrector* GEDPhotonProducer::thePhotonEnergyCorrector_
private
PhotonIsolationCalculator* GEDPhotonProducer::thePhotonIsolationCalculator_
private

Definition at line 100 of file GEDPhotonProducer.h.

Referenced by beginRun(), endRun(), and fillPhotonCollection().

PhotonMIPHaloTagger* GEDPhotonProducer::thePhotonMIPHaloTagger_
private

Definition at line 132 of file GEDPhotonProducer.h.

Referenced by beginRun(), endRun(), and fillPhotonCollection().

bool GEDPhotonProducer::usePrimaryVertex_
private

Definition at line 122 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

bool GEDPhotonProducer::validConversions_
private

Definition at line 119 of file GEDPhotonProducer.h.

bool GEDPhotonProducer::validPixelSeeds_
private

Definition at line 129 of file GEDPhotonProducer.h.

std::string GEDPhotonProducer::valueMapPFCandPhoton_
private

Definition at line 95 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().

edm::EDGetTokenT<reco::VertexCollection> GEDPhotonProducer::vertexProducer_
private

Definition at line 90 of file GEDPhotonProducer.h.

Referenced by GEDPhotonProducer(), and produce().