CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
customHGCdigitizer_cfi Namespace Reference

Functions

def customHGCdigitizer
 

Function Documentation

def customHGCdigitizer_cfi.customHGCdigitizer (   process,
  version = 'simple0',
  debug = False 
)

Definition at line 7 of file customHGCdigitizer_cfi.py.

References print().

7 
8 def customHGCdigitizer(process, version='simple0', debug=False):
9 
10  #configure digitizer model
11  if version.find('femodel')>=0:
12  print('Adapting for FE model')
13  process.mix.digitizers.hgceeDigitizer.digiCfg.feCfg.fwVersion = cms.uint32(1)
14  process.mix.digitizers.hgceeDigitizer.digiCfg.feCfg.shaperN = cms.double(8.02)
15  process.mix.digitizers.hgceeDigitizer.digiCfg.feCfg.shaperTau = cms.double(3.26)
16  process.mix.digitizers.hgchefrontDigitizer.digiCfg.feCfg.fwVersion = cms.uint32(1)
17  process.mix.digitizers.hgchefrontDigitizer.digiCfg.feCfg.shaperN = cms.double(8.02)
18  process.mix.digitizers.hgchefrontDigitizer.digiCfg.feCfg.shaperTau = cms.double(3.26)
19  process.mix.digitizers.hgchebackDigitizer.digiCfg.feCfg.fwVersion = cms.uint32(0)
20  process.mix.digitizers.hgchebackDigitizer.digiCfg.feCfg.shaperN = cms.double(1)
21  process.mix.digitizers.hgchebackDigitizer.digiCfg.feCfg.shaperTau = cms.double(10)
22  process.mix.digitizers.hfnoseDigitizer.digiCfg.feCfg.fwVersion = cms.uint32(1)
23  process.mix.digitizers.hfnoseDigitizer.digiCfg.feCfg.shaperN = cms.double(8.02)
24  process.mix.digitizers.hfnoseDigitizer.digiCfg.feCfg.shaperTau = cms.double(3.26)
25  if version=='femodel-v0':
26  process.mix.digitizers.hgceeDigitizer.digiCfg.feCfg.tdcTransferDelay = cms.double(0)
27  process.mix.digitizers.hgchefrontDigitizer.digiCfg.feCfg.tdcTransferDelay = cms.double(0)
28  process.mix.digitizers.hfnoseDigitizer.digiCfg.feCfg.tdcTransferDelay = cms.double(0)
29  if version=='femodel-v1':
30  process.mix.digitizers.hgceeDigitizer.digiCfg.feCfg.tdcTransferDelay = cms.double(12.5)
31  process.mix.digitizers.hgchefrontDigitizer.digiCfg.feCfg.tdcTransferDelay = cms.double(12.5)
32  process.mix.digitizers.hfnoseDigitizer.digiCfg.feCfg.tdcTransferDelay = cms.double(12.5)
33  if version=='femodel-v2':
34  process.mix.digitizers.hgceeDigitizer.digiCfg.feCfg.tdcTransferDelay = cms.double(25)
35  process.mix.digitizers.hgchefrontDigitizer.digiCfg.feCfg.tdcTransferDelay = cms.double(25)
36  process.mix.digitizers.hfnoseDigitizer.digiCfg.feCfg.tdcTransferDelay = cms.double(25)
37 
38 
39  elif version.find('simple')>=0 :
40  tau=float(version.replace('simple',''))
41  print('Adapting simple pulse shape with tau=%f'%tau)
42  process.mix.digitizers.hgceeDigitizer.digiCfg.feCfg.fwVersion = cms.uint32(0)
43  process.mix.digitizers.hgceeDigitizer.digiCfg.feCfg.shaperTau = cms.double(tau)
44  process.mix.digitizers.hgchefrontDigitizer.digiCfg.feCfg.fwVersion = cms.uint32(0)
45  process.mix.digitizers.hgchefrontDigitizer.digiCfg.feCfg.shaperTau = cms.double(tau)
46  process.mix.digitizers.hgchebackDigitizer.digiCfg.feCfg.fwVersion = cms.uint32(0)
47  process.mix.digitizers.hgchebackDigitizer.digiCfg.feCfg.shaperN = cms.double(1)
48  process.mix.digitizers.hgchebackDigitizer.digiCfg.feCfg.shaperTau = cms.double(tau)
49  process.mix.digitizers.hfnoseDigitizer.digiCfg.feCfg.fwVersion = cms.uint32(0)
50  process.mix.digitizers.hfnoseDigitizer.digiCfg.feCfg.shaperTau = cms.double(tau)
51 
52  #save all the time samples to the output
53  if debug:
54  process.mix.digitizers.hgceeDigitizer.digiCfg.doTimeSamples = cms.bool(True)
55  process.mix.digitizers.hgchefrontDigitizer.digiCfg.doTimeSamples = cms.bool(True)
56  process.mix.digitizers.hgchebackDigitizer.digiCfg.doTimeSamples = cms.bool(True)
57  process.mix.digitizers.hfnoseDigitizer.digiCfg.doTimeSamples = cms.bool(True)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47