Tcut when I import a TH1F from a file

Hi @couet, maybe did you open the file si-500596.root? The bpar[0] is in the file si-500596-trasl.root because I create this branch by the TBAlign I don’t know if you remember, we talked about this macro in this topic Fit of an array with @Wile_E_Coyote .

By the macro TBAlign I traslated the local coordinates to laboratory ones, moreover, I fit the events in the three trackers and I also fill the bpar[0] (the slope of the fits).

By this macro

graphb.cpp (4.5 KB)

I plotted the bpar[0] for events read by the tracker 37, i.e I used the condition

fChain->Draw(hxb01string, subdet37 && xh99);

and I got 5289 events.

Now I must plot the bpar distribution for events that have hits in the three trackers 33, 35 and 37

so I tried to write in the graphb.cpp macro

`fChain->Draw(hxb01string, subdet33 && subdet35 && subdet37 && xh99);

but I got 0 events the I said it to my supervisor and his colleague and he said me that this code doesn’t work and I’ve to set the condition that x33[0] && x35[0] && x37[0] .

You see, yesterday I was able to fill a histogram for events having hits in the three trackers but I also have to apply other cuts and it looked like that the Tcut didn’t work for a filled histogram…

Now I also tried to add in the TBAlign a new array in this way

if (x33[0]!=NULL && x35[0]!=NULL && x37[0]!=NULL) bparT[0]=b;

but in this way I get the same events that I get just for bpar[0]=b

TBAlign.C (25.3 KB)