CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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)
22  : TriggerObject(id, pt, eta, phi, mass), hasPixelMatch_(false) {}
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
const std::vector< std::pair< std::string, float > > & vars() const
Definition: EgammaObject.h:35
std::vector< std::string > varNames() const
Definition: EgammaObject.cc:40
float phi() const
Definition: TriggerObject.h:54
void setVars(std::vector< std::pair< std::string, float >> vars)
Definition: EgammaObject.cc:59
bool operator()(const std::pair< std::string, float > &lhs, const std::string &rhs) const
Definition: EgammaObject.h:48
float eta() const
Definition: TriggerObject.h:53
std::string varNamesStr() const
Definition: EgammaObject.cc:48
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
float var(const std::string &varName, bool raiseExcept=true) const
Definition: EgammaObject.cc:26
const reco::SuperClusterRef & superCluster() const
Definition: EgammaObject.h:25
const reco::GsfTrackRefVector & gsfTracks() const
Definition: EgammaObject.h:26
def move
Definition: eostools.py:511
void setGsfTracks(reco::GsfTrackRefVector trks)
Definition: EgammaObject.h:30
reco::SuperClusterRef superCluster_
Definition: EgammaObject.h:56
reco::ElectronSeedRefVector seeds_
Definition: EgammaObject.h:59
const reco::ElectronSeedRefVector & seeds() const
Definition: EgammaObject.h:27
EgammaObject(int id, float pt, float eta, float phi, float mass)
Definition: EgammaObject.h:21
bool operator()(const std::string &lhs, const std::pair< std::string, float > &rhs) const
Definition: EgammaObject.h:45
void setSeeds(reco::ElectronSeedRefVector seeds)
Definition: EgammaObject.cc:11
void setSuperCluster(const reco::SuperClusterRef &sc)
Definition: EgammaObject.h:29
reco::GsfTrackRefVector gsfTracks_
Definition: EgammaObject.h:57
bool hasVar(const std::string &varName) const
Definition: EgammaObject.cc:22
vars
Definition: DeepTauId.cc:164
float mass() const
Definition: TriggerObject.h:55
std::vector< std::pair< std::string, float > > vars_
Definition: EgammaObject.h:54