Print

Print


Hi,

 I discovered that if you play too much with histogram names you will get
very bad behaviours. For instance

if(l == 2 && i == 0 && thebin == 1){
	sprintf(name, "%s%d", "a", 1609);
	((TH1D*)gDirectory->Get(name))->Fill(momentumTrk[itrk]);
	sprintf(name,"%s%d%s%d","a",1600,"bin",thebin);
	((TH1D*)gDirectory->Get(name))->Fill(momentumTrk[itrk]);
}

the two histograms have same binning and same range.

Well, I get two different numbers of entries. The first plot has the
correct number, the second one has an excess. This histogram is not filled
elsewhere. If I comment out the filling I get 0 entries, then no other
filling elsewhere. The extra events have shape proper to a mes
distribution. Other histogram with a similar name are filled with mes.
Very suspicious...

 If I change the histogram name things work properly again (same
distribution for both the histograms).

 Millions of histograms and tree variables are filled in recoilNtp in this
way. I don't know if I will sleep well in the next days.

 Daniele