58 dropSuperClusters_(iConfig.getParameter<std::
string>("dropSuperCluster")),
59 dropBasicClusters_(iConfig.getParameter<std::
string>("dropBasicClusters")),
60 dropPreshowerClusters_(iConfig.getParameter<std::
string>("dropPreshowerClusters")),
61 dropSeedCluster_(iConfig.getParameter<std::
string>("dropSeedCluster")),
62 dropRecHits_(iConfig.getParameter<std::
string>("dropRecHits")),
63 dropSaturation_(iConfig.getParameter<std::
string>("dropSaturation")),
64 dropRegressionData_(iConfig.getParameter<std::
string>("dropRegressionData")),
66 iConfig.getParameter<edm::
InputTag>("recoToPFMap"))),
70 linkToPackedPF_(iConfig.getParameter<
bool>("linkToPackedPFCandidates")),
71 saveNonZSClusterShapes_(iConfig.getParameter<std::
string>("saveNonZSClusterShapes")),
72 reducedBarrelRecHitCollectionToken_(
74 reducedEndcapRecHitCollectionToken_(
77 ecalClusterToolsESGetTokens_{consumesCollector()} {
80 photonModifier_ = std::make_unique<pat::ObjectModifier<pat::Photon>>(mod_config, consumesCollector());
83 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEB"));
84 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEE"));
86 produces<std::vector<pat::Photon>>();
111 auto out = std::make_unique<std::vector<pat::Photon>>();
112 out->reserve(
src->size());
120 std::vector<unsigned int>
keys;
183 for (
auto const& pf : (*reco2pf)[photon.
refToOrig_]) {
184 if (pf2pc->contains(pf.id())) {
185 keys.push_back((*pf2pc)[pf].
key());
192 if (
keys.size() == 1) {
199 const auto& vCov = lazyToolsNoZS.localCovariances(*(photon.
superCluster()->seed()));
202 float sigmaIetaIphi = vCov[1];
206 photon.
addUserFloat(
"sigmaIetaIeta_NoZS", sigmaIetaIeta);
207 photon.
addUserFloat(
"sigmaIetaIphi_NoZS", sigmaIetaIphi);
208 photon.
addUserFloat(
"sigmaIphiIphi_NoZS", sigmaIphiIphi);
Analysis-level Photon class.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
void setSubClusDPhi3(float s)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
constexpr bool isNotFinite(T x)
#define DEFINE_FWK_MODULE(type)
void setMaxDRRawEnergy(float m)
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...
void setSubClusDPhi2(float s)
void setSaturationInfo(const SaturationInfo &s)
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.
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
reco::CandidatePtr sourceCandidatePtr(size_type i) const override
get the source candidate pointer with index i
const StringCutObjectSelector< pat::Photon > saveNonZSClusterShapes_
std::vector< reco::CaloCluster > seedCluster_
Place to store electron's seed cluster internally.
~PATPhotonSlimmer() override
tuple reducedBarrelRecHitCollection
const EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > pf2pc_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > reco2pf_
void setMaxDRDEta(float m)
tuple key
prepare the HTCondor submission files and eventually submit them
void setSubClusDPhi1(float s)
const edm::EDGetTokenT< edm::View< pat::Photon > > src_
void setSubClusDEta1(float s)
bool embeddedSuperCluster_
const StringCutObjectSelector< pat::Photon > dropRegressionData_
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
void setSubClusDEta2(float s)
T getParameter(std::string const &) const
void setSubClusRawE2(float s)
PATPhotonSlimmer(const edm::ParameterSet &iConfig)
reco::SuperClusterRef superCluster() const override
override the superCluster method from CaloJet, to access the internal storage of the supercluster ...
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
void setMaxDRDPhi(float m)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void setSubClusDEta3(float s)
bool embeddedSeedCluster_
True if seed cluster is stored internally.
void setSubClusRawE1(float s)
const StringCutObjectSelector< pat::Photon > dropSeedCluster_
const StringCutObjectSelector< pat::Photon > dropRecHits_
std::unique_ptr< pat::ObjectModifier< pat::Photon > > photonModifier_
void setSubClusRawE3(float s)
edm::Ref< l1t::PFCandidateCollection > PFCandidateRef
const StringCutObjectSelector< pat::Photon > dropSaturation_
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
tuple reducedEndcapRecHitCollection
const edm::EDGetTokenT< pat::PackedCandidateCollection > pc_