[d2n-analysis-talk] BB cer class TDC mod
posik at jlab.org
posik at jlab.org
Wed Jun 23 09:08:07 EDT 2010
Hi all,
So in trying to modify the THaCherenkov class to include multi-hit TDCs,
I ran into a when trying to have the variables that I was using in the
Cherenkov class write to the ROOT Tree. It turns out that the analyzer
global variable system does not support 2D arrays. So my idea of having
a variable structure of TDC[PMT][Nhit] is not easily possible. I had
sent an email to Ole. Here is the convo:
//////////////////////////////////////////////////////////////////
me:
Since the BigBite Cherenkov uses multi-hit TDC information, I need to
modify the THaCherenkov class to incoorperate this information. What I
would like to do is the following:
- change the current 1D array TDC variable BB.cer.t to a 2D array
variable. Currently the class has the variable Float t[fNelem] which is
an array of the number of PMTs. I want this to be an array like Float
t[fNelem][ndata], where fNelem is the PMT number and ndata is the TDC
channel that got hit. I started to look at how the DecData class took
advantage of the multi-hit TDCs and what that class did was to have
fNelem variables of length ndata so for example
Float PMT1[ndata]
Float PMT2[ndata]
.
.
.
Float PMTFnelem[ndata]
//
Ole:
what you are doing is exactly right. Unfortunately, the "global variable"
system in the analyzer does not support 2D arrays. (That's why there are
all these ugly definitions in DecData.) There are a number of
possibilities.
(a) you could duplicate the setup in DecData. That would give you quick
results, but you may have to do some recoding. You can always map
individual member variables into an array, so you can still make things
look like a 2D array in the code, except you lose the flexibility of
having a configurable number of PMTs.
(b) You may decide that writing out all the hit information is just a
luxury, and the analysis can be done already in the Cherenkov class rather
than interactively with ROOT. (That's a situation I've encountered
frequently.)
(c) We can add support for 2D arrays. That may take a while,
unfortunately, since I am currently quite busy. Of course, you are welcome
to take a shot at it ... but be warned, it gets pretty technical.
I will put (c) on my longer-term to-do list.
/////////////////////////////////////////////////////////////
I am now thinking how I should approach this with only 1D arrays. Are
there any suggestions?
Thanks
Matt
More information about the d2n-analysis-talk
mailing list