diff --git a/L1Trigger/L1TCalorimeter/python/caloStage1Params_cfi.py b/L1Trigger/L1TCalorimeter/python/caloStage1Params_cfi.py index 46b1ea33f2303..e2b5e0c984cd9 100644 --- a/L1Trigger/L1TCalorimeter/python/caloStage1Params_cfi.py +++ b/L1Trigger/L1TCalorimeter/python/caloStage1Params_cfi.py @@ -13,7 +13,7 @@ # EG caloStage1Params.egLsb = cms.double(1.) -caloStage1Params.egSeedThreshold = cms.double(1.) +caloStage1Params.egSeedThreshold = cms.double(0.) caloStage1Params.egMinPtJetIsolation = cms.int32(25) caloStage1Params.egMaxPtJetIsolation = cms.int32(63) @@ -38,17 +38,19 @@ caloStage1Params.tauMaxJetIsolationB = cms.double(100.) caloStage1Params.tauMaxJetIsolationA = cms.double(0.1) caloStage1Params.tauIsoLUTFile = cms.FileInPath("L1Trigger/L1TCalorimeter/data/tauIsoLUT_stage1_isolA0.10_isolB100.00_ch_switchToIsoBPt192.00_j8t8.txt") -caloStage1Params.tauCalibrationLUTFile = cms.FileInPath("L1Trigger/L1TCalorimeter/data/tauCalibrationLUT_stage1.txt") +## caloStage1Params.tauCalibrationLUTFile = cms.FileInPath("L1Trigger/L1TCalorimeter/data/tauCalibrationLUT_stage1.txt") +caloStage1Params.tauCalibrationLUTFile = cms.FileInPath("L1Trigger/L1TCalorimeter/data/tauL1Calib_LUT.txt") caloStage1Params.tauEtToHFRingEtLUTFile= cms.FileInPath("L1Trigger/L1TCalorimeter/data/tauHwEtToHFRingScale_LUT.txt") caloStage1Params.isoTauEtaMin = cms.int32(5) caloStage1Params.isoTauEtaMax = cms.int32(16) # jets caloStage1Params.jetLsb = cms.double(0.5) -caloStage1Params.jetSeedThreshold = cms.double(10.) +caloStage1Params.jetSeedThreshold = cms.double(5.) caloStage1Params.jetNeighbourThreshold = cms.double(0.) caloStage1Params.jetCalibrationType = cms.string("Stage1JEC") caloStage1Params.jetCalibrationParams = jetSF_8TeV_data -caloStage1Params.jetCalibrationLUTFile = cms.FileInPath("L1Trigger/L1TCalorimeter/data/jetCalibrationLUT_stage1_prelim.txt") +## caloStage1Params.jetCalibrationLUTFile = cms.FileInPath("L1Trigger/L1TCalorimeter/data/jetCalibrationLUT_stage1_prelim.txt") +caloStage1Params.jetCalibrationLUTFile = cms.FileInPath("L1Trigger/L1TCalorimeter/data/jetCalibrationLUT_symmetric_0is0.txt") # sums caloStage1Params.etSumLsb = cms.double(0.5) diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EGammaAlgorithmImpHW.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EGammaAlgorithmImpHW.cc index 7cf42ec0c1ebd..3cc6c78590ad2 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EGammaAlgorithmImpHW.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EGammaAlgorithmImpHW.cc @@ -147,6 +147,8 @@ unsigned l1t::Stage1Layer2EGammaAlgorithmImpHW::isoLutIndex(unsigned int egPt,un const unsigned int nbitsEG=6; // number of bits used for EG bins in LUT file (needed for left shift operation) // const unsigned int nbitsJet=9; // not used but here for info number of bits used for Jet bins in LUT file + //jetPt &= 511; // Take only the LSB 9 bits to match firmware. + if(jetPt > 511) jetPt = 511; unsigned int address= (jetPt << nbitsEG) + egPt; // std::cout << address << "\t## " << egPt << " " << jetPt << std::endl; return address; diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EtSumAlgorithmImpHW.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EtSumAlgorithmImpHW.cc index 0d2e875f41622..fda7fcf28fc6c 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EtSumAlgorithmImpHW.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2EtSumAlgorithmImpHW.cc @@ -98,11 +98,6 @@ void l1t::Stage1Layer2EtSumAlgorithmImpHW::processEvent(const std::vector= 0xfff) HTTqual = 1; + MHT &= 127; // limit MHT to 7 bits as the firmware does, but only after checking for overflow. + //MHT is replaced with MHT/HT + uint16_t MHToHT=MHToverHT(MHT,sumHT); + // std::cout << "MHT HT MHT/HT" << std::endl; + // std::cout << MHT << " " << sumHT << " " << MHToHT << std::endl; + //iPhiHt is replaced by the dPhi between two most energetic jets + iPhiHT = DiJetPhi(jets); + const ROOT::Math::LorentzVector > etLorentz(0,0,0,0); l1t::EtSum etMiss(*&etLorentz,EtSum::EtSumType::kMissingEt,MET&0xfff,0,iPhiET,METqual); diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2TauAlgorithmImpHW.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2TauAlgorithmImpHW.cc index d2422b71a8f17..148d135b14272 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2TauAlgorithmImpHW.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2TauAlgorithmImpHW.cc @@ -131,12 +131,13 @@ void l1t::Stage1Layer2TauAlgorithmImpHW::processEvent(const std::vector tauMaxPtTauVeto) { int jetEt=AssociatedJetPt(region->hwEta(), region->hwPhi(),unCorrJets); if (jetEt>0){ - // unsigned int MAX_LUT_ADDRESS = params_->tauIsolationLUT()->maxSize()-1; + unsigned int MAX_LUT_ADDRESS = params_->tauIsolationLUT()->maxSize()-1; // unsigned int lutAddress = isoLutIndex(tauEt,jetEt); unsigned lutAddress = isoTauLut->lutAddress(tauEt,jetEt); if (tauEt >0){ - // if (lutAddress > MAX_LUT_ADDRESS) lutAddress = MAX_LUT_ADDRESS; - isoFlag= isoTauLut->lutPayload(lutAddress); + if (lutAddress > MAX_LUT_ADDRESS) lutAddress = MAX_LUT_ADDRESS; + isoFlag = params_->tauIsolationLUT()->data(lutAddress); + // isoFlag= isoTauLut->lutPayload(lutAddress); // if (isoFlag != params_->tauIsolationLUT()->data(lutAddress)) std::cout << "XXX -- isoFlag: " << isoFlag << "\tisoFlag2: " << params_->tauIsolationLUT()->data(lutAddress) << std::endl; } diff --git a/L1Trigger/L1TCalorimeter/src/legacyGtHelper.cc b/L1Trigger/L1TCalorimeter/src/legacyGtHelper.cc index 151ea669ff316..c722ca70d827a 100644 --- a/L1Trigger/L1TCalorimeter/src/legacyGtHelper.cc +++ b/L1Trigger/L1TCalorimeter/src/legacyGtHelper.cc @@ -19,6 +19,10 @@ namespace l1t { if(pt > ((1<<10) -1) ) pt = ((1<<10) -1); unsigned int eta = itJet->hwEta(); + if (eta>10){ // LUT is symmetric in eta. For eta>10 map to corresponding eta<10 bin + int offset=2*(eta-10)-1; + eta=eta-offset; + } unsigned int lutAddress = (eta<<10)+pt; unsigned int rank = params->jetCalibrationLUT()->data(lutAddress); diff --git a/L1Trigger/L1TCalorimeter/test/SimL1Emulator_Stage1.py b/L1Trigger/L1TCalorimeter/test/SimL1Emulator_Stage1.py index 8f1205e9e8bc8..07d40da40af5b 100644 --- a/L1Trigger/L1TCalorimeter/test/SimL1Emulator_Stage1.py +++ b/L1Trigger/L1TCalorimeter/test/SimL1Emulator_Stage1.py @@ -4,7 +4,8 @@ process.load('Configuration.StandardSequences.Services_cff') process.load('FWCore.MessageService.MessageLogger_cfi') -process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff') +## process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff') process.load('Configuration.EventContent.EventContent_cff') process.load('Configuration.Geometry.GeometryIdeal_cff') @@ -12,13 +13,13 @@ process.load('FWCore.MessageService.MessageLogger_cfi') process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(100) + input = cms.untracked.int32(-200) ) # Input source process.source = cms.Source("PoolSource", secondaryFileNames = cms.untracked.vstring(), - fileNames = cms.untracked.vstring("root://xrootd.unl.edu//store/mc/Fall13dr/Neutrino_Pt-2to20_gun/GEN-SIM-RAW/tsg_PU40bx25_POSTLS162_V2-v1/00005/02B79593-F47F-E311-8FF6-003048FFD796.root") + fileNames = cms.untracked.vstring("/store/relval/CMSSW_7_5_0_pre4/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_MCRUN2_75_V1-v1/00000/0CD12657-DAF7-E411-91F2-002618943910.root") ) @@ -40,9 +41,10 @@ process.options = cms.untracked.PSet() # Other statements -from Configuration.AlCa.GlobalTag import GlobalTag -process.GlobalTag.connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG') -process.GlobalTag.globaltag = cms.string('POSTLS162_V2::All') +## from Configuration.AlCa.GlobalTag import GlobalTag +## process.GlobalTag.connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG') +from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +process.GlobalTag.globaltag = cms.string('MCRUN2_75_V1') process.load('L1Trigger.L1TCalorimeter.caloConfigStage1PP_cfi') @@ -56,6 +58,32 @@ process.simGtDigis.TechnicalTriggersInputTags = cms.VInputTag( ) +### Get new RCT calibrations from CondDB until new GlobalTag is ready +### Goes with tauL1Calib_LUT.txt +### Need new GCT jet calibrations to go with it +#from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup +#process.rctSFDB = cms.ESSource("PoolDBESSource", +# CondDBSetup, +# connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'), +# DumpStat=cms.untracked.bool(True), +# toGet = cms.VPSet( +# cms.PSet( +# record = cms.string('L1RCTParametersRcd'), +# tag = cms.string('L1RCTParametersRcd_L1TDevelCollisions_ExtendedScaleFactorsV4') +# ) +# ) +#) +## process.prefer("caloParmsDB") +#process.es_prefer_rctSFDB = cms.ESPrefer( "PoolDBESSource", "rctSFDB" ) + +## load the CaloStage1 params +## process.GlobalTag.toGet = cms.VPSet( +## cms.PSet(record = cms.string("L1TCaloParamsRcd"), +## tag = cms.string("L1TCaloParams_CRAFT09_hlt"), +## connect = cms.string("sqlite:l1config.db") +## ) +## ) + process.p1 = cms.Path( process.L1TCaloStage1_PPFromRaw +process.simGtDigis