From bb4b1076c345df886c50310ff87914b279c9ed23 Mon Sep 17 00:00:00 2001 From: "R. Alex Barbieri" Date: Tue, 8 Apr 2014 15:39:51 -0400 Subject: [PATCH 1/5] fixes to build in 71X --- src/L1AnalysisDTTF.cc | 7 ++++--- src/L1AnalysisGT.cc | 3 ++- src/L1NtupleProducer.cc | 33 ++++++++++++++++----------------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/L1AnalysisDTTF.cc b/src/L1AnalysisDTTF.cc index 4f8b441..12d560b 100644 --- a/src/L1AnalysisDTTF.cc +++ b/src/L1AnalysisDTTF.cc @@ -1,4 +1,5 @@ #include "L1TriggerDPG/L1Ntuples/interface/L1AnalysisDTTF.h" +#include "math.h" L1Analysis::L1AnalysisDTTF::L1AnalysisDTTF() @@ -14,7 +15,7 @@ L1Analysis::L1AnalysisDTTF::~L1AnalysisDTTF() void L1Analysis::L1AnalysisDTTF::SetDTPH(const edm::Handle L1MuDTChambPhContainer, unsigned int maxDTPH) { - L1MuDTChambPhContainer::Phi_Container *PhContainer = L1MuDTChambPhContainer->getContainer(); + const L1MuDTChambPhContainer::Phi_Container *PhContainer = L1MuDTChambPhContainer->getContainer(); dttf_.phSize = PhContainer->size(); int iphtr=0; @@ -49,7 +50,7 @@ void L1Analysis::L1AnalysisDTTF::SetDTPH(const edm::Handle L1MuDTChambThContainer, unsigned int maxDTTH) { - L1MuDTChambThContainer::The_Container* ThContainer = L1MuDTChambThContainer->getContainer(); + const L1MuDTChambThContainer::The_Container* ThContainer = L1MuDTChambThContainer->getContainer(); int ithtr=0; dttf_.thSize = ThContainer->size(); @@ -88,7 +89,7 @@ void L1Analysis::L1AnalysisDTTF::SetDTTH(const edm::Handle L1MuDTTrackContainer, unsigned int maxDTTR) { double pig=acos(-1); - L1MuDTTrackContainer::TrackContainer *tr = L1MuDTTrackContainer->getContainer(); + const L1MuDTTrackContainer::TrackContainer *tr = L1MuDTTrackContainer->getContainer(); int idttr = 0 ; dttf_.trSize = tr->size(); for ( L1MuDTTrackContainer::TrackContainer::const_iterator i diff --git a/src/L1AnalysisGT.cc b/src/L1AnalysisGT.cc index d817a77..2c56fc5 100644 --- a/src/L1AnalysisGT.cc +++ b/src/L1AnalysisGT.cc @@ -1,4 +1,5 @@ #include "L1TriggerDPG/L1Ntuples/interface/L1AnalysisGT.h" +#include "stdint.h" L1Analysis::L1AnalysisGT::L1AnalysisGT() @@ -21,7 +22,7 @@ void L1Analysis::L1AnalysisGT::SetEvm(const L1GlobalTriggerEvmReadoutRecord* gte //orbitn = tcsw.orbitNr(); gt_.partrig_tcs = tcsw.partTrigNr(); L1GtfeExtWord myGtfeExtWord = gtevmrr->gtfeWord(); - boost::uint64_t gpsTime = myGtfeExtWord.gpsTime(); + uint64_t gpsTime = myGtfeExtWord.gpsTime(); gt_.gpsTimelo = gpsTime&0xffffffff; gt_.gpsTimehi = (gpsTime>>32)&0xffffffff; diff --git a/src/L1NtupleProducer.cc b/src/L1NtupleProducer.cc index 0e06ef3..474137c 100644 --- a/src/L1NtupleProducer.cc +++ b/src/L1NtupleProducer.cc @@ -65,7 +65,6 @@ #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h" - //---------------- // Constructor -- //---------------- @@ -204,18 +203,18 @@ void L1NtupleProducer::endJob() { void L1NtupleProducer::analyze(const edm::Event& e, const edm::EventSetup& es) { - //add if "none" .. - analyzeEvent(e); + //add if "none" .. + analyzeEvent(e); analyzeGenerator(e); analyzeSimulation(e); - analyzeGMT(e); - analyzeGT(e); - analyzeGCT(e); - analyzeRCT(e); - analyzeDTTF(e); + analyzeGMT(e); + analyzeGT(e); + analyzeGCT(e); + analyzeRCT(e); + analyzeDTTF(e); analyzeCSCTF(e,es); pL1calotp->Reset(); - analyzeECAL(e, es); + analyzeECAL(e, es); analyzeHCAL(e, es); tree_->Fill(); @@ -482,15 +481,15 @@ void L1NtupleProducer::analyzeCSCTF(const edm::Event& e, const edm::EventSetup& } // otherwise use the O2O mechanism - else if (es.get< L1MuCSCPtLutRcd > ().cacheIdentifier() != m_csctfptlutCacheID ) - { - edm::LogInfo("L1NtupleProducer") << " Initializing the CSCTF ptLUTs via O2O mechanism..."; - // initializing the ptLUT from O2O - csctfPtLUTs_ = new CSCTFPtLUT(es); + // else if (es.get< L1MuCSCPtLutRcd > ().cacheIdentifier() != m_csctfptlutCacheID ) + // { + // edm::LogInfo("L1NtupleProducer") << " Initializing the CSCTF ptLUTs via O2O mechanism..."; + // // initializing the ptLUT from O2O + // csctfPtLUTs_ = new CSCTFPtLUT(es); - m_csctfptlutCacheID = es.get< L1MuCSCPtLutRcd > ().cacheIdentifier(); - edm::LogInfo("L1NtupleProducer") << " Changed the cache ID for CSCTF ptLUTs..."; - } + // m_csctfptlutCacheID = es.get< L1MuCSCPtLutRcd > ().cacheIdentifier(); + // edm::LogInfo("L1NtupleProducer") << " Changed the cache ID for CSCTF ptLUTs..."; + // } if (csctfPtLUTs_ == NULL) edm::LogWarning("L1NtupleProducer")<<" No valid CSCTFPtLUT initialized!"; From 2f5da9fc71fba79e1df495281d919fd451206a8e Mon Sep 17 00:00:00 2001 From: "R. Alex Barbieri" Date: Tue, 8 Apr 2014 15:40:15 -0400 Subject: [PATCH 2/5] python cfi for Stage1Layer2 tests --- python/l1NtupleProducer_Stage1Layer2_cfi.py | 60 +++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 python/l1NtupleProducer_Stage1Layer2_cfi.py diff --git a/python/l1NtupleProducer_Stage1Layer2_cfi.py b/python/l1NtupleProducer_Stage1Layer2_cfi.py new file mode 100644 index 0000000..2d31f64 --- /dev/null +++ b/python/l1NtupleProducer_Stage1Layer2_cfi.py @@ -0,0 +1,60 @@ +import FWCore.ParameterSet.Config as cms + +l1NtupleProducer = cms.EDAnalyzer("L1NtupleProducer", + verbose = cms.untracked.bool(False), + physVal = cms.bool(True), + + generatorSource = cms.InputTag("none"), + simulationSource = cms.InputTag("none"), + hltSource = cms.InputTag("none"), + gmtSource = cms.InputTag("none"), + gtEvmSource = cms.InputTag("none"), + gtSource = cms.InputTag("simGtDigis"), + gctCentralJetsSource = cms.InputTag("Layer2gctFormat","cenJets"), + gctNonIsoEmSource = cms.InputTag("Layer2gctFormat","nonIsoEm"), + gctForwardJetsSource = cms.InputTag("Layer2gctFormat","forJets"), + gctIsoEmSource = cms.InputTag("Layer2gctFormat","isoEm"), + gctEnergySumsSource = cms.InputTag("Layer2gctFormat",""), + gctTauJetsSource = cms.InputTag("Layer2gctFormat","tauJets"), + rctSource = cms.InputTag("Layer2gctFormat"), + dttfSource = cms.InputTag("none"), + ecalSource = cms.InputTag("none"), + hcalSource = cms.InputTag("none"), + csctfTrkSource = cms.InputTag("none"), + csctfLCTSource = cms.InputTag("none"), + csctfStatusSource = cms.InputTag("none"), + csctfDTStubsSource = cms.InputTag("none"), + # if initCSCTFPtLutsPSet is True, then the CSCTF ptLUTs + # get initialized from the PSet, csctfPtLutsPSet + # useful for experts to overwrite the csctf pt LUTs + initCSCTFPtLutsPSet = cms.bool(False), + csctfPtLutsPSet = cms.PSet(LowQualityFlag = cms.untracked.uint32(4), + ReadPtLUT = cms.bool(False), + isBinary = cms.bool(False), + PtMethod = cms.untracked.uint32(32) + ), + + maxRPC = cms.uint32(12), + maxDTBX = cms.uint32(12), + maxCSC = cms.uint32(12), + maxGMT = cms.uint32(12), + maxGT = cms.uint32(12), + maxRCTREG = cms.uint32(400), + maxDTPH = cms.uint32(50), + maxDTTH = cms.uint32(50), + maxDTTR = cms.uint32(50), + maxGEN = cms.uint32(20), + maxCSCTFTR = cms.uint32(50), + maxCSCTFLCTSTR = cms.uint32(4), + maxCSCTFLCTS = cms.uint32(360), + maxCSCTFSPS = cms.uint32(12), + + puMCFile = cms.untracked.string(""), + puDataFile = cms.untracked.string(""), + puMCHist = cms.untracked.string(""), + puDataHist = cms.untracked.string(""), + + useAvgVtx = cms.untracked.bool(True), + maxAllowedWeight = cms.untracked.double(-1) +) + From fb21721f7aadf4dc40ad12ecbcbac92cfff44ab4 Mon Sep 17 00:00:00 2001 From: "R. Alex Barbieri" Date: Fri, 30 May 2014 15:23:30 +0200 Subject: [PATCH 3/5] renaming to match L1 emulator --- python/l1NtupleProducer_Stage1Layer2_cfi.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/python/l1NtupleProducer_Stage1Layer2_cfi.py b/python/l1NtupleProducer_Stage1Layer2_cfi.py index 2d31f64..b5e4a44 100644 --- a/python/l1NtupleProducer_Stage1Layer2_cfi.py +++ b/python/l1NtupleProducer_Stage1Layer2_cfi.py @@ -10,13 +10,14 @@ gmtSource = cms.InputTag("none"), gtEvmSource = cms.InputTag("none"), gtSource = cms.InputTag("simGtDigis"), - gctCentralJetsSource = cms.InputTag("Layer2gctFormat","cenJets"), - gctNonIsoEmSource = cms.InputTag("Layer2gctFormat","nonIsoEm"), - gctForwardJetsSource = cms.InputTag("Layer2gctFormat","forJets"), - gctIsoEmSource = cms.InputTag("Layer2gctFormat","isoEm"), - gctEnergySumsSource = cms.InputTag("Layer2gctFormat",""), - gctTauJetsSource = cms.InputTag("Layer2gctFormat","tauJets"), - rctSource = cms.InputTag("Layer2gctFormat"), + #gtSource = cms.InputTag("none"), + gctCentralJetsSource = cms.InputTag("simCaloLegacyFormatDigis","cenJets"), + gctNonIsoEmSource = cms.InputTag("simCaloLegacyFormatDigis","nonIsoEm"), + gctForwardJetsSource = cms.InputTag("simCaloLegacyFormatDigis","forJets"), + gctIsoEmSource = cms.InputTag("simCaloLegacyFormatDigis","isoEm"), + gctEnergySumsSource = cms.InputTag("simCaloLegacyFormatDigis",""), + gctTauJetsSource = cms.InputTag("simCaloLegacyFormatDigis","tauJets"), + rctSource = cms.InputTag("simCaloLegacyFormatDigis"), dttfSource = cms.InputTag("none"), ecalSource = cms.InputTag("none"), hcalSource = cms.InputTag("none"), From 7c87788d6dec7e16e77c73854fe2834fa356a0aa Mon Sep 17 00:00:00 2001 From: "R. Alex Barbieri" Date: Fri, 30 May 2014 15:25:52 +0200 Subject: [PATCH 4/5] add gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1577fec --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pyc +__init__.py From ac52aafdc34cdbc04fad4b5928176b73cca3718a Mon Sep 17 00:00:00 2001 From: "R. Alex Barbieri" Date: Thu, 12 Jun 2014 13:08:04 +0200 Subject: [PATCH 5/5] more name changes --- python/l1NtupleProducer_Stage1Layer2_cfi.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/l1NtupleProducer_Stage1Layer2_cfi.py b/python/l1NtupleProducer_Stage1Layer2_cfi.py index b5e4a44..ed32af6 100644 --- a/python/l1NtupleProducer_Stage1Layer2_cfi.py +++ b/python/l1NtupleProducer_Stage1Layer2_cfi.py @@ -11,13 +11,13 @@ gtEvmSource = cms.InputTag("none"), gtSource = cms.InputTag("simGtDigis"), #gtSource = cms.InputTag("none"), - gctCentralJetsSource = cms.InputTag("simCaloLegacyFormatDigis","cenJets"), - gctNonIsoEmSource = cms.InputTag("simCaloLegacyFormatDigis","nonIsoEm"), - gctForwardJetsSource = cms.InputTag("simCaloLegacyFormatDigis","forJets"), - gctIsoEmSource = cms.InputTag("simCaloLegacyFormatDigis","isoEm"), - gctEnergySumsSource = cms.InputTag("simCaloLegacyFormatDigis",""), - gctTauJetsSource = cms.InputTag("simCaloLegacyFormatDigis","tauJets"), - rctSource = cms.InputTag("simCaloLegacyFormatDigis"), + gctCentralJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","cenJets"), + gctNonIsoEmSource = cms.InputTag("caloStage1LegacyFormatDigis","nonIsoEm"), + gctForwardJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","forJets"), + gctIsoEmSource = cms.InputTag("caloStage1LegacyFormatDigis","isoEm"), + gctEnergySumsSource = cms.InputTag("caloStage1LegacyFormatDigis",""), + gctTauJetsSource = cms.InputTag("caloStage1LegacyFormatDigis","tauJets"), + rctSource = cms.InputTag("caloStage1LegacyFormatDigis"), dttfSource = cms.InputTag("none"), ecalSource = cms.InputTag("none"), hcalSource = cms.InputTag("none"),