ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/UHHAnalysis/SFrameTools/include/HypothesisDiscriminator.h
Revision: 1.5
Committed: Fri Feb 1 14:37:06 2013 UTC (12 years, 3 months ago) by peiffer
Content type: text/plain
Branch: MAIN
CVS Tags: Makefile, v1-00, Feb-15-2013-v1, Feb-14-2013, Feb-07-2013-v1
Changes since 1.4: +1 -1 lines
Log Message:
typos

File Contents

# User Rev Content
1 peiffer 1.1 #ifndef HypothesisDiscriminator_H
2     #define HypothesisDiscriminator_H
3    
4     #include "BaseCycleContainer.h"
5     #include "ObjectHandler.h"
6     #include "Utils.h"
7     #include "ReconstructionHypothesis.h"
8     #include "EventCalc.h"
9 peiffer 1.2 #include "TTbarGen.h"
10 peiffer 1.1
11     /**
12     * @short basic class to select a reconstruction hypothesis with a certain discriminator value
13     *
14 peiffer 1.5 * Each class that inherits from the HypothesisDiscriminator class provides functions to fill discriminator values for every ReconstructionHypothesis in the actual BaseCycleContainer
15 peiffer 1.1 * 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 peiffer 1.2 * BestPossible hypothesis discriminator, only works on ttbar MC
48 peiffer 1.1 */
49     class BestPossibleDiscriminator: public HypothesisDiscriminator{
50     public:
51     BestPossibleDiscriminator():HypothesisDiscriminator("BestPossible"){};
52     ~BestPossibleDiscriminator(){};
53    
54 peiffer 1.2 virtual void FillDiscriminatorValues();
55    
56     virtual ReconstructionHypothesis* GetBestHypothesis();
57 peiffer 1.1 };
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 peiffer 1.3 /**
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 peiffer 1.4 float isMatched(GenParticle p, std::vector<Jet> jets, int& index);
99 peiffer 1.3 };
100    
101 peiffer 1.1 #endif