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
const std::vector< std::pair< std::string, float > > & vars() const
Definition: EgammaObject.h:35
const reco::SuperClusterRef & superCluster() const
Definition: EgammaObject.h:25
bool operator()(const std::string &lhs, const std::pair< std::string, float > &rhs) const
Definition: EgammaObject.h:45
void setVars(std::vector< std::pair< std::string, float >> vars)
Definition: EgammaObject.cc:60
bool operator()(const std::pair< std::string, float > &lhs, const std::string &rhs) const
Definition: EgammaObject.h:48
const reco::ElectronSeedRefVector & seeds() const
Definition: EgammaObject.h:27
void setGsfTracks(reco::GsfTrackRefVector trks)
Definition: EgammaObject.h:30
int id() const
getters
Definition: TriggerObject.h:51
std::vector< std::string > varNames() const
Definition: EgammaObject.cc:40
reco::SuperClusterRef superCluster_
Definition: EgammaObject.h:56
const reco::GsfTrackRefVector & gsfTracks() const
Definition: EgammaObject.h:26
reco::ElectronSeedRefVector seeds_
Definition: EgammaObject.h:59
EgammaObject(int id, float pt, float eta, float phi, float mass)
Definition: EgammaObject.h:21
bool hasVar(const std::string &varName) const
Definition: EgammaObject.cc:22
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
std::string varNamesStr() const
Definition: EgammaObject.cc:49
fixed size matrix
vars
Definition: DeepTauId.cc:166
std::vector< std::pair< std::string, float > > vars_
Definition: EgammaObject.h:54
def move(src, dest)
Definition: eostools.py:511
float var(const std::string &varName, bool raiseExcept=true) const
Definition: EgammaObject.cc:26