4 #ifndef DataFormats_PatCandidates_PATObject_h
5 #define DataFormats_PatCandidates_PATObject_h
40 template <
class ObjectType>
205 std::vector<std::pair<std::string,pat::LookupTableRecord> >
efficiencies()
const ;
274 return (data != 0 ? data->template get<T>() : 0);
285 return (data != 0 ? data->
typeName() : EMPTY);
294 return (data != 0 ? data->
bareData() : 0);
461 refToOrig_(ref.id(), ref.
get(), ref.
key())
472 if (refToOrig_.isNull()) {
476 }
else if (!refToOrig_.isAvailable()) {
477 throw edm::Exception(
edm::errors::ProductNotFound) <<
"The original collection from which this PAT object was made is not present any more in the event, hence you cannot access the originating object anymore.";
479 return refToOrig_.get();
483 template <
class ObjectType>
486 template <
class ObjectType>
488 if ( idx >= triggerObjectMatches().
size() )
return 0;
493 template <
class ObjectType>
496 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
497 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasTriggerObjectType( triggerObjectType ) ) matches.push_back( *( triggerObjectMatch(
i ) ) );
502 template <
class ObjectType>
504 std::vector< size_t > refs;
505 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
506 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasTriggerObjectType( triggerObjectType ) ) refs.push_back(
i );
508 if ( idx >= refs.size() )
return 0;
513 template <
class ObjectType>
516 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
517 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasCollection( coll ) ) matches.push_back( *( triggerObjectMatch(
i ) ) );
522 template <
class ObjectType>
524 std::vector< size_t > refs;
525 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
526 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasCollection( coll ) ) {
530 if ( idx >= refs.size() )
return 0;
535 template <
class ObjectType>
538 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
539 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasConditionName( nameCondition ) ) matches.push_back( *( triggerObjectMatch(
i ) ) );
544 template <
class ObjectType>
546 std::vector< size_t > refs;
547 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
548 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasConditionName( nameCondition ) ) refs.push_back(
i );
550 if ( idx >= refs.size() )
return 0;
555 template <
class ObjectType>
558 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
559 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasAlgorithmName( nameAlgorithm, algoCondAccepted ) ) matches.push_back( *( triggerObjectMatch(
i ) ) );
564 template <
class ObjectType>
566 std::vector< size_t > refs;
567 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
568 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasAlgorithmName( nameAlgorithm, algoCondAccepted ) ) refs.push_back(
i );
570 if ( idx >= refs.size() )
return 0;
575 template <
class ObjectType>
578 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
579 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasFilterLabel( labelFilter ) ) matches.push_back( *( triggerObjectMatch(
i ) ) );
584 template <
class ObjectType>
586 std::vector< size_t > refs;
587 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
588 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasFilterLabel( labelFilter ) ) refs.push_back(
i );
590 if ( idx >= refs.size() )
return 0;
595 template <
class ObjectType>
598 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
599 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasPathName( namePath, pathLastFilterAccepted, pathL3FilterAccepted ) ) matches.push_back( *( triggerObjectMatch(
i ) ) );
604 template <
class ObjectType>
606 std::vector< size_t > refs;
607 for (
size_t i = 0;
i < triggerObjectMatches().size(); ++
i ) {
608 if ( triggerObjectMatch(
i ) != 0 && triggerObjectMatch(
i )->hasPathName( namePath, pathLastFilterAccepted, pathL3FilterAccepted ) ) refs.push_back(
i );
610 if ( idx >= refs.size() )
return 0;
615 template <
class ObjectType>
619 std::vector<std::string>::const_iterator it = std::lower_bound(efficiencyNames_.begin(), efficiencyNames_.end(),
name);
620 if ((it == efficiencyNames_.end()) || (*it != name)) {
621 throw cms::Exception(
"Invalid Label") <<
"There is no efficiency with name '" << name <<
"' in this PAT Object\n";
623 return efficiencyValues_[it - efficiencyNames_.begin()];
626 template <
class ObjectType>
627 std::vector<std::pair<std::string,pat::LookupTableRecord> >
629 std::vector<std::pair<std::string,pat::LookupTableRecord> >
ret;
630 std::vector<std::string>::const_iterator itn = efficiencyNames_.begin(), edn = efficiencyNames_.end();
631 std::vector<pat::LookupTableRecord>::const_iterator itv = efficiencyValues_.begin();
632 for ( ; itn != edn; ++itn, ++itv) {
633 ret.push_back( std::pair<std::string,pat::LookupTableRecord>(*itn, *itv) );
638 template <
class ObjectType>
641 std::vector<std::string>::iterator it = std::lower_bound(efficiencyNames_.begin(), efficiencyNames_.end(),
name);
642 if (it == efficiencyNames_.end()) {
643 efficiencyNames_.push_back(name);
644 efficiencyValues_.push_back(value);
645 }
else if (*it == name) {
646 efficiencyValues_[it - efficiencyNames_.begin()] =
value;
648 efficiencyNames_.
insert(it, name);
649 efficiencyValues_.insert( efficiencyValues_.begin() + (it - efficiencyNames_.begin()), value );
653 template <
class ObjectType>
655 genParticleRef_ = std::vector<reco::GenParticleRef>(1,ref);
656 genParticleEmbedded_.clear();
657 if (embed) embedGenParticle();
660 template <
class ObjectType>
662 if (!genParticleEmbedded_.empty()) {
663 if (ref.
isNonnull()) genParticleEmbedded_.push_back(*ref);
665 genParticleRef_.push_back(ref);
669 template <
class ObjectType>
671 genParticleEmbedded_.clear();
672 genParticleEmbedded_.push_back(particle);
673 genParticleRef_.clear();
676 template <
class ObjectType>
678 genParticleEmbedded_.clear();
679 for (std::vector<reco::GenParticleRef>::const_iterator it = genParticleRef_.begin(); it != genParticleRef_.end(); ++it) {
680 if (it->isNonnull()) genParticleEmbedded_.push_back(**it);
682 genParticleRef_.clear();
685 template <
class ObjectType>
687 if (genParticleEmbedded_.empty())
return genParticleRef_;
688 std::vector<reco::GenParticleRef>
ret(genParticleEmbedded_.size());
689 for (
size_t i = 0,
n =
ret.size();
i <
n; ++
i) {
695 template <
class ObjectType>
698 const std::vector<reco::GenParticleRef> & vec = (genParticleEmbedded_.empty() ? genParticleRef_ : genParticleRefs());
699 for (std::vector<reco::GenParticleRef>::const_iterator ref = vec.begin(),
end = vec.end(); ref !=
end; ++ref) {
700 if (ref->isNonnull()) {
705 }
else if (!autoCharge) {
706 if (pdgId == g.
pdgId())
return *ref;
709 if (g.
charge() == 0)
return *ref;
710 else if ((this->charge() == 0) && (pdgId == g.
pdgId()))
return *ref;
711 else if (g.
charge()*this->charge()*pdgId > 0)
return *ref;
718 template <
class ObjectType>
720 return std::find(overlapLabels_.begin(), overlapLabels_.end(),
label) != overlapLabels_.end();
723 template <
class ObjectType>
726 std::vector<std::string>::const_iterator
match =
std::find(overlapLabels_.begin(), overlapLabels_.end(),
label);
727 if (match == overlapLabels_.end())
return EMPTY;
728 return overlapItems_[match - overlapLabels_.begin()];
731 template <
class ObjectType>
733 if (!overlaps.
empty()) {
734 std::vector<std::string>::const_iterator
match =
std::find(overlapLabels_.begin(), overlapLabels_.end(),
label);
735 if (match == overlapLabels_.end()) {
736 overlapLabels_.push_back(label);
737 overlapItems_.push_back(overlaps);
739 overlapItems_[match - overlapLabels_.begin()] =
overlaps;
744 template <
class ObjectType>
747 std::vector<std::string>::const_iterator it =
std::find(userDataLabels_.begin(), userDataLabels_.end(),
key);
748 if (it != userDataLabels_.end()) {
749 return & userDataObjects_[it - userDataLabels_.begin()];
754 template <
class ObjectType>
757 std::vector<std::string>::const_iterator it =
std::find(userFloatLabels_.begin(), userFloatLabels_.end(),
key);
758 if (it != userFloatLabels_.end()) {
759 return userFloats_[it - userFloatLabels_.begin()];
764 template <
class ObjectType>
768 userFloatLabels_.push_back(label);
769 userFloats_.push_back( data );
773 template <
class ObjectType>
776 std::vector<std::string>::const_iterator it =
std::find(userIntLabels_.begin(), userIntLabels_.end(),
key);
777 if (it != userIntLabels_.end()) {
778 return userInts_[it - userIntLabels_.begin()];
783 template <
class ObjectType>
787 userIntLabels_.push_back(label);
788 userInts_.push_back( data );
791 template <
class ObjectType>
794 std::vector<std::string>::const_iterator it =
std::find(userCandLabels_.begin(), userCandLabels_.end(),
key);
795 if (it != userCandLabels_.end()) {
796 return userCands_[it - userCandLabels_.begin()];
801 template <
class ObjectType>
805 userCandLabels_.push_back(label);
806 userCands_.push_back( data );
810 template <
class ObjectType>
813 if (kinResolutionLabels_.size()+1 == kinResolutions_.size()) {
814 return kinResolutions_[0];
816 throw cms::Exception(
"Missing Data",
"This object does not contain an un-labelled kinematic resolution");
819 std::vector<std::string>::const_iterator
match =
std::find(kinResolutionLabels_.begin(), kinResolutionLabels_.end(),
label);
820 if (match == kinResolutionLabels_.end()) {
822 ex <<
"This object does not contain a kinematic resolution with name '" << label <<
"'.\n";
823 ex <<
"The known labels are: " ;
824 for (std::vector<std::string>::const_iterator it = kinResolutionLabels_.begin(); it != kinResolutionLabels_.end(); ++it) {
825 ex <<
"'" << *it <<
"' ";
830 if (kinResolutionLabels_.size()+1 == kinResolutions_.size()) {
832 return kinResolutions_[match - kinResolutionLabels_.begin() + 1];
835 return kinResolutions_[match - kinResolutionLabels_.begin()];
841 template <
class ObjectType>
844 return (kinResolutionLabels_.size()+1 == kinResolutions_.size());
846 std::vector<std::string>::const_iterator
match =
std::find(kinResolutionLabels_.begin(), kinResolutionLabels_.end(),
label);
847 return match != kinResolutionLabels_.end();
851 template <
class ObjectType>
854 if (kinResolutionLabels_.size()+1 == kinResolutions_.size()) {
856 kinResolutions_[0] = resol;
860 kinResolutions_.insert(kinResolutions_.begin(), resol);
863 std::vector<std::string>::iterator
match =
std::find(kinResolutionLabels_.begin(), kinResolutionLabels_.end(),
label);
864 if (match != kinResolutionLabels_.end()) {
866 if (kinResolutionLabels_.size()+1 == kinResolutions_.size()) {
867 kinResolutions_[(match - kinResolutionLabels_.begin())+1] = resol;
869 kinResolutions_[(match - kinResolutionLabels_.begin())] = resol;
872 kinResolutionLabels_.push_back(label);
873 kinResolutions_.push_back(resol);
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
bool hasUserFloat(const char *key) const
a CINT-friendly interface
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
virtual int pdgId() const
PDG identifier.
const TriggerObjectStandAlone * triggerObjectMatchByAlgorithm(const char *nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const
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
void addUserDataFromPtr(const std::string &label, const edm::Ptr< pat::UserData > &data)
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.
static const HistoName names[]
std::vector< reco::GenParticleRef > genParticleRef_
Reference to a generator level particle.
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
virtual int status() const
status word
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
bool empty() const
Is the RefVector empty.
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.
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.
std::vector< std::string > userCandLabels_
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
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
void setEfficiency(const std::string &name, const pat::LookupTableRecord &value)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
TriggerObjectStandAloneCollection triggerObjectMatchesEmbedded_
vector of trigger matches
void setGenParticleRef(const reco::GenParticleRef &ref, bool embed=false)
Set the generator level particle reference.
std::vector< std::string > userDataLabels_
User data object.
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
virtual ~PATObject()
destructor
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.
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.
void addUserFloat(const std::string &label, float data)
Set user-defined float.
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
virtual int charge() const
electric charge
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_
const TriggerObjectStandAlone * triggerObjectMatch(const size_t idx=0) const
get one matched trigger object by index
void addUserInt(const std::string &label, int32_t data)
Set user-defined int.
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
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
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.
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
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 addUserData(const std::string &label, const T &data, bool transientOnly=false)
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
int32_t userInt(const std::string &key) const
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
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 ...
virtual const std::string & typeName() const =0
Human readable name of the concrete type of stored data.
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
void addUserCand(const std::string &label, const reco::CandidatePtr &data)
Set user-defined int.
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< 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.
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.
const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm(const char *nameAlgorithm, const unsigned algoCondAccepted) const
edm::Ptr< reco::Candidate > refToOrig_
tuple size
Write out results.
double resolM(const std::string &label="") const
reco::GenParticleRef genParticleById(int pdgId, int status, uint8_t autoCharge=0) const
const void * bareData() const
T get(const Candidate &c)
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.