Hi all. I’m am trying to plot some data using TTree::Draw under some conditions that I can’t figure out how to write in the conditional syntax. Perhaps what I want to do is not possible with the Draw command and I’ll need to write a script.
Here’s what my branch structure looks like
Event{
HeaderData fHeader;
TClonesArray *fDetectors; //an array of Detectors
What I want to plot is fValue[1]-fValue[0] when fDetectorNumber == 4 AND when any of the other Detectors in the array have fDetectorNumber >= 33 with fValue[0] >-1 and fValue[1]>-1.
So, something like this:
TTree::Draw(“fValue[][1] - fValue[][0]”,“fDetectorNumber==4 && ??? how do I write this condition?”)
What I want to plot is fValue[1]-fValue[0] for fDetectorNumber == 4 when any of the other Detectors in the array have fDetectorNumber >= 33 with fValue[0] >-1 and fValue[1]>-1.
So, in terms of these variables, I want to plot fTdc[1]-fTdc[0] for fModuleNumber == 4 when any of the other MuonModule objects in the array have " fModuleNumber >= 33 with fTdc[0] >-1 and fTdc[1]>-1 ".
Also - I’ve attached a small file (but it contains all of these branches that I don’t care about at the moment).
[quote] fTdc[1]-fTdc[0] for fModuleNumber == 4 with fTdc[0] >-1 and fTdc[1]>-1[/quote]is
and [quote] fTdc[1]-fTdc[0] for fModuleNumber == 4 when any of the other MuonModule objects in the array have " fModuleNumber >= 33 with fTdc[0] >-1 and fTdc[1]>-1[/quote]is