CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/SimCalorimetry/EcalSimAlgos/src/EcalSimParameterMap.cc

Go to the documentation of this file.
00001 #include "SimCalorimetry/EcalSimAlgos/interface/EcalSimParameterMap.h"
00002 #include "DataFormats/DetId/interface/DetId.h"
00003 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
00004 #include <iostream>
00005   
00012 EcalSimParameterMap::EcalSimParameterMap() :
00013   theBarrelParameters(2250., 1./2250., 
00014                    1., 0, 
00015                    10, 6, true, true),
00016   theEndcapParameters( 1800., 1./1800., 
00017                    1., 0, 
00018                        10, 6, true, true),
00019   theESParameters(1., 1., 1., 20., 3, 2, false, true)
00020 {}
00021 
00022 EcalSimParameterMap::EcalSimParameterMap(double simHitToPhotoelectronsBarrel, 
00023                                          double simHitToPhotoelectronsEndcap, 
00024                                          double photoelectronsToAnalogBarrel, 
00025                                          double photoelectronsToAnalogEndcap, 
00026                                          double samplingFactor, double timePhase,
00027                                          int readoutFrameSize, int binOfMaximum,
00028                                          bool doPhotostatistics, bool syncPhase) : 
00029   theBarrelParameters(simHitToPhotoelectronsBarrel, photoelectronsToAnalogBarrel,
00030                       samplingFactor, timePhase, 
00031                       readoutFrameSize, binOfMaximum, doPhotostatistics, syncPhase),
00032   theEndcapParameters(simHitToPhotoelectronsEndcap, photoelectronsToAnalogEndcap, 
00033                       samplingFactor, timePhase, 
00034                       readoutFrameSize, binOfMaximum, doPhotostatistics, syncPhase),
00035   theESParameters(1., 1., 1., 20., 3, 2, false, syncPhase)
00036 {}
00037 
00038   /*
00039   CaloSimParameters(double simHitToPhotoelectrons, double photoelectronsToAnalog, 
00040                  double samplingFactor, double timePhase,
00041                  int readoutFrameSize, int binOfMaximum,
00042                  bool doPhotostatistics, bool syncPhase)
00043   */
00044   
00045 const CaloSimParameters & EcalSimParameterMap::simParameters(const DetId & detId) const 
00046 {
00047   if (EcalSubdetector(detId.subdetId()) == EcalBarrel) 
00048     return theBarrelParameters;
00049   else if (EcalSubdetector(detId.subdetId()) == EcalEndcap)
00050     return theEndcapParameters;
00051   else 
00052     return theESParameters;
00053 }
00054