Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:00:06

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # Slopes for the S9S1 filter
0004 _slopes_S9S1_run1 = [-99999,0.0164905,0.0238698,0.0321383,
0005                      0.041296,0.0513428,0.0622789,0.0741041,
0006                      0.0868186,0.100422,0.135313,0.136289,0.0589927]
0007 
0008 _coeffs = [1.0, 2.5, 2.2, 2.0, 1.8, 1.6, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
0009 
0010 _slopes_S9S1_run2 = [s*c for s, c in zip(_slopes_S9S1_run1, _coeffs)]
0011 
0012 
0013 hfreco = cms.EDProducer("HFPhase1Reconstructor",
0014     # Label for the input HFPreRecHitCollection
0015     inputLabel = cms.InputTag("hfprereco"),
0016 
0017     # Change the following to True in order to use the channel
0018     # status from the DB
0019     useChannelQualityFromDB = cms.bool(True),
0020 
0021     # Change the following to True when the status becomes
0022     # available in the DB for both anodes. If this parameter
0023     # is set to False then it is assumed that the status of
0024     # both anodes is given by the channel at depth 1 and 2.
0025     checkChannelQualityForDepth3and4 = cms.bool(True),
0026 
0027     # Configure the reconstruction algorithm
0028     algorithm = cms.PSet(
0029         Class = cms.string("HFFlexibleTimeCheck"),
0030 
0031         # Timing cuts: pass everything for now
0032         tlimits = cms.vdouble(-1000.0, 1000.0,
0033                               -1000.0, 1000.0),
0034 
0035         # Linear mapping of the array with dimensions [13][2].
0036         # The first dimension is 2*HFAnodeStatus::N_POSSIBLE_STATES - 1.
0037         energyWeights = cms.vdouble(
0038             1.0, 1.0,  # {OK, OK} anode status
0039             1.0, 0.0,  # {OK, NOT_DUAL}
0040             1.0, 0.0,  # {OK, NOT_READ_OUT}
0041             2.0, 0.0,  # {OK, HARDWARE_ERROR}
0042             2.0, 0.0,  # {OK, FLAGGED_BAD}
0043             2.0, 0.0,  # {OK, FAILED_TIMING}
0044             1.0, 0.0,  # {OK, FAILED_OTHER}
0045             0.0, 1.0,  # {NOT_DUAL, OK}
0046             0.0, 1.0,  # {NOT_READ_OUT, OK}
0047             0.0, 2.0,  # {HARDWARE_ERROR, OK}
0048             0.0, 2.0,  # {FLAGGED_BAD, OK}
0049             0.0, 2.0,  # {FAILED_TIMING, OK}
0050             0.0, 1.0   # {FAILED_OTHER, OK}
0051         ),
0052 
0053         # Into which byte (0, 1, or 2) of the aux word the sample
0054         # of interest ADC will be placed?
0055         soiPhase = cms.uint32(1),
0056 
0057         # Time shift added to all "normal" QIE10 TDC time measurements
0058         timeShift = cms.double(0.0),
0059 
0060         # Rise and fall time of the rechit will be set to these values
0061         # if neither anode has valid TDC info
0062         triseIfNoTDC = cms.double(-100.0),
0063         tfallIfNoTDC = cms.double(-101.0),
0064 
0065         # Charge limits for special TDC values. If the anode charge is
0066         # below such a limit, the anode will participate in the energy
0067         # reconstruction even if its TDC undershoots/overshoots. These
0068         # global limits are in addition to those per channel limits in
0069         # the database (effectively, the larger limit is used).
0070         minChargeForUndershoot = cms.double(1.0e10),
0071         minChargeForOvershoot = cms.double(1.0e10),
0072 
0073         # Do not construct rechits with problems
0074         rejectAllFailures = cms.bool(True),
0075 
0076         # If False, calculate charge asymmetry only when both PMT
0077         # anodes have "OK" status (or were mapped into "OK" status)
0078         alwaysCalculateQAsymmetry = cms.bool(False)
0079     ),
0080 
0081     # Reconstruction algorithm data to fetch from DB, if any
0082     algoConfigClass = cms.string("HFPhase1PMTParams"),
0083 
0084     # Turn on/off the noise cleanup algorithms
0085     setNoiseFlags = cms.bool(True),
0086 
0087     # Run HFStripFilter in the noise cleanup sequence? This switch
0088     # is meaningful only if "setNoiseFlags" is set to True.
0089     runHFStripFilter = cms.bool(True),
0090 
0091     # Parameters for the S9S1 test.
0092     #
0093     #   optimumSlopes are slopes for each of the |ieta| values
0094     #   29, 30, .... ,41  (although |ieta|=29 is not used in
0095     #   current S9S1 formulation)
0096     #
0097     #   energy and ET params are thresholds for each |ieta|
0098     #
0099     S9S1stat = cms.PSet(
0100         # WARNING!  ONLY LONG PARAMETERS ARE USED IN DEFAULT RECO; SHORT S9S1 IS NOT USED!
0101         short_optimumSlope   = cms.vdouble(_slopes_S9S1_run2),
0102 
0103         # Short energy cut is 129.9 - 6.61*|ieta|+0.1153*|ieta|^2
0104         shortEnergyParams    = cms.vdouble([35.1773, 35.37, 35.7933, 36.4472,
0105                                             37.3317, 38.4468, 39.7925, 41.3688,
0106                                             43.1757, 45.2132, 47.4813, 49.98,
0107                                             52.7093]),
0108         shortETParams        = cms.vdouble([0,0,0,0,
0109                                             0,0,0,0,
0110                                             0,0,0,0,0]),
0111 
0112         long_optimumSlope    = cms.vdouble(_slopes_S9S1_run2),
0113 
0114         # Long energy cut is 162.4-10.9*abs(ieta)+0.21*ieta*ieta
0115         longEnergyParams     = cms.vdouble([43.5, 45.7, 48.32, 51.36,
0116                                             54.82, 58.7, 63.0, 67.72,
0117                                             72.86, 78.42, 84.4, 90.8,
0118                                             97.62]),
0119         longETParams         = cms.vdouble([0,0,0,0,
0120                                             0,0,0,0,
0121                                             0,0,0,0,0]),
0122 
0123         HcalAcceptSeverityLevel = cms.int32(9), # allow hits with severity up to AND INCLUDING 9
0124         isS8S1                  = cms.bool(False),
0125     ),
0126 
0127     # Parameters for the S8S1 test. Sets the HFS8S1Ratio Bit (bit 3).
0128     #
0129     #   energy and ET params are coefficients for
0130     #   energy/ET thresholds, parameterized in ieta
0131     #
0132     S8S1stat = cms.PSet(
0133         short_optimumSlope   = cms.vdouble([0.30, # ieta=29 is a special case
0134                                             0.10, 0.10, 0.10, 0.10,
0135                                             0.10, 0.10, 0.10, 0.10,
0136                                             0.10, 0.10, 0.10, 0.10]),
0137 
0138         # Short energy cut is 40 for ieta=29, 100 otherwise
0139         shortEnergyParams    = cms.vdouble([40,
0140                                             100,100,100,100,
0141                                             100,100,100,100,
0142                                             100,100,100,100]),
0143         shortETParams        = cms.vdouble([0,0,0,0,
0144                                             0,0,0,0,
0145                                             0,0,0,0,0]),
0146 
0147         long_optimumSlope   = cms.vdouble([0.30, # ieta=29 is a special case
0148                                            0.10, 0.10, 0.10, 0.10,
0149                                            0.10, 0.10, 0.10, 0.10,
0150                                            0.10, 0.10, 0.10, 0.10]),
0151 
0152         # Long energy cut is 40 for ieta=29, 100 otherwise
0153         longEnergyParams    = cms.vdouble([40,
0154                                            100,100,100,100,
0155                                            100,100,100,100,
0156                                            100,100,100,100]),
0157         longETParams        = cms.vdouble([0,0,0,0,
0158                                            0,0,0,0,
0159                                            0,0,0,0,0]),
0160 
0161         HcalAcceptSeverityLevel  = cms.int32(9), # allow hits with severity up to AND INCLUDING 9
0162         isS8S1                   = cms.bool(True),
0163     ),
0164 
0165     # Parameters for the Parameterized Energy Threshold (PET) test.
0166     #
0167     #   short_R, long_R are coefficients of R threshold,
0168     #   parameterized in *ENERGY*:  R_thresh = [0]+[1]*energy+[2]*energy^2+...
0169     #
0170     #   As of March 2010, the R threshold is a simple fixed value:
0171     #   R>0.98, with separate params for |ieta|=29
0172     #
0173     #   Energy and ET params are energy and ET cuts for each |ieta| 29 -> 41
0174     #
0175     PETstat = cms.PSet(
0176         short_R = cms.vdouble([0.8]),  # new default ratio cut:  R>0.8
0177 
0178         # Short energy cut is 129.9 - 6.61*|ieta|+0.1153*|ieta|^2
0179         shortEnergyParams    = cms.vdouble([35.1773, 35.37, 35.7933, 36.4472,
0180                                             37.3317, 38.4468, 39.7925, 41.3688,
0181                                             43.1757, 45.2132, 47.4813, 49.98,
0182                                             52.7093]),
0183         shortETParams        = cms.vdouble([0,0,0,0,
0184                                             0,0,0,0,
0185                                             0,0,0,0,0]),
0186 
0187         long_R  = cms.vdouble([0.98]),  # default ratio cut:  R>0.98
0188 
0189         # Long energy cut is 162.4-10.9*abs(ieta)+0.21*ieta*ieta
0190         longEnergyParams    = cms.vdouble([43.5, 45.7, 48.32, 51.36,
0191                                            54.82, 58.7, 63.0, 67.72,
0192                                            72.86, 78.42, 84.4, 90.8,
0193                                            97.62]),
0194         longETParams        = cms.vdouble([0,0,0,0,
0195                                            0,0,0,0,
0196                                            0,0,0,0,0]),
0197 
0198         short_R_29 = cms.vdouble([0.8]),
0199         long_R_29  = cms.vdouble([0.8]), # should move from 0.98 to 0.8?
0200         HcalAcceptSeverityLevel = cms.int32(9), # allow hits with severity up to AND INCLUDING 9
0201     ),
0202 
0203     # Parameters for HFStripFilter.
0204     HFStripFilter = cms.PSet(
0205         stripThreshold = cms.double(40.0),     # threshold to include hits into strips
0206         maxThreshold = cms.double(100.0),      # threshold for seed hits in the strips (depth1 and depth2)
0207         timeMax = cms.double(6.0),             # seed hits should have time < timeMax
0208         maxStripTime = cms.double(10.0),       # maximum time for hits in the strips
0209         wedgeCut = cms.double(0.05),           # the possible level of energy leak into adjacent wedges
0210         seedHitIetaMax = cms.int32(35),        # maximum possible Ieta value for seed hit
0211         gap = cms.int32(2),                    # maximum distance between hits in the strip (along Ieta direction)
0212         lstrips = cms.int32(2),                # at least one of strips in depth1 or depth2 is not less than lstrips
0213         verboseLevel = cms.untracked.int32(10) # verboseLevel for debugging printouts, should be > 20 to get output
0214     )
0215 )