CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TtFullHadHypothesis.h
Go to the documentation of this file.
1 #ifndef TtFullHadHypothesis_h
2 #define TtFullHadHypothesis_h
3 
4 #include <memory>
5 #include <vector>
6 
11 
14 
16 
17 /*
18  \class TtFullHadHypothesis TtFullHadHypothesis.h "TopQuarkAnalysis/TopJetCombination/interface/TtFullHadHypothesis.h"
19 
20  \brief Interface class for the creation of full-hadronic ttbar event hypotheses
21 
22  The class provides an interface for the creation of full-hadronic ttbar event hypotheses. Input information is read
23  from the event content and the proper candidate creation is taken care of. Hypotheses are characterized by the
24  CompositeCandidate made of a ttbar pair (including all its decay products in a parton level interpretation) and an
25  enumerator type key to specify the algorithm to determine the candidate (hypothesis cklass). The buildKey and the
26  buildHypo class have to implemented by derived classes.
27 **/
28 
30 
31  public:
33  explicit TtFullHadHypothesis(const edm::ParameterSet& cfg);
36 
37  protected:
39  virtual void produce(edm::Event&, const edm::EventSetup&);
41  void resetCandidates();
44  std::string jetCorrectionLevel(const std::string& quarkType);
46  template <typename C>
49  void setCandidate(const edm::Handle<std::vector<pat::Jet> >& handle, const int& idx, reco::ShallowClonePtrCandidate*& clone, const std::string& correctionLevel);
51  int key() const { return key_; };
55  bool isValid(const int& idx, const edm::Handle<std::vector<pat::Jet> >& jets){ return (0<=idx && idx<(int)jets->size()); };
56 
57  // -----------------------------------------
58  // implemet the following two functions
59  // for a concrete event hypothesis
60  // -----------------------------------------
61 
63  virtual void buildKey() = 0;
65  virtual void buildHypo(edm::Event& event,
66  const edm::Handle<std::vector<pat::Jet> >& jets,
67  std::vector<int>& jetPartonAssociation,
68  const unsigned int iComb) = 0;
69 
70  protected:
73  bool getMatch_;
81  int key_;
90 };
91 
92 // has to be placed in the header since otherwise the function template
93 // would cause unresolved references in classes derived from this base class
94 template<typename C>
95 void
97  typedef typename C::value_type O;
99  clone = new reco::ShallowClonePtrCandidate( ptr, ptr->charge(), ptr->p4(), ptr->vertex() );
100 }
101 #endif
tuple cfg
Definition: looper.py:293
int key() const
return key
void setCandidate(const edm::Handle< C > &handle, const int &idx, reco::ShallowClonePtrCandidate *&clone)
use one object in a collection to set a ShallowClonePtrCandidate
virtual void produce(edm::Event &, const edm::EventSetup &)
produce the event hypothesis as CompositeCandidate and Key
std::string jetCorrectionLevel(const std::string &quarkType)
helper function to construct the proper correction level string for corresponding quarkType ...
reco::ShallowClonePtrCandidate * lightPBar_
vector< PseudoJet > jets
reco::ShallowClonePtrCandidate * lightQBar_
bool isValid(const int &idx, const edm::Handle< std::vector< pat::Jet > > &jets)
check if index is in valid range of selected jets
tuple handle
Definition: patZpeak.py:22
reco::ShallowClonePtrCandidate * lightP_
virtual void buildHypo(edm::Event &event, const edm::Handle< std::vector< pat::Jet > > &jets, std::vector< int > &jetPartonAssociation, const unsigned int iComb)=0
build event hypothesis from the reco objects of a full-hadronic event
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
Container::value_type value_type
edm::EDGetTokenT< std::vector< std::vector< int > > > matchToken_
std::string jetCorrectionLevel_
virtual void buildKey()=0
build the event hypothesis key
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
reco::ShallowClonePtrCandidate * bBar_
void resetCandidates()
reset candidate pointers before hypo build process
~TtFullHadHypothesis()
default destructor
reco::ShallowClonePtrCandidate * b_
int key_
hypothesis key (to be set by the buildKey function)
TtFullHadHypothesis(const edm::ParameterSet &cfg)
default constructor
reco::CompositeCandidate hypo()
return event hypothesis
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
input label for all necessary collections
reco::ShallowClonePtrCandidate * lightQ_