DAS  3.0
Das Analysis System
PtYfinal

#include <PtY.h>

+ Inheritance diagram for PtY:
+ Collaboration diagram for PtY:

Public Member Functions

 PtY ()
 
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

◆ PtY()

PtY ( )

Constructor.

115  :
116  Observable(__FUNCTION__, "Inclusive jet double differential cross section")
117 {
118  recBinning->AddAxis("pt",nRecBins,recBins.data(),false,false);
119  recBinning->AddAxis("y" , nYbins,y_edges.data(),false,false);
120  genBinning->AddAxis("pt",nGenBins,genBins.data(),false,false);
121  genBinning->AddAxis("y" , nYbins,y_edges.data(),false,false);
122 }

Member Function Documentation

◆ getFiller()

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

Constructs a filler for the observable.

Reimplemented from Observable.

125 {
126  return make_unique<PtYFiller>(*this, reader);
127 }

◆ setLmatrix()

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

See Observable::setLmatrix

Reimplemented from Observable.

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

The documentation for this struct was generated from the following files:
jmarExample.pt
pt
Definition: jmarExample.py:19
DAS::Unfolding::InclusiveJet::y_edges
static const std::vector< double > y_edges
Definition: PtY.h:25
DAS::Unfolding::InclusiveJet::nRecBins
static const int nRecBins
Definition: PtY.h:27
DAS::Unfolding::Observable::genBinning
TUnfoldBinning * genBinning
particle-level binning
Definition: Observable.h:150
DAS::Unfolding::InclusiveJet::recBins
static const std::vector< double > recBins
Definition: PtY.h:23
DAS::Unfolding::Observable::Observable
Observable(const char *, const char *)
Constructor.
Definition: Observable.cc:26
DAS::Unfolding::InclusiveJet::nGenBins
static const int nGenBins
Definition: PtY.h:28
DAS::Unfolding::InclusiveJet::nYbins
static const int nYbins
Definition: PtY.h:29
DAS::Unfolding::InclusiveJet::genBins
static const std::vector< double > genBins
Definition: PtY.h:24
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