Skip to content

Commit 0756b8f

Browse files
authored
Merge branch 'cms-sw:master' into empty
2 parents 90adbe2 + 2420a9a commit 0756b8f

File tree

2,396 files changed

+366849
-220989
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,396 files changed

+366849
-220989
lines changed

Alignment/APEEstimation/test/apeMeasurement/refitting_cfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
CondDBAlignmentError = CondDB.clone(connect = cms.string('sqlite_file:'+os.path.join(options.workingArea,options.measName)+'/apeObjects/apeIter'+str(options.iteration-1)+'.db'))
111111
process.myTrackerAlignmentErr = cms.ESSource("PoolDBESSource",
112112
CondDBAlignmentError,
113-
timetype = cms.string("runnumber"),
114113
toGet = cms.VPSet(
115114
cms.PSet(
116115
record = cms.string('TrackerAlignmentErrorExtendedRcd'),

Alignment/APEEstimation/test/apeTreeCreateDefault_cfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
CondDBAlignmentError = CondDB.clone(connect = cms.string(theSource))
9494
process.myTrackerAlignmentErr = cms.ESSource("PoolDBESSource",
9595
CondDBAlignmentError,
96-
timetype = cms.string("runnumber"),
9796
toGet = cms.VPSet(
9897
cms.PSet(
9998
record = cms.string('TrackerAlignmentErrorExtendedRcd'),

Alignment/APEEstimation/test/cfgTemplate/apeEstimatorSummary_cfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
CondDBAlignmentError = CondDB.clone(connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'))
7979
process.myTrackerAlignmentErr = cms.ESSource("PoolDBESSource",
8080
CondDBAlignmentError,
81-
timetype = cms.string("runnumber"),
8281
toGet = cms.VPSet(
8382
cms.PSet(
8483
record = cms.string('TrackerAlignmentErrorExtendedRcd'),

Alignment/APEEstimation/test/cfgTemplate/apeEstimator_cfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@
184184
CondDBAlignmentError = CondDB.clone(connect = cms.string('sqlite_file:'+os.environ['CMSSW_BASE']+'/src/Alignment/APEEstimation/hists/'+options.measurementName+'/apeObjects/apeIter'+str(options.iterNumber-1)+'.db'))
185185
process.myTrackerAlignmentErr = cms.ESSource("PoolDBESSource",
186186
CondDBAlignmentError,
187-
timetype = cms.string("runnumber"),
188187
toGet = cms.VPSet(
189188
cms.PSet(
190189
record = cms.string('TrackerAlignmentErrorExtendedRcd'),

Alignment/CommonAlignment/BuildFile.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<use name="CondCore/CondDB"/>
55
<use name="DataFormats/GeometryCommonDetAlgo"/>
66
<use name="DataFormats/GeometrySurface"/>
7+
<use name="FWCore/AbstractServices"/>
78
<use name="FWCore/MessageLogger"/>
89
<use name="FWCore/ParameterSet"/>
910
<use name="FWCore/ServiceRegistry"/>

Alignment/CommonAlignment/python/tools/trackselectionRefitting.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def getSequence(process, collection,
147147
if collection in ("ALCARECOTkAlMinBias", "generalTracks",
148148
"ALCARECOTkAlMinBiasHI", "hiGeneralTracks",
149149
"ALCARECOTkAlJetHT", "ALCARECOTkAlDiMuonVertexTracks",
150-
"hltMergedTracks"):
150+
"hltMergedTracks", "ALCARECOTkAlHLTTracks"):
151151
options["TrackSelector"]["Alignment"].update({
152152
"ptMin": 1.0,
153153
"pMin": 8.,
@@ -200,7 +200,8 @@ def getSequence(process, collection,
200200
elif collection in ("ALCARECOTkAlZMuMu",
201201
"ALCARECOTkAlZMuMuHI",
202202
"ALCARECOTkAlZMuMuPA",
203-
"ALCARECOTkAlDiMuon"):
203+
"ALCARECOTkAlDiMuon",
204+
"ALCARECOTkAlHLTTracksZMuMu"):
204205
options["TrackSelector"]["Alignment"].update({
205206
"ptMin": 15.0,
206207
"etaMin": -3.0,

Alignment/CommonAlignment/src/AlignableModifier.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include "CLHEP/Random/Randomize.h"
77

88
#include "DataFormats/GeometryCommonDetAlgo/interface/AlignmentPositionError.h"
9+
#include "FWCore/AbstractServices/interface/RandomNumberGenerator.h"
910
#include "FWCore/ServiceRegistry/interface/Service.h"
10-
#include "FWCore/Utilities/interface/RandomNumberGenerator.h"
1111
#include "FWCore/MessageLogger/interface/MessageLogger.h"
1212
#include "FWCore/ParameterSet/interface/ParameterSet.h"
1313

Alignment/HIPAlignmentAlgorithm/test/serialIntoNtuples_tpl.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
process.PoolDBESSource = cms.ESSource("PoolDBESSource",
2929
process.CondDBSetup,
30-
timetype = cms.string('runnumber'),
3130
toGet = cms.VPSet(cms.PSet(
3231
record = cms.string('TrackerAlignmentRcd'),
3332
tag = cms.string('Alignments')

Alignment/LaserAlignment/test/laserAlignment.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
## get the tracker alignment records from this file
3939
process.trackerAlignment = cms.ESSource( "PoolDBESSource",
4040
process.CondDBSetup,
41-
timetype = cms.string( 'runnumber' ),
4241
toGet = cms.VPSet(
4342
cms.PSet(
4443
record = cms.string( 'TrackerAlignmentRcd' ),

Alignment/LaserAlignment/test/laserAlignment_sim.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
## get the tracker alignment records from this file
3434
process.trackerAlignment = cms.ESSource( "PoolDBESSource",
3535
process.CondDBSetup,
36-
timetype = cms.string( 'runnumber' ),
3736
toGet = cms.VPSet(
3837
cms.PSet(
3938
record = cms.string( 'TrackerAlignmentRcd' ),

Alignment/LaserAlignmentSimulation/BuildFile.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<use name="FWCore/AbstractServices"/>
12
<use name="FWCore/MessageLogger"/>
23
<use name="FWCore/ParameterSet"/>
34
<use name="FWCore/ServiceRegistry"/>

Alignment/LaserAlignmentSimulation/src/LaserBeamsBarrel.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
#include "Alignment/LaserAlignmentSimulation/interface/LaserBeamsBarrel.h"
1010

11+
#include "FWCore/AbstractServices/interface/RandomNumberGenerator.h"
1112
#include "FWCore/MessageLogger/interface/MessageLogger.h"
1213
#include "FWCore/ServiceRegistry/interface/Service.h"
13-
#include "FWCore/Utilities/interface/RandomNumberGenerator.h"
1414

1515
#include <CLHEP/Random/RandGaussQ.h>
1616
#include "G4ParticleDefinition.hh"

Alignment/LaserAlignmentSimulation/src/LaserBeamsTEC1.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
#include "Alignment/LaserAlignmentSimulation/interface/LaserBeamsTEC1.h"
1010

11+
#include "FWCore/AbstractServices/interface/RandomNumberGenerator.h"
1112
#include "FWCore/MessageLogger/interface/MessageLogger.h"
1213
#include "FWCore/ServiceRegistry/interface/Service.h"
13-
#include "FWCore/Utilities/interface/RandomNumberGenerator.h"
1414

1515
#include <CLHEP/Random/RandGaussQ.h>
1616
#include <CLHEP/Units/SystemOfUnits.h>

Alignment/LaserAlignmentSimulation/src/LaserBeamsTEC2.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
#include "Alignment/LaserAlignmentSimulation/interface/LaserBeamsTEC2.h"
1010

11+
#include "FWCore/AbstractServices/interface/RandomNumberGenerator.h"
1112
#include "FWCore/MessageLogger/interface/MessageLogger.h"
1213
#include "FWCore/ServiceRegistry/interface/Service.h"
13-
#include "FWCore/Utilities/interface/RandomNumberGenerator.h"
1414

1515
#include <CLHEP/Random/RandGaussQ.h>
1616
#include <CLHEP/Units/SystemOfUnits.h>

Alignment/MillePedeAlignmentAlgorithm/test/test_mille.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,20 @@
6969
primaryWidth = setupPrimaryWidth,
7070
cosmicsZeroTesla = setupCosmicsZeroTesla)
7171

72+
################################################################################
73+
# Configure the MessageLogger service to dump information to cout (instead of alignment.log)
74+
# see https://github.com/cms-sw/cmssw/issues/47963 for more information
75+
# ------------------------------------------------------------------------------
76+
process.MessageLogger.destinations = cms.untracked.vstring('cout')
77+
process.MessageLogger.statistics = cms.untracked.vstring('cout')
78+
# Copy all parameters from the existing 'alignment' PSet to a new 'cout' PSet
79+
if hasattr(process.MessageLogger, 'alignment'):
80+
alignment_pset = process.MessageLogger.alignment
81+
process.MessageLogger.cout = alignment_pset
82+
83+
# Optionally delete the old 'alignment' PSet
84+
delattr(process.MessageLogger, 'alignment')
85+
7286
################################################################################
7387
# Overwrite some conditions in global tag
7488
# ------------------------------------------------------------------------------

Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFromTrack.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,18 @@ class MuonResidualsFromTrack {
9595
TMatrixD choleskyCorrMatrix(DetId chamberId);
9696

9797
private:
98+
//Due to large constructor code, UBSAN with GCC14 hangs and never returns
99+
//Moving large constructor code to a private function fixes this issue
100+
void init(edm::ESHandle<TransientTrackingRecHitBuilder> builder,
101+
edm::ESHandle<MagneticField> magneticField,
102+
edm::ESHandle<GlobalTrackingGeometry> globalGeometry,
103+
edm::ESHandle<DetIdAssociator> muonDetIdAssociator_,
104+
edm::ESHandle<Propagator> prop,
105+
const Trajectory *traj,
106+
const reco::Track *recoTrack,
107+
AlignableNavigator *navigator,
108+
double maxResidual);
109+
98110
TrajectoryStateCombiner m_tsoscomb;
99111

100112
int m_tracker_numHits;

Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFromTrack.cc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,26 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(edm::ESHandle<TransientTrackingRe
3131
AlignableNavigator* navigator,
3232
double maxResidual)
3333
: m_recoTrack(recoTrack) {
34+
init(trackerRecHitBuilder,
35+
magneticField,
36+
globalGeometry,
37+
muonDetIdAssociator_,
38+
prop,
39+
traj,
40+
recoTrack,
41+
navigator,
42+
maxResidual);
43+
}
44+
45+
void MuonResidualsFromTrack::init(edm::ESHandle<TransientTrackingRecHitBuilder> trackerRecHitBuilder,
46+
edm::ESHandle<MagneticField> magneticField,
47+
edm::ESHandle<GlobalTrackingGeometry> globalGeometry,
48+
edm::ESHandle<DetIdAssociator> muonDetIdAssociator_,
49+
edm::ESHandle<Propagator> prop,
50+
const Trajectory* traj,
51+
const reco::Track* recoTrack,
52+
AlignableNavigator* navigator,
53+
double maxResidual) {
3454
bool m_debug = false;
3555

3656
if (m_debug) {

Alignment/OfflineValidation/plugins/GeneralPurposeVertexAnalyzer.cc

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,18 @@
3232
#include "CommonTools/UtilAlgos/interface/TFileService.h"
3333
#include "DataFormats/BeamSpot/interface/BeamSpot.h"
3434
#include "DataFormats/Common/interface/Association.h"
35+
#include "DataFormats/Common/interface/RefToBase.h"
3536
#include "DataFormats/Common/interface/ValueMap.h"
3637
#include "DataFormats/TrackReco/interface/Track.h"
3738
#include "DataFormats/TrackReco/interface/TrackFwd.h"
3839
#include "DataFormats/VertexReco/interface/Vertex.h"
3940
#include "DataFormats/VertexReco/interface/VertexFwd.h"
40-
#include "FWCore/ServiceRegistry/interface/Service.h"
4141
#include "FWCore/Framework/interface/Event.h"
4242
#include "FWCore/Framework/interface/Frameworkfwd.h"
4343
#include "FWCore/Framework/interface/MakerMacros.h"
4444
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
4545
#include "FWCore/ParameterSet/interface/ParameterSet.h"
46+
#include "FWCore/ServiceRegistry/interface/Service.h"
4647
#include "FWCore/Utilities/interface/InputTag.h"
4748
#include "FWCore/Utilities/interface/isFinite.h"
4849

@@ -123,6 +124,7 @@ class GeneralPurposeVertexAnalyzer : public edm::one::EDAnalyzer<edm::one::Share
123124
TProfile2D *IPVsEtaVsPhi_, *IPErrVsEtaVsPhi_;
124125

125126
void bookIPMonitor(const edm::ParameterSet &, const edm::Service<TFileService> fs);
127+
void fillIPMonitor(const edm::RefToBase<reco::Track> &tk, const math::XYZPoint &pv);
126128
};
127129

128130
const edm::ParameterSet conf_;
@@ -187,23 +189,35 @@ class GeneralPurposeVertexAnalyzer : public edm::one::EDAnalyzer<edm::one::Share
187189

188190
void GeneralPurposeVertexAnalyzer::IPMonitoring::bookIPMonitor(const edm::ParameterSet &config,
189191
const edm::Service<TFileService> fs) {
192+
// Lambda for range validation
193+
auto checkRange = [](const std::string &name, double min, double max) {
194+
if (min >= max) {
195+
throw cms::Exception("IPMonitoring")
196+
<< "Invalid range for " << name << ": min (" << min << ") >= max (" << max << ")";
197+
}
198+
};
199+
190200
int VarBin = config.getParameter<int>(fmt::format("D{}Bin", varname_));
191201
double VarMin = config.getParameter<double>(fmt::format("D{}Min", varname_));
192202
double VarMax = config.getParameter<double>(fmt::format("D{}Max", varname_));
203+
checkRange(fmt::format("D{}", varname_), VarMin, VarMax);
193204

194205
int PhiBin = config.getParameter<int>("PhiBin");
195206
int PhiBin2D = config.getParameter<int>("PhiBin2D");
196207
double PhiMin = config.getParameter<double>("PhiMin");
197208
double PhiMax = config.getParameter<double>("PhiMax");
209+
checkRange("Phi", PhiMin, PhiMax);
198210

199211
int EtaBin = config.getParameter<int>("EtaBin");
200212
int EtaBin2D = config.getParameter<int>("EtaBin2D");
201213
double EtaMin = config.getParameter<double>("EtaMin");
202214
double EtaMax = config.getParameter<double>("EtaMax");
215+
checkRange("Eta", EtaMin, EtaMax);
203216

204217
int PtBin = config.getParameter<int>("PtBin");
205218
double PtMin = config.getParameter<double>("PtMin") * pTcut_;
206219
double PtMax = config.getParameter<double>("PtMax") * pTcut_;
220+
checkRange("Pt", PtMin, PtMax);
207221

208222
IP_ = fs->make<TH1D>(fmt::format("d{}_pt{}", varname_, pTcut_).c_str(),
209223
fmt::format("PV tracks (p_{{T}} > {} GeV) d_{{{}}} (#mum)", pTcut_, varname_).c_str(),
@@ -336,6 +350,38 @@ void GeneralPurposeVertexAnalyzer::IPMonitoring::bookIPMonitor(const edm::Parame
336350
fmt::format("PV tracks (p_{{T}} > {} GeV) d_{{{}}} error (#mum)", pTcut_, varname_).c_str());
337351
}
338352

353+
void GeneralPurposeVertexAnalyzer::IPMonitoring::fillIPMonitor(const edm::RefToBase<reco::Track> &tk,
354+
const math::XYZPoint &pv) {
355+
float value = 999.f, error = 9999.f;
356+
357+
if (varname_ == "xy") {
358+
value = tk->dxy(pv) * cmToUm;
359+
error = tk->dxyError() * cmToUm;
360+
} else if (varname_ == "z") {
361+
value = tk->dz(pv) * cmToUm;
362+
error = tk->dzError() * cmToUm;
363+
} else {
364+
throw cms::Exception("IPMonitoring") << "Unknown varname: " << varname_ << ". Expected 'xy' or 'z\'.";
365+
}
366+
367+
const float eta = tk->eta();
368+
const float phi = tk->phi();
369+
const float pt = tk->pt();
370+
371+
IP_->Fill(value);
372+
IPVsPhi_->Fill(phi, value);
373+
IPVsEta_->Fill(eta, value);
374+
IPVsPt_->Fill(pt, value);
375+
IPVsEtaVsPhi_->Fill(eta, phi, value);
376+
377+
IPErr_->Fill(error);
378+
IPPull_->Fill(value / error);
379+
IPErrVsPhi_->Fill(phi, error);
380+
IPErrVsEta_->Fill(eta, error);
381+
IPErrVsPt_->Fill(pt, error);
382+
IPErrVsEtaVsPhi_->Fill(eta, phi, error);
383+
}
384+
339385
//
340386
// constructors and destructor
341387
//
@@ -510,9 +556,6 @@ void GeneralPurposeVertexAnalyzer::pvTracksPlots(const reco::Vertex &v) {
510556
const float chi2NDF = t->normalizedChi2();
511557
const float chi2Prob = TMath::Prob(t->chi2(), static_cast<int>(t->ndof()));
512558
const float Dxy = t->dxy(myVertex) * cmToUm;
513-
const float Dz = t->dz(myVertex) * cmToUm;
514-
const float DxyErr = t->dxyError() * cmToUm;
515-
const float DzErr = t->dzError() * cmToUm;
516559

517560
sumPT += pt2;
518561

@@ -524,60 +567,20 @@ void GeneralPurposeVertexAnalyzer::pvTracksPlots(const reco::Vertex &v) {
524567
eta_pt1->Fill(eta);
525568

526569
// dxy pT>1
527-
528-
dxy_pt1.IP_->Fill(Dxy);
529-
dxy_pt1.IPVsPhi_->Fill(phi, Dxy);
530-
dxy_pt1.IPVsEta_->Fill(eta, Dxy);
531-
dxy_pt1.IPVsEtaVsPhi_->Fill(eta, phi, Dxy);
532-
533-
dxy_pt1.IPErr_->Fill(DxyErr);
534-
dxy_pt1.IPPull_->Fill(Dxy / DxyErr);
535-
dxy_pt1.IPErrVsPhi_->Fill(phi, DxyErr);
536-
dxy_pt1.IPErrVsEta_->Fill(eta, DxyErr);
537-
dxy_pt1.IPErrVsEtaVsPhi_->Fill(eta, phi, DxyErr);
570+
dxy_pt1.fillIPMonitor(t, myVertex);
538571

539572
// dz pT>1
540-
541-
dz_pt1.IP_->Fill(Dz);
542-
dz_pt1.IPVsPhi_->Fill(phi, Dz);
543-
dz_pt1.IPVsEta_->Fill(eta, Dz);
544-
dz_pt1.IPVsEtaVsPhi_->Fill(eta, phi, Dz);
545-
546-
dz_pt1.IPErr_->Fill(DzErr);
547-
dz_pt1.IPPull_->Fill(Dz / DzErr);
548-
dz_pt1.IPErrVsPhi_->Fill(phi, DzErr);
549-
dz_pt1.IPErrVsEta_->Fill(eta, DzErr);
550-
dz_pt1.IPErrVsEtaVsPhi_->Fill(eta, phi, DzErr);
573+
dz_pt1.fillIPMonitor(t, myVertex);
551574

552575
if (pt >= 10.f) {
553576
phi_pt10->Fill(phi);
554577
eta_pt10->Fill(eta);
555578

556579
// dxy pT>10
557-
558-
dxy_pt10.IP_->Fill(Dxy);
559-
dxy_pt10.IPVsPhi_->Fill(phi, Dxy);
560-
dxy_pt10.IPVsEta_->Fill(eta, Dxy);
561-
dxy_pt10.IPVsEtaVsPhi_->Fill(eta, phi, Dxy);
562-
563-
dxy_pt10.IPErr_->Fill(DxyErr);
564-
dxy_pt10.IPPull_->Fill(Dxy / DxyErr);
565-
dxy_pt10.IPErrVsPhi_->Fill(phi, DxyErr);
566-
dxy_pt10.IPErrVsEta_->Fill(eta, DxyErr);
567-
dxy_pt10.IPErrVsEtaVsPhi_->Fill(eta, phi, DxyErr);
580+
dxy_pt10.fillIPMonitor(t, myVertex);
568581

569582
// dz pT>10
570-
571-
dz_pt10.IP_->Fill(Dz);
572-
dz_pt10.IPVsPhi_->Fill(phi, Dz);
573-
dz_pt10.IPVsEta_->Fill(eta, Dz);
574-
dz_pt10.IPVsEtaVsPhi_->Fill(eta, phi, Dz);
575-
576-
dz_pt10.IPErr_->Fill(DzErr);
577-
dz_pt10.IPPull_->Fill(Dz / DzErr);
578-
dz_pt10.IPErrVsPhi_->Fill(phi, DzErr);
579-
dz_pt10.IPErrVsEta_->Fill(eta, DzErr);
580-
dz_pt10.IPErrVsEtaVsPhi_->Fill(eta, phi, DzErr);
583+
dz_pt10.fillIPMonitor(t, myVertex);
581584
}
582585
}
583586

0 commit comments

Comments
 (0)