[d2n-analysis-talk] BB Cerenkov TDC cut

MATTHEW R POSIK tua88437 at temple.edu
Fri Mar 12 09:17:46 EST 2010


Yes, that is a good point. Looking at the actual hits there is never any
above 5 hits for any PMT. But when I do a T->MakeSelector("my_selector" ) on
the TTree, it outputs a my_selector.C and my_selector.h where the .h file
lists all variable names,types and array sizes. This is what it lists for
the DBB.BBcerT* stuff:

  Double_t        DBB_BBcerT01[16];   //[Ndata.DBB.BBcerT01]
   Int_t           Ndata_DBB_BBcerT02;
   Double_t        DBB_BBcerT02[16];   //[Ndata.DBB.BBcerT02]
   Int_t           Ndata_DBB_BBcerT03;
   Double_t        DBB_BBcerT03[16];   //[Ndata.DBB.BBcerT03]
   Int_t           Ndata_DBB_BBcerT04;
   Double_t        DBB_BBcerT04[16];   //[Ndata.DBB.BBcerT04]
   Int_t           Ndata_DBB_BBcerT05;
   Double_t        DBB_BBcerT05[16];   //[Ndata.DBB.BBcerT05]
   Int_t           Ndata_DBB_BBcerT06;
   Double_t        DBB_BBcerT06[16];   //[Ndata.DBB.BBcerT06]
   Int_t           Ndata_DBB_BBcerT07;
   Double_t        DBB_BBcerT07[16];   //[Ndata.DBB.BBcerT07]
   Int_t           Ndata_DBB_BBcerT08;
   Double_t        DBB_BBcerT08[16];   //[Ndata.DBB.BBcerT08]
   Int_t           Ndata_DBB_BBcerT09;
   Double_t        DBB_BBcerT09[16];   //[Ndata.DBB.BBcerT09]
   Int_t           Ndata_DBB_BBcerT10;
   Double_t        DBB_BBcerT10[16];   //[Ndata.DBB.BBcerT10]
   Int_t           Ndata_DBB_BBcerT11;
   Double_t        DBB_BBcerT11[5];   //[Ndata.DBB.BBcerT11]
   Int_t           Ndata_DBB_BBcerT12;
   Double_t        DBB_BBcerT12[7];   //[Ndata.DBB.BBcerT12]
   Int_t           Ndata_DBB_BBcerT13;
   Double_t        DBB_BBcerT13[10];   //[Ndata.DBB.BBcerT13]
   Int_t           Ndata_DBB_BBcerT14;
   Double_t        DBB_BBcerT14[14];   //[Ndata.DBB.BBcerT14]
   Int_t           Ndata_DBB_BBcerT15;
   Double_t        DBB_BBcerT15[5];   //[Ndata.DBB.BBcerT15]
   Int_t           Ndata_DBB_BBcerT16;
   Double_t        DBB_BBcerT16[4];   //[Ndata.DBB.BBcerT16]
   Int_t           Ndata_DBB_BBcerT17;
   Double_t        DBB_BBcerT17[16];   //[Ndata.DBB.BBcerT17]
   Int_t           Ndata_DBB_BBcerT18;
   Double_t        DBB_BBcerT18[10];   //[Ndata.DBB.BBcerT18]
   Int_t           Ndata_DBB_BBcerT19;
   Double_t        DBB_BBcerT19[5];   //[Ndata.DBB.BBcerT19]
   Int_t           Ndata_DBB_BBcerT20;
   Double_t        DBB_BBcerT20[5];   //[Ndata.DBB.BBcerT20]

So there are arrays of length of 16? Am I interpreting this correctly?

Fortunately I think that this is only a problem when I tried using the
string version of the TDC cut. Instead of defining the TDC cuts as TStrings
I set the TBranch Address in the replayed ROOT file to the Address of an
array of length 20 (# of PMTs) So I have this line in my code:

 //set for Ndata and TDCs
  for(pmt=0;pmt<20;pmt++) {
//single TDC hits
 TBranch * bnhit =   chain->GetBranch(Form("Ndata.DBB.BBcerT%02d",pmt+1)  )
;
  if( bnhit ) {
    chain->SetBranchAddress(Form("Ndata.DBB.BBcerT%02d",pmt+1),
&tdc_hits[pmt], &bnhit  ) ;
  } else {
  cout << " Ndata hit loading error \n" ;
  }

I also use this TBranch to set the TDCs to a double array of legth 20. Note
that if I try to define the length as tdc_values[20][5] or something less I
get the following error:

 *** Break *** segmentation violation
(no debugging symbols found)
Attaching to program: /proc/26896/exe, process 26896

warning: .dynamic section for "/usr/lib/libz.so.1" is not at the expected
address

warning: difference appears to be caused by prelink, adjusting expectations

warning: .dynamic section for "/lib/libpthread.so.0" is not at the expected
address

warning: difference appears to be caused by prelink, adjusting expectations

warning: .dynamic section for "/usr/lib/libXau.so.6" is not at the expected
address

warning: difference appears to be caused by prelink, adjusting expectations

warning: .dynamic section for "/usr/lib/libXdmcp.so.6" is not at the
expected address

warning: difference appears to be caused by prelink, adjusting expectations
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
[New Thread 0xb7fcf6d0 (LWP 26896)]
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.

(no debugging symbols found)
0x0016c410 in __kernel_vsyscall ()
#1  0x01afa4a3 in __waitpid_nocancel () from /lib/libc.so.6
#2  0x01a9f07b in do_system () from /lib/libc.so.6
#3  0x00bf7ccd in system () from /lib/libpthread.so.0
#4  0x010cecc7 in TUnixSystem::Exec () from
/apps/root/PRO/root/lib/libCore.so.5.18
#5  0x010d46d5 in TUnixSystem::StackTrace () from
/apps/root/PRO/root/lib/libCore.so.5.18
#6  0x010d1392 in TUnixSystem::DispatchSignals () from
/apps/root/PRO/root/lib/libCore.so.5.18
#7  0x010d1420 in SigHandler () from /apps/root/PRO/root/lib/libCore.so.5.18
#8  0x010d066d in sighandler () from /apps/root/PRO/root/lib/libCore.so.5.18
#9  <signal handler called>
#10 0x01ad8b3a in strcmp () from /lib/libc.so.6
#11 0x002f3c63 in G__searchvariable () from
/apps/root/PRO/root/lib/libCint.so.5.18
#12 0x002f5595 in G__getvariable () from
/apps/root/PRO/root/lib/libCint.so.5.18
#13 0x0022293a in G__getitem () from /apps/root/PRO/root/lib/libCint.so.5.18
#14 0x00226bdf in G__getexpr () from /apps/root/PRO/root/lib/libCint.so.5.18
#15 0x0023dfeb in G__getfunction () from
/apps/root/PRO/root/lib/libCint.so.5.18
#16 0x00222c84 in G__getitem () from /apps/root/PRO/root/lib/libCint.so.5.18
#17 0x00227ab6 in G__getexpr () from /apps/root/PRO/root/lib/libCint.so.5.18
#18 0x0022ecb4 in G__test () from /apps/root/PRO/root/lib/libCint.so.5.18
#19 0x0029e1ad in G__exec_if () from /apps/root/PRO/root/lib/libCint.so.5.18
#20 0x00294ac2 in G__exec_statement () from
/apps/root/PRO/root/lib/libCint.so.5.18
#21 0x0029cdce in G__exec_loop () from
/apps/root/PRO/root/lib/libCint.so.5.18
#22 0x0029c53c in G__exec_statement () from
/apps/root/PRO/root/lib/libCint.so.5.18
#23 0x002516cf in G__interpret_func () from
/apps/root/PRO/root/lib/libCint.so.5.18
#24 0x0023e7e2 in G__getfunction () from
/apps/root/PRO/root/lib/libCint.so.5.18
#25 0x00222c84 in G__getitem () from /apps/root/PRO/root/lib/libCint.so.5.18
#26 0x002258cb in G__getexpr () from /apps/root/PRO/root/lib/libCint.so.5.18
#27 0x0022ebe4 in G__calc_internal () from
/apps/root/PRO/root/lib/libCint.so.5.18
#28 0x002a4abd in G__process_cmd () from
/apps/root/PRO/root/lib/libCint.so.5.18
#29 0x010a2237 in TCint::ProcessLine () from
/apps/root/PRO/root/lib/libCore.so.5.18
#30 0x010a236e in TCint::ProcessLineSynch () from
/apps/root/PRO/root/lib/libCore.so.5.18
#31 0x010119f7 in TApplication::ExecuteFile () from
/apps/root/PRO/root/lib/libCore.so.5.18
#32 0x01011d1a in TApplication::ProcessFile () from
/apps/root/PRO/root/lib/libCore.so.5.18
#33 0x0100fd42 in TApplication::ProcessLine () from
/apps/root/PRO/root/lib/libCore.so.5.18
#34 0x0014ed6d in TRint::Run () from /apps/root/PRO/root/lib/libRint.so.5.18
#35 0x0804903c in main ()
The program is running.  Quit anyway (and detach it)? (y or n) [answered Y;
input not from terminal]
Detaching from program: /proc/26896/exe, process 26896
Root > Function plot_cer() busy flag cleared

not too sure what that means or why it occurs. So I define the array of
tdc_values[20][20].

Double_t tdc_values[20][20]
 for(pmt=0;pmt<20;pmt++) {

 TBranch * btdc =   chain->GetBranch(Form("DBB.BBcerT%02d",pmt+1)  ) ;
  if( btdc ) {
    chain->SetBranchAddress(Form("DBB.BBcerT%02d",pmt+1), &tdc_values[pmt] ,
&btdc ) ;
  } else {
  cout << "TDC loading error \n" ;
  }

I do not think this leads to the same issue as with using the TString
method, due to the fact that I only loop over the number of hits on each PMT
for each event:

  //Loop over PMTs
     for(pmt=0;pmt<20; pmt++) {
        h_hits[pmt]->Fill(tdc_hits[pmt]);
// Loop over cherenkov tdc hits
         for(j=0;j<tdc_hits[pmt];j++) {
            h_tdc[pmt]->Fill(tdc_values[pmt][j]);
        }
    }

So j only goes to the number of hits on that PMT for that event. Looking at
the TDCs and TDC hits they seem to look good. See plots below, red histo is
a TDC cut using the Multi-hit TDCs.  Does this seem correct?

-matt

On Thu, Mar 11, 2010 at 10:17 PM, Brad Sawatzky <brads at jlab.org> wrote:

> On Thu, 11 Mar 2010, posik at jlab.org wrote:
>
> > So I have been working on the BB cerenkov multi hit TDCs. I first
> > tried to do this by running a script that implements the TDC cuts
> > though strings ie
> >
> >    T->Draw(var,"DBB.BBcerT04<400.0 && "DBB.BBcerT04>150.0")
> >
> > Since each TDC can handle 16 hits I wrote some code that loops over
> > all 16 hits for a given TDC and then histogramed it. In this case I
> > chose to look
>
> You can't loop over 16 hits.  The I believe the DecData class only
> stores a maximum of 5 hits to the Tree (arbitrary limit set in the
> source code). Also, recall that the DecData class only guarantees valid
> data for DBB.BBcerT04[x] for x=(0,Ndata.DBB.BBcerT04).  If
> Ndata.DBB.BBcerT04==-1, then DBB.BBcerT04[0] is undefined (may not even
> be initialized).
>
> That needs to be fixed before your plots will make sense.
>
> -- Brad
>
> --
> Brad Sawatzky, PhD <brads at jlab.org>  -<>-  Jefferson Lab / Hall C / C111
>  Ph: 757-269-5947 -<>- Pager: 757-584-5947 -<>- Fax: 757-269-5235
> The most exciting phrase to hear in science, the one that heralds new
>  discoveries, is not "Eureka!" but "That's funny..."   -- Isaac Asimov
> _______________________________________________
> d2n-analysis-talk mailing list
> d2n-analysis-talk at jlab.org
> https://mailman.jlab.org/mailman/listinfo/d2n-analysis-talk
>



-- 
Matthew Posik
Email: posik at temple.edu
Temple University Physics Dept.
Office: BA-319
Office #:  215-204-1331
WebSites:
Temple:
http://quarks.temple.edu/
d2n:
http://hallaweb.jlab.org/experiment/E06-014/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.jlab.org/pipermail/d2n-analysis-talk/attachments/20100312/44c83c25/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: beam_tdc_2063.ps
Type: application/postscript
Size: 125096 bytes
Desc: not available
Url : https://mailman.jlab.org/pipermail/d2n-analysis-talk/attachments/20100312/44c83c25/attachment-0002.ps 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rhrs_tdc_2063.ps
Type: application/postscript
Size: 123955 bytes
Desc: not available
Url : https://mailman.jlab.org/pipermail/d2n-analysis-talk/attachments/20100312/44c83c25/attachment-0003.ps 


More information about the d2n-analysis-talk mailing list