CMS 3D CMS Logo

hgcalTriggerPrimitiveDigiProducer_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
5 
6 # Digitization parameters
7 adcSaturation_fC = digiparam.hgceeDigitizer.digiCfg.feCfg.adcSaturation_fC
8 adcNbits = digiparam.hgceeDigitizer.digiCfg.feCfg.adcNbits
9 tdcSaturation_fC = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcSaturation_fC
10 tdcNbits = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcNbits
11 tdcOnset_fC = digiparam.hgceeDigitizer.digiCfg.feCfg.tdcOnset_fC
12 adcSaturationBH_MIP = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcSaturation_fC
13 adcNbitsBH = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcNbits
14 # Reco calibration parameters
15 fCPerMIPee = recoparam.HGCalUncalibRecHit.HGCEEConfig.fCPerMIP
16 fCPerMIPfh = recoparam.HGCalUncalibRecHit.HGCHEFConfig.fCPerMIP
17 layerWeights = recocalibparam.HGCalRecHit.layerWeights
18 thicknessCorrection = recocalibparam.HGCalRecHit.thicknessCorrection
19 
20 # Parameters used in several places
21 triggerCellLsbBeforeCompression = 100./1024.
22 triggerCellTruncationBits = 0
23 
24 # Equalization in the frontend of the sensor responses to 200um sensors
25 frontend_thickness_corrections = [1./(c1*c2) for c1,c2 in zip(fCPerMIPee,thicknessCorrection)]
26 c200 = frontend_thickness_corrections[1]
27 frontend_thickness_corrections = [c/c200 for c in frontend_thickness_corrections]
28 fCPerMIP_200 = fCPerMIPee[1]
29 thicknessCorrection_200 = thicknessCorrection[1]
30 
31 fe_codec = cms.PSet( CodecName = cms.string('HGCalTriggerCellThresholdCodec'),
32  CodecIndex = cms.uint32(2),
33  MaxCellsInModule = cms.uint32(288),
34  DataLength = cms.uint32(16),
35  linLSB = cms.double(triggerCellLsbBeforeCompression),
36  linnBits = cms.uint32(16),
37  triggerCellTruncationBits = cms.uint32(triggerCellTruncationBits),
38  NData = cms.uint32(999),
39  TCThreshold_fC = cms.double(1.),
40  TCThresholdBH_MIP = cms.double(1.),
41  #take the following parameters from the digitization config file
42  adcsaturation = adcSaturation_fC,
43  adcnBits = adcNbits,
44  tdcsaturation = tdcSaturation_fC,
45  tdcnBits = tdcNbits,
46  tdcOnsetfC = tdcOnset_fC,
47  adcsaturationBH = adcSaturationBH_MIP,
48  adcnBitsBH = adcNbitsBH,
49  ThicknessCorrections = cms.vdouble(frontend_thickness_corrections)
50  )
51 
52 calib_parValues = cms.PSet( siliconCellLSB_fC = cms.double( triggerCellLsbBeforeCompression*(2**triggerCellTruncationBits) ),
53  scintillatorCellLSB_MIP = cms.double(float(adcSaturationBH_MIP.value())/(2**float(adcNbitsBH.value()))),
54  fCperMIP = cms.double(fCPerMIP_200),
55  dEdXweights = layerWeights,
56  thickCorr = cms.double(thicknessCorrection_200)
57  )
58 C2d_parValues = cms.PSet( seeding_threshold_silicon = cms.double(5), # MipT
59  seeding_threshold_scintillator = cms.double(5), # MipT
60  clustering_threshold_silicon = cms.double(2), # MipT
61  clustering_threshold_scintillator = cms.double(2), # MipT
62  dR_cluster = cms.double(3.), # in cm
63  clusterType = cms.string('NNC2d') # clustering type: dRC2d--> Geometric-dR clustering; NNC2d-->Nearest Neighbors clustering
64  )
65 
66 C3d_parValues = cms.PSet( dR_multicluster = cms.double(0.01), # dR in normalized plane used to clusterize C2d
67  minPt_multicluster = cms.double(0.5), # minimum pt of the multicluster (GeV)
68  calibSF_multicluster = cms.double(1.084)
69  )
70 cluster_algo = cms.PSet( AlgorithmName = cms.string('HGCClusterAlgoThreshold'),
71  FECodec = fe_codec.clone(),
72  calib_parameters = calib_parValues.clone(),
73  C2d_parameters = C2d_parValues.clone(),
74  C3d_parameters = C3d_parValues.clone()
75  )
76 
77 hgcalTriggerPrimitiveDigiProducer = cms.EDProducer(
78  "HGCalTriggerDigiProducer",
79  eeDigis = cms.InputTag('mix:HGCDigisEE'),
80  fhDigis = cms.InputTag('mix:HGCDigisHEfront'),
81  bhDigis = cms.InputTag('mix:HGCDigisHEback'),
82  FECodec = fe_codec.clone(),
83  BEConfiguration = cms.PSet(
84  algorithms = cms.VPSet( cluster_algo )
85  )
86  )
87 
88 hgcalTriggerPrimitiveDigiFEReproducer = cms.EDProducer(
89  "HGCalTriggerDigiFEReproducer",
90  feDigis = cms.InputTag('hgcalTriggerPrimitiveDigiProducer'),
91  FECodec = fe_codec.clone(),
92  BEConfiguration = cms.PSet(
93  algorithms = cms.VPSet( cluster_algo )
94  )
95  )
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)