DAS  3.0
Das Analysis System
MjjYmaxfinal

#include <MjjYmax.h>

+ Inheritance diagram for MjjYmax:
+ Collaboration diagram for MjjYmax:

Public Member Functions

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

Public Attributes

int nGenMjjBinsFwd
 
int nGenMjjBinsCnt
 
- Public Attributes inherited from Observable
TUnfoldBinning * recBinning
 
TUnfoldBinning * genBinning
 

Additional Inherited Members

- 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

◆ MjjYmax()

MjjYmax ( )

Constructor.

134  :
135  Observable(__FUNCTION__, "Dijet mass double differential cross section")
136 {
137  vector<double> recMjj_edges;
138  recMjj_edges.reserve(Mjj_edges.size()*2);
139 
140  // rec binning with twice more bins
141  for (size_t j = 0; j < Mjj_edges.size()-1; ++j) {
142  double m = Mjj_edges.at(j),
143  M = Mjj_edges.at(j+1);
144  recMjj_edges.push_back(m);
145  recMjj_edges.push_back((m+M)/2);
146  }
147  recMjj_edges.push_back(Mjj_edges.back());
148 
149  int nRecMjjBins = recMjj_edges.size()-1;
150  int nGenMjjBins = Mjj_edges.size()-1;
151 
152  recBinning->AddAxis("Mjj", nRecMjjBins, recMjj_edges.data(),false,false);
153  recBinning->AddAxis("y" , nYmaxBins, ymax_edges.data(),false,false);
154  genBinning->AddAxis("Mjj", nGenMjjBins, Mjj_edges.data(),false,false);
155  genBinning->AddAxis("y" , nYmaxBins, ymax_edges.data(),false,false);
156 }

Member Function Documentation

◆ getFiller()

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

Constructs a filler for the observable.

Reimplemented from Observable.

159 {
160  return make_unique<MjjYmaxFiller>(*this, reader);
161 }

◆ setLmatrix()

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

See Observable::getLmatrix

Todo:
fix

Reimplemented from Observable.

164 {
165  for (size_t iy = 1; iy <= nYmaxBins; ++iy) {
166  const TVectorD * Mjj_edges = genBinning->GetDistributionBinning(0);
167  int nMjjBins = Mjj_edges->GetNrows()-1;
168  for (int iM = 1; iM <= nMjjBins; ++iM) {
169 
170  double Ymax = ( y_edges.at(iy-1) + y_edges.at(iy)) / 2,
171  Mjj = ((*Mjj_edges)[iM-1] + (*Mjj_edges)[iM]) / 2;
172  int i = genBinning->GetGlobalBinNumber(Mjj, Ymax);
173  if (i == 0)
174  BOOST_THROW_EXCEPTION( runtime_error("Mjj = "s + Mjj + " and Ymax = "s + Ymax
175  + " do not correspond to any bin index"s) );
176 
177  // b(in)
178  int bUp = i-nMjjBins,
179  bLeft = i-1, bCenter = i , bRight = i+1,
180  bDown = i+nMjjBins;
181 
182  // values (curvature regularisation)
183  auto get = [&bias](int i) {
184  double content = bias->GetBinContent(i);
185  if (content < 0)
186  BOOST_THROW_EXCEPTION( DE::BadInput("Expecting only positive entries", bias) );
187  return content > 0 ? 1./content : 0;
188  };
189  double cUp = get(bUp ),
190  cLeft = get(bLeft ),
191  cRight = get(bRight),
192  cDown = get(bDown );
193 
194  cout << setw(3) << iy << setw(3) << iM
195  << setw(5) << bCenter << setw(15) << (cUp+cLeft+cRight+cDown)
196  << setw(5) << bUp << setw(15) << -cUp
197  << setw(5) << bLeft << setw(15) << -cLeft
198  << setw(5) << bRight << setw(15) << -cRight
199  << setw(5) << bDown << setw(15) << -cDown << '\n';
200 
201  // filling L-matrix
202  L->SetBinContent(i, bCenter, cUp+cLeft+cRight+cDown );
203  if (cUp > 0) L->SetBinContent(i, bUp , -cUp );
204  if (cLeft > 0) L->SetBinContent(i, bLeft , -cLeft );
205  if (cRight > 0) L->SetBinContent(i, bRight , -cRight );
206  if (cDown > 0) L->SetBinContent(i, bDown , -cDown );
207  }
208  }
209  cout << flush;
210 }

Member Data Documentation

◆ nGenMjjBinsCnt

int nGenMjjBinsCnt

◆ nGenMjjBinsFwd

int nGenMjjBinsFwd

The documentation for this struct was generated from the following files:
DAS::y_edges
static const std::vector< double > y_edges
Definition: binnings.h:36
DAS::nMjjBins
static const int nMjjBins
Definition: binnings.h:40
DAS::Unfolding::Observable::genBinning
TUnfoldBinning * genBinning
particle-level binning
Definition: Observable.h:150
DAS::Unfolding::DijetMass::ymax_edges
static const std::vector< double > ymax_edges
Definition: MjjYmax.h:27
DAS::Unfolding::Observable::Observable
Observable(const char *, const char *)
Constructor.
Definition: Observable.cc:26
DAS::Unfolding::DijetMass::Mjj_edges
static const std::vector< double > Mjj_edges
Definition: MjjYmax.h:23
DAS::Unfolding::DijetMass::nYmaxBins
static const size_t nYmaxBins
Definition: MjjYmax.h:29
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