[d2n-analysis-talk] BB cer TDCs
Brad Sawatzky
brads at jlab.org
Sun Jan 31 11:22:35 EST 2010
On Fri, 29 Jan 2010, MATTHEW R POSIK wrote:
> Ok, so I just tried using the cut
>
> DBB.BBcerT11[0]<400.0||DBB.BBcerT12[0]<400.0||||DBB.BBcerT13[0]<400.0||DBB.BBcerT14[0]<400.0||DBB.BBcerT15[0]<400.0
>
> and applied it to BB.cer.asum_c[0]
Only index array variables. BB.cer.asum_c is a scalar. It would be far
better if ROOT just threw an error and crashed on bugs like that rather
than attempting to guess "what you mean". If anyone can find an option
that would make ROOT behave that way, PLEASE tell me! Usually ROOT
guesses correctly, but it encourages sloppy code practice. When errors
do crop up they're hard to debug...
Bottom line is this:
- always use an explicit index on array variables
- never index a scalar variable
- if you don't know if a variable is an array or scaler, then find out
using T->Print(<var_name>), or equivalent
> The result was out of ~500000 only 18 were left. I checked all the
> TDCs and all have there in time peaks around 200-300, so having just
> 18 events left doesn't make sense.
That is very strange. I recommend copying your generated cut string
into a text file. Then, _by_hand_ at the root prompt, call
T->Draw("..", ...) and add pieces of your cut step by step until you
discover what part is throwing away your data.
-- Brad
--
Brad Sawatzky, PhD <brads at jlab.org> -<>- Jefferson Lab / Hall C / C111
Ph: 757-269-5947 -<>- Pager: 757-584-5947 -<>- Fax: 757-269-7848
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" but "That's funny..." -- Isaac Asimov
More information about the d2n-analysis-talk
mailing list