Hi all,
in my ntuple, I have got two branches:
....
*Br 41 :passHLT : passHLT/I
*Br 42 :passedTriggers : vector<string>
.... *
The first is just a flag for a “good” event, the second is a vector that contains for each event the names of “triggers” belonging to that event.
I would like to plot a flat variable like
*Br 1 :eventNumber : eventNumber/I
with a TTree::Draw() or TTree::Project call, by selecting only events that pass an OR of two well defined “triggers”, i.e.,
something like:
physics->Draw("eventNumber","( passHLT == 1 && ( passedTriggers == \"HLT_mu20_iloose_L1MU15\" || passedTriggers == \"HLT_mu50\") )")
but this (as I somehow expected…) does not seem to do what I would like to do.
In fact, just picking a single event where both the two above “triggers” are there:
root [2] physics->Scan("passedTriggers:eventNumber","( eventNumber == 8312257 && passHLT == 1 )","colsize=25")
*******************************************************************************
* Row * Instance * passedTriggers * eventNumber *
*******************************************************************************
* 8 * 0 * HLT_mu20_iloose_L1MU15 * 8312257 *
* 8 * 1 * HLT_mu50 * 8312257 *
*******************************************************************************
, when drawing a hist for eventNumber I get the event counted twice in the histogram. Guess the reason is that the cut expression evaluates to true twice.
Is there a way to avoid this double counting? Or is just something that goes beyond the scope of Draw/Project?
I see that in root.cern.ch/doc/master/classTT … TTree:Draw there are some special variables and functions available, but I can’t get my head around my specific use case.
Anything that sounds like
would be awesome
Thanks in advance for the help!
Marco