Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:32

0001 #include "SimCalorimetry/EcalSimAlgos/interface/EcalSimParameterMap.h"
0002 #include "DataFormats/DetId/interface/DetId.h"
0003 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
0004 #include <iostream>
0005 
0006 /** Relevant constants are:
0007   4.5 photoelectrons per MeV (J. Nash's slides)
0008   APD gain 50, but analog signal stays in GeV
0009   Account for excess noise factor
0010  */
0011 
0012 EcalSimParameterMap::EcalSimParameterMap()
0013     : theBarrelParameters(2250., 1. / 2250., 1., 0, 10, 6, true, true),
0014       theEndcapParameters(1800., 1. / 1800., 1., 0, 10, 6, true, true),
0015       theESParameters(1., 1., 1., 20., 3, 2, false, true) {}
0016 
0017 EcalSimParameterMap::EcalSimParameterMap(double simHitToPhotoelectronsBarrel,
0018                                          double simHitToPhotoelectronsEndcap,
0019                                          double photoelectronsToAnalogBarrel,
0020                                          double photoelectronsToAnalogEndcap,
0021                                          double samplingFactor,
0022                                          double timePhase,
0023                                          int readoutFrameSize,
0024                                          int binOfMaximum,
0025                                          bool doPhotostatistics,
0026                                          bool syncPhase)
0027     : theBarrelParameters(simHitToPhotoelectronsBarrel,
0028                           photoelectronsToAnalogBarrel,
0029                           samplingFactor,
0030                           timePhase,
0031                           readoutFrameSize,
0032                           binOfMaximum,
0033                           doPhotostatistics,
0034                           syncPhase),
0035       theEndcapParameters(simHitToPhotoelectronsEndcap,
0036                           photoelectronsToAnalogEndcap,
0037                           samplingFactor,
0038                           timePhase,
0039                           readoutFrameSize,
0040                           binOfMaximum,
0041                           doPhotostatistics,
0042                           syncPhase),
0043       theESParameters(1., 1., 1., 20., 3, 2, false, syncPhase) {}
0044 
0045 /*
0046   CaloSimParameters(double simHitToPhotoelectrons, double photoelectronsToAnalog, 
0047                  double samplingFactor, double timePhase,
0048                  int readoutFrameSize, int binOfMaximum,
0049                  bool doPhotostatistics, bool syncPhase)
0050   */
0051 
0052 const CaloSimParameters& EcalSimParameterMap::simParameters(const DetId& detId) const {
0053   if (EcalSubdetector(detId.subdetId()) == EcalBarrel)
0054     return theBarrelParameters;
0055   else if (EcalSubdetector(detId.subdetId()) == EcalEndcap)
0056     return theEndcapParameters;
0057   else
0058     return theESParameters;
0059 }