CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
17 namespace pat { namespace helper {
19  public:
22 
24  KinResolutionsLoader(const edm::ParameterSet &iConfig) ;
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>
34  void setResolutions( pat::PATObject<T> &obj ) const ;
35 
37  static void fillDescription(edm::ParameterSetDescription & iDesc);
38  private:
40  std::vector<std::string> patlabels_;
42  std::vector<std::string> eslabels_;
44  std::vector<edm::ESHandle<KinematicResolutionProvider> > handles_;
45 }; // class
46 
47 template<typename T>
48 void
50 {
51  for (size_t i = 0, n = patlabels_.size(); i < n; ++i) {
52  obj.setKinResolution( handles_[i]->getResolution(obj), patlabels_[i]);
53  }
54 }
55 
56 } }
57 
58 #endif
int i
Definition: DBlmapReader.cc:9
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
void setKinResolution(const pat::CandKinResolution &resol, const std::string &label="")
Add a kinematic resolution to this object (possibly with a label)
Definition: PATObject.h:914
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.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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:49
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
std::vector< edm::ESHandle< KinematicResolutionProvider > > handles_
Handles to the EventSetup.