Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-16 00:28:22

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 bxBins = [1]
0004 
0005 bxStepSizes = [9, 50, 100, 300]
0006 bxMaxVals = [101, 1501, 2401, 3601]
0007 runningMinVal = 1
0008 
0009 for stepCounter in range(len(bxStepSizes)):
0010     runningMinVal = bxBins[-1]
0011     bxStepSize = bxStepSizes[stepCounter]
0012     bxMaxVal = bxMaxVals[stepCounter]
0013     bxBins += list(range(runningMinVal + bxStepSize, bxMaxVal, bxStepSize))
0014 
0015 bxBinLabels = [str(bxBins[0])]
0016 for bxBinCounter in range(0, -1+len(bxBins)):
0017     bxBinLabels += [str(1+bxBins[bxBinCounter]) + "-->" + str(bxBins[bxBinCounter+1])]
0018 
0019 nBXBins = len(bxBins)
0020 
0021 bxBinsFine = [i for i in range(1, 3601)]
0022 bxBinLabelsFine = [str(i) for i in range(1, 3601)]
0023 nBXBinsFine = len(bxBinsFine)
0024 
0025 EaxisEdges = []
0026 for i in range(50) :
0027     EaxisEdges.append(pow(10., -0.5 + 2.5 / 50. * i))
0028 
0029 chi2ThresholdEE = 50.
0030 chi2ThresholdEB = 16.
0031 energyThresholdEE = 4.6
0032 energyThresholdEEFwd = 12.
0033 energyThresholdEB = 2.02
0034 timingVsBXThreshold = energyThresholdEB
0035 timeErrorThreshold = 3.
0036 timeWindow = 12.5
0037 summaryTimeWindow = 7.
0038 
0039 ecalTimingTask = cms.untracked.PSet(
0040     params = cms.untracked.PSet(
0041         bxBins = cms.untracked.vint32(bxBins),
0042         bxBinsFine = cms.untracked.vint32(bxBinsFine),
0043         chi2ThresholdEE = cms.untracked.double(chi2ThresholdEE),
0044         chi2ThresholdEB = cms.untracked.double(chi2ThresholdEB),
0045         energyThresholdEE = cms.untracked.double(energyThresholdEE),
0046         energyThresholdEEFwd = cms.untracked.double(energyThresholdEEFwd),
0047         energyThresholdEB = cms.untracked.double(energyThresholdEB),
0048         timingVsBXThreshold = cms.untracked.double(timingVsBXThreshold),
0049         timeErrorThreshold = cms.untracked.double(timeErrorThreshold),
0050         splashSwitch = cms.untracked.bool(False)
0051     ),
0052     MEs = cms.untracked.PSet(
0053         TimeMap = cms.untracked.PSet(
0054             path = cms.untracked.string('%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT timing %(sm)s'),
0055             kind = cms.untracked.string('TProfile2D'),
0056             zaxis = cms.untracked.PSet(
0057                 high = cms.untracked.double(timeWindow),
0058                 low = cms.untracked.double(-timeWindow),
0059                 title = cms.untracked.string('time (ns)')
0060             ),
0061             otype = cms.untracked.string('SM'),
0062             btype = cms.untracked.string('Crystal'),
0063             description = cms.untracked.string('2D distribution of the mean rec hit timing. Only hits with GOOD or OUT_OF_TIME reconstruction flags and energy above threshold are used. Hits with |t| > ' + str(timeWindow) + ' ns are discarded. The energy thresholds are ' + ('%f and %f' % (energyThresholdEB, energyThresholdEE)) + ' for EB and EE respectively.')
0064         ),
0065         TimeMapByLS = cms.untracked.PSet(
0066             path = cms.untracked.string('%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT timing by LS %(sm)s'),
0067             kind = cms.untracked.string('TProfile2D'),
0068             zaxis = cms.untracked.PSet(
0069                 high = cms.untracked.double(timeWindow),
0070                 low = cms.untracked.double(-timeWindow),
0071                 title = cms.untracked.string('time (ns)')
0072             ),
0073             otype = cms.untracked.string('SM'),
0074             btype = cms.untracked.string('Crystal'),
0075             description = cms.untracked.string('2D distribution of the mean rec hit timing. Only hits with GOOD or OUT_OF_TIME reconstruction flags and energy above threshold are used. Hits with |t| > ' + str(timeWindow) + ' ns are discarded. The energy thresholds are ' + ('%f and %f' % (energyThresholdEB, energyThresholdEE)) + ' for EB and EE respectively.')
0076         ),
0077         TimeAll = cms.untracked.PSet(
0078             path = cms.untracked.string('%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT timing 1D summary%(suffix)s'),
0079             kind = cms.untracked.string('TH1F'),
0080             otype = cms.untracked.string('Ecal3P'),
0081             xaxis = cms.untracked.PSet(
0082                 high = cms.untracked.double(timeWindow),
0083                 nbins = cms.untracked.int32(100),
0084                 low = cms.untracked.double(-timeWindow),
0085                 title = cms.untracked.string('time (ns)')
0086             ),
0087             btype = cms.untracked.string('User'),
0088             description = cms.untracked.string('Distribution of the mean rec hit timing. Only hits with GOOD or OUT_OF_TIME reconstruction flags and energy above threshold are used. The energy thresholds are ' + ('%f and %f' % (energyThresholdEB, energyThresholdEE)) + ' for EB and EE respectively.')
0089         ),
0090         TimeAllMap = cms.untracked.PSet(
0091             path = cms.untracked.string('%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT timing map%(suffix)s'),
0092             kind = cms.untracked.string('TProfile2D'),
0093             zaxis = cms.untracked.PSet(
0094                 high = cms.untracked.double(summaryTimeWindow),
0095                 low = cms.untracked.double(-summaryTimeWindow),
0096                 title = cms.untracked.string('time (ns)')
0097             ),
0098             otype = cms.untracked.string('Ecal3P'),
0099             btype = cms.untracked.string('SuperCrystal'),
0100             description = cms.untracked.string('2D distribution of the mean rec hit timing. Only hits with GOOD or OUT_OF_TIME reconstruction flags and energy above threshold are used. Hits with |t| > ' + str(summaryTimeWindow) + ' ns are discarded. The energy thresholds are ' + ('%f and %f' % (energyThresholdEB, energyThresholdEE)) + ' for EB and EE respectively.')
0101         ),
0102         TimeAmpAll = cms.untracked.PSet(
0103             kind = cms.untracked.string('TH2F'),
0104             yaxis = cms.untracked.PSet(
0105                 high = cms.untracked.double(50.0),
0106                 nbins = cms.untracked.int32(200),
0107                 low = cms.untracked.double(-50.0),
0108                 title = cms.untracked.string('time (ns)')
0109             ),
0110             otype = cms.untracked.string('Ecal3P'),
0111             xaxis = cms.untracked.PSet(
0112                 edges = cms.untracked.vdouble(EaxisEdges),
0113                 title = cms.untracked.string('energy (GeV)')
0114             ),
0115             btype = cms.untracked.string('User'),
0116             path = cms.untracked.string('%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT timing vs amplitude summary%(suffix)s'),
0117             description = cms.untracked.string('Correlation between hit timing and energy. Only hits with GOOD or OUT_OF_TIME reconstruction flags are used.')
0118         ),
0119         TimeAmp = cms.untracked.PSet(
0120             kind = cms.untracked.string('TH2F'),
0121             yaxis = cms.untracked.PSet(
0122                 high = cms.untracked.double(50.0),
0123                 nbins = cms.untracked.int32(200),
0124                 low = cms.untracked.double(-50.0),
0125                 title = cms.untracked.string('time (ns)')
0126             ),
0127             otype = cms.untracked.string('SM'),
0128             xaxis = cms.untracked.PSet(
0129                 edges = cms.untracked.vdouble(EaxisEdges),
0130                 title = cms.untracked.string('energy (GeV)')
0131             ),
0132             btype = cms.untracked.string('User'),
0133             path = cms.untracked.string('%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT timing vs amplitude %(sm)s'),
0134             description = cms.untracked.string('Correlation between hit timing and energy. Only hits with GOOD or OUT_OF_TIME reconstruction flags are used.')
0135         ),
0136         BarrelTimingVsBX = cms.untracked.PSet(
0137             path = cms.untracked.string('EcalBarrel/EBTimingTask/EBTMT Timing vs BX'),
0138             kind = cms.untracked.string('TProfile'),
0139             otype = cms.untracked.string('EB'),
0140             xaxis = cms.untracked.PSet(
0141                 high = cms.untracked.double(1.0*nBXBins),
0142                 nbins = cms.untracked.int32(nBXBins),
0143                 low = cms.untracked.double(0.0),
0144                 title = cms.untracked.string('BX Id'),
0145                 labels = cms.untracked.vstring(bxBinLabels)
0146             ),
0147             yaxis = cms.untracked.PSet(
0148                 title = cms.untracked.string('Timing (ns)')
0149             ),
0150             btype = cms.untracked.string('User'),
0151             description = cms.untracked.string('Average hit timing in EB as a function of BX number. BX ids start at 1. Only events with energy above 2.02 GeV and chi2 less than 16 are used.')
0152         ),
0153         BarrelTimingVsBXFineBinned = cms.untracked.PSet(
0154             path = cms.untracked.string('EcalBarrel/EBTimingTask/EBTMT Timing vs Finely Binned BX'),
0155             kind = cms.untracked.string('TProfile'),
0156             otype = cms.untracked.string('EB'),
0157             xaxis = cms.untracked.PSet(
0158                 high = cms.untracked.double(1.0*nBXBinsFine),
0159                 nbins = cms.untracked.int32(nBXBinsFine),
0160                 low = cms.untracked.double(0.0),
0161                 title = cms.untracked.string('BX Id'),
0162                 labels = cms.untracked.vstring(bxBinLabelsFine)
0163             ),
0164             yaxis = cms.untracked.PSet(
0165                 title = cms.untracked.string('Timing (ns)')
0166             ),
0167             btype = cms.untracked.string('User'),
0168             description = cms.untracked.string('Average hit timing in EB as a finely binned function of BX number. BX ids start at 1. Only events with energy above 2.02 GeV and chi2 less than 16 are used. The Customize button can be used to zoom in.')
0169         ),
0170         TimeAmpBXm = cms.untracked.PSet(
0171             kind = cms.untracked.string('TH2F'),
0172             yaxis = cms.untracked.PSet(
0173                 high = cms.untracked.double(100.0),
0174                 nbins = cms.untracked.int32(100),
0175                 low = cms.untracked.double(0.0),
0176                 title = cms.untracked.string('Amplitude BX-1 [ADC]')
0177             ),
0178             otype = cms.untracked.string('Ecal3P'),
0179             xaxis = cms.untracked.PSet(
0180                 high = cms.untracked.double(1000.0),
0181                 nbins = cms.untracked.int32(250),
0182                 low = cms.untracked.double(0.0),
0183                 title = cms.untracked.string('In-time amplitude [ADC]')
0184             ),
0185             btype = cms.untracked.string('User'),
0186             path = cms.untracked.string('%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT in-time vs BX-1 amplitude%(suffix)s'),
0187             description = cms.untracked.string('Correlation between in-time amplitude and BX-1 out-of-time amplitude. Only events with kGood reconstruction flag set, energy > ( ' + ('EB:%f, EE:%f' % (energyThresholdEB*20., energyThresholdEE*5.)) + ' ) GeV, and chi2 < ( ' + ('EB:%f, EE:%f' % (chi2ThresholdEB, chi2ThresholdEE)) + ' ) are used.')
0188         ),
0189         TimeAmpBXp = cms.untracked.PSet(
0190             kind = cms.untracked.string('TH2F'),
0191             yaxis = cms.untracked.PSet(
0192                 high = cms.untracked.double(100.0),
0193                 nbins = cms.untracked.int32(100),
0194                 low = cms.untracked.double(0.0),
0195                 title = cms.untracked.string('Amplitude BX+1 [ADC]')
0196             ),
0197             otype = cms.untracked.string('Ecal3P'),
0198             xaxis = cms.untracked.PSet(
0199                 high = cms.untracked.double(1000.0),
0200                 nbins = cms.untracked.int32(250),
0201                 low = cms.untracked.double(0.0),
0202                 title = cms.untracked.string('In-time amplitude [ADC]')
0203             ),
0204             btype = cms.untracked.string('User'),
0205             path = cms.untracked.string('%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT in-time vs BX+1 amplitude%(suffix)s'),
0206             description = cms.untracked.string('Correlation between in-time amplitude and BX+1 out-of-time amplitude. Only events with kGood reconstruction flag set, energy > ( ' + ('EB:%f, EE:%f' % (energyThresholdEB*20., energyThresholdEE*5.)) + ' ) GeV, and chi2 < ( ' + ('EB:%f, EE:%f' % (chi2ThresholdEB, chi2ThresholdEE)) + ' ) are used.')
0207         ),
0208         Time1D = cms.untracked.PSet(
0209             path = cms.untracked.string('%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT timing 1D %(sm)s'),
0210             kind = cms.untracked.string('TH1F'),
0211             otype = cms.untracked.string('SM'),
0212             xaxis = cms.untracked.PSet(
0213                 high = cms.untracked.double(timeWindow),
0214                 nbins = cms.untracked.int32(100),
0215                 low = cms.untracked.double(-timeWindow),
0216                 title = cms.untracked.string('time (ns)')
0217             ),
0218             btype = cms.untracked.string('User'),
0219             description = cms.untracked.string('Distribution of the mean rec hit timing. Only hits with GOOD or OUT_OF_TIME reconstruction flags and energy above threshold are used. The energy thresholds are ' + ('%f and %f' % (energyThresholdEB, energyThresholdEE)) + ' for EB and EE respectively.')
0220         ),
0221         Chi2 = cms.untracked.PSet(
0222             path = cms.untracked.string("%(subdet)s/%(prefix)sTimingTask/%(prefix)sTMT %(subdetshortsig)s Chi2"),
0223             kind = cms.untracked.string('TH1F'),
0224             otype = cms.untracked.string('Ecal3P'),
0225             btype = cms.untracked.string('User'),
0226             xaxis = cms.untracked.PSet(
0227                 high = cms.untracked.double(100.),
0228                 low = cms.untracked.double(0.),
0229                 nbins = cms.untracked.int32(100)
0230             ),
0231             description = cms.untracked.string('Chi2 of the pulse reconstruction.')
0232         )
0233     )
0234 )