45 |
|
bool is_data; |
46 |
|
bool is_signal; |
47 |
|
bool is_active; |
48 |
+ |
float weightrenormalization; |
49 |
|
int groupindex; |
50 |
|
Color_t samplecolor; |
51 |
|
|
73 |
|
this->groupindex=m_groupindex; |
74 |
|
this->is_active=true; |
75 |
|
this->samplecolor=mycolor; |
76 |
+ |
this->weightrenormalization=1.0; |
77 |
|
if(!doesROOTFileExist(this->filename)) { |
78 |
|
stringstream message; |
79 |
|
message << "The " << write_mc_or_data(is_data) << " sample " << this->samplename << " is invalid because the associated file path, " << this->filename << " is incorrect."; |
108 |
|
if(m_Nentries>1) write_warning(__FUNCTION__,warning.str()); |
109 |
|
this->Nentries=measured_nevents; |
110 |
|
} |
111 |
< |
this->weight=(xs/(float)Nentries); |
112 |
< |
TH1F *weight_histo = (TH1F*)(this->tfile)->Get("weight_histo"); |
111 |
< |
this->weight/=average_weight; |
111 |
> |
this->weight=(xs/(float)Nentries)/average_weight; |
112 |
> |
this->weightrenormalization=(1.0/average_weight); |
113 |
|
} |
114 |
|
else { |
115 |
|
this->is_active=false; |
218 |
|
dout << "MC sample(s): " << endl; |
219 |
|
for (int isamp=0;isamp<(int)this->collection.size();isamp++) |
220 |
|
{ |
221 |
< |
if(!(this->collection)[isamp].is_data) dout << " - " << (this->collection)[isamp].samplename << " (" << (this->collection)[isamp].filename << ") xs=" << (this->collection)[isamp].xs << " pb, N(events)=" << (this->collection)[isamp].Nentries << endl; |
221 |
> |
if(!(this->collection)[isamp].is_data) dout << " - " << (this->collection)[isamp].samplename << " (" << (this->collection)[isamp].filename << ") xs=" << (this->collection)[isamp].xs << " pb, N(events)=" << (this->collection)[isamp].Nentries << " , RN = " << (this->collection)[isamp].weightrenormalization << endl; |
222 |
|
} |
223 |
|
} |
224 |
|
dout << "---------------------------------------------------------------------------------------------------" << endl; |
271 |
|
if(Verbosity>0) dout << endl << endl; |
272 |
|
if(Verbosity>0) dout << "-------------------------------------------------------------------------------------" << endl; |
273 |
|
if(Verbosity>0) dout << "histoname : " << m_histoname << " , m_var = " << m_var << ", m_xlabel=" << m_xlabel << " m_ylabel=" << m_ylabel << " m_is_data = " << m_is_data << " lumi = " << luminosity << " onlyindex size: " << onlyindex.size() << endl; |
274 |
+ |
|
275 |
|
if(HUSH==0) dout << "Drawing histo called " << m_histoname << "... " << endl; |
276 |
|
bool do_only_selected_samples=false; |
277 |
|
if(onlyindex.size()>0&&onlyindex[0]!=-1) { |