48 src_(consumes<edm::
View<pat::
Photon> >(iConfig.getParameter<edm::InputTag>(
"src"))),
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"))
57 produces<std::vector<pat::Photon> >();
63 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEB"));
64 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEE"));
78 if (linkToPackedPF_) {
83 edm::InputTag reducedBarrelRecHitCollection(
"reducedEcalRecHitsEB");
84 edm::InputTag reducedEndcapRecHitCollection(
"reducedEcalRecHitsEE");
87 auto_ptr<vector<pat::Photon> >
out(
new vector<pat::Photon>());
88 out->reserve(
src->size());
100 if (linkToPackedPF_) {
105 if (pf2pc->contains(pf.id())) {
112 if (origs.
size() == 1) {
118 if (saveNonZSClusterShapes_(photon)) {
120 const auto & seedCluster = *photon.
superCluster()->seed();
122 std::vector<float> Cov = lazyToolsNoZS.
covariances(seedCluster);
127 ss.
e1x5 = lazyToolsNoZS.
e1x5(seedCluster);
129 ss.
e3x3 = lazyToolsNoZS.
e3x3(seedCluster);
130 ss.
e5x5 = lazyToolsNoZS.
e5x5(seedCluster);
void setAssociatedPackedPFCandidates(const edm::RefVector< pat::PackedCandidateCollection > &refvector)
References to PFCandidates linked to this object (e.g. for isolation vetos or masking before jet recl...
T getParameter(std::string const &) const
StringCutObjectSelector< pat::Photon > dropSeedCluster_
Analysis-level Photon class.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
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 full5x5_setShowerShape(const ShowerShape &s)
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_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual ~PATPhotonSlimmer()
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
reco::SuperClusterRef superCluster() const
override the superCluster method from CaloJet, to access the internal storage of the supercluster ...
edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > pf2pc_
PATPhotonSlimmer(const edm::ParameterSet &iConfig)
edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
StringCutObjectSelector< pat::Photon > saveNonZSClusterShapes_
bool embeddedSeedCluster_
True if seed cluster is stored internally.
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
size_type size() const
Size of the RefVector.
void setPackedPFCandidateCollection(const edm::RefProd< pat::PackedCandidateCollection > &refprod)
References to PFCandidates (e.g. to recompute isolation)
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