|
|
Go to the documentation of this file.
54 electronToken_(consumes<
edm::
View<
reco::GsfElectron>>(iConfig.getParameter<
edm::
InputTag>(
"electronSource"))),
56 embedGsfElectronCore_(iConfig.getParameter<
bool>(
"embedGsfElectronCore")),
57 embedGsfTrack_(iConfig.getParameter<
bool>(
"embedGsfTrack")),
58 embedSuperCluster_(iConfig.getParameter<
bool>(
"embedSuperCluster")),
59 embedPflowSuperCluster_(iConfig.getParameter<
bool>(
"embedPflowSuperCluster")),
60 embedSeedCluster_(iConfig.getParameter<
bool>(
"embedSeedCluster")),
61 embedBasicClusters_(iConfig.getParameter<
bool>(
"embedBasicClusters")),
62 embedPreshowerClusters_(iConfig.getParameter<
bool>(
"embedPreshowerClusters")),
63 embedPflowBasicClusters_(iConfig.getParameter<
bool>(
"embedPflowBasicClusters")),
64 embedPflowPreshowerClusters_(iConfig.getParameter<
bool>(
"embedPflowPreshowerClusters")),
65 embedTrack_(iConfig.getParameter<
bool>(
"embedTrack")),
66 addGenMatch_(iConfig.getParameter<
bool>(
"addGenMatch")),
67 embedGenMatch_(addGenMatch_ ? iConfig.getParameter<
bool>(
"embedGenMatch") :
false),
68 embedRecHits_(iConfig.getParameter<
bool>(
"embedRecHits")),
70 useParticleFlow_(iConfig.getParameter<
bool>(
"useParticleFlow")),
71 usePfCandidateMultiMap_(iConfig.getParameter<
bool>(
"usePfCandidateMultiMap")),
72 pfElecToken_(!usePfCandidateMultiMap_
76 iConfig.getParameter<
edm::
InputTag>(
"pfCandidateMap"))
78 pfCandidateMultiMapToken_(usePfCandidateMultiMap_
80 iConfig.getParameter<
edm::
InputTag>(
"pfCandidateMultiMap"))
82 embedPFCandidate_(iConfig.getParameter<
bool>(
"embedPFCandidate")),
84 addMVAVariables_(iConfig.getParameter<
bool>(
"addMVAVariables")),
85 reducedBarrelRecHitCollection_(iConfig.getParameter<
edm::
InputTag>(
"reducedBarrelRecHitCollection")),
86 reducedBarrelRecHitCollectionToken_(mayConsume<
EcalRecHitCollection>(reducedBarrelRecHitCollection_)),
87 reducedEndcapRecHitCollection_(iConfig.getParameter<
edm::
InputTag>(
"reducedEndcapRecHitCollection")),
88 reducedEndcapRecHitCollectionToken_(mayConsume<
EcalRecHitCollection>(reducedEndcapRecHitCollection_)),
90 addPFClusterIso_(iConfig.getParameter<
bool>(
"addPFClusterIso")),
91 addPuppiIsolation_(iConfig.getParameter<
bool>(
"addPuppiIsolation")),
92 ecalPFClusterIsoT_(consumes<
edm::ValueMap<
float>>(iConfig.getParameter<
edm::
InputTag>(
"ecalPFClusterIsoMap"))),
93 hcalPFClusterIsoT_(consumes<
edm::ValueMap<
float>>(iConfig.getParameter<
edm::
InputTag>(
"hcalPFClusterIsoMap"))),
95 embedHighLevelSelection_(iConfig.getParameter<
bool>(
"embedHighLevelSelection")),
98 addElecID_(iConfig.getParameter<
bool>(
"addElectronID")),
100 isolator_(iConfig.exists(
"userIsolation") ? iConfig.getParameter<
edm::
ParameterSet>(
"userIsolation")
104 addEfficiencies_(iConfig.getParameter<
bool>(
"addEfficiencies")),
105 addResolutions_(iConfig.getParameter<
bool>(
"addResolutions")),
106 useUserData_(iConfig.exists(
"userData"))
117 iConfig.
getParameter<std::vector<edm::InputTag>>(
"genParticleMatch"),
118 [
this](
edm::InputTag const&
tag) { return consumes<edm::Association<reco::GenParticleCollection>>(tag); });
152 <<
"PATElectronProducer: you can't specify both 'electronIDSource' and 'electronIDSources'\n";
157 for (std::vector<std::string>::const_iterator it =
names.begin(), ed =
names.end(); it != ed; ++it) {
164 <<
"PATElectronProducer: id addElectronID is true, you must specify either:\n"
165 <<
"\tInputTag electronIDSource = <someTag>\n"
167 <<
"\tPSet electronIDSources = { \n"
168 <<
"\t\tInputTag <someName> = <someTag> // as many as you want \n "
199 throw cms::Exception(
"ParameterError") <<
"miniIsoParams must have exactly 9 elements.\n";
223 throw cms::Exception(
"Configuration",
"usePfCandidateMultiMap not supported when useParticleFlow is set to true");
226 produces<std::vector<Electron>>();
233 if (
iEvent.isRealData()) {
297 std::vector<edm::Handle<edm::ValueMap<float>>> idhandles;
298 std::vector<pat::Electron::IdPair> ids;
313 bool beamSpotIsValid =
false;
314 bool primaryVertexIsValid =
false;
328 if (pvHandle.
isValid() && !pvHandle->empty()) {
330 primaryVertexIsValid =
true;
333 <<
"No primary vertex available from EventSetup, not adding high level selection \n";
355 std::vector<Electron>*
patElectrons =
new std::vector<Electron>();
370 bool MatchedToAmbiguousGsfTrack =
false;
375 if (
Matched || MatchedToAmbiguousGsfTrack)
380 if (itElectron->gsfTrack() ==
i->gsfTrackRef()) {
384 it != itElectron->ambiguousGsfTracksEnd();
386 MatchedToAmbiguousGsfTrack |= (
bool)(
i->gsfTrackRef() == (*it));
390 if (
Matched || MatchedToAmbiguousGsfTrack) {
400 (*PUPPIIsolation_neutral_hadrons)[elePtr],
401 (*PUPPIIsolation_photons)[elePtr]);
403 (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
404 (*PUPPINoLeptonsIsolation_photons)[elePtr]);
428 if (
track.isNonnull() &&
track.isAvailable()) {
433 ip3d = ip3dpv.second.value();
442 ids[
i].second = (*idhandles[
i])[elecsRef];
445 ids.push_back(std::make_pair(
"pf_evspi", pfRef->mva_e_pi()));
446 ids.push_back(std::make_pair(
"pf_evsmu", pfRef->mva_e_mu()));
452 std::vector<float> vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
468 std::vector<DetId> selectedCells;
469 bool barrel = itElectron->isEB();
473 clusIt != itElectron->superCluster()->clustersEnd();
476 DetId seed = lazyTools.getMaximum(**clusIt).first;
478 std::vector<DetId> dets5x5 =
481 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
484 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
485 selectedCells.push_back(
hit.first);
492 clusIt != itElectron->parentSuperCluster()->clustersEnd();
495 DetId seed = lazyTools.getMaximum(**clusIt).first;
497 std::vector<DetId> dets5x5 =
500 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
503 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
504 selectedCells.push_back(
hit.first);
510 std::sort(selectedCells.begin(), selectedCells.end());
511 std::unique(selectedCells.begin(), selectedCells.end());
524 unsigned nSelectedCells = selectedCells.size();
525 for (
unsigned icell = 0; icell < nSelectedCells; ++icell) {
531 selectedRecHits.
sort();
536 bool passconversionveto =
false;
579 bool pfCandsPresent =
false, valMapPresent =
false;
608 }
else if (pfCandsPresent) {
616 if (trkRef == pfTrkRef) {
623 }
else if (valMapPresent) {
648 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
655 ids[
i].second = (*idhandles[
i])[elecsRef];
672 if (
track.isNonnull() &&
track.isAvailable()) {
677 ip3d = ip3dpv.second.value();
683 std::vector<float> vCov = lazyTools.localCovariances(*(itElectron->superCluster()->seed()));
702 (*PUPPIIsolation_neutral_hadrons)[elePtr],
703 (*PUPPIIsolation_photons)[elePtr]);
705 (*PUPPINoLeptonsIsolation_neutral_hadrons)[elePtr],
706 (*PUPPINoLeptonsIsolation_photons)[elePtr]);
712 std::vector<DetId> selectedCells;
713 bool barrel = itElectron->isEB();
717 clusIt != itElectron->superCluster()->clustersEnd();
720 DetId seed = lazyTools.getMaximum(**clusIt).first;
722 std::vector<DetId> dets5x5 =
725 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
728 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
729 selectedCells.push_back(
hit.first);
736 clusIt != itElectron->parentSuperCluster()->clustersEnd();
739 DetId seed = lazyTools.getMaximum(**clusIt).first;
741 std::vector<DetId> dets5x5 =
744 selectedCells.insert(selectedCells.end(), dets5x5.begin(), dets5x5.end());
747 for (
const std::pair<DetId, float>&
hit : (*clusIt)->hitsAndFractions()) {
748 selectedCells.push_back(
hit.first);
754 std::sort(selectedCells.begin(), selectedCells.end());
755 std::unique(selectedCells.begin(), selectedCells.end());
768 unsigned nSelectedCells = selectedCells.size();
769 for (
unsigned icell = 0; icell < nSelectedCells; ++icell) {
775 selectedRecHits.
sort();
780 bool passconversionveto =
false;
807 std::unique_ptr<std::vector<Electron>> ptr(
patElectrons);
863 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
884 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
949 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
966 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
992 if (anElectron.
isEE())
1022 iDesc.
setComment(
"PAT electron producer module");
1031 "ecalPFClusterIsoMap",
edm::InputTag(
"electronEcalPFClusterIsolationProducer"),
true) and
1033 "hcalPFClusterIsoMap",
edm::InputTag(
"electronHcalPFClusterIsolationProducer"),
true))
or
1039 "puppiIsolationChargedHadrons",
1040 edm::InputTag(
"egmElectronPUPPIIsolation",
"h+-DR030-BarVeto000-EndVeto001"),
1043 "puppiIsolationNeutralHadrons",
1044 edm::InputTag(
"egmElectronPUPPIIsolation",
"h0-DR030-BarVeto000-EndVeto000"),
1047 "puppiIsolationPhotons",
1048 edm::InputTag(
"egmElectronPUPPIIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1051 "puppiNoLeptonsIsolationChargedHadrons",
1052 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1055 "puppiNoLeptonsIsolationNeutralHadrons",
1056 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1059 "puppiNoLeptonsIsolationPhotons",
1060 edm::InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008"),
1065 iDesc.
add<
bool>(
"embedGsfElectronCore",
true)->setComment(
"embed external gsf electron core");
1066 iDesc.
add<
bool>(
"embedGsfTrack",
true)->setComment(
"embed external gsf track");
1067 iDesc.
add<
bool>(
"embedSuperCluster",
true)->setComment(
"embed external super cluster");
1068 iDesc.
add<
bool>(
"embedPflowSuperCluster",
true)->setComment(
"embed external super cluster");
1069 iDesc.
add<
bool>(
"embedSeedCluster",
true)->setComment(
"embed external seed cluster");
1070 iDesc.
add<
bool>(
"embedBasicClusters",
true)->setComment(
"embed external basic clusters");
1071 iDesc.
add<
bool>(
"embedPreshowerClusters",
true)->setComment(
"embed external preshower clusters");
1072 iDesc.
add<
bool>(
"embedPflowBasicClusters",
true)->setComment(
"embed external pflow basic clusters");
1073 iDesc.
add<
bool>(
"embedPflowPreshowerClusters",
true)->setComment(
"embed external pflow preshower clusters");
1074 iDesc.
add<
bool>(
"embedTrack",
false)->setComment(
"embed external track");
1075 iDesc.
add<
bool>(
"embedRecHits",
true)->setComment(
"embed external RecHits");
1079 ->setComment(
"particle flow input collection");
1082 "take ParticleFlow candidates from pfCandidateMultiMap instead of matching to pfElectrons by Gsf track "
1087 iDesc.
add<
bool>(
"useParticleFlow",
false)->setComment(
"whether to use particle flow or not");
1088 iDesc.
add<
bool>(
"embedPFCandidate",
false)->setComment(
"embed external particle flow object");
1091 iDesc.
add<
bool>(
"addGenMatch",
true)->setComment(
"add MC matching");
1092 iDesc.
add<
bool>(
"embedGenMatch",
false)->setComment(
"embed MC matched MC information");
1093 std::vector<edm::InputTag> emptySourceVector;
1097 ->
setComment(
"input with MC match information");
1100 iDesc.
add<
bool>(
"addElectronID",
true)->setComment(
"add electron ID variables");
1107 ->
setComment(
"input with electron ID variables");
1110 iDesc.
add<
bool>(
"computeMiniIso",
false)->setComment(
"whether or not to compute and store electron mini-isolation");
1112 ->setComment(
"collection to use to compute mini-iso");
1113 iDesc.
add<std::vector<double>>(
"miniIsoParamsE", std::vector<double>())
1114 ->setComment(
"mini-iso parameters to use for endcap electrons");
1115 iDesc.
add<std::vector<double>>(
"miniIsoParamsB", std::vector<double>())
1116 ->setComment(
"mini-iso parameters to use for barrel electrons");
1129 isoDepositsPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1130 iDesc.
addOptional(
"isoDeposits", isoDepositsPSet);
1143 isolationValuesPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1144 iDesc.
addOptional(
"isolationValues", isolationValuesPSet);
1157 isolationValuesNoPFIdPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
1158 iDesc.
addOptional(
"isolationValuesNoPFId", isolationValuesNoPFIdPSet);
1163 iDesc.
add(
"efficiencies", efficienciesPSet);
1164 iDesc.
add<
bool>(
"addEfficiencies",
false);
1172 iDesc.
add<
bool>(
"addMVAVariables",
true)->setComment(
"embed extra variables in pat::Electron : sip3d, sigmaIEtaIPhi");
1178 iDesc.
add(
"userIsolation", isolationPSet);
1183 iDesc.
add<
bool>(
"embedHighLevelSelection",
true)->setComment(
"embed high level selection");
1187 ->
setComment(
"input with high level selection");
1189 ->
setComment(
"input with high level selection");
1191 descriptions.
add(
"PATElectronProducer", iDesc);
1200 bool primaryVertexIsValid,
1202 bool beamspotIsValid) {
1206 std::pair<bool, Measurement1D>
result =
1208 double d0_corr =
result.second.value();
1209 double d0_err = primaryVertexIsValid ?
result.second.error() : -1.0;
1214 d0_corr =
result.second.value();
1215 d0_err = primaryVertexIsValid ?
result.second.error() : -1.0;
1224 d0_corr =
result.second.value();
1225 d0_err = beamspotIsValid ?
result.second.error() : -1.0;
1230 d0_corr =
result.second.value();
1231 d0_err = beamspotIsValid ?
result.second.error() : -1.0;
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
void embedTrack()
method to store the electron's Track internally
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueNoPFIdTokens_
Assists in assimilating all pat::UserData into pat objects.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const bool embedGsfTrack_
std::vector< EcalRecHit >::const_iterator const_iterator
std::vector< NameTag > elecIDSrcs_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
const bool addPFClusterIso_
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
T const * product() const
void embedHighLevel(pat::Electron &anElectron, reco::GsfTrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid)
void fillElectron2(Electron &anElectron, const reco::CandidatePtr &candPtrForIsolation, const reco::CandidatePtr &candPtrForGenMatch, const reco::CandidatePtr &candPtrForLoader, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const IsolationValueMaps &isolationValues) const
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
void embedSeedCluster()
method to store the electron's seedcluster internally
void embedPreshowerClusters()
method to store the electron's preshower clusters
void setElectronMiniIso(pat::Electron &anElectron, const pat::PackedCandidateCollection *pc)
std::vector< Conversion > ConversionCollection
pat::helper::KinResolutionsLoader resolutionLoader_
IsolationLabels isolationValueLabels_
bool isNull() const
Checks for null.
void fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
static void fillDescription(edm::ParameterSetDescription &iDesc)
const edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
void setEcalDrivenMomentum(const Candidate::LorentzVector &mom)
void embedGsfElectronCore()
method to store the electron's core internally
PFCandidateCollection::const_iterator PFCandidateConstIterator
iterator
void setPassConversionVeto(bool flag)
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > elecIDTokens_
void setIsolationPUPPINoLeptons(float chargedhadrons_, float neutralhadrons_, float photons_)
sets PUPPINoLeptons isolations
void setIsolation(IsolationKeys key, float value)
bool enabled() const
'true' if this there is at least one efficiency configured
void embedRecHits(const EcalRecHitCollection *rechits)
method to store the RecHits internally - can be called from the PATElectronProducer
void setIsolationPUPPI(float chargedhadrons_, float neutralhadrons_, float photons_)
sets PUPPI isolations
const bool embedPflowBasicClusters_
void addGenParticleRef(const reco::GenParticleRef &ref)
const bool embedHighLevelSelection_
embed high level selection variables?
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
pat::PATUserDataHelper< pat::Electron > userDataHelper_
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_charged_hadrons_
const bool addEfficiencies_
Global3DVector GlobalVector
IsolationLabels isolationValueLabelsNoPFId_
void embedPflowBasicClusters()
method to store the electron's pflow basic clusters
std::pair< std::string, edm::InputTag > NameTag
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
reco::PFCandidateRef pfCandidateRef() const
reference to the source PFCandidates; null if this has been built from a standard electron
void push_back(T const &t)
void embedPflowSuperCluster()
method to store the electron's PflowSuperCluster internally
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
bool enabled() const
'true' if this there is at least one efficiency configured
void embedGsfTrack()
method to store the electron's GsfTrack internally
const bool embedPreshowerClusters_
const GreaterByPt< Electron > pTComparator_
const edm::EDGetTokenT< edm::ValueMap< reco::PFCandidatePtr > > pfCandidateMapToken_
bool enabled() const
True if it has a non null configuration.
const edm::EDGetTokenT< reco::PFCandidateCollection > pfElecToken_
const bool embedPflowSuperCluster_
const bool embedSeedCluster_
void setDB(double dB, double edB, IPTYPE type)
Set impact parameter of a certain type and its uncertainty.
primaryVertex
hltOfflineBeamSpot for HLTMON
reducedEBRecHitCollection
void setP4(P4Kind kind, const LorentzVector &p4, float p4Error, bool setCandidate)
const bool usePfCandidateMultiMap_
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > pfCandidateMultiMapToken_
PFIsolation getMiniPFIsolation(const pat::PackedCandidateCollection *pfcands, const reco::Candidate::PolarLorentzVector &p4, float mindr=0.05, float maxdr=0.2, float kt_scale=10.0, float ptthresh=0.5, float deadcone_ch=0.0001, float deadcone_pu=0.01, float deadcone_ph=0.01, float deadcone_nh=0.01, float dZ_cut=0.0)
edm::Ref< l1t::PFCandidateCollection > PFCandidateRef
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
void embedPflowPreshowerClusters()
method to store the electron's pflow preshower clusters
const std::string names[nVars_]
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
reducedEERecHitCollection
const bool embedBasicClusters_
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
const bool embedGsfElectronCore_
static const std::string source
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
void embedBasicClusters()
method to store the electron's basic clusters
const Point & position() const
position
void embedSuperCluster()
method to store the electron's SuperCluster internally
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
void setMvaVariables(double sigmaIetaIphi, double ip3d)
set missing mva input variables
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
void setIsPF(bool hasPFCandidate)
const edm::EDGetTokenT< edm::ValueMap< float > > hcalPFClusterIsoT_
void setComment(std::string const &value)
ProductID id() const
Accessor for product ID.
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
const bool embedSuperCluster_
void setPfIsolationVariables(const PflowIsolationVariables &iso)
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases)
const edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
const bool embedPflowPreshowerClusters_
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
void setMiniPFIsolation(PFIsolation const &iso)
const CaloTopology * ecalTopology_
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
const bool embedPFCandidate_
bool contains(EventRange const &lh, EventID const &rh)
void setAllowAnything()
allow any parameter label/value pairs
const edm::EDGetTokenT< reco::ConversionCollection > hConversionsToken_
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
const LorentzVector & p4(P4Kind kind) const
~PATElectronProducer() override
std::vector< l1t::PFCandidate > PFCandidateCollection
void embedPFCandidate()
embed the PFCandidate pointed to by pfCandidateRef_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
const bool addMVAVariables_
mva input variables
const bool useParticleFlow_
pflow specific
const bool addPuppiIsolation_
std::vector< pat::PackedCandidate > PackedCandidateCollection
PATElectronProducer(const edm::ParameterSet &iConfig)
pat::helper::MultiIsolator isolator_
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
math::XYZPoint Point
point in the space
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T getParameter(std::string const &) const
edm::EDGetTokenT< pat::PackedCandidateCollection > pcToken_
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
def unique(seq, keepstr=True)
std::vector< double > miniIsoParamsB_
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
void fillElectron(Electron &aElectron, const ElectronBaseRef &electronRef, const reco::CandidateBaseRef &baseRef, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const bool pfId, const IsolationValueMaps &isolationValues, const IsolationValueMaps &isolationValuesNoPFId) const
common electron filling, for both the standard and PF2PAT case
const edm::EDGetTokenT< edm::ValueMap< float > > ecalPFClusterIsoT_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
const edm::EDGetTokenT< reco::BeamSpot > beamLineToken_
bool isNonnull() const
Checks for non-null.
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_neutral_hadrons_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
reco::TransientTrack build(const reco::Track *p) const
std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > GenAssociations
Analysis-level electron class.
const PolarLorentzVector & polarP4() const final
four-momentum Lorentz vector
const PflowIsolationVariables & pfIsolationVariables() const
void setComment(std::string const &value)
IsolationLabels isoDepositLabels_
void setPFCandidateRef(const reco::PFCandidateRef &ref)
add a reference to the source IsolatedPFCandidate
std::vector< double > miniIsoParamsE_
void setElectronIDs(const std::vector< IdPair > &ids)
Store multiple electron ID values, discarding existing ones. The first one in the list becomes the 'd...
const bool addResolutions_
pat::helper::EfficiencyLoader efficiencyLoader_
Produces pat::Electron's.
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &tokens)
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_