Skip to content

Commit

Permalink
merge from master (#2)
Browse files Browse the repository at this point in the history
* added EXOLLPJetHCAL skim (initial version)

* added test script test_EXOLLPJetHCAL_SKIM.py

* Replace cout with edm::Logverbatim in Geometry/GlobalTrackingGeometryBuilder

* Re-enable unit tests for ASAN build

* dd4hep phase2 wf

* Add wf *.81 for BPH DQM

* Added utility script edmFileInPath

* improve unt test; use edmFileInPath; convert to bash

* Replace std::cout with edm::LogVerbatim in Geometry/HcalEventSetup and Geometry/HcalTestBeamData. Also add some missing files needed for testing

* Code check

* Remove FWCore TestHelper utility

* Add ap_data type for GT interface

Update GMT emulator for new ap format

Also clean up the config file

Update Z0/D0 according to GT

Using 0.05 for Z0 and 0.03 for d0.

update code format

Bug fix in tracker muon matching

Thanks to Santi for spotting this. This line was commented out by
someone, likely by accident.

Update the reference type to SA muons

* improve unit test testCreateRandomMisalignment

* Add back removed data version

* fix bug in computation of barycenters per partition and improve graphical display

* get rid of gROOT->Reset() in GeometryComparisonPlotter.cc

---------

Co-authored-by: Kiley Kennedy <kiley.elizabeth.kennedy@cern.ch>
Co-authored-by: Sunanda <sunanda.banerjee@cern.ch>
Co-authored-by: Shahzad Malik Muzaffar <shahzad.malik.muzaffar@cern.ch>
Co-authored-by: Norraphat <srimanob@mail.cern.ch>
Co-authored-by: AdrianoDee <adriano.diflorio@ba.infn.it>
Co-authored-by: Zhenbin Wu <zhenbin.wu@gmail.com>
Co-authored-by: cmsbuild <cmsbuild@cern.ch>
Co-authored-by: mmusich <marco.musich@cern.ch>
Co-authored-by: Andrew David Loeliger <andrew.loeliger@cern.ch>
  • Loading branch information
10 people authored Apr 6, 2023
1 parent 7a383cd commit 7ce96e9
Show file tree
Hide file tree
Showing 41 changed files with 763 additions and 483 deletions.
2 changes: 0 additions & 2 deletions Alignment/OfflineValidation/src/GeometryComparisonPlotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ GeometryComparisonPlotter::GeometryComparisonPlotter(TString tree_file_name,
#endif

// style
gROOT->Reset();

data->SetMarkerSize(0.5);
data->SetMarkerStyle(6);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,8 @@
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '') # using realistic Phase 2 geom
process.GlobalTag.toGet = cms.VPSet(
cms.PSet(record = cms.string("TrackerAlignmentRcd"),
tag = cms.string("Alignments"),
connect = cms.string('sqlite_file:/afs/cern.ch/user/m/musich/public/forSandra/tracker_alignment_phase2_D88130X_mcRun4_realistic_v2.db')
),
cms.PSet(record = cms.string("TrackerAlignmentErrorExtendedRcd"),
tag = cms.string("AlignmentErrorsExtended"),
connect = cms.string('sqlite_file:/afs/cern.ch/user/m/musich/public/forSandra/tracker_alignment_phase2_D88130X_mcRun4_realistic_v2.db')
),
cms.PSet(record = cms.string("TrackerSurfaceDeformationRcd"),
tag = cms.string("AlignmentSurfaceDeformations"),
connect = cms.string('sqlite_file:/afs/cern.ch/user/m/musich/public/forSandra/tracker_alignment_phase2_D88130X_mcRun4_realistic_v2.db')
)
)

print("Using global tag:", process.GlobalTag.globaltag.value())


###################################################################
# This uses the object from the tag and applies the misalignment scenario on top of that object
###################################################################
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#! /bin/bash
#!/bin/bash

function die { echo $1: status $2 ; exit $2; }
folder=$CMSSW_BASE/src/Alignment/TrackerAlignment/test/Misalignments

for a in $(ls $folder); do
echo "running " ${a}
cmsRun $folder/${a}
echo "running unit test: " ${a}
cmsRun $folder/${a} || die "Failure running ${a}" $?
done
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,17 @@ namespace AlignmentPI {
virtual ~TkAlBarycenters() {}
};

/*--------------------------------------------------------------------*/
inline void TkAlBarycenters::init()
/*--------------------------------------------------------------------*/
{
// empty all maps
Xbarycenters.clear();
Ybarycenters.clear();
Zbarycenters.clear();
nmodules.clear();
}

/*--------------------------------------------------------------------*/
inline GlobalPoint TkAlBarycenters::getPartitionAvg(AlignmentPI::PARTITION p)
/*--------------------------------------------------------------------*/
Expand All @@ -895,10 +906,8 @@ namespace AlignmentPI {
const std::map<AlignmentPI::coordinate, float>& GPR)
/*--------------------------------------------------------------------*/
{
// zero in the n. modules per partition...
for (const auto& p : PARTITIONS) {
nmodules[p] = 0.;
}
// clear all data members;
init();

for (const auto& ali : input) {
if (DetId(ali.rawId()).det() != DetId::Tracker) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ namespace {
bool fill() override {
auto tag = PlotBase::getTag<0>();
auto iov = tag.iovs.front();
const auto &tagname = PlotBase::getTag<0>().name;
std::shared_ptr<Alignments> payload = fetchPayload(std::get<1>(iov));
unsigned int run = std::get<0>(iov);

Expand Down Expand Up @@ -794,8 +795,8 @@ namespace {
TLatex t1;
t1.SetNDC();
t1.SetTextAlign(26);
t1.SetTextSize(0.05);
t1.DrawLatex(0.5, 0.96, Form("Tracker Alignment Barycenters, IOV %i", run));
t1.SetTextSize(0.045);
t1.DrawLatex(0.5, 0.96, Form("TkAl Barycenters, Tag: #color[4]{%s}, IOV #color[4]{%i}", tagname.c_str(), run));
t1.SetTextSize(0.025);

std::string fileName(m_imageFileName);
Expand Down
5 changes: 1 addition & 4 deletions CondTools/Hcal/test/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@
<flags PRE_TEST = "write_HFPhase1PMTParams"/>
</test>

<bin file="HcalPFCuts_unittest.cc">
<flags TEST_RUNNER_ARGS = "/bin/csh CondTools/Hcal/test pfcuts_db_io_test.csh"/>
<use name="FWCore/Utilities"/>
</bin>
<test name="HcalPFCuts_unittest" command="pfcuts_db_io_test.sh"/>

<library file="HcalConditionsTest.cc" name="testCondToolsConTHcal">
<flags EDM_PLUGIN="1"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#!/bin/csh
#!/bin/bash -ex

set inputfile = `ls -1 $CMSSW_DATA_PATH/data-CondTools-Hcal/V*/CondTools/Hcal/data/hcalpfcuts.txt | tail -1`
set inputdir = `dirname $inputfile`
setenv CMSSW_SEARCH_PATH ${CMSSW_SEARCH_PATH}:$inputdir

cat >! temp_pfcuts_to_db.py <<%
inputfile=$(edmFileInPath CondTools/Hcal/data/hcalpfcuts.txt)
cat << \EOF > temp_pfcuts_to_db.py
import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.Eras import eras
Expand Down Expand Up @@ -34,7 +31,7 @@ process.es_ascii = cms.ESSource("HcalTextCalibrations",
input = cms.VPSet(
cms.PSet(
object = cms.string("PFCuts"),
file = cms.FileInPath("hcalpfcuts.txt")
file = cms.FileInPath("CondTools/Hcal/data/hcalpfcuts.txt")
)
)
)
Expand All @@ -59,11 +56,12 @@ process.mytest = cms.EDAnalyzer("HcalPFCutsPopConAnalyzer",
)
)
process.p = cms.Path(process.mytest)
%
EOF

cmsRun temp_pfcuts_to_db.py
rm temp_pfcuts_to_db.py

cat >! temp_pfcuts_from_db.py <<%
cat << \EOF > temp_pfcuts_from_db.py
import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.Eras import eras
Expand Down Expand Up @@ -101,7 +99,8 @@ process.dumpcond = cms.EDAnalyzer("HcalDumpConditions",
dump = cms.untracked.vstring("PFCuts")
)
process.p = cms.Path(process.dumpcond)
%
EOF

cmsRun temp_pfcuts_from_db.py
rm temp_pfcuts_from_db.py

Expand Down
2 changes: 2 additions & 0 deletions Configuration/PyReleaseValidation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The offsets currently in use are:
* 0.601: HLT as separate step
* 0.7: trackingMkFit modifier
* 0.8: BPH Parking (Run-2)
* 0.81: Running also HeavyFlavor DQM
* 0.9: Vector hits
* 0.12: Neutron background
* 0.13: MLPF algorithm
Expand Down Expand Up @@ -84,3 +85,4 @@ The offsets currently in use are:
* 0.9001: Sonic Triton
* 0.278: Weighted Vertexing in Blocks
* 0.279: Weighted Vertexing in Blocks and tracking only wf

4 changes: 2 additions & 2 deletions Configuration/PyReleaseValidation/python/relval_2026.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#2026 WFs to run in IB (TTbar)
numWFIB = []
numWFIB.extend([20034.0]) #2026D86
numWFIB.extend([20834.0,20834.911,20834.103]) #2026D88 DDD XML, DD4hep XML, aging
numWFIB.extend([20834.0]) #2026D88
numWFIB.extend([21061.97]) #2026D88 premixing stage1 (NuGun+PU)
numWFIB.extend([20834.5,20834.9,20834.501,20834.502]) #2026D88 pixelTrackingOnly, vector hits, Patatrack local reconstruction on CPU, Patatrack local reconstruction on GPU
numWFIB.extend([21034.99,21034.999]) #2026D88 premixing combined stage1+stage2 (ttbar+PU200, ttbar+PU50 for PR test)
Expand All @@ -33,7 +33,7 @@
numWFIB.extend([24034.0]) #2026D96
numWFIB.extend([24434.0]) #2026D97
numWFIB.extend([24834.0]) #2026D98
numWFIB.extend([25234.0]) #2026D99
numWFIB.extend([25234.0,25234.911]) #2026D99 DDD XML, DD4hep XML

#Additional sample for short matrix and IB
#CloseByPGun for HGCAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1756,6 +1756,34 @@ def condition(self, fragment, stepList, key, hasHarvest):
offset = 0.8,
)

## Wf to add Heavy Flavor DQM to whichever DQM is already there
class UpgradeWorkflow_HeavyFlavor(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
self.__frags = ["B0","Psi2S","Bu","Bd","Xi","Bs"]
thisStep = stepDict[step][k]["-s"]
if "Reco" in step:
if "DQM:" in thisStep:
#print(thisStep.replace("DQM:","DQM:@heavyFlavor+"))
stepDict[stepName][k] = merge([{'-s': thisStep.replace("DQM:","DQM:@heavyFlavor+")}, stepDict[step][k]])
#print(k)
elif "DQM" in thisStep:
stepDict[stepName][k] = merge([{'-s': thisStep.replace("DQM","DQM:@heavyFlavor")}, stepDict[step][k]])
else:
stepDict[stepName][k] = merge([{'-s': thisStep + ",DQM:@heavyFlavor"}, stepDict[step][k]])

def condition(self, fragment, stepList, key, hasHarvest):
return any(frag in fragment for frag in self.__frags)

upgradeWFs['HeavyFlavor'] = UpgradeWorkflow_HeavyFlavor(
steps = [
'Reco',
'RecoNano'
],
PU = [],
suffix = '_HeavyFlavor',
offset = 0.81,
)

class UpgradeWorkflow_JMENano(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
if 'Nano' in step:
Expand Down
4 changes: 2 additions & 2 deletions Configuration/PyReleaseValidation/scripts/runTheMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def runSelected(opt):
13234.0, #2021 ttbar fastsim
13434.0, #2021 ttbar PU fastsim
12434.0, #2023 ttbar
23634.0, #2026D95 ttbar (2023 new baseline)
#23634.911, #2026D95 ttbar DD4hep XML
23634.0, #2026D95 ttbar (Phase-2 baseline)
23634.911, #2026D95 ttbar DD4hep XML
23834.999, #2026D95 ttbar premixing stage1+stage2, PU50
23696.0, #CE_E_Front_120um D95
23700.0, #CE_H_Coarse_Scint D95
Expand Down
15 changes: 15 additions & 0 deletions Configuration/Skimming/python/PDWG_EXOLLPJetHCAL_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import FWCore.ParameterSet.Config as cms

import HLTrigger.HLTfilters.hltHighLevel_cfi as _hltHighLevel
hltLLPJetHCAL = _hltHighLevel.hltHighLevel.clone(
throw = False,
andOr = True,
HLTPaths = [
"HLT*_L1SingleLLPJet_*",
]
)

# disappTrk skim sequence
EXOLLPJetHCALSkimSequence = cms.Sequence(
hltLLPJetHCAL
)
11 changes: 11 additions & 0 deletions Configuration/Skimming/python/Skims_PDWG_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,17 @@
dataTier = cms.untracked.string('AOD')
)

from Configuration.Skimming.PDWG_EXOLLPJetHCAL_cff import *
EXOLLPJetHCALPath = cms.Path(EXOLLPJetHCALSkimSequence)
SKIMStreamEXOLLPJetHCAL = cms.FilteredStream(
responsible = 'PDWG',
name = 'EXOLLPJetHCAL',
paths = (EXOLLPJetHCALPath),
content = skimRawAODContent.outputCommands+['keep *_hbhereco__*'],
selectEvents = cms.untracked.PSet(),
dataTier = cms.untracked.string('AOD')
)

from Configuration.Skimming.PDWG_EXODTCluster_cff import *
EXODTClusterPath = cms.Path(EXODTClusterSkimSequence)
SKIMStreamEXODTCluster = cms.FilteredStream(
Expand Down
Loading

0 comments on commit 7ce96e9

Please sign in to comment.