Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
e7b2f37
Add Phase2 OT efficiency client to standalone harvesting sequence
brandiskip Nov 13, 2025
1c9bd03
use DQMGenericClient for Phase2OT track efficiencies; drop manual code
brandiskip Nov 13, 2025
5cdca81
added helper functions for booking histograms
brandiskip Nov 13, 2025
378849f
code using DQMGenericClient for Phase2OT track efficiencies
brandiskip Nov 13, 2025
405d956
reduced many lines of code by use of helper functions
brandiskip Nov 13, 2025
290ca3a
fixed error causing compile issues
brandiskip Nov 14, 2025
18190eb
got rid of unnecessary helper function calls and added histograms del…
brandiskip Nov 18, 2025
ccc774f
got rid of unnecessary helper functions
brandiskip Nov 18, 2025
5571675
added code to calculate stub efficiencies
brandiskip Nov 18, 2025
bf2dc78
removed Phase2OTHarvestStub.cc as efficiency calculations are now don…
brandiskip Nov 18, 2025
0f11897
add helper function for resolution hists
brandiskip Jan 6, 2026
e21bd88
reduced several hundred lines of code by use of helper function
brandiskip Jan 6, 2026
39e2092
add detailed hists to sub-folder and reduce range for deltaPhi hists
brandiskip Jan 21, 2026
f73480f
edit comments
brandiskip Jan 21, 2026
1c8648f
add weights for stub efficiency hists
brandiskip Jan 26, 2026
4cf52e5
add code to make number of stubs per event hist
brandiskip Jan 26, 2026
6401193
updated phi matching for very low pt, particularly for bending angles
havynanc Dec 11, 2025
fe09481
updated TPS data formats, cleaning, logs, and other misc things
havynanc Dec 11, 2025
540f010
Code clean and format
Jan 28, 2026
8901e72
Including EXOnanoAODv1 custom constent
Dec 8, 2025
4f9e84a
Remove unused variable
Feb 5, 2026
91ee1bc
Update PhysicsTools/NanoAOD/python/custom_displacedtau_cff.py
kerstinlovisa Feb 19, 2026
9953a84
code-format correction
Feb 20, 2026
fdf8e43
fixing typo in chi2 cutoff for track conversion
Feb 20, 2026
0140ca6
Apply code format patch
Feb 23, 2026
98e74f2
fix res_pt and res_eta axis labels
brandiskip Mar 4, 2026
5c58adf
Changed folder naming logic
brandiskip Mar 4, 2026
a8bc657
remove manual efficiency calculation
brandiskip Mar 4, 2026
939b587
remove Phase2OTHarvestStub as file as been removed
brandiskip Mar 4, 2026
68a6558
Merged work_branch from repository brandiskip with cms-merge-topic
brandiskip Mar 9, 2026
e514f2b
Corrected for additional PR comments
Mar 12, 2026
8263cc1
code format
Mar 12, 2026
6391c87
ensure both num and den for efficiency hists have same selections
brandiskip Mar 20, 2026
a07d05b
update geometry and sample
brandiskip Mar 20, 2026
cfc35b0
add missing histograms for efficiency plots
brandiskip Mar 20, 2026
0dda3df
Reduce code duplication in fillDescriptions
brandiskip Mar 23, 2026
f3cba77
updated header comments
brandiskip Mar 23, 2026
ee2022c
updates from running code-format
brandiskip Mar 23, 2026
f3d4e5d
updates from running code-format
brandiskip Mar 23, 2026
0ef0ddf
add comments
brandiskip Mar 23, 2026
c8c6e36
Merge branch 'master' into work_branch
brandiskip Mar 23, 2026
0930a2d
Apply cmsbuild code-format patch
brandiskip Mar 23, 2026
a561bb2
Merge branch 'work_branch' of https://github.com/brandiskip/cmssw int…
brandiskip Mar 23, 2026
b4845fe
Adding pass-through option to MultiTrackSelector (for LST tracking / …
mmasciov Mar 18, 2026
adc0cc6
Add possibility to mask clusters from seeds on fastSIM
mmasciov Mar 23, 2026
abeed7b
Updating DisTauTag.cc test_vector to test_score
Apr 7, 2026
3e58d5f
Merge branch 'master' into EXOnanoAODv1
kerstinlovisa Apr 7, 2026
e890a13
code format fix
Apr 7, 2026
450de32
Merge branch 'EXOnanoAODv1' of https://github.com/kerstinlovisa/cmssw…
Apr 7, 2026
182a9b2
Fixes for the second round of comment
Apr 7, 2026
676591c
fix code-format differences
Apr 7, 2026
5b2960f
Squashed commit of the following:
fabiocos Mar 22, 2026
a9fdfc5
Add ioread statements for PSimHit backward compatibility in classes_d…
fabiocos Mar 24, 2026
59bf7e6
comment out validation step as per alaperto request
brandiskip Apr 13, 2026
a94bc1b
change number of events to 10
brandiskip Apr 13, 2026
ba046bc
commented out validation step
brandiskip Apr 13, 2026
1e375b1
Revert "Add ioread statements for PSimHit backward compatibility in c…
fabiocos Apr 27, 2026
c16c8cc
comment out unused validation load
brandiskip Apr 28, 2026
4821d8a
Increase thresholds for EE high eta and fwd region in presample client
Apr 28, 2026
db80211
refactor: update personalPlayback to handle optional extra arguments
gabrielmscampos Apr 29, 2026
4057405
Add Phase2OTEffClient to harvesting sequences to enable central DQM G…
brandiskip Apr 29, 2026
de54732
Try to add all the rings in the fine layers of the HGCal Scintillator…
Apr 30, 2026
273dfb2
Code Check
Apr 30, 2026
90e02bb
Merge pull request #49969 from fabiocos/fc-psimhit-20260122
cmsbuild Apr 30, 2026
ba086d9
Merge pull request #50467 from SegmentLinking/passThroughMTS
cmsbuild Apr 30, 2026
af65c7b
Merge pull request #50502 from brandiskip/work_branch
cmsbuild Apr 30, 2026
f388a74
Merge pull request #48502 from kerstinlovisa/EXOnanoAODv1
cmsbuild Apr 30, 2026
367d7da
Include the ProcessAcceleratorAlpaka configuration in the python dumps
fwyzard Apr 30, 2026
446d7f1
Merge pull request #50823 from kyungminparkdrums/170X_ecalDQMupdateEE…
cmsbuild May 1, 2026
996a509
Merge pull request #50828 from gabrielmscampos/refactor/personal-dqm-…
cmsbuild May 1, 2026
8bafe68
Merge pull request #50830 from bsunanda/Phase2-hgx366C
cmsbuild May 1, 2026
567e84f
Merge pull request #50038 from zhenbinwu/tpsupdates2
cmsbuild May 2, 2026
c54365b
Merge pull request #50839 from fwyzard/ProcessAcceleratorAlpaka_confi…
cmsbuild May 3, 2026
595f18d
LC To Sim associators
felicepantaleo Apr 25, 2026
76c365a
code format and rebase to 17_0_0_pre1
felicepantaleo May 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_nano.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ def next(self, index: int = None) -> None:
steps['BTVNANO_mc15.0'] = merge([{'-s': 'NANO:@BTV,DQM:@nanoAODDQM', '-n': '1000'},
steps['NANO_mc15.0']])

steps['EXONANO_mc15.0'] = merge([{'-s': 'PAT,NANO:@EXO', '-n': '1000'},
steps['NANO_mc15.0']])

steps['lepTrackInfoNANO_mc15.0'] = merge([{'-s': 'NANO:@LepTrackInfo,DQM:@nanoAODDQM', '-n': '1000'},
steps['NANO_mc15.0']])

Expand All @@ -422,10 +425,14 @@ def next(self, index: int = None) -> None:

# ====== DATA ======
lumis_Run2025C = {392175: [[95, 542]]}
lumis_Run2025C_Muon0 = {392997: [[146, 202]]}

steps['JetMET1_Run2025C_MINIAOD_150X'] = {'INPUT': InputInfo(
location='STD', ls=lumis_Run2025C, dataSet='/JetMET1/Run2025C-PromptReco-v1/MINIAOD')}

steps['Muon0_Run2025C_AOD_150X'] = {'INPUT': InputInfo(
location='STD',ls=lumis_Run2025C_Muon0, dataSet='/Muon0/Run2025C-PromptReco-v1/AOD')}

steps['ScoutingPFRun3_Run2025C_HLTSCOUT_150X'] = {'INPUT': InputInfo(location='STD', ls=lumis_Run2025C,
dataSet='/ScoutingPFRun3/Run2025C-v1/HLTSCOUT')}

Expand Down Expand Up @@ -455,6 +462,9 @@ def next(self, index: int = None) -> None:
steps['BTVNANO_data15.0'] = merge([{'-s': 'NANO:@BTV,DQM:@nanoAODDQM', '-n': '1000'},
steps['NANO_data15.0']])

steps['EXONANO_data15.0'] = merge([{'-s': 'PAT,NANO:@EXO', '-n': '1000'},
steps['NANO_data15.0']])

steps['lepTrackInfoNANO_data15.0'] = merge([{'-s': 'NANO:@LepTrackInfo,DQM:@nanoAODDQM', '-n': '1000'},
steps['NANO_data15.0']])

Expand Down Expand Up @@ -650,6 +660,7 @@ def next(self, index: int = None) -> None:
workflows[_wfn()] = ['ScoutingNANOmc150X', ['TTbar_13p6_Summer24_MINIAOD_150X', 'scoutingNANO_mc15.0']]
workflows[_wfn()] = ['ScoutingNANOwithPromptmc150X', ['TTbar_13p6_Summer24_MINIAOD_150X', 'scoutingNANO_withPrompt_mc15.0']]
workflows[_wfn()] = ['BPHNANOmc150X', ['TTbar_13p6_Summer24_MINIAOD_150X', 'BPHNANO_mc15.0']]
workflows[_wfn()] = ['EXONANOmc150X', ['TTbar_13p6_Summer24_AOD_140X', 'EXONANO_mc15.0']]

# POG/PAG custom NANOs, data
_wfn.subnext()
Expand All @@ -663,6 +674,7 @@ def next(self, index: int = None) -> None:
workflows[_wfn()] = ['ScoutingNANOmonitordata150Xrun3', ['ScoutingPFMonitor_Run2025C_MINIAOD_150X', 'scoutingNANO_monitor_data15.0']] # noqa
workflows[_wfn()] = ['ScoutingNANOmonitorWithPromptdata150Xrun3', ['ScoutingPFMonitor_Run2025C_MINIAOD_150X', 'scoutingNANO_monitorWithPrompt_data15.0']] # noqa
workflows[_wfn()] = ['BPHNANOdata150Xrun3', ['JetMET1_Run2025C_MINIAOD_150X', 'BPHNANO_data15.0']]
workflows[_wfn()] = ['EXONANOdata150Xrun3', ['Muon0_Run2025C_AOD_150X', 'EXONANO_data15.0']]
workflows[_wfn()] = ['L1ScoutingNANOdata150Xrun3', ['L1Scouting2025RAW15.0', 'l1ScoutingNANO_data15.0']]
workflows[_wfn()] = ['L1ScoutingSelectionNANOdata150Xrun3', ['L1ScoutingSelection2025RAW15.0', 'l1ScoutingSelectionNANO_data15.0']]

Expand Down
4 changes: 2 additions & 2 deletions DQM/EcalMonitorClient/python/PresampleClient_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
minChannelEntries = 6
expectedMean = 200.0
toleranceLow = 25.0
toleranceHigh = 60.0
toleranceHighFwd = 100.0
toleranceHigh = 80.0
toleranceHighFwd = 120.0
toleranceRMS = 6.0
toleranceRMSFwd = 6.0

Expand Down
4 changes: 2 additions & 2 deletions DQM/SiTrackerPhase2/test/dqmstep_phase2tk_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# step3_pre4_inDQM.root - input for the next step in the DQM sequence, harvestingstep_phase2tk_cfg.py

# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
# with command line options: step3 --conditions auto:phase2_realistic_T21 -s RAW2DIGI,L1Reco,RECO,RECOSIM,VALIDATION:@phase2Validation,DQM:@phase2 --datatier DQMIO -n 10 --geometry Extended2026D98 --era Phase2C11M9 --eventcontent DQM --no_exec
# with command line options: step3 --conditions auto:phase2_realistic_T21 -s RAW2DIGI,L1Reco,RECO,RECOSIM,VALIDATION:@phase2Validation,DQM:@phase2 --datatier DQMIO -n 10 --geometry Extended2026D110 --era Phase2C11M9 --eventcontent DQM --no_exec
import FWCore.ParameterSet.Config as cms

from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
Expand Down Expand Up @@ -41,7 +41,7 @@

# Input source
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring('/store/relval/CMSSW_14_0_0_pre2/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/PU_133X_mcRun4_realistic_v1_STD_2026D98_PU200_RV229-v1/2580000/0b2b0b0b-f312-48a8-9d46-ccbadc69bbfd.root'),
fileNames = cms.untracked.vstring('/store/relval/CMSSW_15_0_0/RelValTTbar_14TeV/GEN-SIM-RECO/PU_141X_mcRun4_realistic_v3_STD_Run4D110_PU-v3/2580000/01972f5c-64f5-4fea-890d-ffa3bb070b77.root'),
secondaryFileNames = cms.untracked.vstring()
)

Expand Down
7 changes: 4 additions & 3 deletions DQM/SiTrackerPhase2/test/harvestingstep_phase2tk_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# DQM_V0001_R000000001__Global__CMSSW_X_Y_Z__RECO.root - for local visualization of histograms

# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
# with command line options: step4 --conditions auto:phase2_realistic_T21 -s HARVESTING:@phase2Validation+@phase2+@miniAODValidation+@miniAODDQM --scenario pp --filetype DQM --geometry ExtendedRun4D98 --era Phase2C11M9 --mc -n -1 --no_exec
# with command line options: step4 --conditions auto:phase2_realistic_T21 -s HARVESTING:@phase2Validation+@phase2+@miniAODValidation+@miniAODDQM --scenario pp --filetype DQM --geometry ExtendedRun4D110 --era Phase2C11M9 --mc -n -1 --no_exec
import FWCore.ParameterSet.Config as cms

from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
Expand All @@ -27,6 +27,7 @@
process.load('Configuration.StandardSequences.DQMSaverAtRunEnd_cff')
process.load('Configuration.StandardSequences.Harvesting_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
#process.load('Validation.SiTrackerPhase2V.Phase2OTEffClient_cff')

process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(8000),
Expand Down Expand Up @@ -88,5 +89,5 @@
process.dqmsave_step = cms.Path(process.DQMSaver)

# Schedule definition
#process.schedule = cms.Schedule(process.trackerphase2ValidationHarvesting_step,process.dqmsave_step)
process.schedule = cms.Schedule(process.dqmsave_step)
#process.schedule = cms.Schedule(process.trackerphase2ValidationHarvesting_step, process.dqmsave_step)
process.schedule = cms.Schedule(process.dqmsave_step)
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,13 @@ def _copyIfExists(mod, pset, name):
from Configuration.ProcessModifiers.seedingDeepCore_cff import seedingDeepCore
seedingDeepCore.toReplaceWith(TrackSeedMonSequence,_seedingDeepCore_TrackSeedMonSequence)

from Configuration.ProcessModifiers.seedingLST_cff import seedingLST
from Configuration.ProcessModifiers.trackingLST_cff import trackingLST
trackingLST.toModify(locals()["TrackSeedMonhighPtTripletStep"],
SeedProducer = "lstInputProducer"
)
_LST_TrackSeedMonSequence = TrackSeedMonSequence.copyAndExclude([locals()["TrackSeedMoninitialStep"]])
(seedingLST | trackingLST).toReplaceWith(TrackSeedMonSequence, _LST_TrackSeedMonSequence)

TrackingDQMSourceTier0 += TrackSeedMonSequence

Expand Down
11 changes: 8 additions & 3 deletions DQMServices/StreamerIO/scripts/personalPlayback.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def do_exec(self):
logname="/var/log/hltd/pid/hlt_run$4_pid$$.log"
lognamez="/var/log/hltd/pid/hlt_run$4_pid$$_gzip.log.gz"
#override the noclobber option by using >| operator for redirection - then keep appending to log
echo startDqmRun invoked $TODAY with arguments $1 $2 $3 $4 $5 $6 $7 $8 >| $logname
echo startDqmRun invoked $TODAY with arguments $@ >| $logname
export http_proxy="http://cmsproxy.cms:3128"
export https_proxy="https://cmsproxy.cms:3128/"
export NO_PROXY=".cms"
Expand All @@ -232,8 +232,8 @@ def do_exec(self):
eval `scram runtime -sh`;
cd $3;
pwd >> $logname 2>&1
#exec esMonitoring.py -z $lognamez cmsRun `readlink $6` runInputDir=$5 runNumber=$4 $7 $8 >> $logname 2>&1
exec esMonitoring.py cmsRun `readlink $6` runInputDir=$5 runNumber=$4 $7 $8
#exec esMonitoring.py -z $lognamez cmsRun `readlink $6` runInputDir=$5 runNumber=$4 ${{@:7}} >> $logname 2>&1
exec esMonitoring.py cmsRun `readlink $6` runInputDir=$5 runNumber=$4 ${{@:7}}
"""

start_dqm_job = start_dqm_job.replace("/var/log/hltd/pid/", '{log_path}/')
Expand Down Expand Up @@ -361,6 +361,9 @@ def make_args(self, run):
args.append(self.cfg_link) # cmsRun arg 1
args.append(f"runkey={self.opts.run_key}") # cmsRun arg 2

for extra_arg in self.opts.extra_args:
args.append(extra_arg)

return args

def discover_latest(self):
Expand Down Expand Up @@ -472,6 +475,8 @@ def do_exec(self):
run_group.add_argument("--cmsRun", type=str, help="cmsRun command to run, for igprof and so on.", default="cmsRun")
run_group.add_argument("--run_key", type=str, help="Run key to use (pp_run, cosmic_run or hi_run)", default="pp_run")

client_group = parser.add_argument_group("Client", "Client extra arguments.")
client_group.add_argument("--extra-args", nargs="+", metavar="KEY=VALUE", help="Client extra arguments split by whitespace")

parser.add_argument('cmssw_configs', metavar='cmssw_cfg.py', type=str, nargs='*', help='List of cmssw jobs (clients).')

Expand Down
10 changes: 5 additions & 5 deletions DataFormats/L1TMuonPhase2/interface/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ namespace Phase2L1GMT {
const int BITSSTUBCOORD = 10;
const int BITSSTUBETA = 8;
const int BITSSTUBID = 12;
const int BITSSTUBPHIQUALITY = 4;
const int BITSSTUBETAQUALITY = 4;
const int BITSSTUBTIME = 8;
const int BITSSTUBPHIQUALITY = 2;
const int BITSSTUBETAQUALITY = 2;
const int BITSSTUBTIME = 5;
const int BITSSTAMUONQUALITY = 6;
const int BITSMUONBX = 4;
const int BITSMUONBX = 3;

//PreTrackMatherdMuon
const int BITSMATCHQUALITY = 9;
Expand All @@ -44,7 +44,7 @@ namespace Phase2L1GMT {
//Track Muon Match
const int BITSSIGMAETA = 4;
const int BITSSIGMACOORD = 4;
const int BITSPROPCOORD = 6; //lowered this to make room for another prop coefficient
const int BITSPROPCOORD = 6;
const int BITSPROPSIGMACOORD_A = 6;
const int BITSPROPSIGMACOORD_B = 6;
const int BITSPROPSIGMAETA_A = 5;
Expand Down
7 changes: 7 additions & 0 deletions DataFormats/L1TMuonPhase2/interface/MuonStub.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
//#include "DataFormats/L1TMuon/interface/BMTF/L1MuBMTrackSegLoc.h"
#include "DataFormats/L1Trigger/interface/BXVector.h"
#include "DataFormats/Common/interface/Ref.h"
#include "DataFormats/L1TMuonPhase2/interface/Constants.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

// ---------------------
Expand Down Expand Up @@ -140,6 +141,12 @@ namespace l1t {

void print() const;

const Phase2L1GMT::wordtype hybridStubWord() const;
void printHybridStub(const std::string module = "MuonStub", const uint spaces = 0, const bool label = true) const;
void printHybridStubWord(const std::string module = "MuonStub",
const uint spaces = 0,
const bool label = true) const;

private:
int etaRegion_; //In the barrel this is wheel. In the endcap it is 6-ring
int phiRegion_; //In the barrel it is sector. In the endcap it is chamber
Expand Down
54 changes: 54 additions & 0 deletions DataFormats/L1TMuonPhase2/src/MuonStub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,57 @@ void MuonStub::print() const {
<< " quality=" << quality_ << " eta1=" << eta1_ << " eta2=" << eta2_
<< " etaQuality=" << etaQuality_ << " type=" << type_;
}

const Phase2L1GMT::wordtype MuonStub::hybridStubWord() const {
Phase2L1GMT::wordtype w = 0;
int bstart = 0;
//valid bit is always on in emulator because invalid stubs are never created
bstart = Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, 1, 1);
bstart = Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, quality_, Phase2L1GMT::BITSSTUBPHIQUALITY);
bstart = Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, etaQuality_, Phase2L1GMT::BITSSTUBETAQUALITY);
bstart = Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, bxNum_, Phase2L1GMT::BITSMUONBX);
bstart = Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, coord1_, Phase2L1GMT::BITSSTUBCOORD);
bstart = Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, coord2_, Phase2L1GMT::BITSSTUBCOORD);
bstart = Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, eta1_, Phase2L1GMT::BITSSTUBETA);
bstart = Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, eta2_, Phase2L1GMT::BITSSTUBETA);
bstart =
Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, 0, Phase2L1GMT::BITSSTUBTIME); //placeholder for time
int addr = address();
bstart = Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, addr, Phase2L1GMT::BITSSTUBID);
bstart = Phase2L1GMT::wordconcat<Phase2L1GMT::wordtype>(w, bstart, tfLayer_, 3);
return w;
}

void MuonStub::printHybridStub(const std::string module, const uint spaces, const bool label) const {
std::string lab = "";
lab.append(spaces, ' ');
if (label)
lab.append("hybrid stub: ");
int addr = address();
edm::LogInfo(module) << lab << "quality = " << quality_ << ", "
<< "etaQuality = " << etaQuality_ << ", "
<< "bxNum = " << bxNum_ << ", "
<< "coord1 = " << offline_coord1_ << " (" << coord1_ << ")"
<< ", "
<< "coord2 = " << offline_coord2_ << " (" << coord2_ << ")"
<< ", "
<< "eta1 = " << offline_eta1_ << " (" << eta1_ << ")"
<< ", "
<< "eta2 = " << offline_eta2_ << " (" << eta2_ << ")"
<< ","
<< "\n"
<< std::setfill(' ') << std::setw(lab.length()) << " "
<< "time = " << 0 << ", " //placeholder for time
<< "address = " << addr << " (id = " << id_ << ")"
<< ", "
<< "tfLayer = " << tfLayer_ << std::flush;
}

void MuonStub::printHybridStubWord(const std::string module, const uint spaces, const bool label) const {
std::string lab = "";
lab.append(spaces, ' ');
if (label)
lab.append("hybrid stub word = ");
Phase2L1GMT::wordtype w = MuonStub::hybridStubWord();
edm::LogInfo(module) << lab << std::setfill('0') << std::setw(16) << std::hex << w.to_uint64() << std::flush;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// system includes
#include <memory>

// framework stuff
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/global/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/ESHandle.h"

// data formats
#include "DataFormats/Common/interface/ValueMap.h"
#include "DataFormats/TrackerRecHit2D/interface/FastTrackerRecHit.h"
#include "DataFormats/TrackerRecHit2D/interface/FastTrackerRecHitCollection.h"
#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"

class FastTrackerRecHitMaskFromSeedProducer : public edm::global::EDProducer<> {
public:
explicit FastTrackerRecHitMaskFromSeedProducer(const edm::ParameterSet&);

~FastTrackerRecHitMaskFromSeedProducer() override {}

void produce(edm::StreamID, edm::Event&, edm::EventSetup const&) const override;

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
// an alias
using QualityMaskCollection = std::vector<unsigned char>;

// tokens
edm::EDGetTokenT<TrajectorySeedCollection> trajectories_;

edm::EDGetTokenT<FastTrackerRecHitCollection> recHits_;

edm::EDGetTokenT<std::vector<bool> > oldHitMaskToken_;

edm::EDPutTokenT<std::vector<bool> > collectedHits_;
};

FastTrackerRecHitMaskFromSeedProducer::FastTrackerRecHitMaskFromSeedProducer(const edm::ParameterSet& iConfig)
: trajectories_(consumes(iConfig.getParameter<edm::InputTag>("trajectories"))),
recHits_(consumes(iConfig.getParameter<edm::InputTag>("recHits"))),
collectedHits_(produces()) {
auto const& oldHitRemovalInfo = iConfig.getParameter<edm::InputTag>("oldHitRemovalInfo");
if (!oldHitRemovalInfo.label().empty()) {
oldHitMaskToken_ = consumes<std::vector<bool> >(oldHitRemovalInfo);
}
}

void FastTrackerRecHitMaskFromSeedProducer::produce(edm::StreamID, edm::Event& iEvent, edm::EventSetup const&) const {
// the product

std::vector<bool> collectedHits;

// input

auto const& recHits = iEvent.get(recHits_);

if (!oldHitMaskToken_.isUninitialized()) {
auto const& oldHitMasks = iEvent.get(oldHitMaskToken_);
collectedHits.insert(collectedHits.begin(), oldHitMasks.begin(), oldHitMasks.end());
}
collectedHits.resize(recHits.size(), false);

auto const& seeds = iEvent.get(trajectories_);

// loop over seed tracks and mask hits
for (auto const& seed : seeds) {
for (auto const& hit : seed.recHits()) {
if (!hit.isValid())
continue;
const FastTrackerRecHit& fasthit = static_cast<const FastTrackerRecHit&>(hit);
// note: for matched hits nIds() returns 2, otherwise 1
for (unsigned id_index = 0; id_index < fasthit.nIds(); id_index++) {
collectedHits[unsigned(fasthit.id(id_index))] = true;
}
}
}

iEvent.emplace(collectedHits_, std::move(collectedHits));
}

void FastTrackerRecHitMaskFromSeedProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("trajectories", edm::InputTag("initialStepSeeds"));
desc.add<edm::InputTag>("recHits", edm::InputTag("fastTrackerRecHits"));
desc.add<edm::InputTag>("oldHitRemovalInfo", edm::InputTag(""));
descriptions.addWithDefaultLabel(desc);
}

DEFINE_FWK_MODULE(FastTrackerRecHitMaskFromSeedProducer);
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import FWCore.ParameterSet.Config as cms

from FastSimulation.Tracking.fastTrackerRecHitMaskFromSeedProducer_cfi import fastTrackerRecHitMaskFromSeedProducer

def maskProducerFromSeedClusterRemover(seedClusterRemover):
maskProducer = fastTrackerRecHitMaskFromSeedProducer.clone(
trajectories = seedClusterRemover.trajectories,
)
if(hasattr(seedClusterRemover,"oldClusterRemovalInfo")):
maskProducer.oldHitRemovalInfo = cms.InputTag(seedClusterRemover.oldClusterRemovalInfo.getModuleLabel().replace("Clusters","Masks"))
return maskProducer
14 changes: 10 additions & 4 deletions Geometry/HGCalCommonData/src/HGCalDDDConstants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1557,9 +1557,11 @@ bool HGCalDDDConstants::tileExist(int zside, int layer, int ring, int phi) const
const auto& index = getIndex(layer, true);
bool fine = hgpar_->scintFine(index.first);
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HGCalGeomT") << "TileExist: Layer : " << layer << ":" << index.first << " Fine " << fine;
edm::LogVerbatim("HGCalGeomT") << "TileExist: Layer : " << layer << ":" << index.first << " Fine " << fine
<< " index " << index.first << " :" << index.second;
#endif
bool ok = ((ring >= hgpar_->iradMinBH_[index.first]) && (ring <= hgpar_->iradMaxBH_[index.first]));
bool ok = (fine) ? ((ring >= hgpar_->iradMinBHFine_[index.first]) && (ring <= hgpar_->iradMaxBHFine_[index.first]))
: ((ring >= hgpar_->iradMinBH_[index.first]) && (ring <= hgpar_->iradMaxBH_[index.first]));
if (ok) {
if (fine) {
int indx = HGCalTileIndex::tileIndex(layer, ring, 1);
Expand Down Expand Up @@ -1601,9 +1603,13 @@ bool HGCalDDDConstants::tileExist(int zside, int layer, int ring, int phi) const
}
#ifdef EDM_ML_DEBUG
} else {
std::ostringstream st1;
if (fine)
st1 << hgpar_->iradMinBHFine_[index.first] << ":" << hgpar_->iradMaxBHFine_[index.first];
else
st1 << hgpar_->iradMinBH_[index.first] << ":" << hgpar_->iradMaxBH_[index.first];
edm::LogWarning("HGCalGeomT") << "TileExist:input " << zside << ":" << layer << ":" << ring << ":" << phi
<< " Index " << index.first << " Ring limits " << hgpar_->iradMinBH_[index.first]
<< ":" << hgpar_->iradMaxBH_[index.first] << " ok " << ok;
<< " Index " << index.first << " Ring limits " << st1.str() << " ok " << ok;
#endif
}
return ok;
Expand Down
Loading