LCOV - code coverage report
Current view: top level - EMCAL/EMCALbase - AliEMCALSimParam.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 30 72 41.7 %
Date: 2016-06-14 17:26:59 Functions: 3 8 37.5 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved.      *
       3             :  *                                                                        *
       4             :  * Author: The ALICE Off-line Project.                                    *
       5             :  * Contributors are mentioned in the code where appropriate.              *
       6             :  *                                                                        *
       7             :  * Permission to use, copy, modify and distribute this software and its   *
       8             :  * documentation strictly for non-commercial purposes is hereby granted   *
       9             :  * without fee, provided that the above copyright notice appears in all   *
      10             :  * copies and that both the copyright notice and this permission notice   *
      11             :  * appear in the supporting documentation. The authors make no claims     *
      12             :  * about the suitability of this software for any purpose. It is          *
      13             :  * provided "as is" without express or implied warranty.                  *
      14             :  **************************************************************************/
      15             : 
      16             : /*
      17             :  //
      18             :  // Base class for the EMCAL simulation parameters.
      19             :  //
      20             :  //
      21             :  */
      22             : 
      23             : // --- Root header files ---
      24             : #include "TMath.h"
      25             : // --- AliRoot header files ---
      26             : #include "AliEMCALSimParam.h"
      27             : #include "AliLog.h"
      28             : 
      29             : 
      30          42 : ClassImp(AliEMCALSimParam)
      31             : 
      32             : AliEMCALSimParam  * AliEMCALSimParam::fgSimParam = 0 ;
      33             : //-----------------------------------------------------------------------------
      34             : AliEMCALSimParam::AliEMCALSimParam() :
      35           3 : TNamed(),    
      36           3 : fDigitThreshold(0),
      37           3 : fMeanPhotonElectron(0),
      38           3 : fGainFluctuations(0),
      39           3 : fPinNoise(0),
      40           3 : fTimeNoise(0),
      41           3 : fTimeDelay(0),
      42           3 : fTimeDelayFromOCDB(0),
      43           3 : fTimeResolutionPar0(0),
      44           3 : fTimeResolutionPar1(0),
      45           3 : fNADCEC(0),//Digitizer
      46           3 : fA(0.),
      47           3 : fB(0.),
      48           3 : fECPrimThreshold(0.) //SDigitizer   
      49          15 : {
      50             :   //Constructor 
      51             : 
      52             :   //Parameters in Digitizer
      53           3 :   fMeanPhotonElectron = 4400;    // electrons per GeV 
      54           3 :   fGainFluctuations   = 15.;     // obtained empiricaly to match beam test, from Paraskevi Ganoti   
      55           3 :   fPinNoise           = 0.012;   // APD noise in GeV from analysis test beam data 
      56           3 :   fDigitThreshold     = 3;       // 3 ADC counts not anymore cut in energy: //fPinNoise * 3; // 3 * sigma
      57           3 :   fTimeNoise          = 1.28e-5; // time noise in s
      58           3 :   fTimeResolutionPar0 = 0.26666; // From F. Blanco: 0.51639^2
      59           3 :   fTimeResolutionPar1 = 1.45861; // From F. Blanco: 1.20773^2
      60           3 :   fTimeDelay          = 600e-9 ; // 600 ns
      61           3 :   fTimeDelayFromOCDB  = kFALSE ; 
      62             : 
      63           3 :   fNADCEC             = (Int_t) TMath::Power(2,16) ; // number of channels in Tower ADC - 65536
      64             :         
      65             :   //SDigitizer
      66           3 :   fA                  = 0;
      67           3 :   fB                  = 1.e+6; // Dynamic range now 2 TeV
      68           3 :   fECPrimThreshold    = 0.05;  // GeV   // threshold for deposit energy of hit
      69             :         
      70           6 : }
      71             : 
      72             : 
      73             : //-----------------------------------------------------------------------------
      74             : AliEMCALSimParam::AliEMCALSimParam(const AliEMCALSimParam& ):
      75           0 : TNamed(),
      76           0 : fDigitThreshold(0),
      77           0 : fMeanPhotonElectron(0),
      78           0 : fGainFluctuations(0),
      79           0 : fPinNoise(0),
      80           0 : fTimeNoise(0),
      81           0 : fTimeDelay(0),
      82           0 : fTimeDelayFromOCDB(0),
      83           0 : fTimeResolutionPar0(0),
      84           0 : fTimeResolutionPar1(0),
      85           0 : fNADCEC(0),
      86           0 : fA(0.),
      87           0 : fB(0.),
      88           0 : fECPrimThreshold(0.)//SDigitizer
      89           0 : {
      90             :   //Copy constructor.
      91           0 :   AliError("Should not use copy constructor for singleton") ;
      92             : 
      93           0 :   fgSimParam = this ;
      94             :         
      95           0 : }
      96             : 
      97             : //-----------------------------------------------------------------------------                                                            
      98             : AliEMCALSimParam * AliEMCALSimParam::GetInstance(){
      99             : // Get Instance
     100             : 
     101           0 :   if(!fgSimParam){
     102           0 :         fgSimParam = new AliEMCALSimParam() ;
     103           0 :   }
     104             :   
     105           0 :   return fgSimParam ;
     106             :         
     107           0 : }
     108             : 
     109             : //-----------------------------------------------------------------------------
     110             : AliEMCALSimParam& AliEMCALSimParam::operator = (const AliEMCALSimParam& simParam)
     111             : {
     112             :   //Assignment operator.
     113             : 
     114           0 :   if(this != &simParam) {
     115           0 :     AliError("Should not use operator= for singleton\n") ;
     116           0 :   }
     117             : 
     118           0 :   return *this;
     119             : }
     120             : 
     121             : //-----------------------------------------------------------------------------
     122             : void AliEMCALSimParam::Print(Option_t *) const
     123             : {
     124             :   // Print simulation parameters to stdout
     125             :  
     126           0 :   printf("=== Parameters in Digitizer === \n");
     127           0 :   printf("\t Electronics noise in EMC (fPinNoise)       = %f, (fTimeNoise) = %e\n", fPinNoise, fTimeNoise) ;
     128           0 :   printf("\t Threshold  in EMC  (fDigitThreshold)       = %d\n", fDigitThreshold)  ;
     129           0 :   printf("\t Time Resolution (fTimeResolutionPar0)      = %g\n", fTimeResolutionPar0) ;
     130           0 :   printf("\t Time Resolution (fTimeResolutionPar1)      = %g\n", fTimeResolutionPar1) ;
     131           0 :   printf("\t Time Delay (fTimeDelay)                    = %g\n", fTimeDelay) ;
     132           0 :   printf("\t Time Delay OCDB (fTimeDelayFromOCDB)       = %d\n", fTimeDelayFromOCDB) ;
     133           0 :   printf("\t Mean Photon-Electron (fMeanPhotonElectron) = %d, Gain Fluc. (fGainFluctuations) %2.1f\n", fMeanPhotonElectron,fGainFluctuations)  ;
     134           0 :   printf("\t N channels in EC section ADC (fNADCEC)     = %d\n", fNADCEC) ;
     135             : 
     136           0 :   printf("\n");
     137             : 
     138           0 :   printf("=== Parameters in SDigitizer === \n");
     139           0 :   printf("\t sdigitization parameters       A = %f\n",     fA);
     140           0 :   printf("\t                                B = %f\n",     fB);
     141           0 :   printf("\t Threshold for EC Primary assignment  = %f\n", fECPrimThreshold);
     142             :         
     143           0 : }
     144             : 

Generated by: LCOV version 1.11