DAS  3.0
Das Analysis System
HTnfinal

Description

Todo:
finalise phase space selection

#include <HTn.h>

+ Inheritance diagram for HTn:
+ Collaboration diagram for HTn:

Public Member Functions

 HTn ()
 
std::unique_ptr< FillergetFiller (TTreeReader &reader) const override
 
std::unique_ptr< TransformergetTransformer (TUnfoldBinning *) const override
 
void setLmatrix (const std::unique_ptr< TH1 > &, std::unique_ptr< TH2 > &) override
 
- Public Member Functions inherited from Observable
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

◆ HTn()

HTn ( )

Constructor.

160  :
161  Observable(__FUNCTION__, "H_{T}/2 spectra in bins of jet multiplicity")
162 {
163  recBinning->AddAxis("HT", nRecHtBins, recHt_edges.data(), false, false);
164  recBinning->AddAxis("n" , nJetsBins, n_jets_edges.data(), false, false);
165  genBinning->AddAxis("HT", nGenHtBins, genHt_edges.data(), false, false);
166  genBinning->AddAxis("n" , nJetsBins, n_jets_edges.data(), false, false);
167 }

Member Function Documentation

◆ getFiller()

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

Constructs a filler for the observable.

Reimplemented from Observable.

170 {
171  return make_unique<HTnFiller>(*this, reader);
172 }

◆ getTransformer()

unique_ptr< DAS::Unfolding::Transformer > getTransformer ( TUnfoldBinning *  bng) const
overridevirtual

Constructs a transformer for the observable.

Reimplemented from Observable.

175 {
176  return make_unique<HTnTransformer>(bng);
177 }

◆ setLmatrix()

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

See Observable::getLmatrix

Reimplemented from Observable.

180 {
181  for (int n = nJetsmin; n <= nJetsmax; ++n)
182  for (int iHT = 1; iHT <= nGenHtBins; ++iHT) {
183 
184  double HT = (genHt_edges.at(iHT-1) + genHt_edges.at(iHT)) / 2;
185  int i = genBinning->GetGlobalBinNumber(HT, n);
186  if (i == 0)
187  BOOST_THROW_EXCEPTION( runtime_error("HT = "s + HT + " and n = "s + n
188  + " do not correspond to any bin index"s) );
189 
190  // b(in)
191  int bUp = i-nGenHtBins,
192  bLeft = i-1, bCenter = i , bRight = i+1,
193  bDown = i+nGenHtBins;
194 
195  // values (curvature regularisation)
196  auto get = [&bias](int i) {
197  auto content = bias->GetBinContent(i);
198  if (content < 0)
199  BOOST_THROW_EXCEPTION( DE::BadInput("Expecting only positive entries", bias) );
200  return content > 0 ? 1./content : 0;
201  };
202 
203  auto cUp = get(bUp ),
204  cLeft = get(bLeft ),
205  cRight = get(bRight),
206  cDown = get(bDown );
207 
208  cout << setw(3) << n << setw(3) << iHT
209  << setw(5) << bCenter << setw(15) << (cUp+cLeft+cRight+cDown)
210  << setw(5) << bUp << setw(15) << -cUp
211  << setw(5) << bLeft << setw(15) << -cLeft
212  << setw(5) << bRight << setw(15) << -cRight
213  << setw(5) << bDown << setw(15) << -cDown << '\n';
214 
215  // filling L-matrix
216  L->SetBinContent(i, bCenter, cUp+cLeft+cRight+cDown );
217  if (cUp > 0) L->SetBinContent(i, bUp , -cUp );
218  if (cLeft > 0) L->SetBinContent(i, bLeft , -cLeft );
219  if (cRight > 0) L->SetBinContent(i, bRight , -cRight );
220  if (cDown > 0) L->SetBinContent(i, bDown , -cDown );
221  }
222  cout << flush;
223 }

The documentation for this struct was generated from the following files:
DAS::Unfolding::Rij::nRecHtBins
static const int nRecHtBins
Definition: HTn.h:34
DAS::Unfolding::Rij::nJetsBins
static const int nJetsBins
Definition: HTn.h:36
DAS::Unfolding::Rij::recHt_edges
static const std::vector< double > recHt_edges
Definition: HTn.h:26
DAS::Unfolding::Rij::nJetsmax
static const double nJetsmax
Definition: HTn.h:41
DAS::Unfolding::Observable::genBinning
TUnfoldBinning * genBinning
particle-level binning
Definition: Observable.h:150
DAS::Unfolding::Observable::Observable
Observable(const char *, const char *)
Constructor.
Definition: Observable.cc:26
DAS::Unfolding::Rij::n_jets_edges
static const std::vector< double > n_jets_edges
Definition: HTn.h:32
DAS::Unfolding::Rij::nGenHtBins
static const int nGenHtBins
Definition: HTn.h:35
DAS::Unfolding::Observable::recBinning
TUnfoldBinning * recBinning
detector-level binning
Definition: Observable.h:149
DAS::Unfolding::Rij::genHt_edges
static const std::vector< double > genHt_edges
Definition: HTn.h:23
Darwin::Exceptions::BadInput
Generic exception for ill-defined input (before the event loop).
Definition: exceptions.h:83
DAS::Unfolding::Rij::nJetsmin
static const double nJetsmin
Definition: HTn.h:40