55 std::vector<edm::EDGetTokenT<edm::Association<reco::GenParticleCollection> > >
genMatchTokens_;
82 : isolator_(iConfig.exists(
"userIsolation") ? iConfig.getParameter<
edm::
ParameterSet>(
"userIsolation")
86 userDataHelper_(iConfig.getParameter<
edm::
ParameterSet>(
"userData"), consumesCollector()) {
108 iConfig.
getParameter<std::vector<edm::InputTag> >(
"genParticleMatch"),
109 [
this](
edm::InputTag const&
tag) { return consumes<edm::Association<reco::GenParticleCollection> >(tag); });
118 produces<std::vector<GenericParticle> >();
120 if (iConfig.
exists(
"isoDeposits")) {
122 if (depconf.
exists(
"tracker"))
124 if (depconf.
exists(
"ecal"))
126 if (depconf.
exists(
"hcal"))
128 if (depconf.
exists(
"user")) {
129 std::vector<edm::InputTag> userdeps = depconf.
getParameter<std::vector<edm::InputTag> >(
"user");
130 std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
132 for (; it != ed; ++it, ++
key) {
139 return consumes<edm::ValueMap<IsoDeposit> >(
label.second);
156 if (iConfig.
exists(
"vertexing")) {
163 if (iConfig.
exists(
"userData")) {
188 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
193 std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > > genMatches(
genMatchTokens_.size());
206 std::vector<GenericParticle>* PATGenericParticles =
new std::vector<GenericParticle>();
208 itGenericParticle++) {
210 unsigned int idx = itGenericParticle -
cands->begin();
246 for (
size_t j = 0, nd =
deposits.size();
j < nd; ++
j) {
252 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
289 std::unique_ptr<std::vector<GenericParticle> > myGenericParticles(PATGenericParticles);
bool enabled() const
'true' if this there is at least one efficiency configured
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
T getParameter(std::string const &) const
void setIsolation(IsolationKeys key, float value)
bool enabled() const
True if it has a non null configuration.
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void embedTrack()
embeds the master track instead of keeping a reference to it
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
IsolationKeys
Enum defining isolation keys.
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
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 fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
pat::PATUserDataHelper< pat::GenericParticle > userDataHelper_
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
void embedStandalone()
embeds the stand-alone track instead of keeping a reference to it
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcToken_
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
bool enabled() const
'true' if this there is at least one efficiency configured
PATGenericParticleProducer(const edm::ParameterSet &iConfig)
GreaterByEt< GenericParticle > eTComparator_
Produces the pat::GenericParticle.
~PATGenericParticleProducer() override
bool enabled() const
returns true if this was given a non dummy configuration
key
prepare the HTCondor submission files and eventually submit them
#define DEFINE_FWK_MODULE(type)
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
const char * qualities[3]
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
void embedGsfTrack()
embeds the gsf track instead of keeping a reference to it
void embedSuperCluster()
embeds the supercluster instead of keeping a reference to it
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
void addGenParticleRef(const reco::GenParticleRef &ref)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
void embedTracks()
embeds the other tracks instead of keeping references
void newEvent(const edm::Event &event)
To be called for each new event, reads in the vertex collection.
std::vector< std::pair< pat::IsolationKeys, edm::InputTag > > isoDepositLabels_
pat::helper::EfficiencyLoader efficiencyLoader_
pat::helper::VertexingHelper vertexingHelper_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
pat::helper::MultiIsolator isolator_
void embedCaloTower()
embeds the calotower instead of keeping a reference to it
void setQuality(float quality)
sets a user defined quality value
void embedCombined()
embeds the combined track instead of keeping a reference to it
pat::helper::KinResolutionsLoader resolutionLoader_
edm::EDGetTokenT< edm::ValueMap< float > > qualitySrcToken_
Produces and/or checks pat::VertexAssociation's.
void setVertexAssociation(const pat::VertexAssociation &assoc)
Set a single vertex association.