18 #include "Riostream.h" 43 fWtHst1 =
new TH1D(
"TFoamMaxwt_hst_Wt1",
"Histo of weight ",nBin,0.0,wmax);
44 fWtHst2 =
new TH1D(
"TFoamMaxwt_hst_Wt2",
"Histo of weight**2",nBin,0.0,wmax);
58 Error(
"TFoamMaxwt",
"COPY CONSTRUCTOR NOT TESTED!");
86 if (&From ==
this)
return *
this;
110 Double_t wtLim,aveWt;
113 std::cout<<
"00000000000000000000000000000000000000000000000000000000000000000000000"<<std::endl;
114 std::cout<<
"00 -->wtLim: No_evt ="<<
fNent<<
" <Wt> = "<<aveWt<<
" wtLim= "<<wtLim<<std::endl;
115 std::cout<<
"00 -->wtLim: For eps = "<<eps <<
" EFFICIENCY <Wt>/wtLim= "<<MCeff<<std::endl;
116 std::cout<<
"00000000000000000000000000000000000000000000000000000000000000000000000"<<std::endl;
127 Double_t lowEdge,bin,bin1;
128 Double_t aveWt, aveWt1;
135 Double_t sumWt = 0.0;
136 for(ib=0;ib<=
fnBin+1;ib++) {
137 sum +=
fWtHst1->GetBinContent(ib);
138 sumWt +=
fWtHst2->GetBinContent(ib);
140 if( (sum == 0.0) || (sumWt == 0.0) ) {
141 std::cout<<
"TFoamMaxwt::Make: zero content of histogram !!!,sum,sumWt ="<<sum<<sumWt<<std::endl;
146 for( ibX=
fnBin+1; ibX>0; ibX--) {
150 for( ib=0; ib<=
fnBin+1; ib++) {
151 bin =
fWtHst1->GetBinContent(ib);
152 bin1 =
fWtHst2->GetBinContent(ib);
153 if(ib >= ibX) bin1=lowEdge*bin;
158 if( TMath::Abs(1.0-aveWt1/aveWt) > eps )
break;
162 if(ibX == (
fnBin+1) ) {
165 std::cout<<
"+++++ wtLim undefined. Higher uper limit in histogram"<<std::endl;
166 }
else if( ibX == 1) {
169 std::cout<<
"+++++ wtLim undefined. Lower uper limit or more bins "<<std::endl;
TFoamMaxwt & operator=(const TFoamMaxwt &)
substitution =
void GetMCeff(Double_t, Double_t &, Double_t &)
Calculates Efficiency= aveWt/wtLim for a given tolerance level epsilon<<1 using information stored in...
void Reset()
Reseting weight analysis.
void Make(Double_t, Double_t &)
Calculates Efficiency= aveWt/wtLim for a given tolerance level epsilon<<1 To be called at the end of ...
TFoamMaxwt()
Constructor for streamer.
virtual ~TFoamMaxwt()
Destructor.
void Fill(Double_t)
Filling analyzed weight.