CMS 3D CMS Logo

EgammaObject.h
Go to the documentation of this file.
1 #ifndef DataFormats_HLTReco_EgammaObject_h
2 #define DataFormats_HLTReco_EgammaObject_h
3 
8 
9 #include <vector>
10 #include <string>
11 
12 namespace reco {
13  class RecoEcalCandidate;
14 }
15 
16 namespace trigger {
17  class EgammaObject : public TriggerObject {
18  public:
20 
21  EgammaObject(int id, float pt, float eta, float phi, float mass)
23  EgammaObject(const reco::RecoEcalCandidate& ecalCand);
24 
26  const reco::GsfTrackRefVector& gsfTracks() const { return gsfTracks_; }
27  const reco::ElectronSeedRefVector& seeds() const { return seeds_; }
28 
32 
33  bool hasVar(const std::string& varName) const;
34  float var(const std::string& varName, bool raiseExcept = true) const;
35  const std::vector<std::pair<std::string, float>>& vars() const { return vars_; }
36  //varNames and varNamesStr are reasonably expensive functions and are more
37  //intended for debugging than normal use
38  std::vector<std::string> varNames() const;
39  std::string varNamesStr() const;
40  void setVars(std::vector<std::pair<std::string, float>> vars);
41  void clearVars() { vars_.clear(); }
42 
43  private:
44  struct VarComparer {
45  bool operator()(const std::string& lhs, const std::pair<std::string, float>& rhs) const {
46  return lhs < rhs.first;
47  }
48  bool operator()(const std::pair<std::string, float>& lhs, const std::string& rhs) const {
49  return lhs.first < rhs;
50  }
51  };
52 
54  std::vector<std::pair<std::string, float>> vars_;
55 
58  //currently these are pixel seeds but could be tracker seeds...
60  };
61 
62 } // namespace trigger
63 
64 #endif
trigger::TriggerObject::phi
float phi() const
Definition: TriggerObject.h:54
TriggerObject
Definition: TriggerObject.py:1
funct::false
false
Definition: Factorize.h:34
trigger::EgammaObject::vars_
std::vector< std::pair< std::string, float > > vars_
Definition: EgammaObject.h:54
trigger::EgammaObject::EgammaObject
EgammaObject()
Definition: EgammaObject.h:19
trigger::EgammaObject::vars
const std::vector< std::pair< std::string, float > > & vars() const
Definition: EgammaObject.h:35
edm::RefVector< GsfTrackCollection >
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
ElectronSeedFwd.h
edm::Ref< SuperClusterCollection >
trigger::EgammaObject::setVars
void setVars(std::vector< std::pair< std::string, float >> vars)
Definition: EgammaObject.cc:59
trigger::TriggerObject::pt
float pt() const
Definition: TriggerObject.h:52
vars
vars
Definition: DeepTauId.cc:163
trigger::EgammaObject::gsfTracks
const reco::GsfTrackRefVector & gsfTracks() const
Definition: EgammaObject.h:26
trigger::EgammaObject
Definition: EgammaObject.h:17
trigger::EgammaObject::hasPixelMatch_
bool hasPixelMatch_
Definition: EgammaObject.h:53
trigger::EgammaObject::varNames
std::vector< std::string > varNames() const
Definition: EgammaObject.cc:40
trigger::EgammaObject::superCluster_
reco::SuperClusterRef superCluster_
Definition: EgammaObject.h:56
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trigger::EgammaObject::hasVar
bool hasVar(const std::string &varName) const
Definition: EgammaObject.cc:22
trigger::EgammaObject::seeds
const reco::ElectronSeedRefVector & seeds() const
Definition: EgammaObject.h:27
trigger::TriggerObject::id
int id() const
getters
Definition: TriggerObject.h:51
trigger::EgammaObject::VarComparer::operator()
bool operator()(const std::pair< std::string, float > &lhs, const std::string &rhs) const
Definition: EgammaObject.h:48
trigger::TriggerObject::eta
float eta() const
Definition: TriggerObject.h:53
trigger::EgammaObject::seeds_
reco::ElectronSeedRefVector seeds_
Definition: EgammaObject.h:59
trigger::EgammaObject::setGsfTracks
void setGsfTracks(reco::GsfTrackRefVector trks)
Definition: EgammaObject.h:30
TriggerObject.h
trigger::EgammaObject::EgammaObject
EgammaObject(int id, float pt, float eta, float phi, float mass)
Definition: EgammaObject.h:21
trigger::EgammaObject::clearVars
void clearVars()
Definition: EgammaObject.h:41
trigger::EgammaObject::setSuperCluster
void setSuperCluster(const reco::SuperClusterRef &sc)
Definition: EgammaObject.h:29
trigger::EgammaObject::setSeeds
void setSeeds(reco::ElectronSeedRefVector seeds)
Definition: EgammaObject.cc:11
eostools.move
def move(src, dest)
Definition: eostools.py:511
GsfTrackFwd.h
SuperClusterFwd.h
trigger::EgammaObject::VarComparer
Definition: EgammaObject.h:44
trigger::EgammaObject::gsfTracks_
reco::GsfTrackRefVector gsfTracks_
Definition: EgammaObject.h:57
trigger::EgammaObject::var
float var(const std::string &varName, bool raiseExcept=true) const
Definition: EgammaObject.cc:26
trigger::EgammaObject::varNamesStr
std::string varNamesStr() const
Definition: EgammaObject.cc:48
trigger
Definition: HLTPrescaleTableCond.h:8
hltEgammaHLTExtra_cfi.trks
trks
Definition: hltEgammaHLTExtra_cfi.py:43
trigger::EgammaObject::VarComparer::operator()
bool operator()(const std::string &lhs, const std::pair< std::string, float > &rhs) const
Definition: EgammaObject.h:45
reco::RecoEcalCandidate
Definition: RecoEcalCandidate.h:15
trigger::EgammaObject::superCluster
const reco::SuperClusterRef & superCluster() const
Definition: EgammaObject.h:25
trigger::TriggerObject::mass
float mass() const
Definition: TriggerObject.h:55