/[PAMELA software]/PamelaDigitizer/DigitizeTOF.cxx
ViewVC logotype

Diff of /PamelaDigitizer/DigitizeTOF.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by mocchiut, Tue Aug 11 14:56:30 2009 UTC revision 1.7 by pizzolot, Fri Nov 13 09:08:53 2009 UTC
# Line 189  void Digitizer::DigitizeTOF(int np,float Line 189  void Digitizer::DigitizeTOF(int np,float
189    } // NTHTOF < 200    } // NTHTOF < 200
190  // ======  ADC ======  // ======  ADC ======
191    for(Int_t i=0; i<48; i++){    for(Int_t i=0; i<48; i++){
192      if (QevePmt_pC[i] < 800.)  ADCtof[i]= (Int_t)(ADC_pC0A + ADC_pC1A*QevePmt_pC[i] + ADC_pC2A*pow(QevePmt_pC[i],2) + ADC_pC3A*pow(QevePmt_pC[i],3));      if (QevePmt_pC[i] <= 800.)  ADCtof[i]= (Int_t)(ADC_pC0A + ADC_pC1A*QevePmt_pC[i] + ADC_pC2A*pow(QevePmt_pC[i],2) + ADC_pC3A*pow(QevePmt_pC[i],3));
193      if (QevePmt_pC[i] > 800.)  ADCtof[i]= (Int_t)(ADC_pC0B + ADC_pC1B*QevePmt_pC[i] + ADC_pC2B*pow(QevePmt_pC[i],2) + ADC_pC3B*pow(QevePmt_pC[i],3));      if (QevePmt_pC[i] > 800.)  ADCtof[i]= (Int_t)(ADC_pC0B + ADC_pC1B*QevePmt_pC[i] + ADC_pC2B*pow(QevePmt_pC[i],2) + ADC_pC3B*pow(QevePmt_pC[i],3));
194      if (QevePmt_pC[i] > 2485.) ADCtof[i]= (Int_t)(1758. + 0.54*QevePmt_pC[i]);  //assuming a fictional 0.54 ch/pC above ADCsat      if (QevePmt_pC[i] > 2485.) ADCtof[i]= (Int_t)(1758. + 0.54*QevePmt_pC[i]);  //assuming a fictional 0.54 ch/pC above ADCsat
195      if (ADCtof[i]>ADCsat) ADCtof[i]=ADCsat;      if (ADCtof[i]>ADCsat) ADCtof[i]=ADCsat;
# Line 203  void Digitizer::DigitizeTOF(int np,float Line 203  void Digitizer::DigitizeTOF(int np,float
203    
204  // ======  build  TDC coincidence  ======  // ======  build  TDC coincidence  ======
205    
206      //
207      for(Int_t i=0; i<48; i++) {
208        if((tdcpmt[i] - c1_S[i]) > 1e-7) {
209          tdcpmt[i] = 0.;
210          tdc[i] = 0.;
211        }
212      }// cycle to introduce a window for tdc
213    
214    
215    Float_t t_coinc = 0;    Float_t t_coinc = 0;
216    Int_t ilast = 100;    Int_t ilast = 100;
217    for (Int_t ii=0; ii<48;ii++)    for (Int_t ii=0; ii<48;ii++)
# Line 373  UChar_t Digitizer::EvaluateCrcTof(UChar_ Line 382  UChar_t Digitizer::EvaluateCrcTof(UChar_
382    UChar_t crcTof=0x00;    UChar_t crcTof=0x00;
383    UChar_t *pc=&crcTof, *pc2;    UChar_t *pc=&crcTof, *pc2;
384    pc2=pTof;    pc2=pTof;
385    for (Int_t jp=0; jp < 23; jp++){    for (Int_t jp=0; jp < 22; jp++){ // cecilia: fixed 23->22
386      //crcTof = crc8(...)      //crcTof = crc8(...)
387      Crc8Tof(pc2++,pc);      Crc8Tof(pc2++,pc);
388      //    printf("%2i --- %x\n",jp,crcTof);      //    printf("%2i --- %x\n",jp,crcTof);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.23