ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/UHHAnalysis/SFrameTools/include/HypothesisDiscriminator.h
Revision: 1.6
Committed: Wed Jun 12 12:33:41 2013 UTC (11 years, 10 months ago) by peiffer
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
Error occurred while calculating annotation data.
Log Message:
removed ObjectHandler

File Contents

# Content
1 #ifndef HypothesisDiscriminator_H
2 #define HypothesisDiscriminator_H
3
4 #include "BaseCycleContainer.h"
5 #include "EventCalc.h"
6 #include "Utils.h"
7 #include "ReconstructionHypothesis.h"
8 #include "EventCalc.h"
9 #include "TTbarGen.h"
10
11 /**
12 * @short basic class to select a reconstruction hypothesis with a certain discriminator value
13 *
14 * Each class that inherits from the HypothesisDiscriminator class provides functions to fill discriminator values for every ReconstructionHypothesis in the actual BaseCycleContainer
15 * and to select the hypothesis with the best discriminator value.
16 *
17 */
18
19 class HypothesisDiscriminator{
20 public:
21 ///Default constructor
22 HypothesisDiscriminator(std::string label_name);
23 ///Default destructor
24 virtual ~HypothesisDiscriminator(){};
25
26 /// return the ReconstructionHypothesis with the best discriminator value (discriminator values have to be filled with FillDiscriminatorValues before calling this routine).
27 virtual ReconstructionHypothesis* GetBestHypothesis()=0;
28
29 /// determine the discriminator values and store them in the list of reconstruction hypotheses in the BaseCycleContainer
30 virtual void FillDiscriminatorValues();
31
32 std::string GetLabel(){return m_label;}
33
34 protected:
35
36 ReconstructionHypothesis* GetHypWithSmallestDiscriminator();
37 ReconstructionHypothesis* GetHypWithLargestDiscriminator();
38
39 mutable SLogger m_logger;
40
41 string m_label;
42 bool m_filled;
43
44 };
45
46 /**
47 * BestPossible hypothesis discriminator, only works on ttbar MC
48 */
49 class BestPossibleDiscriminator: public HypothesisDiscriminator{
50 public:
51 BestPossibleDiscriminator():HypothesisDiscriminator("BestPossible"){};
52 ~BestPossibleDiscriminator(){};
53
54 virtual void FillDiscriminatorValues();
55
56 virtual ReconstructionHypothesis* GetBestHypothesis();
57 };
58
59 /**
60 * hypothesis discriminator Chi^2
61 */
62 class Chi2Discriminator: public HypothesisDiscriminator{
63 public:
64 Chi2Discriminator():HypothesisDiscriminator("Chi2"){};
65 ~Chi2Discriminator(){};
66
67 virtual void FillDiscriminatorValues();
68
69 virtual ReconstructionHypothesis* GetBestHypothesis();
70 };
71
72 /**
73 * hypothesis discriminator summed delta R
74 */
75 class SumDeltaRDiscriminator: public HypothesisDiscriminator{
76 public:
77 SumDeltaRDiscriminator():HypothesisDiscriminator("SumDeltaR"){};
78 ~SumDeltaRDiscriminator(){};
79
80 virtual void FillDiscriminatorValues();
81
82 virtual ReconstructionHypothesis* GetBestHypothesis();
83 };
84
85 /**
86 * hypothesis discriminator for correctly matched events
87 */
88 class CorrectMatchDiscriminator: public HypothesisDiscriminator{
89 public:
90 CorrectMatchDiscriminator():HypothesisDiscriminator("CorrectMatch"){};
91 ~CorrectMatchDiscriminator(){};
92
93 virtual void FillDiscriminatorValues();
94
95 virtual ReconstructionHypothesis* GetBestHypothesis();
96
97 private:
98 float isMatched(GenParticle p, std::vector<Jet> jets, int& index);
99 };
100
101 #endif