CMS 3D CMS Logo

KinResolutionsLoader.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatAlgos_KinResolutionsLoader_h
2 #define PhysicsTools_PatAlgos_KinResolutionsLoader_h
3 
5 
10 
13 
15 
16 namespace pat {
17  namespace helper {
19  public:
22 
25 
27  bool enabled() const { return !patlabels_.empty(); }
28 
30  void newEvent(const edm::Event &event, const edm::EventSetup &setup);
31 
33  template <typename T>
35 
38 
39  private:
41  std::vector<std::string> patlabels_;
43  std::vector<std::string> eslabels_;
45  std::vector<edm::ESHandle<KinematicResolutionProvider> > handles_;
46  }; // class
47 
48  template <typename T>
50  for (size_t i = 0, n = patlabels_.size(); i < n; ++i) {
51  obj.setKinResolution(handles_[i]->getResolution(obj), patlabels_[i]);
52  }
53  }
54 
55  } // namespace helper
56 } // namespace pat
57 
58 #endif
Definition: helper.py:1
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
Definition: HeavyIon.h:7
void setKinResolution(const pat::CandKinResolution &resol, const std::string &label="")
Add a kinematic resolution to this object (possibly with a label)
Definition: PATObject.h:1016
std::vector< std::string > eslabels_
Labels of the KinematicResolutionProvider in the EventSetup.
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
std::vector< std::string > patlabels_
Labels of the resolutions in PAT.
Templated PAT object container.
Definition: PATObject.h:48
Definition: event.py:1
std::vector< edm::ESHandle< KinematicResolutionProvider > > handles_
Handles to the EventSetup.