54 dropSuperClusters_(iConfig.getParameter<std::
string>("dropSuperCluster")),
55 dropBasicClusters_(iConfig.getParameter<std::
string>("dropBasicClusters")),
56 dropPreshowerClusters_(iConfig.getParameter<std::
string>("dropPreshowerClusters")),
57 dropSeedCluster_(iConfig.getParameter<std::
string>("dropSeedCluster")),
58 dropRecHits_(iConfig.getParameter<std::
string>("dropRecHits")),
62 linkToPackedPF_(iConfig.getParameter<
bool>("linkToPackedPFCandidates")),
63 saveNonZSClusterShapes_(iConfig.getParameter<std::
string>("saveNonZSClusterShapes")),
66 modifyPhoton_(iConfig.getParameter<
bool>("modifyPhotons"))
72 photonModifier_->setConsumes(sumes);
74 photonModifier_.reset(
nullptr);
77 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEB"));
78 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEE"));
80 produces<std::vector<pat::Photon> >();
105 auto_ptr<vector<pat::Photon> >
out(
new vector<pat::Photon>());
106 out->reserve(
src->size());
111 std::vector<unsigned int>
keys;
127 for(
auto const& pf: (*reco2pf)[photon.
refToOrig_]) {
128 if( pf2pc->contains(pf.id()) ) {
129 keys.push_back( (*pf2pc)[pf].
key());
136 if (
keys.size() == 1) {
146 float sigmaIetaIphi = vCov[1];
149 photon.
addUserFloat(
"sigmaIetaIeta_NoZS", sigmaIetaIeta);
150 photon.
addUserFloat(
"sigmaIetaIphi_NoZS", sigmaIetaIphi);
151 photon.
addUserFloat(
"sigmaIphiIphi_NoZS", sigmaIphiIphi);
T getParameter(std::string const &) const
Analysis-level Photon class.
reco::SuperClusterRef superCluster() const
override the superCluster method from CaloJet, to access the internal storage of the supercluster ...
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const bool linkToPackedPF_
std::vector< pat::PackedCandidate > PackedCandidateCollection
void setAssociatedPackedPFCandidates(const edm::RefProd< pat::PackedCandidateCollection > &refprod, T beginIndexItr, T endIndexItr)
References to PFCandidates linked to this object (e.g. for isolation vetos or masking before jet recl...
const StringCutObjectSelector< pat::Photon > dropSuperClusters_
std::vector< reco::SuperCluster > superCluster_
void addUserFloat(const std::string &label, float data, const bool overwrite=false)
Set user-defined float.
std::vector< reco::CaloCluster > preshowerClusters_
Place to store electron's preshower clusters internally.
const StringCutObjectSelector< pat::Photon > saveNonZSClusterShapes_
std::vector< reco::CaloCluster > seedCluster_
Place to store electron's seed cluster internally.
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
reco::CandidatePtr sourceCandidatePtr(size_type i) const
get the source candidate pointer with index i
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > pf2pc_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > reco2pf_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
virtual ~PATPhotonSlimmer()
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
const edm::EDGetTokenT< edm::View< pat::Photon > > src_
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
bool embeddedSuperCluster_
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) overridefinal
EcalRecHitCollection recHits_
Place to store electron's RecHits internally (5x5 around seed+ all RecHits)
bool embeddedRecHits_
True if RecHits stored internally.
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
PATPhotonSlimmer(const edm::ParameterSet &iConfig)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
bool embeddedSeedCluster_
True if seed cluster is stored internally.
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
const StringCutObjectSelector< pat::Photon > dropSeedCluster_
const StringCutObjectSelector< pat::Photon > dropRecHits_
std::unique_ptr< pat::ObjectModifier< pat::Photon > > photonModifier_
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
const edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
edm::Ptr< reco::Candidate > refToOrig_
const StringCutObjectSelector< pat::Photon > dropBasicClusters_
const StringCutObjectSelector< pat::Photon > dropPreshowerClusters_
std::vector< reco::CaloCluster > basicClusters_
Place to store electron's basic clusters internally.
edm::SortedCollection< EcalRecHit > EcalRecHitCollection
const edm::EDGetTokenT< pat::PackedCandidateCollection > pc_