Skip to content

Commit 71442a7

Browse files
authored
Merge branch 'master' into P8RndmEnginePtr
2 parents 3161768 + e261384 commit 71442a7

File tree

1,084 files changed

+194826
-152707
lines changed

Some content is hidden

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

1,084 files changed

+194826
-152707
lines changed

Alignment/LaserAlignment/interface/LASModuleProfile.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class LASModuleProfile {
2020
void SetValue(unsigned int theStripNumber, const double& theValue) { data.at(theStripNumber) = theValue; }
2121
void SetAllValuesTo(const double&);
2222
void DumpToArray(double[512]);
23-
LASModuleProfile& operator=(const LASModuleProfile&);
2423
LASModuleProfile operator+(const LASModuleProfile&);
2524
LASModuleProfile operator-(const LASModuleProfile&);
2625
LASModuleProfile operator+(const double[512]);

Alignment/LaserAlignment/src/LASModuleProfile.cc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,6 @@ void LASModuleProfile::Init(void) {
100100
data.resize(512);
101101
}
102102

103-
LASModuleProfile& LASModuleProfile::operator=(const LASModuleProfile& anotherProfile) {
104-
///
105-
///
106-
///
107-
108-
// check for self-assignment
109-
if (this != &anotherProfile) {
110-
for (unsigned int i = 0; i < 512; ++i) {
111-
data.at(i) = anotherProfile.GetValue(i);
112-
}
113-
}
114-
115-
return *this;
116-
}
117-
118103
LASModuleProfile LASModuleProfile::operator+(const LASModuleProfile& anotherProfile) {
119104
///
120105
///

Alignment/MillePedeAlignmentAlgorithm/test/BuildFile.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<test name="test-pede" command="pede -t">
1111
<use name="millepede"/>
1212
</test>
13+
<test name="test_MilleZmm" command="test_mille.sh"/>
1314
<test name="test_PedeCampaign" command="test_pede.sh"/>
1415
<test name="test_PayloadSanity" command="test_payload_sanity.sh">
1516
<flags PRE_TEST="test_PedeCampaign"/>
Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
import FWCore.ParameterSet.Config as cms
2+
import FWCore.ParameterSet.VarParsing as VarParsing
3+
4+
process = cms.Process("Alignment")
5+
6+
options = VarParsing.VarParsing()
7+
options.register ('algoMode',
8+
"mille", # default value
9+
VarParsing.VarParsing.multiplicity.singleton,
10+
VarParsing.VarParsing.varType.string,
11+
"algo mode")
12+
13+
options.register ('useLapack',
14+
False, # default value
15+
VarParsing.VarParsing.multiplicity.singleton,
16+
VarParsing.VarParsing.varType.bool,
17+
"use lapack?")
18+
options.parseArguments()
19+
20+
################################################################################
21+
# Variables edited by mps_alisetup.py. Used in functions below.
22+
# You can change them manually as well.
23+
# ------------------------------------------------------------------------------
24+
setupGlobaltag = "140X_dataRun3_ForTkAlReReco_v1"
25+
setupCollection = "ALCARECOTkAlZMuMu"
26+
setupCosmicsDecoMode = False
27+
setupCosmicsZeroTesla = False
28+
setupPrimaryWidth = -1.0
29+
setupJson = ""
30+
setupRunStartGeometry = 362350
31+
32+
################################################################################
33+
# Variables edited by MPS (mps_setup and mps_merge). Be careful.
34+
# ------------------------------------------------------------------------------
35+
# Default is "mille". Gets changed to "pede" by mps_merge.
36+
setupAlgoMode = options.algoMode
37+
38+
# MPS looks specifically for the string "101" so don't change this.
39+
setupMonitorFile = "millePedeMonitor101.root"
40+
setupBinaryFile = "milleBinary101.dat"
41+
42+
# Input files. Edited by mps_splice.py
43+
readFiles = cms.untracked.vstring()
44+
readFiles.extend([
45+
'/store/data/Run2022G/Muon/ALCARECO/TkAlZMuMu-PromptReco-v1/000/362/362/00000/d6641b44-f4e4-4054-b5b0-f038e567c61e.root',
46+
'/store/data/Run2022G/Muon/ALCARECO/TkAlZMuMu-PromptReco-v1/000/362/433/00000/1f93221e-23ce-4731-906a-48c9fe405515.root',
47+
'/store/data/Run2022G/Muon/ALCARECO/TkAlZMuMu-PromptReco-v1/000/362/435/00000/df6e27d1-5367-4192-83ed-2be9303d7837.root',
48+
'/store/data/Run2022G/Muon/ALCARECO/TkAlZMuMu-PromptReco-v1/000/362/437/00000/7ce5bac8-0b29-40f3-a63b-fd0813d5678d.root',
49+
'/store/data/Run2022G/Muon/ALCARECO/TkAlZMuMu-PromptReco-v1/000/362/437/00000/ea6b065d-1912-491e-9cce-732eaf6fa038.root'])
50+
################################################################################
51+
52+
################################################################################
53+
# General setup
54+
# ------------------------------------------------------------------------------
55+
import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.GeneralSetup as generalSetup
56+
generalSetup.setup(process, setupGlobaltag, setupCosmicsZeroTesla)
57+
58+
################################################################################
59+
# setup alignment producer
60+
# ------------------------------------------------------------------------------
61+
import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.ConfigureAlignmentProducer as confAliProducer
62+
63+
confAliProducer.setConfiguration(process,
64+
collection = setupCollection,
65+
mode = setupAlgoMode,
66+
monitorFile = setupMonitorFile,
67+
binaryFile = setupBinaryFile,
68+
primaryWidth = setupPrimaryWidth,
69+
cosmicsZeroTesla = setupCosmicsZeroTesla)
70+
71+
################################################################################
72+
# Overwrite some conditions in global tag
73+
# ------------------------------------------------------------------------------
74+
import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.SetCondition as tagwriter
75+
76+
#######################
77+
## insert Alignables ##
78+
#######################
79+
80+
# # to run a high-level alignment on real data (including TOB centering; use
81+
# # pixel-barrel centering for MC) of the whole tracker you can use the
82+
# # following configuration:
83+
#
84+
process.AlignmentProducer.ParameterBuilder.parameterTypes = [
85+
"SelectorRigid,RigidBody",
86+
#"SelectorBowed,BowedSurface",
87+
#"SelectorTwoBowed,TwoBowedSurfaces",
88+
]
89+
90+
# # Define the high-level structure alignables
91+
process.AlignmentProducer.ParameterBuilder.SelectorRigid = cms.PSet(
92+
alignParams = cms.vstring(
93+
"TrackerP1PXBLadder,111111",
94+
"TrackerP1PXECPanel,111111",
95+
"TrackerTIBHalfBarrel,111111",
96+
"TrackerTOBHalfBarrel,rrrrrr",
97+
"TrackerTIDEndcap,111111",
98+
"TrackerTECEndcap,111111",
99+
)
100+
)
101+
102+
process.AlignmentProducer.RunRangeSelection = [
103+
cms.PSet(
104+
RunRanges = cms.vstring(
105+
"362350",
106+
"362440",
107+
"362446",
108+
"362617",
109+
"362632",
110+
"362640",
111+
"362641",
112+
"362645",
113+
"362663",
114+
"362670",
115+
"362679",
116+
"362683",
117+
"362697",
118+
"362711",
119+
"362744"
120+
),
121+
selector = cms.vstring(
122+
"TrackerP1PXBLadder,111111",
123+
"TrackerP1PXECPanel,111111"
124+
)
125+
),
126+
127+
cms.PSet(
128+
RunRanges = cms.vstring(
129+
"362350",
130+
"362520"
131+
),
132+
selector = cms.vstring(
133+
"TrackerTIBHalfBarrel,111111",
134+
"TrackerTIDEndcap,111111",
135+
"TrackerTECEndcap,111111"
136+
)
137+
)
138+
] # end of process.AlignmentProducer.RunRangeSelection
139+
140+
#########################
141+
## insert Pedesettings ##
142+
#########################
143+
144+
# # reasonable pede settings are already defined in
145+
# # 'confAliProducer.setConfiguration' above
146+
# #
147+
148+
if(options.algoMode == "pede"):
149+
if(options.useLapack):
150+
# LAPACK
151+
print("I am going to run fullLAPACK 3 0.8")
152+
process.AlignmentProducer.algoConfig.pedeSteerer.method = "fullLAPACK 3 0.8"
153+
process.AlignmentProducer.algoConfig.pedeSteerer.pedeCommand = "export OMP_STACKSIZE=20M; MKL_THREADING_LAYER=GNU; export OMP_NUM_THREADS=10; export MKL_NUM_THREADS=10; \
154+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/cvmfs/projects.cern.ch/intelsw/oneAPI/linux/x86_64/2022/mkl/2022.1.0/lib/intel64;"
155+
else:
156+
# MINRES
157+
print("I am going to run sparseMINRES 6 0.8")
158+
process.AlignmentProducer.algoConfig.pedeSteerer.method = "sparseMINRES 6 0.8"
159+
process.AlignmentProducer.algoConfig.pedeSteerer.pedeCommand = "export OMP_STACKSIZE=20M; pede"
160+
else:
161+
pass
162+
163+
# # if you want to obtain alignment errors, use the following setting:
164+
# #
165+
# # a list of possible options is documented here:
166+
# # http://www.desy.de/~kleinwrt/MP2/doc/html/option_page.html#sec-cmd
167+
# #
168+
# # if you need to request a larger stack size for individual threads when
169+
# # running pede, you can do this with this setting:
170+
# #
171+
# # you can change or drop pede options as follows:
172+
#
173+
import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.helper as helper
174+
helper.set_pede_option(process, "threads 10")
175+
helper.set_pede_option(process, "entries 100 10 2")
176+
helper.set_pede_option(process, "skipemptycons")
177+
helper.set_pede_option(process, "countrecords")
178+
179+
#################
180+
## add filters ##
181+
#################
182+
183+
# # please add any EDFilter here that should run before processing the event,
184+
# # e.g. add the following lines to ensure that only 3.8T events are selected
185+
#
186+
# import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.helper as helper
187+
# process.load("Alignment.CommonAlignment.magneticFieldFilter_cfi")
188+
# process.magneticFieldFilter.magneticField = 38 # in units of kGauss (=0.1T)
189+
# helper.add_filter(process, process.magneticFieldFilter)
190+
191+
################################################################################
192+
# Mille-procedure
193+
# ------------------------------------------------------------------------------
194+
if setupAlgoMode == "mille":
195+
import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.MilleSetup as mille
196+
mille.setup(process,
197+
input_files = readFiles,
198+
collection = setupCollection,
199+
json_file = setupJson,
200+
cosmics_zero_tesla = setupCosmicsZeroTesla,
201+
cosmics_deco_mode = setupCosmicsDecoMode)
202+
203+
################################################################################
204+
# Pede-procedure
205+
# ------------------------------------------------------------------------------
206+
else:
207+
# placeholers get replaced by mps_merge.py, which is called in mps_setup.pl
208+
merge_binary_files = ['placeholder_binaryList']
209+
merge_tree_files = ['placeholder_treeList']
210+
211+
import Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.PedeSetup as pede
212+
pede.setup(process,
213+
binary_files = merge_binary_files,
214+
tree_files = merge_tree_files,
215+
run_start_geometry = setupRunStartGeometry)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
function die { echo $1: status $2; exit $2; }
3+
4+
# Check if doPede argument is provided and is true
5+
if [[ "$1" == "--doPede" ]]; then
6+
doPede=true
7+
else
8+
doPede=false
9+
fi
10+
11+
echo -e "testing mille step ..."
12+
(cmsRun ${SCRAM_TEST_PATH}/test_mille.py algoMode="mille") || die 'failed running test_mille.py (LAPACK)' $?
13+
14+
if [[ "$doPede" == "true" ]]; then
15+
echo -e "\n\ntesting pede step with sparseMINRES ..."
16+
(cmsRun ${SCRAM_TEST_PATH}/test_mille.py algoMode="pede" useLapack=False) || die 'failed running test_mille.py (MINRES)' $?
17+
18+
echo -e "\n\ntesting pedes step with LAPACK ..."
19+
(cmsRun ${SCRAM_TEST_PATH}/test_mille.py algoMode="pede" useLapack=True) || die 'failed running test_mille.py (LAPACK)' $?
20+
fi

Alignment/OfflineValidation/bin/BuildFile.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<flags CXXFLAGS="-g -Wall -O3 -Wall -std=c++17 -lASImage -lMultiProc" />
1+
<flags CXXFLAGS="-g -O3 -Wall -lASImage -lMultiProc" />
22
<use name="Alignment/OfflineValidation"/>
33
<use name="boost" />
44
<use name="boost_filesystem"/>

Alignment/OfflineValidation/bin/DMRtrends.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,17 @@ int trends(int argc, char *argv[]) {
136136

137137
for (auto const &Variable : validation.get_child("Variables")) {
138138
vector<tuple<TString, TString, float, float>> DMRs{{"mu", "#mu [#mum]", -6, 6},
139-
{"sigma", "#sigma_{#mu} [#mum]", -15, 15},
139+
{"sigma", "#sigma_{#mu} [#mum]", -5, 5},
140140
{"muplus", "#mu outward [#mum]", -6, 6},
141-
{"sigmaplus", "#sigma_{#mu outward} [#mum]", -15, 15},
141+
{"sigmaplus", "#sigma_{#mu outward} [#mum]", -5, 5},
142142
{"muminus", "#mu inward [#mum]", -6, 6},
143-
{"sigmaminus", "#sigma_{#mu inward} [#mum]", -15, 15},
144-
{"deltamu", "#Delta#mu [#mum]", -15, 15},
145-
{"sigmadeltamu", "#sigma_{#Delta#mu} [#mum]", -15, 15},
146-
{"musigma", "#mu [#mum]", -6, 6},
147-
{"muplussigmaplus", "#mu outward [#mum]", -15, 15},
148-
{"muminussigmaminus", "#mu inward [#mum]", -15, 15},
149-
{"deltamusigmadeltamu", "#Delta#mu [#mum]", -15, 15}};
143+
{"sigmaminus", "#sigma_{#mu inward} [#mum]", -5, 5},
144+
{"deltamu", "#Delta#mu [#mum]", -5, 5},
145+
{"sigmadeltamu", "#sigma_{#Delta#mu} [#mum]", -5, 5},
146+
{"musigma", "#mu [#mum]", -2, 4},
147+
{"muplussigmaplus", "#mu outward [#mum]", -5, 5},
148+
{"muminussigmaminus", "#mu inward [#mum]", -5, 5},
149+
{"deltamusigmadeltamu", "#Delta#mu [#mum]", -5, 10}};
150150

151151
if (Variable.second.get_value<string>() == "DrmsNR") {
152152
DMRs = {{"mu", "RMS(x'_{pred}-x'_{hit} /#sigma)", -1.2, 1.2},

Alignment/OfflineValidation/bin/DiMuonVmerge.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include "TString.h"
1717
#include "TASImage.h"
18+
#include "TGraph.h"
1819

1920
#include "Alignment/OfflineValidation/macros/loopAndPlot.C"
2021
#include "Alignment/OfflineValidation/interface/TkAlStyle.h"

Alignment/OfflineValidation/bin/PVtrends.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ int trends(int argc, char *argv[]) {
140140
outputdir.data(),
141141
Form("mean %s", titles[i].data()),
142142
Form("mean %s", ytitles[i].data()),
143-
-7.,
144-
10.,
143+
-4.,
144+
8.,
145145
style,
146146
GetLumi,
147147
lumiAxisType.data());
@@ -150,7 +150,7 @@ int trends(int argc, char *argv[]) {
150150
Form("RMS %s", titles[i].data()),
151151
Form("RMS %s", ytitles[i].data()),
152152
0.,
153-
35.,
153+
25.,
154154
style,
155155
GetLumi,
156156
lumiAxisType.data());
@@ -181,12 +181,15 @@ int trends(int argc, char *argv[]) {
181181
int color = alignment.second.get<int>("color");
182182
int style = floor(alignment.second.get<double>("style") / 100.);
183183
gMean->SetMarkerColor(color);
184+
gMean->SetLineColor(color); // no need to be set but looks better IMHO
184185
gMean->SetMarkerStyle(style);
186+
gMean->SetMarkerSize(1.6);
185187

186188
hRMS->SetTitle(gtitle); // for the legend
187189
//hRMS ->SetTitle(""); // for the legend
188190
hRMS->SetMarkerSize(0.6);
189191
hRMS->SetMarkerColor(color);
192+
hRMS->SetLineColor(color); // needs to be set, otherwise color is NOT picked up
190193
hRMS->SetMarkerStyle(style);
191194

192195
mean(gMean, "PZ", "p", fullRange);

Alignment/OfflineValidation/macros/loopAndPlot.C

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "TDirectory.h"
55
#include "TFile.h"
66
#include "TGaxis.h"
7+
#include "TGraph.h"
78
#include "TH1.h"
89
#include "TH2.h"
910
#include "TKey.h"

0 commit comments

Comments
 (0)