CMS 3D CMS Logo

JetPartonMatching.h
Go to the documentation of this file.
1 #ifndef JetPartonMatching_h
2 #define JetPartonMatching_h
3 
8 
9 #include <vector>
10 
12  // common class for jet parton matching in ttbar
13  // decays. Several matching algorithms are provided
14 public:
15  typedef std::vector<std::pair<unsigned int, int> > MatchingCollection;
17 
19  JetPartonMatching(const std::vector<const reco::Candidate*>&,
20  const std::vector<reco::GenJet>&,
21  const int,
22  const bool,
23  const bool,
24  const double);
25  JetPartonMatching(const std::vector<const reco::Candidate*>&,
26  const std::vector<reco::CaloJet>&,
27  const int,
28  const bool,
29  const bool,
30  const double);
31  JetPartonMatching(const std::vector<const reco::Candidate*>&,
32  const std::vector<pat::Jet>&,
33  const int,
34  const bool,
35  const bool,
36  const double);
37  JetPartonMatching(const std::vector<const reco::Candidate*>&,
38  const std::vector<const reco::Candidate*>&,
39  const int,
40  const bool,
41  const bool,
42  const double);
44 
45  //matching meta information
46  unsigned int getNumberOfAvailableCombinations() { return matching.size(); }
47  int getNumberOfUnmatchedPartons(const unsigned int comb = 0) {
49  }
50  int getMatchForParton(const unsigned int part, const unsigned int comb = 0);
51  std::vector<int> getMatchesForPartons(const unsigned int comb = 0);
52  double getDistanceForParton(const unsigned int part, const unsigned int comb = 0);
53  double getSumDistances(const unsigned int comb = 0);
54 
55  //matching quantities
56  double getSumDeltaE(const unsigned int comb = 0) { return (comb < sumDeltaE.size() ? sumDeltaE[comb] : -999.); }
57  double getSumDeltaPt(const unsigned int comb = 0) { return (comb < sumDeltaPt.size() ? sumDeltaPt[comb] : -999.); }
58  double getSumDeltaR(const unsigned int comb = 0) { return (comb < sumDeltaR.size() ? sumDeltaR[comb] : -999.); }
59 
60  void print();
61 
62 private:
63  void calculate();
65  void matchingTotalMinDist();
66  void minSumDist_recursion(const unsigned int,
67  std::vector<unsigned int>&,
68  std::vector<bool>&,
69  std::vector<std::pair<double, MatchingCollection> >&);
70  void matchingMinSumDist();
73 
74 private:
75  std::vector<const reco::Candidate*> partons;
76  std::vector<const reco::Candidate*> jets;
77  std::vector<MatchingCollection> matching;
78 
79  std::vector<unsigned int> numberOfUnmatchedPartons;
80  std::vector<double> sumDeltaE;
81  std::vector<double> sumDeltaPt;
82  std::vector<double> sumDeltaR;
83 
86  bool useDeltaR_;
87  double maxDist_;
88 };
89 
90 #endif
JetPartonMatching::getSumDeltaR
double getSumDeltaR(const unsigned int comb=0)
Definition: JetPartonMatching.h:58
bookConverter.comb
comb
Definition: bookConverter.py:145
CaloJet.h
JetPartonMatching::useMaxDist_
bool useMaxDist_
Definition: JetPartonMatching.h:85
JetPartonMatching::algorithm_
int algorithm_
Definition: JetPartonMatching.h:84
JetPartonMatching::getDistanceForParton
double getDistanceForParton(const unsigned int part, const unsigned int comb=0)
Definition: JetPartonMatching.cc:358
JetPartonMatching::unambiguousOnly
Definition: JetPartonMatching.h:16
JetPartonMatching::sumDeltaE
std::vector< double > sumDeltaE
Definition: JetPartonMatching.h:80
JetPartonMatching::print
void print()
Definition: JetPartonMatching.cc:377
JetPartonMatching::getNumberOfAvailableCombinations
unsigned int getNumberOfAvailableCombinations()
Definition: JetPartonMatching.h:46
JetPartonMatching::matchingPtOrderedMinDist
void matchingPtOrderedMinDist()
Definition: JetPartonMatching.cc:262
JetPartonMatching::useDeltaR_
bool useDeltaR_
Definition: JetPartonMatching.h:86
JetPartonMatching::getMatchesForPartons
std::vector< int > getMatchesForPartons(const unsigned int comb=0)
Definition: JetPartonMatching.cc:349
JetPartonMatching::getSumDeltaE
double getSumDeltaE(const unsigned int comb=0)
Definition: JetPartonMatching.h:56
part
part
Definition: HCALResponse.h:20
JetPartonMatching::minSumDist_recursion
void minSumDist_recursion(const unsigned int, std::vector< unsigned int > &, std::vector< bool > &, std::vector< std::pair< double, MatchingCollection > > &)
Definition: JetPartonMatching.cc:198
JetPartonMatching::getMatchForParton
int getMatchForParton(const unsigned int part, const unsigned int comb=0)
Definition: JetPartonMatching.cc:338
JetPartonMatching::algorithms
algorithms
Definition: JetPartonMatching.h:16
JetPartonMatching::jets
std::vector< const reco::Candidate * > jets
Definition: JetPartonMatching.h:76
createfilelist.int
int
Definition: createfilelist.py:10
JetPartonMatching::getNumberOfUnmatchedPartons
int getNumberOfUnmatchedPartons(const unsigned int comb=0)
Definition: JetPartonMatching.h:47
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
Jet.h
JetPartonMatching::getSumDeltaPt
double getSumDeltaPt(const unsigned int comb=0)
Definition: JetPartonMatching.h:57
JetPartonMatching::sumDeltaPt
std::vector< double > sumDeltaPt
Definition: JetPartonMatching.h:81
JetPartonMatching::getSumDistances
double getSumDistances(const unsigned int comb=0)
Definition: JetPartonMatching.cc:365
JetPartonMatching::totalMinDist
Definition: JetPartonMatching.h:16
JetPartonMatching::partons
std::vector< const reco::Candidate * > partons
Definition: JetPartonMatching.h:75
JetPartonMatching::matchingUnambiguousOnly
void matchingUnambiguousOnly()
Definition: JetPartonMatching.cc:306
JetPartonMatching::JetPartonMatching
JetPartonMatching()
Definition: JetPartonMatching.h:18
JetPartonMatching::calculate
void calculate()
Definition: JetPartonMatching.cc:57
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
JetPartonMatching::~JetPartonMatching
~JetPartonMatching()
Definition: JetPartonMatching.h:43
JetPartonMatching::minSumDist
Definition: JetPartonMatching.h:16
JetPartonMatching::maxDist_
double maxDist_
Definition: JetPartonMatching.h:87
JetPartonMatching::numberOfUnmatchedPartons
std::vector< unsigned int > numberOfUnmatchedPartons
Definition: JetPartonMatching.h:79
JetPartonMatching::ptOrderedMinDist
Definition: JetPartonMatching.h:16
JetPartonMatching::MatchingCollection
std::vector< std::pair< unsigned int, int > > MatchingCollection
Definition: JetPartonMatching.h:15
JetPartonMatching::matchingTotalMinDist
void matchingTotalMinDist()
Definition: JetPartonMatching.cc:149
JetPartonMatching::matchingMinSumDist
void matchingMinSumDist()
Definition: JetPartonMatching.cc:230
GenJet.h
Candidate.h
JetPartonMatching::distance
double distance(const math::XYZTLorentzVector &, const math::XYZTLorentzVector &)
Definition: JetPartonMatching.cc:141
JetPartonMatching::matching
std::vector< MatchingCollection > matching
Definition: JetPartonMatching.h:77
JetPartonMatching
Definition: JetPartonMatching.h:11
JetPartonMatching::sumDeltaR
std::vector< double > sumDeltaR
Definition: JetPartonMatching.h:82