-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45045 from bsunanda/Run3-alca247YX
Run3-alca247YX Add examples for the IsoTrack calibration in Calibration/HcalCalibAlgos/macros/jobs (restore the material from #45010)
- Loading branch information
Showing
8 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
Calibration/HcalCalibAlgos/macros/jobs/CrabConfig_Commissioning.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from CRABClient.UserUtilities import config | ||
config = config() | ||
|
||
config.General.requestName = 'IsoTrk_2024C_Comissioning_v2' | ||
config.General.transferLogs = True | ||
config.General.transferOutputs = True | ||
config.General.workArea = 'CRAB3_IsoTrkCalib_Comissioning_2024C_v2' | ||
|
||
config.JobType.maxMemoryMB = 4000 | ||
config.JobType.pluginName = 'Analysis' | ||
config.JobType.psetName = 'isoTrackAlCaCommissioning_cfg.py' | ||
#config.JobType.psetName = 'isoTrackAlCaCounter_cfg.py' | ||
config.JobType.allowUndistributedCMSSW = True | ||
#config.Data.userInputFiles = open('input_files_Mahi22C.txt').readlines() | ||
config.Data.inputDataset = '/Commissioning/Run2024C-HcalCalIsoTrk-PromptReco-v1/ALCARECO' | ||
config.Data.splitting = 'FileBased' | ||
config.Data.unitsPerJob = 1 | ||
#config.Data.totalUnits = 5 | ||
config.Data.publication = False | ||
#config.Data.ignoreLocality = False | ||
#config.Data.outputDatasetTag = 'collision13.6TeV' | ||
#config.Data.runRange = '367080-367764' | ||
config.Data.outLFNDirBase = '/store/group/dpg_hcal/comm_hcal/suman/13p6TeV/2024EraB/' | ||
#config.Data.lumiMask ='https://cms-service-dqmdc.web.cern.ch/CAF/certification/Collisions23/Cert_Collisions2023_eraC_367095_368823_Golden.json' | ||
|
||
config.Site.storageSite = 'T2_CH_CERN' | ||
#config.Site.whitelist = ['T2_CH_CERN'] |
26 changes: 26 additions & 0 deletions
26
Calibration/HcalCalibAlgos/macros/jobs/CrabConfig_EGamm_EraC_2024_EGamm0.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import CRABClient | ||
from CRABClient.UserUtilities import config | ||
config = config() | ||
|
||
config.General.requestName = 'EGamma0_2024_EraC_v1' | ||
#config.General.transferOutputs = True | ||
config.General.transferLogs = False | ||
config.JobType.maxMemoryMB = 2500 | ||
config.JobType.pluginName = 'Analysis' | ||
config.JobType.psetName = 'isoTrackNewAlCaAnalysis_cfg.py' #isoTrackAlCaAnalysis_cfg.py' | ||
|
||
#config.Data.inputDataset = '/MinimumBias/Run2017D-21Sep2017-v1/RECO' | ||
#config.Data.inputDataset = '/MinimumBias0/Commissioning2021-HcalCalIsoTrkFilter-PromptReco-v1/ALCARECO' | ||
config.Data.inputDataset = '/EGamma0/Run2024C-HcalCalIsoTrkProducerFilter-PromptReco-v1/ALCARECO' | ||
config.Data.splitting = 'FileBased' | ||
config.Data.unitsPerJob = 5 | ||
#config.Data.totalUnits = -1 | ||
config.Data.publication = False | ||
config.Data.outputDatasetTag = config.General.requestName | ||
config.Data.partialDataset = True | ||
#config.Data.runRange = '379415-379729' | ||
#https://cms-service-dqmdc.web.cern.ch/CAF/certification/Collisions22/Cert_Collisions2022_355100_356175_Muon.json' | ||
#config.Data.lumiMask = 'https://cms-service-dqmdc.web.cern.ch/CAF/certification/Collisions24/Cert_Collisions2024_378981_379075_Golden.json' | ||
#https://cms-service-dqmdc.web.cern.ch/CAF/certification/Collisions23/Cert_Collisions2023_eraB_366403_367079_Golden.json' | ||
config.Site.storageSite = 'T2_CH_CERN' | ||
config.Data.outLFNDirBase = '/store/group/dpg_hcal/comm_hcal/Jyoti/13p6TeV/2024/EraC/EGamma0_v1/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Steps to be taken to submit batch jobs which create the flat ROOT Trees. | ||
1. Modify one of the python files: | ||
- isoTrackNewAlCaAnalysis_cfg.py for AlCaReco files from EGamma data stream | ||
- isoTrackAlCaCommissioning_cfg.py for AlCaReco files from Commissioning stream | ||
2. Use crab to submit the jobs: | ||
- crab submit -c CrabConfig_EGamm_EraC_2024_EGamm0.py for the EGamma stream | ||
- crab submit -c CrabConfig_Commissioning.py for the Commissioning stream | ||
This will create a whole set of ROOT output files with isolated track candidates | ||
of momentum between 10 and 100 Gev | ||
3. May strip off events with track candidates of momentum between 40 and 60 GeV | ||
./CalibMain.exe 3 <InputFile> <HistogramFile> <Flag> <DirectoryName> <Prefix> | ||
<PUcorr> <Truncate> <Nmax> <pmin> <pmax> <debug> | ||
|
||
Create the executable CalibMain.exe using the script installCalib.csh | ||
|
||
Name of the ROOT files to be used as input can be kept in a file (example d24CE.txt) | ||
|
||
Some sample command lines for running calibration jobs (which creates correction files) | ||
and monitoring jobs (which creates a set of histograms to be used for making | ||
histograms to be used in the next step) are kept in *jobs.txt*. | ||
|
||
Note <DirectoryName> for EGamma stream (hcalIsoTrackAnalyzer) is different from | ||
that for Commissioning stream (hcalIsoTrkAnalyzer) | ||
|
||
Fit the histograms and make the plots: | ||
root [1] .L CalibFitPlots.C+g | ||
root [2] FitHistExtended("24CEM1.root","24CFit.root","24CE1",54,3,true,true,3,false) | ||
root [3] PlotHist("24CFit.root","24CE1","24C E#gamma Depth Dependent",1,11,0,13.6,true,false,2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/eos/cms/store/group/dpg_hcal/comm_hcal/suman/13p6TeV/2024EraC/Commissioning/Commissioning_IsoTrk_2024C_4060_v1.root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/eos/cms/store/group/dpg_hcal/comm_hcal/Jyoti/13p6TeV/2024/EraC/EGamma0_v3_UnCorr/EraC_40to60_v2.root | ||
/eos/cms/store/group/dpg_hcal/comm_hcal/Jyoti/13p6TeV/2024/EraC/EGamma0_v3_UnCorr/EraC_40to60_v3.root | ||
/eos/cms/store/group/dpg_hcal/comm_hcal/Jyoti/13p6TeV/2024/EraC/EGamma0_v3_UnCorr/EraC_40to60_v5.root | ||
/eos/cms/store/group/dpg_hcal/comm_hcal/Jyoti/13p6TeV/2024/EraC/EGamma0_v3_UnCorr/EraC_40to60_v7.root |
50 changes: 50 additions & 0 deletions
50
Calibration/HcalCalibAlgos/macros/jobs/isoTrackAlCaCommissioning_cfg.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
from Configuration.Eras.Era_Run3_cff import Run3 | ||
process = cms.Process("ANALYSIS",Run3) | ||
|
||
process.load("FWCore.MessageService.MessageLogger_cfi") | ||
process.load('Configuration.StandardSequences.Services_cff') | ||
process.load("Configuration.StandardSequences.GeometryRecoDB_cff") | ||
process.load("Configuration.StandardSequences.MagneticField_cff") | ||
process.load("RecoLocalCalo.EcalRecAlgos.EcalSeverityLevelESProducer_cfi") | ||
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') | ||
|
||
from Configuration.AlCa.GlobalTag import GlobalTag | ||
|
||
#process.GlobalTag=GlobalTag(process.GlobalTag,'130X_dataRun3_Prompt_v3','') | ||
process.GlobalTag=GlobalTag(process.GlobalTag,'140X_dataRun3_Prompt_v2' ,'') | ||
|
||
process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1000) | ||
|
||
if 'MessageLogger' in process.__dict__: | ||
process.MessageLogger.HcalIsoTrackX=dict() | ||
process.MessageLogger.HcalIsoTrack=dict() | ||
|
||
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) ) | ||
|
||
process.load('RecoLocalCalo.CaloTowersCreator.calotowermaker_cfi') | ||
process.towerMakerAll = process.calotowermaker.clone() | ||
process.towerMakerAll.hbheInput = "hbhereco" | ||
process.towerMakerAll.hoInput = "none" | ||
process.towerMakerAll.hfInput = "none" | ||
process.towerMakerAll.ecalInputs = [cms.InputTag("ecalRecHit","EcalRecHitsEB"), cms.InputTag("ecalRecHit","EcalRecHitsEE")] | ||
process.towerMakerAll.AllowMissingInputs = True | ||
|
||
process.load('Calibration.HcalCalibAlgos.hcalIsoTrkAnalyzer_cff') | ||
process.hcalIsoTrkAnalyzer.triggers = [] | ||
process.hcalIsoTrkAnalyzer.useRaw = 0 # 1 for Raw | ||
process.hcalIsoTrkAnalyzer.ignoreTriggers = True | ||
|
||
process.source = cms.Source("PoolSource", | ||
fileNames = cms.untracked.vstring("/store/data/Run2024B/Commissioning/ALCARECO/HcalCalIsoTrk-PromptReco-v1/000/379/075/00000/2a67bdd1-76ce-4be0-bf72-41584e8f23a7.root")) | ||
|
||
|
||
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) | ||
|
||
process.TFileService = cms.Service("TFileService", | ||
fileName = cms.string('output.root') | ||
) | ||
|
||
process.p = cms.Path(process.hcalIsoTrkAnalyzer) | ||
|
42 changes: 42 additions & 0 deletions
42
Calibration/HcalCalibAlgos/macros/jobs/isoTrackNewAlCaAnalysis_cfg.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
#from Configuration.Eras.Era_Run2_2018_cff import Run2_2018 | ||
#process = cms.Process("ANALYSIS",Run2_2018) | ||
from Configuration.Eras.Era_Run3_cff import Run3 | ||
process = cms.Process("ANALYSIS",Run3) | ||
|
||
|
||
process.load("FWCore.MessageService.MessageLogger_cfi") | ||
process.load('Configuration.StandardSequences.Services_cff') | ||
process.load("Configuration.StandardSequences.GeometryRecoDB_cff") | ||
process.load("Configuration.StandardSequences.MagneticField_cff") | ||
process.load("RecoLocalCalo.EcalRecAlgos.EcalSeverityLevelESProducer_cfi") | ||
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') | ||
from Configuration.AlCa.autoCond import autoCond | ||
#process.GlobalTag.globaltag=autoCond['124X_dataRun3_v10'] | ||
process.GlobalTag.globaltag='140X_dataRun3_Prompt_v2' | ||
process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1000) | ||
if 'MessageLogger' in process.__dict__: | ||
process.MessageLogger.HcalIsoTrackX=dict() | ||
process.MessageLogger.HcalIsoTrack=dict() | ||
|
||
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) ) | ||
|
||
process.load('Calibration.HcalCalibAlgos.hcalIsoTrackAnalyzer_cfi') | ||
process.hcalIsoTrackAnalyzer.useRaw = 0 # 1 for Raw | ||
process.hcalIsoTrackAnalyzer.debugEvents = [640818633, 640797426, 641251898, | ||
641261804, 641172007, 641031809] | ||
|
||
process.source = cms.Source("PoolSource", | ||
fileNames = cms.untracked.vstring('/store/data/Run2024C/EGamma0/ALCARECO/HcalCalIsoTrkProducerFilter-PromptReco-v1/000/379/433/00000/455129b2-c385-42c6-ba07-31b69145cfba.root') | ||
#/store/data/Run2023D/EGamma1/ALCARECO/HcalCalIsoTrkProducerFilter-PromptReco-v2/000/370/667/00000/027375a6-b66a-4909-a23c-dc08278265c5.root') | ||
) | ||
|
||
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) | ||
|
||
process.TFileService = cms.Service("TFileService", | ||
fileName = cms.string('output_newalca.root') | ||
) | ||
|
||
process.p = cms.Path(process.hcalIsoTrackAnalyzer) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Example of calibration job without phisymmetry correction (depth dependent) | ||
nohup ./CalibMain.exe 2 d24CE.txt 24CE0.root 1031 hcalIsoTrackAnalyzer 24CE0 -8 0 -1 30 24CE0corr.txt 1 0.5 1 1 0 0 1 0.25 3.0 25 -1 -1 300 0 0 99999999 1 72 0 0 1000 0 1 1 0 40 60 0 > & 24CE0.log & | ||
|
||
# Example of calibration job with phisymmetry correction (depth dependent) | ||
nohup ./CalibMain.exe 2 d24CE.txt 24CE0.root 1031 hcalIsoTrackAnalyzer 24CE0 -8 0 -1 30 24CE0corr.txt 1 0.5 1 1 0 0 1 0.25 3.0 25 -1 -1 304 0 0 99999999 1 72 0 0 1000 0 1 1 0 40 60 0 PhiSym2024_RunC.txt > & 24CE0.log & | ||
|
||
# Example of calibration job with phisymmetry correction (restricted depth dependent) | ||
nohup ./CalibMain.exe 2 d24CE.txt 24CE5.root 1031 hcalIsoTrackAnalyzer 24CE5 -8 5 -1 30 24CE5corr.txt 1 0.5 1 1 0 0 1 0.25 3.0 25 -1 -1 304 0 0 99999999 1 72 0 0 1000 0 1 1 0 40 60 0 PhiSym2024_RunC.txt > & 24CE5.log & | ||
|
||
# Example of calibration job with phisymmetry correction (depth independent) | ||
nohup ./CalibMain.exe 2 d24CE.txt 24CE2.root 1031 hcalIsoTrackAnalyzer 24CE2 -8 2 -1 30 24CE2corr.txt 1 0.5 1 1 0 0 1 0.25 3.0 25 -1 -1 304 0 0 99999999 1 72 0 0 1000 0 1 1 0 40 60 0 > & 24CE2.log & | ||
|
||
# Example of a job producing histograms (depth dependent) | ||
nohup ./CalibMain.exe 0 d24CE.txt 24CEM1.root 41031 hcalIsoTrackAnalyzer 24CE1 -8 0 -1 1 54 0 1 0 0 30 0 99999999 1 72 1 0 1000 0 0 0 1 1 24CE0corr.txt PhiSym2024_RunC.txt >& 24CEM1.log & | ||
|
||
# Example of a job producing histograms (restricted depth dependent) | ||
nohup ./CalibMain.exe 0 d24CE.txt 24CEM2.root 41031 hcalIsoTrackAnalyzer 24CE2 -8 5 -1 1 54 0 1 0 0 30 0 99999999 1 72 1 0 1000 0 0 0 1 1 24CE5corr.txt PhiSym2024_RunC.txt >& 24CEM2.log & | ||
|
||
# Example of a job producing histograms (depth independent) | ||
nohup ../d24/CalibMain.exe 0 d24CE.txt 24CEM3.root 41031 hcalIsoTrackAnalyzer 24CE3 -8 2 -1 1 54 0 1 0 0 30 0 99999999 1 72 1 0 1000 0 0 0 1 1 24CE2corr.txt PhiSym2024_RunC.txt >& 24CEM3.log & |