Ignore:
Timestamp:
03/02/05 20:49:19 (20 years ago)
Author:
moralejo
Message:
 Changed default pulse position in the FADC window. Now the high gain peak
 is around the 5th slice (changed default value of trigger_delay from 25 to
 19 ns)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.cxx

    r6695 r6710  
    227227    fadc_time_offset = trigger_delay - p2 / FADC_SLICES_PER_NSEC; // ns
    228228
     229
    229230    for (i=0; i< fResponseSlicesFadc ; i++ )
    230231      {
     
    241242                                   p3+p4*exp(-p1*(exp(-p1*zed_slices)+
    242243                                                  p5*zed_slices))+p6*d);
     244        response_sum_inner += sing_resp[i];
     245
     246
     247        // Now the low gain:
    243248
    244249        zed_slices = x * FADC_SLICES_PER_NSEC - p2_LG;
    245250        d = (zed_slices>0)? 0.5 : -0.5;
     251
    246252        sing_resp_lowgain[i] =  (Float_t) (p0_LG*exp(-p1_LG*(exp(-p1_LG*zed_slices)+zed_slices))+
    247                                            p3+p4*exp(-p1_LG*(exp(-p1_LG*zed_slices)+
    248                                                           p5*zed_slices))+p6*d);
    249 
    250         response_sum_inner += sing_resp[i];
     253                                           p3_LG+p4_LG*exp(-p1_LG*(exp(-p1_LG*zed_slices)+
     254                                                          p5_LG*zed_slices))+p6_LG*d);
    251255        response_sum_inner_LG += sing_resp_lowgain[i];
     256
    252257      }
    253258
     
    268273    sigma = fwhm_resp_outer / 2.35 ;
    269274    x0 = 3*sigma ;
    270     fadc_time_offset = trigger_delay-x0; // ns
    271275   
    272276    for (i = 0; i < fResponseSlicesFadc ; i++ )
     
    309313    p6_LG = fPulseParametersLG[6];
    310314
    311     // Now define the time before trigger to read FADC signal when it
    312     // has to be written. Here FADC_SLICES_PER_NSEC (=0.3) is the value
    313     // for the 300 MHz MAGIC FADCs and must NOT be changed, even if you
    314     // use a faster sampling in the simulation (through the input card
    315     // command "fadc_GHz"), because this is just a conversion of units. The
    316     // parameters of the "pulpo" pulse shape were obtained with the 300 MHz
    317     // FADC and so we convert the time parameter to units of 3.3 ns slices
    318     // just to use the provided parametrization, and no matter what sampling
    319     // frequency we are simulating!
    320 
    321     fadc_time_offset = trigger_delay - p2 / FADC_SLICES_PER_NSEC; // ns
    322 
    323315    for (i=0; i< fResponseSlicesFadc ; i++ )
    324316      {
     
    336328                                        p4*exp(-p1*(exp(-p1*zed_slices)+
    337329                                                    p5*zed_slices))+p6*d);
     330        response_sum_outer += sing_resp_outer[i];
     331
     332
     333        // Now the low gain:
    338334
    339335        zed_slices = x * FADC_SLICES_PER_NSEC - p2_LG;
    340336        d = (zed_slices>0)? 0.5 : -0.5;
     337
    341338        sing_resp_outer_lowgain[i] =  (Float_t) (p0_LG*exp(-p1_LG*(exp(-p1_LG*zed_slices)+zed_slices))+
    342                                                  p3+p4*exp(-p1_LG*(exp(-p1_LG*zed_slices)+
    343                                                                    p5*zed_slices))+p6*d);
    344 
    345         response_sum_outer += sing_resp_outer[i];
     339                                                 p3_LG+p4_LG*exp(-p1_LG*(exp(-p1_LG*zed_slices)+
     340                                                                   p5_LG*zed_slices))+p6_LG*d);
    346341        response_sum_outer_LG += sing_resp_outer_lowgain[i];
    347342      }
     
    492487    // We take the pulse height in the middle of FADC slices, we start in the
    493488    // first such point after the time "time" (=ichan in response bins). Each
    494     // FADC slice corresponds to SUBBINS response bins (SUBBINS=5 by default).
     489    // FADC slice corresponds to SUBBINS response bins.
    495490
    496491    Int_t first_i =  Int_t(SUBBINS/2) - ichan%(Int_t)SUBBINS;
Note: See TracChangeset for help on using the changeset viewer.