Ok, I will try this, but I don't think it is the Ndata.DBB.BBcerT%02d cut that is making the cerenkov sum vanish when I "OR" the TDCs. I tried a variety of things and one was using just DBB.BBcerT%02[0] TDC hits and when applying the "OR" ed beamline side TDCs the sum still look ok, but when I applyed the "OR" ed farside (farthest from beam) TDCs with out the beamline side TDCs, the cerenkov sum vanished.<br>
<br> However, since BB.cer.asum_c was only a single element, I did not use an index on it, so I guess I could try BB.cer.asum_c[0]. But then I do not know why using the "OR" ed BB.cer.t[ ] TDCs on the unindexed chernkov sum would work?<br>
<br>-Matt <br><div class="gmail_quote">On Fri, Jan 29, 2010 at 12:03 AM, Brad Sawatzky <<a href="mailto:brads@jlab.org">brads@jlab.org</a>> wrote:<br><blockquote class="gmail_quote">
Hi Matt,<br>
<br>
There are only 'Ndata.DBB.BBcerT%02d' hits in the DBB.BBcerT%02d[]<br>
array. If you index out of bounds you'll get weird results.<br>
<br>
Modify your loop so that you build your cut this way:<br>
for(nhit=0; nhit<Ndata.DBB.BBcerT%02d; nhit++) { ... }<br>
Note that this will not add any cut if there are no hits in that<br>
particular TDC channel.<br>
<br>
Also, be very careful that you add an explicit index to every array type<br>
variable in all of your cuts (and that includes arrays with only one<br>
entry).<br>
<br>
-- Brad<br>
<div><div></div><div class="h5"><br>
On Thu, 28 Jan 2010, <a href="mailto:posik@jlab.org">posik@jlab.org</a> wrote:<br>
<br>
> Hi All,<br>
><br>
> So I was playing around with the Big bite TDCs today and forming a cut<br>
> that incorporates all the multi-hits for each TDC, so that I can apply it<br>
> to the cerenkov ADC signals.<br>
><br>
> The multihit TDC cut loops over all tdc-hits and accepts only a certain<br>
> timing peak. ie<br>
><br>
> for(Int_t nhit=0;nhit<6;nhit++){ //loop over multihit TDC<br>
> if(nhit==0){<br>
> 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);<br>
> }else{<br>
> tdc_ct+=<br>
> 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);<br>
> }<br>
> }<br>
> where pmt is the pmt that you are looking at and tdc_hi and tdc_lo are<br>
> the high and low ranges of the timing peak.This is shown below in the<br>
> plot multi_tdc.png. The blue histo is the raw TDC and the red is the<br>
> multi-hit cut TDC, there seems to be some background/noise in some of the<br>
> higher chans (>400), this can be removed by using an extra cut<br>
><br>
> ("DBB.BBcerT%02d<400",pmt) where pmt is the pmt you are looking at.<br>
><br>
> Next I wanted to look at the cerenkov ADC sum, so I plot this and start to<br>
> apply multi-hit TDC cuts defined above to the sum by "OR" ing the TDC cuts<br>
> for each TDC, something like:<br>
><br>
> tdc_cut1 || tdc_cut2 || tdc_cut3 || ect<br>
><br>
> However when I begin to "OR" the TDCs and apply them to the ADC sum, the<br>
> sum goes to zero. And yet applying the individual TDC cuts to the<br>
> individual ADCs, they seem ok.<br>
><br>
> What I think may be happening is that I am using THaCherenkov class to<br>
> produce the ADCs (each individual ADC, ped subtracted ADC, gain corrected<br>
> ADC and the ADC sum) and I am using the DBB class for the TDCs. I was<br>
> wondering if it is possible that the two classes are some how conflicting<br>
> when I try to "OR" the DBB TDCs. As a curiosity I tried to use the<br>
> THaCherenkov TDCs(only single hit) and they leave me with a signal when<br>
> "OR" ing them together. You can see the cerenkov ADC sum using the<br>
> THCherenkov TDCs below(bb_cer_sum.png).<br>
><br>
> I was wondering if anyone had any input on this issue?<br>
><br>
> Thanks<br>
> Matt<br>
<br>
<br>
<br>
</div></div>--<br>
<font color="#888888">Brad Sawatzky, PhD <<a href="mailto:brads@jlab.org">brads@jlab.org</a>> -<>- Jefferson Lab / Hall C / C111<br>
Ph: 757-269-5947 -<>- Pager: 757-584-5947 -<>- Fax: 757-269-7848<br>
The most exciting phrase to hear in science, the one that heralds new<br>
discoveries, is not "Eureka!" but "That's funny..." -- Isaac Asimov<br>
_______________________________________________<br>
d2n-analysis-talk mailing list<br>
<a href="mailto:d2n-analysis-talk@jlab.org">d2n-analysis-talk@jlab.org</a><br>
<a href="https://mailman.jlab.org/mailman/listinfo/d2n-analysis-talk">https://mailman.jlab.org/mailman/listinfo/d2n-analysis-talk</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Matthew Posik<br>Email: <a href="mailto:posik@temple.edu">posik@temple.edu</a><br>Temple University Physics Dept.<br>Office: BA-319<br>Office #: 215-204-1331 <br>