DAS  3.0
Das Analysis System
ZPtYfinal

Description

#include <ZPtY.h>

+ Inheritance diagram for ZPtY:
+ Collaboration diagram for ZPtY:

Public Member Functions

 ZPtY ()
 
std::unique_ptr< FillergetFiller (TTreeReader &reader) const override
 
void setLmatrix (const std::unique_ptr< TH1 > &, std::unique_ptr< TH2 > &) override
 
- Public Member Functions inherited from Observable
virtual std::unique_ptr< TransformergetTransformer (TUnfoldBinning *) const
 
virtual ~Observable ()=default
 

Additional Inherited Members

- Public Attributes inherited from Observable
TUnfoldBinning * recBinning
 
TUnfoldBinning * genBinning
 
- Static Public Attributes inherited from Observable
static bool isMC = false
 
static double maxDR = 0.2
 
- Protected Member Functions inherited from Observable
 Observable (const char *, const char *)
 

Constructor & Destructor Documentation

◆ ZPtY()

ZPtY ( )

Constructor.

114  :
115  Observable(__FUNCTION__, "Z boson dsigma/dpT dy")
116 {
117  recBinning->AddAxis("pt", nRecPtBins, recPtBins.data(), false, false);
118  recBinning->AddAxis("y" , nYbins, yBins.data(), false, false);
119  genBinning->AddAxis("pt", nGenPtBins, genPtBins.data(), false, false);
120  genBinning->AddAxis("y" , nYbins, yBins.data(), false, false);
121 }

Member Function Documentation

◆ getFiller()

unique_ptr< DAS::Unfolding::Filler > getFiller ( TTreeReader &  reader) const
overridevirtual

Constructs a filler for the observable.

Reimplemented from Observable.

124 {
125  return make_unique<ZPtYFiller>(*this, reader);
126 }

◆ setLmatrix()

void setLmatrix ( const std::unique_ptr< TH1 > &  bias,
std::unique_ptr< TH2 > &  L 
)
overridevirtual

See Observable::setLmatrix

Todo:
some docs... this is quite obscure
Todo:
Most existing L-matrices follow a similar structure, this should be implemented in a function instead of repeating the same code

Reimplemented from Observable.

129 {
133  for (int iy = 1; iy <= nRecPtBins; ++iy)
134  for (int ipt = 1; ipt <= nGenPtBins; ++ipt) {
135 
136  auto y = (yBins.at(iy - 1) + yBins.at(iy)) / 2,
137  pt = (genPtBins.at(ipt - 1) + genPtBins.at(ipt)) / 2;
138  int i = genBinning->GetGlobalBinNumber(pt, y);
139  if (i == 0)
140  BOOST_THROW_EXCEPTION( logic_error(
141  Form("pt = %f and y = %f do not correspond to any bin index", pt, y)) );
142 
143  // b(in)
144  int bUp = i-nGenPtBins,
145  bLeft = i-1, bCenter = i , bRight = i+1,
146  bDown = i+nGenPtBins;
147 
148  // values (curvature regularisation)
149  auto get = [&bias](int i) {
150  auto content = bias->GetBinContent(i);
151  if (content < 0)
152  BOOST_THROW_EXCEPTION( DE::BadInput("Expecting only positive entries", bias) );
153  return content > 0 ? 1./content : 0;
154  };
155 
156  auto cUp = get(bUp ),
157  cLeft = get(bLeft ),
158  cRight = get(bRight),
159  cDown = get(bDown );
160 
161  cout << setw(3) << iy << setw(3) << ipt
162  << setw(5) << bCenter << setw(15) << (cUp+cLeft+cRight+cDown)
163  << setw(5) << bUp << setw(15) << -cUp
164  << setw(5) << bLeft << setw(15) << -cLeft
165  << setw(5) << bRight << setw(15) << -cRight
166  << setw(5) << bDown << setw(15) << -cDown << '\n';
167 
168  // filling L-matrix
169  L->SetBinContent(i, bCenter, cUp+cLeft+cRight+cDown );
170  if (cUp > 0) L->SetBinContent(i, bUp , -cUp );
171  if (cLeft > 0) L->SetBinContent(i, bLeft , -cLeft );
172  if (cRight > 0) L->SetBinContent(i, bRight , -cRight );
173  if (cDown > 0) L->SetBinContent(i, bDown , -cDown );
174  }
175  cout << flush;
176 }

The documentation for this struct was generated from the following files:
jmarExample.pt
pt
Definition: jmarExample.py:19
DAS::Unfolding::DrellYan::nYbins
static const int nYbins
Definition: ZPtY.h:33
DAS::Unfolding::DrellYan::yBins
static const std::vector< double > yBins
Definition: ZPtY.h:29
DAS::Unfolding::Observable::genBinning
TUnfoldBinning * genBinning
particle-level binning
Definition: Observable.h:150
DAS::Unfolding::DrellYan::nGenPtBins
static const int nGenPtBins
Definition: ZPtY.h:32
DAS::Unfolding::DrellYan::recPtBins
static const std::vector< double > recPtBins
Definition: ZPtY.h:20
DAS::Unfolding::Observable::Observable
Observable(const char *, const char *)
Constructor.
Definition: Observable.cc:26
DAS::Unfolding::DrellYan::nRecPtBins
static const int nRecPtBins
Definition: ZPtY.h:31
DAS::Unfolding::DrellYan::genPtBins
static const std::vector< double > genPtBins
Definition: ZPtY.h:26
DAS::Unfolding::Observable::recBinning
TUnfoldBinning * recBinning
detector-level binning
Definition: Observable.h:149
Darwin::Exceptions::BadInput
Generic exception for ill-defined input (before the event loop).
Definition: exceptions.h:83