Print

Print


Hello Omar,

The confusion seems to stem from undefined behavior in TTree->Draw(). Let me explain.

Your hps_event contains a TClonesArray *ecal_hits containing EcalHit object and a counter n_ecal_hits.  It also contains a TClonesArray *ecal_clusters containing EcalCluster objects, and each EcalCluster object contain a TRefArray *ecal_hits and a counter n_ecal_hits. There should not be, but in the TTree->Draw() there is a naming confusion, so when I ask for the n_ecal_hits from the hps_event, I seem to get the n_ecal_hits for the EcalCluser objects instead, even though when I want the latter, I should have requested for “ecal_clusters.n_ecal_hits”. 

I am a bit disappointed that the TTree->Draw() mechanism can’t keep this straight. It seems that this is due to one of those ROOT shortcut hacks, so you can specify tree->Draw(“x”) instead of tree->Draw(“ecal_clusters.x”). Indeed, that works, but you don’t know if you get the “ecal_clusters.x” or the “svt_hits.x” (you get the latter, in my test).  Maybe I should fie a bug report with ROOT about this poorly defined behavior.

To plot the number of hits in the event I thus need to specify: t->Draw("Event.n_ecal_hits>>nhits","pair1_trigger==1 && n_ecal_clusters>1"). This produces the attached histogram, which no longer contains the one hit wonder events. Remarkably, there do exist 2 hit events, but those are few.

Note that there are also ~7519 events out of ~250,000 that have only one cluster. (From t->Draw("Event.n_ecal_hits>>nhits","pair1_trigger==1 && n_ecal_clusters==1”) ) Some of those one cluster events have only one hit. I would conclude that we are not writing all the hits to the DST but only those found in clusters (confirmed by looking at the code), and that the clustering algorithm does not find all the clusters that the GTP found. 

Thanks for the help!

Best,
Maurik







On Jun 4, 2015, at 5:50 PM, Omar Moreno <[log in to unmask]> wrote:

This is the number of Ecal hits per cluster.  The number of entries is showing the total number of Ecal clusters integrated over all events.


On Thu, Jun 4, 2015 at 2:40 PM, Maurik Holtrop <[log in to unmask]> wrote:
Hello Omar,

Here is a surprising graph of one hit wonder events. There is one hit in the ECal, but the trigger was pair1 and there is more than one ECal cluster. 
It seems that is because I am not understanding the entries in the DST well enough. Note that I get the same result if I plot “ecal_hits.GetSize()”. I think I am looking at this incorrectly, because the file has 251823 events, but the produced histogram has 800602 entries. It seems thus that there is more than one “ecal_hits” entry per event, and indeed, for event_number == 1 I find 5 entries for n_ecal_hits. When I look at the code that creates these hits, this doesn’t quite make sense.

Can you please point to my error?

Best,
Maurik


File used: /expphy/volatile/hallb/hps/omoreno/run5772_recon_fix.root

[log in to unmask]"><OneHit_wonders.png>




Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1