Class responsible for handling implementation of samples used in analysis, reweighting and returning LLH.
More...
#include <Samples/SampleHandlerBase.h>
|
void | QuietPlease () |
| CW: Redirect std::cout to silence some experiment specific libraries.
|
|
void | NowTalk () |
| CW: Redirect std::cout to silence some experiment specific libraries.
|
|
template<typename T > |
bool | MatchCondition (const std::vector< T > &allowedValues, const T &value) |
| check if event is affected by following conditions, for example pdg, or modes etc
|
|
|
TestStatistic | fTestStatistic |
| Test statistic tells what kind of likelihood sample is using.
|
|
std::streambuf * | buf |
| Keep the cout buffer.
|
|
std::streambuf * | errbuf |
| Keep the cerr buffer.
|
|
M3::int_t | nSamples |
| Contains how many samples we've got.
|
|
unsigned int | nEvents |
| Number of MC events are there.
|
|
std::unique_ptr< MaCh3Modes > | Modes |
| Holds information about used Generator and MaCh3 modes.
|
|
Class responsible for handling implementation of samples used in analysis, reweighting and returning LLH.
Definition at line 25 of file SampleHandlerBase.h.
◆ SampleHandlerBase()
SampleHandlerBase::SampleHandlerBase |
( |
| ) |
|
The main constructor.
Definition at line 4 of file SampleHandlerBase.cpp.
4 {
5
8}
M3::int_t nSamples
Contains how many samples we've got.
unsigned int nEvents
Number of MC events are there.
◆ ~SampleHandlerBase()
SampleHandlerBase::~SampleHandlerBase |
( |
| ) |
|
|
virtual |
◆ CleanMemoryBeforeFit()
virtual void SampleHandlerBase::CleanMemoryBeforeFit |
( |
| ) |
|
|
pure virtual |
◆ GetData()
virtual TH1 * SampleHandlerBase::GetData |
( |
const int |
Selection | ) |
|
|
inlinevirtual |
Definition at line 69 of file SampleHandlerBase.h.
69{ (void) Selection;
throw MaCh3Exception(__FILE__ , __LINE__ ,
"Not implemented"); }
Custom exception class for MaCh3 errors.
◆ GetKinVarLabel()
virtual std::string SampleHandlerBase::GetKinVarLabel |
( |
const int |
sample, |
|
|
const int |
Dimension |
|
) |
| |
|
inlinevirtual |
◆ GetPDF()
virtual TH1 * SampleHandlerBase::GetPDF |
( |
const int |
Selection | ) |
|
|
inlinevirtual |
◆ GetPDFMode()
virtual TH1 * SampleHandlerBase::GetPDFMode |
( |
const int |
Selection, |
|
|
const int |
Mode |
|
) |
| |
|
inlinevirtual |
◆ GetW2()
virtual TH2Poly * SampleHandlerBase::GetW2 |
( |
const int |
Selection | ) |
|
|
inlinevirtual |
◆ MatchCondition()
template<typename T >
bool SampleHandlerBase::MatchCondition |
( |
const std::vector< T > & |
allowedValues, |
|
|
const T & |
value |
|
) |
| |
|
inlineprotected |
check if event is affected by following conditions, for example pdg, or modes etc
Definition at line 109 of file SampleHandlerBase.h.
109 {
110 if (allowedValues.empty()) {
111 return true;
112 }
113 return std::find(allowedValues.begin(), allowedValues.end(), value) != allowedValues.end();
114 }
◆ NowTalk()
void SampleHandlerBase::NowTalk |
( |
| ) |
|
|
protected |
CW: Redirect std::cout to silence some experiment specific libraries.
Definition at line 211 of file SampleHandlerBase.cpp.
211 {
212
213 #if DEBUG > 0
214 return;
215 #else
216 std::cout.rdbuf(
buf);
218 #endif
219}
std::streambuf * buf
Keep the cout buffer.
std::streambuf * errbuf
Keep the cerr buffer.
◆ QuietPlease()
void SampleHandlerBase::QuietPlease |
( |
| ) |
|
|
protected |
CW: Redirect std::cout to silence some experiment specific libraries.
Definition at line 197 of file SampleHandlerBase.cpp.
197 {
198
199 #if DEBUG > 0
200 return;
201 #else
202 buf = std::cout.rdbuf();
203 errbuf = std::cerr.rdbuf();
204 std::cout.rdbuf( nullptr );
205 std::cerr.rdbuf( nullptr );
206 #endif
207}
◆ Reweight()
virtual void SampleHandlerBase::Reweight |
( |
| ) |
|
|
pure virtual |
◆ SaveAdditionalInfo()
virtual void SampleHandlerBase::SaveAdditionalInfo |
( |
TDirectory * |
Dir | ) |
|
|
inlinevirtual |
◆ SetupBinning()
virtual void SampleHandlerBase::SetupBinning |
( |
const M3::int_t |
Selection, |
|
|
std::vector< double > & |
BinningX, |
|
|
std::vector< double > & |
BinningY |
|
) |
| |
|
inlinevirtual |
◆ buf
std::streambuf* SampleHandlerBase::buf |
|
protected |
◆ errbuf
std::streambuf* SampleHandlerBase::errbuf |
|
protected |
◆ fTestStatistic
Test statistic tells what kind of likelihood sample is using.
Definition at line 117 of file SampleHandlerBase.h.
◆ Modes
std::unique_ptr<MaCh3Modes> SampleHandlerBase::Modes |
|
protected |
◆ nEvents
unsigned int SampleHandlerBase::nEvents |
|
protected |
◆ nSamples
The documentation for this class was generated from the following files: