Skip to content

Commit

Permalink
Move the HCALGPUAnalyzer to RecoLocalCalo/HcalRecProducers/ (#572)
Browse files Browse the repository at this point in the history
Update the configuration to
  - read the input data from root files, that are available also offline
  - automatically pick up the global tag for the current release
  • Loading branch information
mariadalfonso authored and fwyzard committed Nov 16, 2020
1 parent 4b0cb83 commit aef101f
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 117 deletions.
11 changes: 0 additions & 11 deletions ComparisonPlots/HCALGPUAnalyzer/plugins/BuildFile.xml

This file was deleted.

27 changes: 0 additions & 27 deletions ComparisonPlots/HCALGPUAnalyzer/python/ConfFile_fig.py

This file was deleted.

51 changes: 0 additions & 51 deletions ComparisonPlots/HCALGPUAnalyzer/python/sourceFromRaw_cff.py

This file was deleted.

11 changes: 10 additions & 1 deletion RecoLocalCalo/HcalRecProducers/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
<use name="boost"/>
<use name="cuda"/>
<use name="CUDADataFormats/Common" />
<use name="CUDADataFormats/CaloCommon"/>
<use name="CUDADataFormats/Common"/>
<use name="CUDADataFormats/HcalDigi"/>
<use name="CUDADataFormats/HcalRecHitSoA"/>
<use name="CalibCalorimetry/HcalAlgos"/>
<use name="CalibFormats/HcalObjects"/>
<use name="CommonTools/UtilAlgos"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/HcalDetId"/>
<use name="DataFormats/HcalRecHit"/>
<use name="FWCore/Framework"/>
<use name="FWCore/ParameterSet"/>
<use name="FWCore/PluginManager"/>
<use name="FWCore/ServiceRegistry"/>
<use name="Geometry/CaloGeometry"/>
<use name="Geometry/HcalCommonData"/>
<use name="Geometry/Records"/>
<use name="HeterogeneousCore/CUDACore"/>
<use name="HeterogeneousCore/CUDAUtilities"/>
<use name="RecoLocalCalo/HcalRecAlgos"/>
<use name="SimCalorimetry/CaloSimAlgos"/>
<use name="SimCalorimetry/HcalSimAlgos"/>
<flags EDM_PLUGIN="1"/>
28 changes: 28 additions & 0 deletions RecoLocalCalo/HcalRecProducers/test/make_GPUvsCPU_HCAL_plots.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import FWCore.ParameterSet.Config as cms

process = cms.Process("PLOT")

process.load("FWCore.MessageService.MessageLogger_cfi")
process.options = cms.untracked.PSet(
wantSummary = cms.untracked.bool(False)
)

process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_hlt_relval', '')

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.MessageLogger.cerr.FwkReport.reportEvery = 500

process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring('file:GPUvsCPU_HCAL_rechits.root')
)

process.comparisonPlots = cms.EDAnalyzer('HCALGPUAnalyzer')

process.TFileService = cms.Service('TFileService',
fileName = cms.string('GPUvsCPU_HCAL_plots.root')
)

process.path = cms.Path(process.comparisonPlots)
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,26 @@
process.load('HeterogeneousCore.CUDAServices.CUDAService_cfi')

process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.GlobalTag.globaltag = '101X_dataRun2_HLT_frozen_v10'
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_hlt_relval', '')

process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1000)
)

### load data using the DAQ source (Run2 data)
import sys, os, inspect
sys.path.append(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))))
process.load('sourceFromRaw_cff')
#-----------------------------------------
# INPUT
#-----------------------------------------

process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring('/store/data/Run2018D/EphemeralHLTPhysics1/RAW/v1/000/323/775/00000/A27DFA33-8FCB-BE42-A2D2-1A396EEE2B6E.root')
)

process.hltGetRaw = cms.EDAnalyzer( "HLTGetRaw",
RawDataCollection = cms.InputTag( "rawDataCollector" )
)

process.input = cms.Path( process.hltGetRaw )

#-----------------------------------------
# CMSSW/Hcal non-DQM Related Module import
Expand All @@ -47,26 +57,26 @@
#-----------------------------------------

## the one below is taken directly from the DB, regard M0
#process.hbheprereco.algorithm.__setattr__('correctForPhaseContainment', cms.bool(False))
#process.hbheprereco.algorithm.correctForPhaseContainment = cms.bool(False)

## do always 8 pulse
process.hbheprereco.algorithm.__setattr__('chiSqSwitch', cms.double(-1))
process.hbheprereco.algorithm.chiSqSwitch = cms.double(-1)

## to match hard coded setting (will be fixed on CPU)
process.hbheprereco.algorithm.__setattr__('nMaxItersMin',cms.int32(50))
process.hbheprereco.algorithm.nMaxItersMin = cms.int32(50)

#-----------------------------------------
# Final Custmization for Run3
#-----------------------------------------

# we will not run arrival Time at HLT
process.hbheprereco.algorithm.__setattr__('calculateArrivalTime',cms.bool(False))
process.hbheprereco.algorithm.calculateArrivalTime = cms.bool(False)

## we do not need this
process.hbheprereco.algorithm.__setattr__('applyLegacyHBMCorrection', cms.bool(False))
process.hbheprereco.algorithm.applyLegacyHBMCorrection = cms.bool(False)

# we only runMahi at HLT
process.hbheprereco.algorithm.__setattr__('useM3',cms.bool(False))
# we only run Mahi at HLT
process.hbheprereco.algorithm.useM3 = cms.bool(False)

# we will not have the HPD noise flags in Run3, as will be all siPM
process.hbheprereco.setLegacyFlagsQIE8 = cms.bool(False)
Expand All @@ -75,31 +85,24 @@
process.hbheprereco.setPulseShapeFlagsQIE8 = cms.bool(False)

# for testing M0 only
##process.hbheprereco.algorithm.__setattr__('useMahi',cms.bool(False))
##process.hbheprereco.algorithm.useMahi = cms.bool(False)

#-----------------------------------------
# OUTPUT
#-----------------------------------------

process.out = cms.OutputModule(
"PoolOutputModule",
### fileName = cms.untracked.string("test_bothCPUGPU_DEFAULT.root")
fileName = cms.untracked.string("test_bothCPUGPU_NEW.root")
)

#process.out = cms.OutputModule("AsciiOutputModule",
# outputCommands = cms.untracked.vstring(
# 'keep *_*_*_*',
# ),
# verbosity = cms.untracked.uint32(0)
#)

process.hltGetRaw = cms.EDAnalyzer( "HLTGetRaw",
RawDataCollection = cms.InputTag( "rawDataCollector" )
process.out = cms.OutputModule("PoolOutputModule",
fileName = cms.untracked.string("GPUvsCPU_HCAL_rechits.root")
)

process.input = cms.Path( process.hltGetRaw )

#---------------

process.finalize = cms.EndPath(process.out)

Expand Down Expand Up @@ -147,7 +150,3 @@
# report CUDAService messages
process.MessageLogger.cerr.FwkReport.reportEvery = 100
process.MessageLogger.categories.append("CUDAService")

#dumpFile = open("dump.py", "w")
#dumpFile.write(process.dumpPython())
#dumpFile.close()

0 comments on commit aef101f

Please sign in to comment.