ATLAS Offline Software
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
top::Chi2LJets Class Reference

Not complete. More...

#include <Chi2LJets.h>

Inheritance diagram for top::Chi2LJets:
Collaboration diagram for top::Chi2LJets:

Public Member Functions

 Chi2LJets ()
 
virtual ~Chi2LJets ()
 
virtual bool apply (const top::Event &) const override
 This does stuff based on the information in an event. More...
 
std::string name () const override
 A human readable name. More...
 
virtual bool applyParticleLevel (const top::ParticleLevelEvent &) const
 This does stuff based on the information in a particle level event. More...
 

Static Public Attributes

static const double input_topmass = 172500
 The top mass that we're using as the baseline - used in chi2 function. More...
 
static const double input_wmass = 80300
 The W mass that we're using as the baseline - used in chi2 function. More...
 
static const double input_topsigma = 13000
 The top resolution that we're using as the baseline - used in chi2 function. More...
 
static const double input_wsigma = 7000
 The W resolution that we're using as the baseline - used in chi2 function. More...
 

Private Attributes

TMinuit * min
 So we can do a minimisation. More...
 
FitInfo params
 

Detailed Description

Not complete.

Work in progress

Definition at line 44 of file Chi2LJets.h.

Constructor & Destructor Documentation

◆ Chi2LJets()

top::Chi2LJets::Chi2LJets ( )

Definition at line 16 of file Chi2LJets.cxx.

16  {
17  min = new TMinuit(2);
18  min->SetPrintLevel(-1);
19  min->SetObjectFit(&params);
20  min->SetFCN(fcn);
21  }

◆ ~Chi2LJets()

top::Chi2LJets::~Chi2LJets ( )
virtual

Definition at line 23 of file Chi2LJets.cxx.

23  {
24  delete min;
25  }

Member Function Documentation

◆ apply()

bool top::Chi2LJets::apply ( const top::Event ) const
overridevirtual

This does stuff based on the information in an event.

The idea is that you implement this to return either true or false based on the information held within top::Event. If this returns true then the event is kept. If it returns false then the event is removed.

Parameters
top::EventThe current event.
Returns
true if the event should be kept, false otherwise.

The other jet in the W

The hadronic b quark

Implements top::EventSelectorBase.

Definition at line 27 of file Chi2LJets.cxx.

27  {
28  //set lepton
29  if (event.m_electrons.size() == 1) params.lepton = event.m_electrons.at(0)->p4();
30 
31  if (event.m_muons.size() == 1) params.lepton = event.m_muons.at(0)->p4();
32 
33  //and met
34  params.neutrino_px = event.m_met->mpx();
35  params.neutrino_py = event.m_met->mpy();
36 
37  //Output
38  double chi2min = 1e200;
39  double topmass = 0.;
40  //double wmass = 0.;
41 
42  //First loop is for the leptonic b quark
43  for (xAOD::JetContainer::const_iterator j1 = event.m_jets.begin(); j1 != event.m_jets.end(); ++j1) {
44  params.leptonic_b = (*j1)->p4();
45 
46  //Second loop is for one of the jets that makes a W
47  for (xAOD::JetContainer::const_iterator j2 = event.m_jets.begin(); j2 != event.m_jets.end(); ++j2) {
48  if (j1 == j2) continue;
49 
51  for (xAOD::JetContainer::const_iterator j3 = event.m_jets.begin(); j3 != event.m_jets.end(); ++j3) {
52  if (j1 == j3 || j2 == j3) continue;
53 
54  params.hadronic_w_mass = ((*j2)->p4() + (*j3)->p4()).M();
55 
57  for (xAOD::JetContainer::const_iterator j4 = event.m_jets.begin(); j4 != event.m_jets.end(); ++j4) {
58  if (j1 == j4 || j2 == j4 || j3 == j4) continue;
59 
60  params.hadronic_t_mass = ((*j1)->p4() + (*j2)->p4() + (*j3)->p4()).M();
61 
62  //Set input parameters to something reasonable (a guess)
63  min->DefineParameter(0, "top_mass", 172500., 10000., 0, 500000); //starting guess, step, min, max
64  min->DefineParameter(1, "neutrino_pz", 10000, 10000, -1000000, 1000000);
65 
66  //Perform the minimisation
67  int status = min->Migrad();
68 
69  double chi2 = 0;
70  double edm = 0;
71  double errdef = 0;
72  int nvpar = 0;
73  int nparx = 0;
74  int icstat = 0;
75 
76  min->mnstat(chi2, edm, errdef, nvpar, nparx, icstat);
77 
78  if (status == 0 && chi2 < chi2min) {
79  double error = 0;
80  chi2min = chi2;
81  min->GetParameter(0, topmass, error);
82  //wmass = params.hadronic_w_mass;
83  } //min chi2
84  } //j4 = hadronic b
85  } //j3 = j3 + j2 = hadronic W
86  } //j2
87  } //j1 = leptonic b
88 
89 
90 
91 
92  //
93  // 577 MiniElectronContainer electrons = event.electrons();
94  // 578 if (electrons.size() == 1)
95  // 579 params.lepton.SetPtEtaPhiE(electrons[0]->pt(), electrons[0]->eta(), electrons[0]->phi(),
96  // electrons[0]->E());
97  // 580
98  // 581 MiniMuonContainer muons = event.muons();
99  // 582 if (muons.size() == 1)
100  // 583 params.lepton.SetPtEtaPhiE(muons[0]->pt(), muons[0]->eta(), muons[0]->phi(), muons[0]->E());
101  // 584
102  // 585 //set met
103  // 586 const MiniMET* met = event.MET();
104  // 587 params.neutrino_px = met->et()*cos(met->phi());
105  // 588 params.neutrino_py = met->et()*sin(met->phi());
106  // 589
107  // 590 //Out
108  // 591 double chi2, edm, errdef;
109  // 592 int nvpar, nparx, icstat;
110  // 593
111  // 594 double chi2min = 1e200;
112  // 595 double topmass = 0.;
113  // 596 double wmass = 0.;
114  // 597
115  // 598 //TObjects have a significant creation overhead so move them out of the loop
116  // 599 TLorentzVector a;
117  // 600 TLorentzVector b;
118  // 601 TLorentzVector c;
119  // 602
120  // 603 const MiniJetContainer jets = event.jets();
121  // 604
122  // 605 //checks
123  // 606 assert((electrons.size() == 1 && muons.empty()) || (muons.size() == 1 && electrons.empty()));
124  // 607 assert(jets.size() >= 4);
125  // 608
126  // 609 //First loop is for the leptonic b quark
127  // 610 for (MiniJetContainer::const_iterator j1 = jets.begin(); j1 !=jets.end(); ++j1) {
128  // 611
129  // 612 params.leptonic_b.SetPtEtaPhiE((*j1)->pt(), (*j1)->eta(), (*j1)->phi(), (*j1)->E());
130  // 613
131  // 614 //Second loop is for one of the jets that makes a W
132  // 615 for (MiniJetContainer::const_iterator j2 = jets.begin(); j2 != jets.end(); ++j2) {
133  // 616 if (j1 == j2)
134  // 617 continue;
135  // 618
136  // 619 a.SetPtEtaPhiE((*j2)->pt(), (*j2)->eta(), (*j2)->phi(), (*j2)->E());
137  // 620
138  // 621 ///The other jet in the W
139  // 622 for (MiniJetContainer::const_iterator j3 = jets.begin(); j3 != jets.end(); ++j3) {
140  // 623 if (j1 == j3 || j2 == j3)
141  // 624 continue;
142  // 625
143  // 626 b.SetPtEtaPhiE((*j3)->pt(), (*j3)->eta(), (*j3)->phi(), (*j3)->E());
144  // 627 params.hadronic_w_mass = (a + b).M();
145  // 628
146  // 629 ///The hadronic b quark
147  // 630 for (MiniJetContainer::const_iterator j4 = jets.begin(); j4 != jets.end(); ++j4) {
148  // 631 if (j1 == j4 || j2 == j4 || j3 == j4)
149  // 632 continue;
150  // 633
151  // 634 c.SetPtEtaPhiE((*j4)->pt(), (*j4)->eta(), (*j4)->phi(), (*j4)->E());
152  // 635 params.hadronic_t_mass = (a + b + c).M();
153  // 636
154  // 637 //Set input parameters to something reasonable (a guess)
155  // 638 min->DefineParameter(0, "top_mass", 172500., 10000., 0, 500000); //starting
156  // guess, step, min, max
157  // 639 min->DefineParameter(1, "neutrino_pz", 10000, 10000, -1000000, 1000000);
158  // 640
159  // 641 //Perform the minimisation
160  // 642 int status = min->Migrad();
161  // 643 min->mnstat(chi2, edm, errdef, nvpar, nparx, icstat);
162  // 644
163  // 645 if (status == 0 && chi2 < chi2min) {
164  // 646 double error;
165  // 647 chi2min = chi2;
166  // 648 min->GetParameter(0, topmass, error);
167  // 649 wmass = params.hadronic_w_mass;
168  // 650 } //min chi2
169  // 651
170  // 652 } //j4 = hadronic b
171  // 653 } //j3 = j3 + j2 = hadronic W
172  // 654 } //j2
173  // 655 } //j1 = leptonic b
174 
175  return true;
176  }

◆ applyParticleLevel()

virtual bool top::EventSelectorBase::applyParticleLevel ( const top::ParticleLevelEvent ) const
inlinevirtualinherited

This does stuff based on the information in a particle level event.

The idea is that you implement this to return either true or false, based on the information held within the top::ParticleLevelEvent. If this function returns true, then the event is kept, otherwise it is removed. The function has a default implementation (which returns true) because it is expected that many EventSelector objects do not operate on ParticleLevelEvent objects.

Parameters
top::ParticleLevelEventthe current particle level event.
trueif the event should be kept (i.e. it passed the selector criteria), false otherwise.

Reimplemented in top::JetNGhostSelector, top::PrintEventSelector, top::PseudoTopRecoRun, top::NElectronNMuonTightSelector, top::NElectronNMuonSelector, top::NFwdElectronSelector, top::HTSelector, top::OSLeptonTightSelector, top::MLLSelector, top::MWTSelector, top::NElectronTightSelector, top::NFwdElectronTightSelector, top::NMuonTightSelector, top::OSLeptonSelector, top::METMWTSelector, top::METSelector, top::MLLWindow, top::NElectronSelector, top::NJetSelector, top::NMuonSelector, top::NPhotonSelector, top::NSoftMuonSelector, top::NTauSelector, top::SSLeptonTightSelector, top::SSLeptonSelector, top::ParticleLevelSelector, top::RecoLevelSelector, top::NVarRCJetSelector, top::NLargeJetSelector, and top::NRCJetSelector.

Definition at line 73 of file EventSelectorBase.h.

73 {return true;}

◆ name()

std::string top::Chi2LJets::name ( ) const
inlineoverridevirtual

A human readable name.

Mostly used for printing the cut and value to the screen. Must be implemented for each tool.

Implements top::EventSelectorBase.

Definition at line 51 of file Chi2LJets.h.

51 {return "RECO:CHI2LJETS";}

Member Data Documentation

◆ input_topmass

const double top::Chi2LJets::input_topmass = 172500
static

The top mass that we're using as the baseline - used in chi2 function.

Definition at line 61 of file Chi2LJets.h.

◆ input_topsigma

const double top::Chi2LJets::input_topsigma = 13000
static

The top resolution that we're using as the baseline - used in chi2 function.

Definition at line 67 of file Chi2LJets.h.

◆ input_wmass

const double top::Chi2LJets::input_wmass = 80300
static

The W mass that we're using as the baseline - used in chi2 function.

Definition at line 64 of file Chi2LJets.h.

◆ input_wsigma

const double top::Chi2LJets::input_wsigma = 7000
static

The W resolution that we're using as the baseline - used in chi2 function.

Definition at line 70 of file Chi2LJets.h.

◆ min

TMinuit* top::Chi2LJets::min
private

So we can do a minimisation.

Definition at line 54 of file Chi2LJets.h.

◆ params

FitInfo top::Chi2LJets::params
mutableprivate

Definition at line 56 of file Chi2LJets.h.


The documentation for this class was generated from the following files:
top::FitInfo::neutrino_py
double neutrino_py
Missing ET - py.
Definition: Chi2LJets.h:32
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
doubleTestComp.j1
j1
Definition: doubleTestComp.py:21
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
top::Chi2LJets::params
FitInfo params
Definition: Chi2LJets.h:56
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
fcn
void fcn(int &, double *, double &result, double par[], int)
this is where we write out chi2
Definition: Chi2LJets.cxx:183
top::FitInfo::hadronic_t_mass
double hadronic_t_mass
Mass of the hadronic top quark (j+j+j)
Definition: Chi2LJets.h:26
top::Chi2LJets::min
TMinuit * min
So we can do a minimisation.
Definition: Chi2LJets.h:54
top::FitInfo::hadronic_w_mass
double hadronic_w_mass
Mass of the hadronic W (j+j)
Definition: Chi2LJets.h:23
top::FitInfo::neutrino_px
double neutrino_px
Missing ET - px.
Definition: Chi2LJets.h:29
merge.status
status
Definition: merge.py:17
error
Definition: IImpactPoint3dEstimator.h:70
top::FitInfo::leptonic_b
TLorentzVector leptonic_b
Four vector of the jet that we think is the leptonic b quark.
Definition: Chi2LJets.h:38
doubleTestComp.j2
j2
Definition: doubleTestComp.py:22
top::FitInfo::lepton
TLorentzVector lepton
Four-vector of the lepton (electron or muon)
Definition: Chi2LJets.h:35