[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with cosmics triggers files (fwd)




Hi Andrei,

    I think I have finally got this fixed. I won't bore you with the 
details of the epic journey it took to get here, but the short of it is:

1. Using macros with the interpreter didn't work so compiled programs 
were required.
2. All of the files in /work/halld/bcal06 are currently being 
reprocessed and should be done sometime today.
3. The programs were placed in the repository in 
https://halldsvn.jlab.org/repos/beam_tests/bcal06/src/trig_filter
   There is a README file there which I copy below for those interested.

I've checked one file of each of the tree types to see that something is 
there for the tn8-ts8 spectrum (besides all zeros as before) and that 
the trig and adcsumN fields seemed to have something as well. Those 
looked reasonable, but I'll leave it to you to verify things look OK for 
the rest of the files that you are interested in.

Please let me know if you have any trouble. Also, if you have trouble 
using TChain to chain the files.

Regards,
-David

===================

README trig_filter_treeX for bcal06 data
May 5, 2008

This directory contains 3 programs that are near identical
copies of one another. There are 3 different ones corresponding
to 3 different versions of the bcal TTree definition used
in producing the bcal_dst files in /work/halld/bcal06 on the
JLab CUE.

The purpose of these programs is to read in events from root
files produced by bcal_dst and write only the events satisfying
a trigger mask into an output file. The output tree is of
the same format as the input tree, except that the run number
is added as another branch.

The programs were written specifically to address a request
by the Regina group to have a set of files containing only
cosmic triggers. This is useful for production runs which
had cosmic data sprinkled in amongst a sea of beam photon
events making it unnecessarily long to make a single pass.

The programs are all run with 2 arguments. The first is an
integer representing the bit pattern of the triggers one
wishes to keep and the second is the input file name. For
example:

trig_filter_tree1 32 bcal_dst02371.root

This would create a file called bcal_dst02371_t6.root that
had only events in which trigger 6 (=log(32)/log(2)+1) was
set. Note that other triggers could be present as well.

The program of the appropriate tree type should be used.
If one uses the trig_filter_tree2 program on a bcal_dst
file containing a "version 1" tree, then a seg fault is
likely and the desired result will not be achieved. Lists
of which files belong to each type can be found in the
following files:

/work/halld/bcal06/tree1files.txt
/work/halld/bcal06/tree2files.txt
/work/halld/bcal06/tree3files.txt


Please direct any questions or comments to David Lawrence
at davidl@jlab.org.


David Lawrence wrote:
>
> Hi Andrei,
>
>    OK I guess we got one step closer, but not all the way there. The 
> TTree entries seem to be copying except for the contents of arrays. 
> So, things like "trig" and "adcsumN" are fine, but not the individual 
> ADC and TDC values in "n3" and "t3" etc..
>
>    It is not immediately clear to me at this point why it is failing 
> to copy certain branches but not others. I will look at it some more 
> and will let you know when it is resolved.
>
> Regards,
> -David
>
> Andrei Semenov wrote:
>> David:
>>
>> I had a look on your new-produced (April 30 at 11am) root ntuples, and
>> it looks like they are empty again...
>>
>> Just to let you know,
>> Andrei
>>
>>
>>
>> On Tue, 29 Apr 2008, David Lawrence wrote:
>>
>>  
>>> Hi Andrei,
>>>
>>>     I'll take a look and let you know what I find.
>>>
>>> Regards,
>>> -David
>>>
>>> Andrei Semenov wrote:
>>>    
>>>> It looks like my previous e-mail did not reach both David and 
>>>> Zisis, so I
>>>> re-send it now again.
>>>>
>>>> Thank you,
>>>> Andrei
>>>>
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> Date: Fri, 25 Apr 2008 18:56:25 -0400 (EDT)
>>>> From: Andrei Semenov <semenov@jlab.org>
>>>> To: David Lawrence <davidl@jlab.org>
>>>> Cc: Zisis Papandreou <zisis@uregina.ca>
>>>> Subject: Problems with cosmics triggers files
>>>>
>>>>
>>>> David:
>>>>
>>>> I had a look on the /work/halld/bcal06/bcal_dst0????_t6.root files 
>>>> (that
>>>> were created 2 days ago), and it looks like these files are empty: 
>>>> some of
>>>> the files (like run 2371) have the size of about 370 bytes and no 
>>>> ntuple
>>>> structure inside; the rest of the files has the ntuple structure but
>>>> filled with zeroes... I checked a couple original ntuples with 
>>>> "trig==32"
>>>> condition, and it looks like the data are OK (in original ntuples).
>>>>
>>>> Could you please have a look?
>>>>
>>>> Is it a big problem to direct whole output to one summary file?
>>>>
>>>> Thank you,
>>>> Andrei
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, 23 Apr 2008, David Lawrence wrote:
>>>>
>>>>
>>>>      
>>>>> Hi Zisis and Andrei,
>>>>>
>>>>>     I have written a script that will copy events from a file created
>>>>> with bcal_dst into a new file, but filtered such that only certain
>>>>> triggers are kept. Right now, it just creates one output file for a
>>>>> single input file. I assume the outputs can be chained together using
>>>>> TChain to give the same functionality as copying them all into a 
>>>>> single
>>>>> file.
>>>>>
>>>>>     The script is called trig_filter.C and it currently exists in the
>>>>> /work/halld/bcal06 directory on the JLab CUE. It has some minimal
>>>>> documentation at the top that describes what it does and how to 
>>>>> use it.
>>>>> I am currently running it on every bcal_dst-generated file in the 
>>>>> bcal06
>>>>> directory to filter out events with trigger 6 set. The filtered files
>>>>> have names based on the input files', but with an "_t6" appended 
>>>>> to the
>>>>> base name.
>>>>>
>>>>>     The trees in the filtered files also have another branch to 
>>>>> hold the
>>>>> run number as per Andrei's request. It derives this from the name 
>>>>> of the
>>>>> input ROOT file. This worked OK on my first test case, but I haven't
>>>>> checked it beyond that.
>>>>>
>>>>>     This should be done running in a couple of hours. Please let 
>>>>> me know
>>>>> if you'd like something else or need help with the chaining.
>>>>>
>>>>> Regards,
>>>>> -David
>>>>>
>>>>>
>>>>> Zisis Papandreou wrote:
>>>>>
>>>>>        
>>>>>> No sweat, it has been chaotic here too.
>>>>>>
>>>>>> Thanks David.
>>>>>>
>>>>>> Cheers, Zisis...
>>>>>>
>>>>>>
>>>>>> On Apr 23, 2008, at 3:37 AM, David Lawrence wrote:
>>>>>>
>>>>>>
>>>>>>          
>>>>>>> Hi Guys,
>>>>>>>
>>>>>>>    Oops! I guess with everything else that was going on, I 
>>>>>>> completely
>>>>>>> forgot about this by the time I finally got back to my desk at 
>>>>>>> JLab.
>>>>>>> I'll get started on this today. I've very sorry about the delay and
>>>>>>> I'll let you know one something is available.
>>>>>>>
>>>>>>> Regards,
>>>>>>> -David
>>>>>>>
>>>>>>> Zisis Papandreou wrote:
>>>>>>>
>>>>>>>            
>>>>>>>> Hi David:
>>>>>>>>
>>>>>>>> just a gentle reminder that we are waiting to hear from you on
>>>>>>>> getting help to chain the TS cosmics trigger events from the 
>>>>>>>> photon
>>>>>>>> runs, for Andrei's timing resolution study.  Are you still able 
>>>>>>>> and
>>>>>>>> willing to help us with code to produce a single ROOT file with
>>>>>>>> these events from days of running with photons?
>>>>>>>>
>>>>>>>> Cheers, Zisis...
>>>>>>>>
>>>>>>>> ---
>>>>>>>> Dr. Zisis Papandreou |  email: zisis@uregina.ca
>>>>>>>> <mailto:zisis@uregina.ca>
>>>>>>>> Department of Physics |  tel. : (306) 585-5379
>>>>>>>> University of Regina |  tel. : (306) 585-4149
>>>>>>>> Regina, SK  S4S 0A2 |  fax. : (306) 585-5659
>>>>>>>> World Wide Web:    http://www.phys.uregina.ca/sparro/zisis/
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>               
>>>>>>> -- 
>>>>>>>
>>>>>>> ------------------------------------------------------------------------ 
>>>>>>>
>>>>>>>  David Lawrence Ph.D.
>>>>>>>  Staff Scientist                 Office: (757)269-5567   [[[  [   [
>>>>>>> [        Jefferson Lab                   Pager:  (757)584-5567   
>>>>>>> [  [
>>>>>>> [ [ [ [    http://www.jlab.org/~davidl
>>>>>>> <http://www.jlab.org/%7Edavidl>     davidl@jlab.org
>>>>>>> <mailto:davidl@jlab.org>         [[[  [[ [[ [[[
>>>>>>> ------------------------------------------------------------------------ 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>             
>>>>>> ---
>>>>>> Dr. Zisis Papandreou |  email: zisis@uregina.ca 
>>>>>> <mailto:zisis@uregina.ca>
>>>>>> Department of Physics |  tel. : (306) 585-5379
>>>>>> University of Regina |  tel. : (306) 585-4149
>>>>>> Regina, SK  S4S 0A2 |  fax. : (306) 585-5659
>>>>>> World Wide Web:    http://www.phys.uregina.ca/sparro/zisis/
>>>>>>
>>>>>>
>>>>>>
>>>>>>           
>>>>> -- 
>>>>>
>>>>> ------------------------------------------------------------------------ 
>>>>>
>>>>>   David Lawrence Ph.D.
>>>>>   Staff Scientist                 Office: (757)269-5567   [[[  [   
>>>>> [ [
>>>>>   Jefferson Lab                   Pager:  (757)584-5567   [  [ [ [ 
>>>>> [ [
>>>>>   http://www.jlab.org/~davidl     davidl@jlab.org         [[[  [[ 
>>>>> [[ [[[
>>>>> ------------------------------------------------------------------------ 
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>         
>>>>       
>>> -- 
>>>
>>> ------------------------------------------------------------------------ 
>>>
>>>   David Lawrence Ph.D.
>>>   Staff Scientist                 Office: (757)269-5567   [[[  [   [ [
>>>   Jefferson Lab                   Pager:  (757)584-5567   [  [ [ [ [ [
>>>   http://www.jlab.org/~davidl     davidl@jlab.org         [[[  [[ [[ 
>>> [[[
>>> ------------------------------------------------------------------------ 
>>>
>>>
>>>
>>>
>>>
>>>     
>>
>>   
>

-- 

------------------------------------------------------------------------
  David Lawrence Ph.D.
  Staff Scientist                 Office: (757)269-5567   [[[  [   [ [       
  Jefferson Lab                   Pager:  (757)584-5567   [  [ [ [ [ [   
  http://www.jlab.org/~davidl     davidl@jlab.org         [[[  [[ [[ [[[
------------------------------------------------------------------------