ATLAS Offline Software
NeutrinoWeighting.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef NEUTRINOWEIGHTING_H_
6 #define NEUTRINOWEIGHTING_H_
7 
9 
10 namespace top {
11  class Event;
12 
19  class NWSolution {
20  public:
21  void setSolutions(int num, const TLorentzVector& a, const TLorentzVector& b) {
22  m_v1 = a;
23  m_v2 = b;
24  m_solutions = num;
25  }
26 
27  void setSolutions(int num) {
28  m_solutions = num;
29  }
30 
31  int getNumSolutions() const {
32  return m_solutions;
33  }
34 
35  TLorentzVector getv1() const {
36  return m_v1;
37  }
38 
39  TLorentzVector getv2() const {
40  return m_v2;
41  }
42 
43  private:
46 
48  TLorentzVector m_v1;
49 
51  TLorentzVector m_v2;
52  };
53 
58  public:
60  virtual ~NeutrinoWeighting();
61 
62  bool apply(const top::Event&) const override;
63 
64  std::string name() const override {return "RECO:NEUTRINOWEIGHTING";}
65  private:
72  NWSolution solveForNeutrinoEta(const TLorentzVector& lepton, const TLorentzVector& bJet, double topMass,
73  int index) const;
74 
87  double neutrino_weight(const TLorentzVector&, const TLorentzVector&, double, double) const;
88 
90  double neutrinos[2000][3];
91 
93  int etaSize;
94 
95  // commented out variables are unused. experts please check and remove
96  // ///Top Quark Mass constraint.
97  // double topMass;
98 
100  double m_bmass;
101 
103  double m_wmass;
104 
105  //For weighter.
106  double sigmax;
107 
108  //For weighter.
109  double sigmay;
110  };
111 }
112 
113 #endif
top::NWSolution::getv1
TLorentzVector getv1() const
Definition: NeutrinoWeighting.h:35
top::NeutrinoWeighting::m_bmass
double m_bmass
B jet mass constraint.
Definition: NeutrinoWeighting.h:100
top::NeutrinoWeighting::NeutrinoWeighting
NeutrinoWeighting()
Definition: NeutrinoWeighting.cxx:12
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::NWSolution::getNumSolutions
int getNumSolutions() const
Definition: NeutrinoWeighting.h:31
top::NeutrinoWeighting::apply
bool apply(const top::Event &) const override
This does stuff based on the information in an event.
Definition: NeutrinoWeighting.cxx:36
index
Definition: index.py:1
top::NeutrinoWeighting::neutrinos
double neutrinos[2000][3]
Sampling points.
Definition: NeutrinoWeighting.h:90
Event
Definition: trigbs_orderedMerge.cxx:42
top::NeutrinoWeighting::name
std::string name() const override
A human readable name.
Definition: NeutrinoWeighting.h:64
top::NWSolution::getv2
TLorentzVector getv2() const
Definition: NeutrinoWeighting.h:39
top::NeutrinoWeighting::~NeutrinoWeighting
virtual ~NeutrinoWeighting()
Definition: NeutrinoWeighting.cxx:33
top::NWSolution::m_v1
TLorentzVector m_v1
First solution from the quadratic, check m_solutions is 2 first.
Definition: NeutrinoWeighting.h:48
top::NWSolution::setSolutions
void setSolutions(int num)
Definition: NeutrinoWeighting.h:27
top::NeutrinoWeighting::neutrino_weight
double neutrino_weight(const TLorentzVector &, const TLorentzVector &, double, double) const
Calculate the weight for this combination of particles by comparing with Met.
Definition: NeutrinoWeighting.cxx:124
top::NeutrinoWeighting::sigmay
double sigmay
Definition: NeutrinoWeighting.h:109
top::NeutrinoWeighting::m_wmass
double m_wmass
W jet mass constraint.
Definition: NeutrinoWeighting.h:103
top::NeutrinoWeighting::sigmax
double sigmax
Definition: NeutrinoWeighting.h:106
top::NeutrinoWeighting
Not complete.
Definition: NeutrinoWeighting.h:57
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
top::NeutrinoWeighting::etaSize
int etaSize
Delta eta sampling size. For the mass we don't need to sample so many points.
Definition: NeutrinoWeighting.h:93
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
top::EventSelectorBase
This should apply event-level cuts and perform simple plotting on top::Event objects.
Definition: EventSelectorBase.h:20
top::NWSolution
Holds the two solutions from the quadratic equation as TLorentVectors.
Definition: NeutrinoWeighting.h:19
top::NWSolution::m_v2
TLorentzVector m_v2
Second solution from the quadratic, check m_solutions is 2 first.
Definition: NeutrinoWeighting.h:51
top::NeutrinoWeighting::solveForNeutrinoEta
NWSolution solveForNeutrinoEta(const TLorentzVector &lepton, const TLorentzVector &bJet, double topMass, int index) const
Definition: NeutrinoWeighting.cxx:81
a
TList * a
Definition: liststreamerinfos.cxx:10
EventSelectorBase.h
top::NWSolution::setSolutions
void setSolutions(int num, const TLorentzVector &a, const TLorentzVector &b)
Definition: NeutrinoWeighting.h:21
top::Event
Very simple class to hold event data after reading from a file.
Definition: Event.h:49
top::NWSolution::m_solutions
int m_solutions
Number of solutions. 0 or 2, one solution isn't possible due to the use of floats.
Definition: NeutrinoWeighting.h:45