[d2n-analysis-talk] BB cer TDCs
Brad Sawatzky
brads at jlab.org
Fri Jan 29 00:03:40 EST 2010
Hi Matt,
There are only 'Ndata.DBB.BBcerT%02d' hits in the DBB.BBcerT%02d[]
array. If you index out of bounds you'll get weird results.
Modify your loop so that you build your cut this way:
for(nhit=0; nhit<Ndata.DBB.BBcerT%02d; nhit++) { ... }
Note that this will not add any cut if there are no hits in that
particular TDC channel.
Also, be very careful that you add an explicit index to every array type
variable in all of your cuts (and that includes arrays with only one
entry).
-- Brad
On Thu, 28 Jan 2010, posik at jlab.org wrote:
> Hi All,
>
> So I was playing around with the Big bite TDCs today and forming a cut
> that incorporates all the multi-hits for each TDC, so that I can apply it
> to the cerenkov ADC signals.
>
> The multihit TDC cut loops over all tdc-hits and accepts only a certain
> timing peak. ie
>
> for(Int_t nhit=0;nhit<6;nhit++){ //loop over multihit TDC
> if(nhit==0){
> tdc_ct=Form("(DBB.BBcerT%02d[Ndata.DBB.BBcerT%02d]<%f&&DBB.BBcerT%02d[Ndata.DBB.BBcerT%02d]>%f)",pmt,pmt,tdc_hi,pmt,pmt,tdc_low);
> }else{
> tdc_ct+=
> Form("||(DBB.BBcerT%02d[Ndata.DBB.BBcerT%02d-%d]<%f&&DBB.BBcerT%02d[Ndata.DBB.BBcerT%02d-%d]>%f)",pmt,pmt,nhit,tdc_hi,pmt,pmt,nhit,tdc_low);
> }
> }
> where pmt is the pmt that you are looking at and tdc_hi and tdc_lo are
> the high and low ranges of the timing peak.This is shown below in the
> plot multi_tdc.png. The blue histo is the raw TDC and the red is the
> multi-hit cut TDC, there seems to be some background/noise in some of the
> higher chans (>400), this can be removed by using an extra cut
>
> ("DBB.BBcerT%02d<400",pmt) where pmt is the pmt you are looking at.
>
> Next I wanted to look at the cerenkov ADC sum, so I plot this and start to
> apply multi-hit TDC cuts defined above to the sum by "OR" ing the TDC cuts
> for each TDC, something like:
>
> tdc_cut1 || tdc_cut2 || tdc_cut3 || ect
>
> However when I begin to "OR" the TDCs and apply them to the ADC sum, the
> sum goes to zero. And yet applying the individual TDC cuts to the
> individual ADCs, they seem ok.
>
> What I think may be happening is that I am using THaCherenkov class to
> produce the ADCs (each individual ADC, ped subtracted ADC, gain corrected
> ADC and the ADC sum) and I am using the DBB class for the TDCs. I was
> wondering if it is possible that the two classes are some how conflicting
> when I try to "OR" the DBB TDCs. As a curiosity I tried to use the
> THaCherenkov TDCs(only single hit) and they leave me with a signal when
> "OR" ing them together. You can see the cerenkov ADC sum using the
> THCherenkov TDCs below(bb_cer_sum.png).
>
> I was wondering if anyone had any input on this issue?
>
> Thanks
> Matt
--
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