4 #ifndef DataFormats_PatCandidates_PATObject_h 5 #define DataFormats_PatCandidates_PATObject_h 42 namespace pat_statics {
47 template <
class ObjectType>
91 const size_t idx = 0)
const;
93 const size_t idx = 0)
const {
98 const size_t idx = 0)
const {
105 return triggerObjectMatchesByCollection(
std::string(coll));
117 return triggerObjectMatchesByCondition(
std::string(nameCondition));
121 const size_t idx = 0)
const;
124 const size_t idx = 0)
const {
125 return triggerObjectMatchByCondition(
std::string(nameCondition),
idx);
131 const bool algoCondAccepted =
true)
const;
134 const bool algoCondAccepted =
true)
const {
135 return triggerObjectMatchesByAlgorithm(
std::string(nameAlgorithm), algoCondAccepted);
139 const unsigned algoCondAccepted)
const {
140 return triggerObjectMatchesByAlgorithm(nameAlgorithm,
bool(algoCondAccepted));
144 const unsigned algoCondAccepted)
const {
145 return triggerObjectMatchesByAlgorithm(
std::string(nameAlgorithm),
bool(algoCondAccepted));
151 const bool algoCondAccepted =
true,
152 const size_t idx = 0)
const;
155 const bool algoCondAccepted =
true,
156 const size_t idx = 0)
const {
157 return triggerObjectMatchByAlgorithm(
std::string(nameAlgorithm), algoCondAccepted,
idx);
161 const unsigned algoCondAccepted,
162 const size_t idx = 0)
const {
163 return triggerObjectMatchByAlgorithm(nameAlgorithm,
bool(algoCondAccepted),
idx);
167 const unsigned algoCondAccepted,
168 const size_t idx = 0)
const {
169 return triggerObjectMatchByAlgorithm(
std::string(nameAlgorithm),
bool(algoCondAccepted),
idx);
175 return triggerObjectMatchesByFilter(
std::string(labelFilter));
179 const size_t idx = 0)
const;
190 const bool pathLastFilterAccepted =
false,
191 const bool pathL3FilterAccepted =
true)
const;
194 const bool pathLastFilterAccepted =
false,
195 const bool pathL3FilterAccepted =
true)
const {
196 return triggerObjectMatchesByPath(
std::string(namePath), pathLastFilterAccepted, pathL3FilterAccepted);
200 const unsigned pathLastFilterAccepted,
201 const unsigned pathL3FilterAccepted = 1)
const {
202 return triggerObjectMatchesByPath(namePath,
bool(pathLastFilterAccepted),
bool(pathL3FilterAccepted));
206 const unsigned pathLastFilterAccepted,
207 const unsigned pathL3FilterAccepted = 1)
const {
208 return triggerObjectMatchesByPath(
209 std::string(namePath),
bool(pathLastFilterAccepted),
bool(pathL3FilterAccepted));
217 const bool pathLastFilterAccepted =
false,
218 const bool pathL3FilterAccepted =
true,
219 const size_t idx = 0)
const;
222 const bool pathLastFilterAccepted =
false,
223 const bool pathL3FilterAccepted =
true,
224 const size_t idx = 0)
const {
225 return triggerObjectMatchByPath(
std::string(namePath), pathLastFilterAccepted, pathL3FilterAccepted,
idx);
229 const unsigned pathLastFilterAccepted,
230 const unsigned pathL3FilterAccepted = 1,
231 const size_t idx = 0)
const {
232 return triggerObjectMatchByPath(namePath,
bool(pathLastFilterAccepted),
bool(pathL3FilterAccepted),
idx);
236 const unsigned pathLastFilterAccepted,
237 const unsigned pathL3FilterAccepted = 1,
238 const size_t idx = 0)
const {
239 return triggerObjectMatchByPath(
240 std::string(namePath),
bool(pathLastFilterAccepted),
bool(pathL3FilterAccepted),
idx);
244 triggerObjectMatchesEmbedded_.push_back(trigObj);
248 for (std::vector<TriggerObjectStandAlone>::iterator it = triggerObjectMatchesEmbedded_.begin(),
249 ed = triggerObjectMatchesEmbedded_.end();
252 it->unpackPathNames(names);
258 std::vector<std::pair<std::string, pat::LookupTableRecord> >
efficiencies()
const;
262 const std::vector<pat::LookupTableRecord> &
efficiencyValues()
const {
return efficiencyValues_; }
271 if (
idx >= genParticlesSize())
296 return genParticleEmbedded_.empty() ? genParticleRef_.size() : genParticleEmbedded_.size();
300 std::vector<reco::GenParticleRef> genParticleRefs()
const;
311 void embedGenParticle();
319 const std::vector<std::string> &
overlapLabels()
const {
return overlapLabels_; }
326 template <
typename T>
329 return (data !=
nullptr ? data->template get<T>() :
nullptr);
339 const std::vector<std::string> &
userDataNames()
const {
return userDataLabels_; }
345 return (data !=
nullptr ? data->
bareData() :
nullptr);
352 template <
typename T>
354 std::unique_ptr<pat::UserData> made(pat::UserData::make<T>(data, transientOnly));
355 addUserDataObject_(label,
std::move(made), overwrite);
361 std::unique_ptr<pat::UserData>
cloned(data->
clone());
369 std::vector<float> userFloatRange(
const std::string &key)
const;
374 void addUserFloat(
const std::string &label,
float data,
const bool overwrite =
false);
376 const std::vector<std::string> &
userFloatNames()
const {
return userFloatLabels_; }
379 auto it = std::lower_bound(userFloatLabels_.cbegin(), userFloatLabels_.cend(),
key);
380 return (it != userFloatLabels_.cend() && *it ==
key);
389 std::vector<int> userIntRange(
const std::string &key)
const;
391 void addUserInt(
const std::string &label, int32_t data,
const bool overwrite =
false);
393 const std::vector<std::string> &
userIntNames()
const {
return userIntLabels_; }
396 auto it = std::lower_bound(userIntLabels_.cbegin(), userIntLabels_.cend(),
key);
397 return (it != userIntLabels_.cend() && *it ==
key);
406 const std::vector<std::string> &
userCandNames()
const {
return userCandLabels_; }
409 auto it = std::lower_bound(userCandLabels_.cbegin(), userCandLabels_.cend(),
key);
410 return (it != userCandLabels_.cend() && *it ==
key);
419 bool hasKinResolution(
const std::string &label =
"")
const;
502 void addUserDataObject_(
const std::string &label, std::unique_ptr<pat::UserData> value,
bool overwrite =
false);
508 template <
class ObjectType>
511 template <
class ObjectType>
514 template <
class ObjectType>
523 template <
class ObjectType>
526 template <
class ObjectType>
534 <<
"The original collection from which this PAT object was made is not present any more in the event, hence " 535 "you cannot access the originating object anymore.";
541 template <
class ObjectType>
546 template <
class ObjectType>
554 template <
class ObjectType>
565 template <
class ObjectType>
568 std::vector<size_t> refs;
573 if (idx >= refs.size())
576 return ref.
isNonnull() ? ref.get() :
nullptr;
579 template <
class ObjectType>
590 template <
class ObjectType>
592 const size_t idx)
const {
593 std::vector<size_t> refs;
599 if (idx >= refs.size())
602 return ref.
isNonnull() ? ref.get() :
nullptr;
605 template <
class ObjectType>
616 template <
class ObjectType>
618 const size_t idx)
const {
619 std::vector<size_t> refs;
624 if (idx >= refs.size())
627 return ref.
isNonnull() ? ref.get() :
nullptr;
630 template <
class ObjectType>
632 const std::string &nameAlgorithm,
const bool algoCondAccepted)
const {
641 template <
class ObjectType>
643 const bool algoCondAccepted,
644 const size_t idx)
const {
645 std::vector<size_t> refs;
650 if (idx >= refs.size())
653 return ref.
isNonnull() ? ref.get() :
nullptr;
656 template <
class ObjectType>
667 template <
class ObjectType>
669 const size_t idx)
const {
670 std::vector<size_t> refs;
675 if (idx >= refs.size())
678 return ref.
isNonnull() ? ref.get() :
nullptr;
681 template <
class ObjectType>
683 const std::string &namePath,
const bool pathLastFilterAccepted,
const bool pathL3FilterAccepted)
const {
693 template <
class ObjectType>
695 const bool pathLastFilterAccepted,
696 const bool pathL3FilterAccepted,
697 const size_t idx)
const {
698 std::vector<size_t> refs;
704 if (idx >= refs.size())
707 return ref.
isNonnull() ? ref.get() :
nullptr;
710 template <
class ObjectType>
715 throw cms::Exception(
"Invalid Label") <<
"There is no efficiency with name '" << name <<
"' in this PAT Object\n";
720 template <
class ObjectType>
722 std::vector<std::pair<std::string, pat::LookupTableRecord> >
ret;
724 std::vector<pat::LookupTableRecord>::const_iterator itv =
efficiencyValues_.begin();
725 for (; itn != edn; ++itn, ++itv) {
726 ret.emplace_back(*itn, *itv);
731 template <
class ObjectType>
739 }
else if (*it == name) {
747 template <
class ObjectType>
755 template <
class ObjectType>
765 template <
class ObjectType>
772 template <
class ObjectType>
783 template <
class ObjectType>
788 for (
size_t i = 0,
n =
ret.size();
i <
n; ++
i) {
794 template <
class ObjectType>
798 for (std::vector<reco::GenParticleRef>::const_iterator ref = vec.begin(),
end = vec.end(); ref !=
end; ++ref) {
799 if (ref->isNonnull()) {
805 }
else if (!autoCharge) {
806 if (pdgId == g.
pdgId())
812 else if ((this->
charge() == 0) && (pdgId == g.
pdgId()))
822 template <
class ObjectType>
828 template <
class ObjectType>
836 template <
class ObjectType>
848 template <
class ObjectType>
857 template <
class ObjectType>
859 std::unique_ptr<pat::UserData>
data,
866 }
else if (overwrite) {
875 template <
class ObjectType>
882 return std::numeric_limits<float>::quiet_NaN();
885 template <
class ObjectType>
888 std::vector<float>
result;
890 for (
auto it =
range.first; it !=
range.second; ++it) {
896 template <
class ObjectType>
903 }
else if (overwrite) {
912 template <
class ObjectType>
922 template <
class ObjectType>
927 for (
auto it =
range.first; it !=
range.second; ++it) {
933 template <
class ObjectType>
940 }
else if (overwrite) {
949 template <
class ObjectType>
958 template <
class ObjectType>
961 const bool overwrite) {
967 }
else if (overwrite) {
975 template <
class ObjectType>
979 if (has_unlabelled) {
982 throw cms::Exception(
"Missing Data",
"This object does not contain an un-labelled kinematic resolution");
987 const size_t increment = (has_unlabelled ? 1 : 0);
990 ex <<
"This object does not contain a kinematic resolution with name '" << label <<
"'.\n";
991 ex <<
"The known labels are: ";
995 ex <<
"'" << *it <<
"' ";
1005 template <
class ObjectType>
1007 if (label.empty()) {
1015 template <
class ObjectType>
1018 if (label.empty()) {
1019 if (has_unlabelled) {
1030 const size_t increment = (has_unlabelled ? 1 : 0);
std::vector< std::string > efficiencyNames_
vector of the efficiencies (names)
const TriggerObjectStandAlone * triggerObjectMatchByCollection(const std::string &coll, const size_t idx=0) const
get one matched trigger object from a certain collection by index
~PATObject() override
destructor
bool hasUserFloat(const char *key) const
a CINT-friendly interface
int pdgId() const final
PDG identifier.
void addUserCand(const std::string &label, const reco::CandidatePtr &data, const bool overwrite=false)
Set user-defined int.
bool hasOverlaps(const std::string &label) const
Returns true if there was at least one overlap for this test label.
const TriggerObjectStandAlone * triggerObjectMatchByPath(const std::string &namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, const size_t idx=0) const
void addUserDataObject_(const std::string &label, std::unique_ptr< pat::UserData > value, bool overwrite=false)
def addGenParticleRef(patMuonProducer, label='classByHitsGlbOrTrk')
const TriggerObjectStandAlone * triggerObjectMatchByAlgorithm(const char *nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const
bool hasPathName(const std::string &pathName, bool pathLastFilterAccepted=false, bool pathL3FilterAccepted=true) const
Checks, if a certain HLT path name is assigned.
bool isNonnull() const
Checks for non-null.
std::vector< std::pair< std::string, pat::LookupTableRecord > > efficiencies() const
Returns the efficiencies as <name,value> pairs (by value)
const TriggerObjectStandAlone * triggerObjectMatchByPath(const char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, const size_t idx=0) const
const TriggerObjectStandAlone * triggerObjectMatchByAlgorithm(const char *nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const
double resolPhi(const LorentzVector &p4) const
Resolution on phi, given the 4-momentum of the associated Candidate.
std::vector< reco::GenParticleRef > genParticleRef_
Reference to a generator level particle.
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
bool hasKinResolution(const std::string &label="") const
Check if the kinematic resolutions are stored into this object (possibly specifying a label for them)...
reco::GenParticleRef genParticleRef(size_t idx=0) const
const reco::GenParticle * genParticle(size_t idx=0) const
PATObject()
default constructor
double resolP(const std::string &label="") const
Resolution on p, possibly with a label to specify which resolution to use.
const TriggerObjectStandAlone * triggerObjectMatchByFilterID(const unsigned triggerObjectType, const size_t idx=0) const
ret
prodAgent to be discontinued
T const * get() const
Returns C++ pointer to the item.
size_t genParticlesSize() const
Number of generator level particles stored as ref or embedded.
std::vector< reco::CandidatePtr > userCands_
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath(const char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1) const
edm::Ref< GenParticleCollection > GenParticleRef
persistent reference to a GenParticle
Class to store the result of a lookup table fetch, e.g. for efficiencies.
const TriggerObjectStandAloneCollection triggerObjectMatchesByFilter(const std::string &labelFilter) const
get all matched HLT objects used in a certain HLT filter
double resolPInv(const std::string &label="") const
Resolution on 1/p, possibly with a label to specify which resolution to use.
bool hasUserFloat(const std::string &key) const
Return true if there is a user-defined float with a given name.
int charge() const final
electric charge
std::vector< pat::CandKinResolution > kinResolutions_
Kinematic resolutions.
double resolPz(const std::string &label="") const
Resolution on pz, possibly with a label to specify which resolution to use.
const TriggerObjectStandAlone * triggerObjectMatchByCondition(const char *nameCondition, const size_t idx=0) const
bool hasUserCand(const std::string &key) const
Return true if there is a user-defined int with a given name.
void addUserFloat(const std::string &label, float data, const bool overwrite=false)
Set user-defined float.
std::vector< std::string > userCandLabels_
void setGenParticle(const reco::GenParticle &particle)
Set the generator level particle from a particle not in the Event (embedding it, of course) ...
std::vector< reco::GenParticleRef > genParticleRefs() const
std::vector< float > userFloatRange(const std::string &key) const
return a range of values corresponding to key
void setEfficiency(const std::string &name, const pat::LookupTableRecord &value)
TriggerObjectStandAloneCollection triggerObjectMatchesEmbedded_
vector of trigger matches
void setGenParticleRef(const reco::GenParticleRef &ref, bool embed=false)
Set the generator level particle reference.
bool hasCollection(const std::string &collName) const override
Checks, if a certain label of original collection is assigned (method overrides)
std::vector< std::string > userDataLabels_
User data object.
const std::string names[nVars_]
std::vector< reco::GenParticle > genParticleEmbedded_
vector to hold an embedded generator level particle
const std::vector< std::string > & userCandNames() const
Get list of user-defined cand names.
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 g
const std::vector< pat::LookupTableRecord > & efficiencyValues() const
Returns the list of the values of the stored efficiencies (the ordering is the same as in efficiencyN...
std::vector< float > userFloats_
float userFloat(const std::string &key) const
void setKinResolution(const pat::CandKinResolution &resol, const std::string &label="")
Add a kinematic resolution to this object (possibly with a label)
void unpackTriggerObjectPathNames(const edm::TriggerNames &names)
unpack path names of matched trigger objects (if they were packed before embedding, which is not normally the case)
bool hasUserInt(const std::string &key) const
Return true if there is a user-defined int with a given name.
bool hasAlgorithmName(const std::string &algorithmName, bool algoCondAccepted=true) const
Checks, if a certain L1 algorithm name is assigned.
double resolPt(const std::string &label="") const
Resolution on pt, possibly with a label to specify which resolution to use.
const reco::CandidatePtrVector & overlaps(const std::string &label) const
const TriggerObjectStandAlone * triggerObjectMatchByAlgorithm(const std::string &nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const
double resolPz(const LorentzVector &p4) const
Resolution on pz, given the 4-momentum of the associated Candidate.
const TriggerObjectStandAlone * triggerObjectMatchByFilter(const std::string &labelFilter, const size_t idx=0) const
get one matched HLT object used in a certain HLT filter by index
std::vector< pat::LookupTableRecord > efficiencyValues_
vector of the efficiencies (values)
double resolPy(const std::string &label="") const
Resolution on py, possibly with a label to specify which resolution to use.
double resolEt(const std::string &label="") const
Resolution on et, possibly with a label to specify which resolution to use.
double resolPx(const std::string &label="") const
Resolution on px, possibly with a label to specify which resolution to use.
double resolP(const LorentzVector &p4) const
Resolution on p, given the 4-momentum of the associated Candidate.
double resolPy(const LorentzVector &p4) const
Resolution on py, given the 4-momentum of the associated Candidate.
const TriggerObjectStandAlone * triggerObjectMatchByPath(const char *namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true, const size_t idx=0) const
static const std::string EMPTY_STR("")
virtual const std::string & typeName() const =0
Human readable name of the concrete type of stored data.
bool isNull() const
Checks for null.
Abs< T >::type abs(const T &t)
double resolEta(const LorentzVector &p4) const
Resolution on eta, given the 4-momentum of the associated Candidate.
std::vector< std::string > userFloatLabels_
void throwMissingLabel(const std::string &what, const std::string &bad_label, const std::vector< std::string > &available)
const TriggerObjectStandAlone * triggerObjectMatch(const size_t idx=0) const
get one matched trigger object by index
void set(size_t i, D *&d)
const T * userData(const std::string &key) const
Returns user-defined data. Returns NULL if the data is not present, or not of type T...
const TriggerObjectStandAlone * triggerObjectMatchByFilter(const char *labelFilter, const size_t idx=0) const
T const * get() const
Returns C++ pointer to the item.
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath(const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
double resolPhi(const std::string &label="") const
Resolution on phi, possibly with a label to specify which resolution to use.
const edm::Ptr< reco::Candidate > & originalObjectRef() const
reference to original object. Returns a null reference if not available
const TriggerObjectStandAlone * triggerObjectMatchByPath(const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true, const size_t idx=0) const
const TriggerObjectStandAloneCollection triggerObjectMatchesByCondition(const char *nameCondition) const
bool hasUserData(const std::string &key) const
Check if user data with a specific type is present.
void addUserInt(const std::string &label, int32_t data, const bool overwrite=false)
Set user-defined int.
double resolE(const std::string &label="") const
Resolution on energy, possibly with a label to specify which resolution to use.
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath(const char *namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
bool hasTriggerObjectType(trigger::TriggerObjectType triggerObjectType) const
Checks, if a certain trigger object type identifier is assigned.
const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm(const std::string &nameAlgorithm, const bool algoCondAccepted=true) const
const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm(const char *nameAlgorithm, const bool algoCondAccepted=true) const
double resolM(const LorentzVector &p4) const
std::vector< reco::CandidatePtrVector > overlapItems_
Overlapping items (sorted by distance)
std::vector< std::string > kinResolutionLabels_
void setOverlaps(const std::string &label, const reco::CandidatePtrVector &overlaps)
const TriggerObjectStandAloneCollection triggerObjectMatchesByFilterID(const unsigned triggerObjectType) const
void addGenParticleRef(const reco::GenParticleRef &ref)
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
double resolPInv(const LorentzVector &p4) const
Resolution on 1/p, given the 4-momentum of the associated Candidate.
pat::UserDataCollection userDataObjects_
const TriggerObjectStandAloneCollection triggerObjectMatchesByCollection(const std::string &coll) const
get all matched trigger objects from a certain collection
double resolPx(const LorentzVector &p4) const
Resolution on px, given the 4-momentum of the associated Candidate.
const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm(const std::string &nameAlgorithm, const unsigned algoCondAccepted) const
const pat::UserData * userDataObject_(const std::string &key) const
bool hasFilterLabel(const std::string &filterLabel) const
Checks, if a certain HLT filter label is assigned.
bool hasConditionName(const std::string &conditionName) const
Checks, if a certain L1 condition name is assigned.
virtual UserData * clone() const =0
Necessary for deep copy in OwnVector.
int32_t userInt(const std::string &key) const
const TriggerObjectStandAlone * triggerObjectMatchByType(const unsigned triggerObjectType, const size_t idx=0) const
void addTriggerObjectMatch(const TriggerObjectStandAlone &trigObj)
add a trigger match
const std::vector< std::string > & userDataNames() const
Get list of user data object names.
const TriggerObjectStandAlone * triggerObjectMatchByAlgorithm(const std::string &nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const
const TriggerObjectStandAloneCollection & triggerObjectMatches() const
get all matched trigger objects
const void * userDataBare(const std::string &key) const
reco::CandidatePtr userCand(const std::string &key) const
const TriggerObjectStandAlone * triggerObjectMatchByCollection(const char *coll, const size_t idx=0) const
const TriggerObjectStandAloneCollection triggerObjectMatchesByType(const unsigned triggerObjectType) const
char data[epos_bytes_allocation]
const TriggerObjectStandAlone * triggerObjectMatchByCondition(const std::string &nameCondition, const size_t idx=0) const
get one matched L1 object used in a succeeding object combination of a certain L1 condition by index ...
double resolE(const LorentzVector &p4) const
Resolution on energy, given the 4-momentum of the associated Candidate.
const TriggerObjectStandAloneCollection triggerObjectMatchesByType(const trigger::TriggerObjectType triggerObjectType) const
const TriggerObjectStandAloneCollection triggerObjectMatchesByCollection(const char *coll) const
const TriggerObjectStandAloneCollection triggerObjectMatchesByCondition(const std::string &nameCondition) const
get all matched L1 objects used in a succeeding object combination of a certain L1 condition ...
float userFloat(const char *key) const
a CINT-friendly interface
int status() const final
status word
const pat::LookupTableRecord & efficiency(const std::string &name) const
Returns an efficiency given its name.
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath(const std::string &namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1) const
const reco::Candidate * originalObject() const
access to the original object; returns zero for null Ref and throws for unavailable collection ...
Templated PAT object container.
const pat::CandKinResolution & getKinResolution(const std::string &label="") const
const TriggerObjectStandAlone * triggerObjectMatchByType(const trigger::TriggerObjectType triggerObjectType, const size_t idx=0) const
get one matched trigger object of a certain type by index
double resolTheta(const std::string &label="") const
Resolution on theta, possibly with a label to specify which resolution to use.
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Base class for data that users can add to pat objects.
std::vector< int > userIntRange(const std::string &key) const
returns a range of values corresponding to key
std::vector< std::string > overlapLabels_
Overlapping test labels (only if there are any overlaps)
double resolEt(const LorentzVector &p4) const
Resolution on et, given the 4-momentum of the associated Candidate.
const std::vector< std::string > & userFloatNames() const
Get list of user-defined float names.
double resolPt(const LorentzVector &p4) const
Resolution on pt, given the 4-momentum of the associated Candidate.
static const reco::CandidatePtrVector EMPTY_CPV
std::vector< int32_t > userInts_
const TriggerObjectStandAloneCollection triggerObjectMatchesByFilter(const char *labelFilter) const
const std::vector< std::string > & userIntNames() const
Get list of user-defined int names.
void insert(const_iterator i, D *&d)
const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm(const char *nameAlgorithm, const unsigned algoCondAccepted) const
edm::Ptr< reco::Candidate > refToOrig_
void addUserData(const std::string &label, const T &data, bool transientOnly=false, bool overwrite=false)
double resolM(const std::string &label="") const
reco::GenParticleRef genParticleById(int pdgId, int status, uint8_t autoCharge=0) const
void addUserDataFromPtr(const std::string &label, const edm::Ptr< pat::UserData > &data, bool overwrite=false)
const void * bareData() const
double resolEta(const std::string &label="") const
Resolution on eta, possibly with a label to specify which resolution to use.
const std::string & userDataObjectType(const std::string &key) const
Get human-readable type of user data object, for debugging.
const std::vector< std::string > & efficiencyNames() const
Returns the list of the names of the stored efficiencies.
Analysis-level trigger object class (stand-alone)
double resolTheta(const LorentzVector &p4) const
Resolution on theta, given the 4-momentum of the associated Candidate.
std::vector< std::string > userIntLabels_
const std::vector< std::string > & overlapLabels() const
Returns the labels of the overlap tests that found at least one overlap.