49 dropSuperClusters_(iConfig.getParameter<std::
string>(
"dropSuperCluster")),
50 dropBasicClusters_(iConfig.getParameter<std::
string>(
"dropBasicClusters")),
51 dropPreshowerClusters_(iConfig.getParameter<std::
string>(
"dropPreshowerClusters")),
52 dropSeedCluster_(iConfig.getParameter<std::
string>(
"dropSeedCluster")),
53 dropRecHits_(iConfig.getParameter<std::
string>(
"dropRecHits")),
54 linkToPackedPF_(iConfig.getParameter<bool>(
"linkToPackedPFCandidates")),
55 saveNonZSClusterShapes_(iConfig.getParameter<std::
string>(
"saveNonZSClusterShapes")),
56 reducedBarrelRecHitCollectionToken_(consumes<
EcalRecHitCollection>(iConfig.getParameter<edm::
InputTag>(
"reducedBarrelRecHitCollection"))),
57 reducedEndcapRecHitCollectionToken_(consumes<
EcalRecHitCollection>(iConfig.getParameter<edm::
InputTag>(
"reducedEndcapRecHitCollection")))
59 produces<std::vector<pat::Photon> >();
65 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEB"));
66 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEE"));
80 if (linkToPackedPF_) {
85 noZS::EcalClusterLazyTools lazyToolsNoZS(iEvent, iSetup, reducedBarrelRecHitCollectionToken_, reducedEndcapRecHitCollectionToken_);
87 auto_ptr<vector<pat::Photon> >
out(
new vector<pat::Photon>());
88 out->reserve(
src->size());
90 std::vector<unsigned int>
keys;
101 if (linkToPackedPF_) {
104 for(
auto const& pf: (*reco2pf)[photon.
refToOrig_]) {
105 if( pf2pc->contains(pf.id()) ) {
106 keys.push_back( (*pf2pc)[pf].
key());
113 if (
keys.size() == 1) {
119 if (saveNonZSClusterShapes_(photon)) {
123 float sigmaIetaIphi = vCov[1];
126 photon.
addUserFloat(
"sigmaIetaIeta_NoZS", sigmaIetaIeta);
127 photon.
addUserFloat(
"sigmaIetaIphi_NoZS", sigmaIetaIphi);
128 photon.
addUserFloat(
"sigmaIphiIphi_NoZS", sigmaIphiIphi);
T getParameter(std::string const &) const
StringCutObjectSelector< pat::Photon > dropSeedCluster_
Analysis-level Photon class.
reco::SuperClusterRef superCluster() const
override the superCluster method from CaloJet, to access the internal storage of the supercluster ...
StringCutObjectSelector< pat::Photon > dropPreshowerClusters_
edm::EDGetTokenT< edm::View< pat::Photon > > src_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
StringCutObjectSelector< pat::Photon > dropSuperClusters_
#define DEFINE_FWK_MODULE(type)
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...
std::vector< reco::SuperCluster > superCluster_
std::vector< reco::CaloCluster > preshowerClusters_
Place to store electron's preshower clusters internally.
edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > reco2pf_
std::vector< reco::CaloCluster > seedCluster_
Place to store electron's seed cluster internally.
StringCutObjectSelector< pat::Photon > dropRecHits_
reco::CandidatePtr sourceCandidatePtr(size_type i) const
get the source candidate pointer with index i
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void addUserFloat(const std::string &label, float data)
Set user-defined float.
virtual ~PATPhotonSlimmer()
edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
bool embeddedSuperCluster_
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
edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > pf2pc_
PATPhotonSlimmer(const edm::ParameterSet &iConfig)
edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
StringCutObjectSelector< pat::Photon > saveNonZSClusterShapes_
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)
StringCutObjectSelector< pat::Photon > dropBasicClusters_
edm::Ptr< reco::Candidate > refToOrig_
std::vector< reco::CaloCluster > basicClusters_
Place to store electron's basic clusters internally.
edm::SortedCollection< EcalRecHit > EcalRecHitCollection