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 (Darwin::Tools::Flow &) 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.

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

Member Function Documentation

◆ getFiller()

unique_ptr< DAS::Unfolding::Filler > getFiller ( Darwin::Tools::Flow flow) const
overridevirtual

Constructs a filler for the observable.

Reimplemented from Observable.

126 {
127  return make_unique<PtYFiller>(*this, flow);
128 }

◆ setLmatrix()

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

See Observable::setLmatrix

Reimplemented from Observable.

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

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:23
DAS::Unfolding::InclusiveJet::nRecBins
static const int nRecBins
Definition: PtY.h:25
DAS::Unfolding::Observable::genBinning
TUnfoldBinning * genBinning
particle-level binning
Definition: Observable.h:125
DAS::Unfolding::InclusiveJet::recBins
static const std::vector< double > recBins
Definition: PtY.h:21
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:26
DAS::Unfolding::InclusiveJet::nYbins
static const int nYbins
Definition: PtY.h:27
DAS::Unfolding::InclusiveJet::genBins
static const std::vector< double > genBins
Definition: PtY.h:22
DAS::Unfolding::Observable::recBinning
TUnfoldBinning * recBinning
detector-level binning
Definition: Observable.h:124
Darwin::Exceptions::BadInput
Generic exception for ill-defined input (before the event loop).
Definition: exceptions.h:83