Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:37

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 calotowermaker = cms.EDProducer("CaloTowersCreator",
0004     # Energy threshold for EB 5x5 crystal inclusion [GeV]
0005     EBSumThreshold = cms.double(0.2),
0006     # Weighting factor for HF short-fiber readouts
0007     HF2Weight = cms.double(1.0),
0008     # Weighting factor for EB   
0009     EBWeight = cms.double(1.0),
0010     # Label of HFRecHitCollection to use
0011     hfInput = cms.InputTag("hfreco"),
0012     # Energy threshold for EE crystals-in-tower inclusion [GeV]
0013     EESumThreshold = cms.double(0.45),
0014     # Energy threshold for HO cell inclusion [GeV]
0015     HOThreshold0 = cms.double(1.1),
0016     HOThresholdPlus1 = cms.double(3.5),
0017     HOThresholdMinus1 = cms.double(3.5),
0018     HOThresholdPlus2 = cms.double(3.5),
0019     HOThresholdMinus2 = cms.double(3.5),
0020     HBGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
0021     # Energy threshold for HB cell inclusion [GeV]
0022     HBThreshold1 = cms.double(0.7), # depth 1
0023     HBThreshold2 = cms.double(0.7), # depth 2
0024     HBThreshold = cms.double(0.7), # depths 3-4
0025     EEWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
0026     # Energy threshold for long-fiber HF readout inclusion [GeV]
0027     HF1Threshold = cms.double(0.5),
0028     HF2Weights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
0029     HOWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
0030     EEGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
0031     # Weighting factor for HE 10-degree cells   
0032     HEDWeight = cms.double(1.0),
0033     # Weighting factor for EE   
0034     EEWeight = cms.double(1.0),
0035     # HO on/off flag for tower energy reconstruction
0036     UseHO = cms.bool(True),
0037     HBWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
0038     # Weighting factor for HE 5-degree cells   
0039     HESWeight = cms.double(1.0),
0040     # Weighting factor for HF long-fiber readouts 
0041     HF1Weight = cms.double(1.0),
0042     HF2Grid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
0043     HEDWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
0044     HF1Grid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
0045     EBWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
0046     # Weighting factor for HO 
0047     HOWeight = cms.double(1.0),
0048                               
0049     # Energy threshold for EB crystal inclusion [GeV]
0050     EBThreshold = cms.double(0.07),
0051     # Energy threshold for EE crystal inclusion [GeV]
0052     EEThreshold = cms.double(0.3),
0053     # Flags specifying if the above thresholds
0054     # should be applied to Et (UseEtEXTreshold='True') or E ('False')
0055     # Flags for use of symmetric thresholds: |e|>threshold                          
0056     UseEtEBTreshold = cms.bool(False),
0057     UseSymEBTreshold = cms.bool(True),
0058     UseEtEETreshold = cms.bool(False),
0059     UseSymEETreshold = cms.bool(True),
0060 
0061 
0062     # Label of HBHERecHitCollection to use
0063     hbheInput = cms.InputTag("hbhereco"),
0064     # Global energy threshold on Hcal [GeV]
0065     HcalThreshold = cms.double(-1000.0),
0066     # Energy threshold for short-fiber HF readout inclusion [GeV]
0067     HF2Threshold = cms.double(0.85),
0068 
0069     # Energy threshold for 5-degree (phi) HE cell inclusion [GeV]
0070     HESThreshold1 = cms.double(0.8), # depth  1    
0071     HESThreshold  = cms.double(0.8), # depths 2-7
0072     HF1Weights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
0073     # Label of HORecHitCollection to use
0074     hoInput = cms.InputTag("horeco"),
0075     HESGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
0076     #
0077     HESWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
0078     # Energy threshold for 10-degree (phi) HE cel inclusion [GeV]
0079     HEDThreshold1 = cms.double(0.8), # depth  1  
0080     HEDThreshold  = cms.double(0.8), # depths 2-7
0081     # Global energy threshold on tower [GeV]
0082     EcutTower = cms.double(-1000.0),
0083     HEDGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
0084     # Label of EcalRecHitCollections to use
0085     ecalInputs = cms.VInputTag(cms.InputTag("ecalRecHit","EcalRecHitsEB"), cms.InputTag("ecalRecHit","EcalRecHitsEE")),
0086     # Weighting factor for HB   
0087     HBWeight = cms.double(1.0),
0088     HOGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
0089     # Energy dependent weights and energy scale to be used
0090     EBGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
0091     #
0092     #
0093     # momentum assignment
0094     # Method for momentum reconstruction
0095     MomConstrMethod = cms.int32(1),                           
0096     # Depth, fraction of the respective calorimeter [0,1]
0097     MomHBDepth = cms.double(0.2),
0098     MomHEDepth = cms.double(0.4),   
0099     MomEBDepth = cms.double(0.3),
0100     MomEEDepth = cms.double(0.0),
0101 
0102 # parameters for handling of anomalous cells
0103 # 
0104     # acceptable severity level
0105     HcalAcceptSeverityLevel = cms.uint32(9),
0106     #EcalAcceptSeverityLevel = cms.uint32(1),
0107     EcalRecHitSeveritiesToBeExcluded = cms.vstring('kTime','kWeird','kBad'),
0108                                 
0109     # use of recovered hits
0110     UseHcalRecoveredHits = cms.bool(True),
0111       # The CaloTower code treats recovered cells as a separate category.
0112       # The flag to use (or not use) them should be explicitly set
0113       # regardless of the specified severity level in EcalAcceptSeverityLevel.                       
0114     UseEcalRecoveredHits = cms.bool(False),
0115                         
0116 
0117 # NOTE: The following controls the creation of towers from
0118 #       rejected rechits.
0119 #       Always make sure that UseRejectedHitsOnly=false for
0120 #       normal reconstructions!!!
0121 
0122      UseRejectedHitsOnly = cms.bool(False),
0123 
0124 #    Controls for hits to be included in the "bad" tower collection.
0125 #    They have no effect unless UseRejectedHitsOnly=true                                
0126 #    Hits passing the   HcalAcceptSeverityLevel
0127 #    will be skipped as they are already in the default towers                                
0128      HcalAcceptSeverityLevelForRejectedHit = cms.uint32(9999),
0129 #    List of ECAL problems that should be used in bad tower construction
0130 #    Note that these can only be of type already rejected in default
0131 #    reconstruction as specified in "EcalRecHitSeveritiesToBeExcluded"
0132      EcalSeveritiesToBeUsedInBadTowers = cms.vstring(),
0133                                 
0134 
0135 #    The code also checks the settings of the flags for the default
0136 #    collection - if the recovered hits were used there, they
0137 #    will be skipped for the "bad" tower collection regardless of these settings                                
0138      UseRejectedRecoveredHcalHits = cms.bool(True),
0139      UseRejectedRecoveredEcalHits = cms.bool(False),
0140 
0141 #    If Hcal is masked, and Ecal is present, pretend Hcal = (this factor) * Ecal
0142     missingHcalRescaleFactorForEcal = cms.double(0),
0143 
0144 
0145 # flag to allow/disallow missing inputs
0146     AllowMissingInputs = cms.bool(False),
0147     
0148 # specify hcal upgrade phase - 0, 1, 2  
0149     HcalPhase = cms.int32(0),
0150 
0151 # Read HBHE thresholds from Global Tag
0152     usePFThresholdsFromDB = cms.bool(False)
0153     
0154 )
0155 
0156 from Configuration.Eras.Modifier_run2_HE_2018_cff import run2_HE_2018
0157 run2_HE_2018.toModify(calotowermaker, 
0158                       HcalPhase = 1,
0159                       HESThreshold1 = 0.1,
0160                       HESThreshold  = 0.2,
0161                       HEDThreshold1 = 0.1,
0162                       HEDThreshold  = 0.2
0163 )
0164 
0165 # needed to handle inner/outer assignment
0166 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
0167 run2_HECollapse_2018.toModify(calotowermaker,
0168     HcalPhase = 0,
0169     HESThreshold1 = 0.8,
0170     HESThreshold  = 0.8,
0171     HEDThreshold1 = 0.8,
0172     HEDThreshold  = 0.8
0173 )
0174 
0175 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
0176 run3_HB.toModify(calotowermaker,
0177     HBThreshold1 = 0.1,
0178     HBThreshold2 = 0.2,
0179     HBThreshold = 0.3,
0180 )
0181 
0182 #--- Use DB conditions for HBHE thresholds for Run3 and phase2
0183 from Configuration.Eras.Modifier_hcalPfCutsFromDB_cff import hcalPfCutsFromDB
0184 hcalPfCutsFromDB.toModify( calotowermaker,
0185                            usePFThresholdsFromDB = True)