Ignore:
Timestamp:
10/14/04 17:56:43 (20 years ago)
Author:
moralejo
Message:
- Added calibration_run option to produce calibration MC files.

- Added jitter of pulse position +- 0.5 slices due to FADC clock noise.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx

    r5273 r5275  
    2121//
    2222// $RCSfile: camera.cxx,v $
    23 // $Revision: 1.75 $
     23// $Revision: 1.76 $
    2424// $Author: moralejo $
    25 // $Date: 2004-10-14 12:55:02 $
     25// $Date: 2004-10-14 16:56:43 $
    2626//
    2727////////////////////////////////////////////////////////////////////////
     
    40254025  float C1, C2, C3, rho;
    40264026
     4027  // A. Moralejo, October 2004
     4028  // Introduced the FADC jitter of 1 FADC slice. This is a time to be added to the
     4029  // time of all photons in an event, before digitalization of the signal. We use
     4030  // a positive value between 0 and 1 slice for technical reasons, but it is
     4031  // totally equivalent to having made  +- 1 FADC slice
     4032
     4033  float fadc_jitter = (1./fadc->GetFadcSlicesPerNanosec()) * random.Uniform(0., 1.);
    40274034
    40284035  //- - - - - - - - - - - - - - - - - - - - - - - - -
     
    41954202    // store the new photoelectron
    41964203
    4197     fadc->Fill(ipixnum,(t-*tmin_ns) ,
    4198                trigger->FillShow(ipixnum,t-*tmin_ns),
     4204    fadc->Fill(ipixnum,(t-*tmin_ns) + fadc_jitter ,
     4205               trigger->FillShow(ipixnum, t-*tmin_ns + fadc_jitter),
    41994206               !((*camgeom)[ipixnum].GetD()>(*camgeom)[0].GetD()));
    42004207   
     
    45974604          Fadc_CT[ict]->Pedestals();
    45984605
    4599           // Set the trigger time. The 3 ns are such that the pulse appears well
    4600           // centered if the FADC range is the usual 50 ns.
    4601           // If you want to shift the pulse position, do not change the value here,
     4606          // Set the trigger time. The 3 ns are such that the calibration pulses
     4607          // appear roughly at the same position as for the case of real data.
     4608          // If you want to shift the pulse position, do not change this value here,
    46024609          // use the option trigger_delay in the input card instead.
    4603 
    4604           Fadc_CT[ict]->TriggeredFadc(13.);
     4610          // The additional value 3*sigma_time makes that the pulse maximum is, in
     4611          // average, in the same position no matter of the time width of the pulse
     4612          // (see in produce_calib_phes(...) that in order to avoid negative times
     4613          // we shift the time of the photons by this same amount!)
     4614
     4615          Fadc_CT[ict]->TriggeredFadc(3.+3*sigma_time);
    46054616
    46064617          //
     
    46864697  random.SetSeed(seed);
    46874698
     4699  // Introduce the FADC jitter of 1 FADC slice. This is a time to be added to the
     4700  // time of all photons in an event, before digitalization of the signal. We use
     4701  // a positive value between 0 and 1 slice for technical reasons, but it is
     4702  // totally equivalent to having made  +- 1 FADC slice
     4703
     4704  float fadc_jitter = (1./fadc->GetFadcSlicesPerNanosec()) * random.Uniform(0., 1.);
     4705
    46884706  //
    46894707  // Create photons and "map" them into the pixels
     
    47154733
    47164734      // time
    4717       //      time = random.Gaus(0., sigma_time);
    4718       time = 10.;
     4735      // We do not want negative times, so center the gaussian at 3 sigma
     4736      // and reject negative values:
     4737
     4738      do
     4739        time = random.Gaus(3*sigma_time, sigma_time);
     4740      while (time < 0.);
    47194741
    47204742      // wavelength
    4721       wl = lambda;
     4743      wl = random.Gaus(lambda, sigma_lambda);
    47224744
    47234745      if( (wl > WAVEBANDBOUND6) || (wl < WAVEBANDBOUND1))
     
    47924814
    47934815      //
    4794       // Apply incient angular correction due to Light Guides, plexiglas,
     4816      // Apply incident angular correction due to Light Guides, plexiglas,
    47954817      // 1st dynode collection efficiency, double crossings... etc.
    47964818      // This information is contained in the file Data/LightCollection.dat,
     
    48374859      // store the new photoelectron
    48384860
    4839       fadc->Fill(ipixnum,(time) ,
    4840                  trigger->FillShow(ipixnum, time),
     4861      fadc->Fill(ipixnum, time + fadc_jitter,
     4862                 trigger->FillShow(ipixnum, time + fadc_jitter),
    48414863                 !((*camgeom)[ipixnum].GetD()>(*camgeom)[0].GetD()));
    48424864   
     
    48604882//
    48614883// $Log: not supported by cvs2svn $
     4884// Revision 1.75  2004/10/14 12:55:02  moralejo
     4885// *** empty log message ***
     4886//
    48624887// Revision 1.74  2004/10/13 17:05:05  moralejo
    48634888// *** empty log message ***
Note: See TracChangeset for help on using the changeset viewer.