39 fWtHst1 =
new TH1D(
"TFoamMaxwt_hst_Wt1",
"Histo of weight ",nBin,0.0,
wmax);
40 fWtHst2 =
new TH1D(
"TFoamMaxwt_hst_Wt2",
"Histo of weight**2",nBin,0.0,
wmax);
54 Error(
"TFoamMaxwt",
"COPY CONSTRUCTOR NOT TESTED!");
82 if (&From ==
this)
return *
this;
109 std::cout<<
"00000000000000000000000000000000000000000000000000000000000000000000000"<<std::endl;
110 std::cout<<
"00 -->wtLim: No_evt ="<<
fNent<<
" <Wt> = "<<aveWt<<
" wtLim= "<<wtLim<<std::endl;
111 std::cout<<
"00 -->wtLim: For eps = "<<eps <<
" EFFICIENCY <Wt>/wtLim= "<<MCeff<<std::endl;
112 std::cout<<
"00000000000000000000000000000000000000000000000000000000000000000000000"<<std::endl;
132 for(ib=0;ib<=
fnBin+1;ib++) {
136 if( (
sum == 0.0) || (sumWt == 0.0) ) {
137 std::cout<<
"TFoamMaxwt::Make: zero content of histogram !!!,sum,sumWt ="<<
sum<<sumWt<<std::endl;
142 for( ibX=
fnBin+1; ibX>0; ibX--) {
146 for( ib=0; ib<=
fnBin+1; ib++) {
149 if(ib >= ibX) bin1=lowEdge*bin;
154 if(
TMath::Abs(1.0-aveWt1/aveWt) > eps )
break;
158 if(ibX == (
fnBin+1) ) {
161 std::cout<<
"+++++ wtLim undefined. Higher upper limit in histogram"<<std::endl;
162 }
else if( ibX == 1) {
165 std::cout<<
"+++++ wtLim undefined. Lower upper limit or more bins "<<std::endl;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmax
Small auxiliary class for controlling MC weight.
void Make(Double_t, Double_t &)
Calculates Efficiency= aveWt/wtLim for a given tolerance level epsilon<<1 To be called at the end of ...
void Fill(Double_t)
Filling analyzed weight.
TFoamMaxwt()
Constructor for streamer.
void Reset()
Resetting weight analysis.
TH1D * fWtHst1
Histogram of the weight wt.
Double_t fNent
No. of MC events.
Int_t fnBin
No. of bins on the weight distribution.
void GetMCeff(Double_t, Double_t &, Double_t &)
Calculates Efficiency= aveWt/wtLim for a given tolerance level epsilon<<1 using information stored in...
Double_t fwmax
Maximum analyzed weight.
TH1D * fWtHst2
Histogram of wt filled with wt.
TFoamMaxwt & operator=(const TFoamMaxwt &)
substitution =
~TFoamMaxwt() override
Destructor.
1-D histogram with a double per channel (see TH1 documentation)}
void Reset(Option_t *option="") override
Reset.
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
void Print(Option_t *option="") const override
Print some global quantities for this histogram.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Mother of all ROOT objects.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
static uint64_t sum(uint64_t i)