ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/NSVFit.h
Revision: 1.1
Committed: Thu May 5 12:40:35 2011 UTC (14 years ago) by rwolf
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_025c_branch2, Mit_025c_branch1, Mit_025c_branch0, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_021, Mit_021pre2
Branch point for: Mit_025c_branch
Log Message:
added NSVfit information

File Contents

# User Rev Content
1 rwolf 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id: NSVFit.h,v 1.5 2009/07/13 11:00:32 loizides Exp $
3     //
4     // NSVFit
5     //
6     // Basic implementation of a class that allows access to the nsv fit information for resonances that
7     // decay into tau leptons (subsequenctly decaying into electrons, muons or hadrons).
8     //
9     // Authors: R.Wolf
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef MITANA_DATATREE_NSVFIT_H
13     #define MITANA_DATATREE_NSVFIT_H
14    
15     #include "MitCommon/DataFormats/interface/Vect4M.h"
16     #include "MitAna/DataTree/interface/DataObject.h"
17    
18     namespace mithep
19     {
20     class NSVFit : public DataObject
21     {
22     public:
23     NSVFit() {}
24    
25     Bool_t IsValid() const {return fIsValid;}
26    
27     Double_t Mass() const {return fMass; }
28     Double_t MassErrUp() const {return fMassErrUp; }
29     Double_t MassErrDown() const {return fMassErrDown; }
30    
31     Double_t MassMean() const {return fMassMean; }
32     Double_t MassMedian() const {return fMassMedian; }
33     Double_t MassMaximum() const {return fMassMaximum; }
34     Double_t MassMaxInterpol() const {return fMassMaxInterpol; }
35    
36     FourVectorM Daughter(UInt_t i) const { return i<fDaughters.size() ? fDaughters.at(i).V() : FourVectorM(); }
37    
38    
39     void AddDaughter(Double_t pt, Double_t eta, Double_t phi, Double_t m);
40     void SetIsValid(Bool_t value) { fIsValid = value; }
41     void SetMass(Double_t value) { fMass = value; }
42     void SetMassErrUp(Double_t value) { fMassErrUp = value; }
43     void SetMassErrDown(Double_t value) { fMassErrDown = value; }
44     void SetMassMean(Double_t value) { fMassMean = value; }
45     void SetMassMedian(Double_t value) { fMassMaximum = value; }
46     void SetMassMaximum(Double_t value) { fMassMaximum = value; }
47     void SetMassMaxInterpol(Double_t value) { fMassMaxInterpol = value; }
48    
49     protected:
50    
51     Bool_t fIsValid; // determines whether the fit converged or not
52    
53     Double_t fMass; // mass from fit
54     Double_t fMassErrUp; // +1 sigma error on mass from fit
55     Double_t fMassErrDown; // -1 sigma error on mass from fit
56    
57     Double_t fMassMean; // mean of the mass from scan
58     Double_t fMassMedian; // median of the mass from scan
59     Double_t fMassMaximum; // maximum of the mass from scan
60     Double_t fMassMaxInterpol; // maximum of the mass from scan
61    
62     std::vector<Vect4M> fDaughters; // vector of four momenta of daughters (input values to fit)
63    
64     ClassDef(NSVFit,1) // NSVFit class
65     };
66     }
67    
68     //--------------------------------------------------------------------------------------------------
69     inline void mithep::NSVFit::AddDaughter(Double_t pt, Double_t eta, Double_t phi, Double_t m)
70     {
71     // Set four momentum of first daughter used in fit (ordering from fit)
72    
73     Vect4M buffer; buffer.Set(pt, eta, phi, m);
74     fDaughters.push_back(buffer);
75     }
76    
77     #endif