Skip to content

Commit 843ea62

Browse files
author
Belle II Software
committed
Merge branch 'feature/10955-fix-typos-in-the-background-package' into 'main'
Resolve "Fix typos in the background package" Closes #10955 See merge request belle2/software/basf2!4171
2 parents 0265169 + 6323875 commit 843ea62

22 files changed

+33
-34
lines changed

background/doc/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ In the following we describe the ``background`` package (documentation still und
55
The background package is how we introduce beam background hit rates in MC samples.
66
Things users should consider when using this package are the following:
77

8-
* Run conditions (i.e. indepedent vs dependent MC samples):
8+
* Run conditions (i.e. independent vs dependent MC samples):
99

10-
* Run Indepedent or Simulated Beam Backgrounds: The experiment number used for "Exp: 100X" (ex. 1002 for phase 2, 1003 for phase 3 Run 1, and 1004 for Run 2).
10+
* Run Independent or Simulated Beam Backgrounds: The experiment number used for "Exp: 100X" (ex. 1002 for phase 2, 1003 for phase 3 Run 1, and 1004 for Run 2).
1111
The files produced from these 'experiments' are in coordination with the background group and are used in run-independent MC proudction.
1212
* Run Dependent or Random Trigger Events: These files are used to produce BG overlay files for use in run-dependent MC production.
1313
Essentially, a random trigger is used to collect events that don't contain physic signals and therefore represent the effect of beam backgrounds and detector noise.

background/examples/beamBkgMixer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
sys.exit()
3232

3333
# define background (collision) files
34-
# glob.glob is the prefered way to get the list of files:
34+
# glob.glob is the preferred way to get the list of files:
3535
# (the directory must include only BG files!)
3636

3737
bg = glob.glob(os.environ['BELLE2_BACKGROUND_MIXING_DIR'] + '/*.root')
3838
if len(bg) == 0:
3939
b2.B2ERROR('No files found in ', os.environ['BELLE2_BACKGROUND_MIXING_DIR'])
4040
sys.exit()
4141

42-
# alternative: you can specify files explicitely
42+
# alternative: you can specify files explicitly
4343
#
4444
# dir = '/sw/belle2/bkg/' # change the directory name if you don't run on KEKCC
4545
# bg = [

background/examples/genericBBbarWithBGMixing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Example of simulation/reconstruction of generic BBbar events with beam background.
2121
#
2222
# This example generates BBbar events using EvtGenInput module, runs full simulation
23-
# with BG mixing using BeamBkgMixer module, then runs full reconstruction and finaly
23+
# with BG mixing using BeamBkgMixer module, then runs full reconstruction and finally
2424
# writes the results to mdst file.
2525
# ----------------------------------------------------------------------------------
2626

background/examples/genericBBbarWithBGOverlay.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# This example generates BBbar events using EvtGenInput module,
2323
# runs full simulation and digitization,
2424
# then adds measured BG to simulated data using BGOverlayExecutor module,
25-
# runs full reconstruction and finaly writes the results to mdst file.
25+
# runs full reconstruction and finally writes the results to mdst file.
2626
# ----------------------------------------------------------------------------------
2727

2828
b2.set_log_level(b2.LogLevel.ERROR)

background/examples/onlyBGMixing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Example of simulation/reconstruction of events with beam background only.
2121
#
2222
# This example runs full simulation of beam BG only events using BeamBkgMixer module,
23-
# then runs full reconstruction and finaly writes the results to mdst file.
23+
# then runs full reconstruction and finally writes the results to mdst file.
2424
# ----------------------------------------------------------------------------------
2525

2626
b2.set_log_level(b2.LogLevel.ERROR)

background/examples/onlyBGOverlay.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Example of simulation/reconstruction of events with beam background only.
2121
#
2222
# This example runs full simulation of beam BG only events using BGOverlayExecutor,
23-
# then runs full reconstruction and finaly writes the results to mdst file.
23+
# then runs full reconstruction and finally writes the results to mdst file.
2424
# ---------------------------------------------------------------------------------
2525

2626
b2.set_log_level(b2.LogLevel.ERROR)

background/modules/BGOverlayExecutor/src/BGOverlayExecutorModule.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,6 @@ void BGOverlayExecutorModule::event()
118118
if (m_addCDC) addBGDigits<CDCHit>(m_CDCHitsName);
119119
if (m_addTOP) addBGDigits<TOPDigit>(m_TOPDigitsName);
120120
if (m_addARICH) addBGDigits<ARICHDigit>(m_ARICHDigitsName);
121-
//Compressed waveforms are loaded to the datastore by BGOverlayInputModule and unpacked and overlayed in ECLDigitizerModule
121+
//Compressed waveforms are loaded to the datastore by BGOverlayInputModule and unpacked and overlaid in ECLDigitizerModule
122122
if (m_addKLM) addBGDigits<KLMDigit>(m_KLMDigitsName);
123123
}

background/modules/BGOverlayInput/include/BGOverlayInputModule.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ namespace Belle2 {
9595
TChain* m_tree = 0; /**< tree pointer */
9696
unsigned m_numEvents = 0; /**< number of events (tree entries) in the sample */
9797
unsigned m_eventCount = 0; /**< current event (tree entry) */
98-
unsigned m_firstEvent = 0; /**< randomly choosen first event (tree entry) */
98+
unsigned m_firstEvent = 0; /**< randomly chosen first event (tree entry) */
9999
bool m_start = true; /**< flag denoting first call of event function (of each run if overlay is run-dependent) */
100100
std::vector<DataStore::StoreEntry*> m_storeEntries; /**< store entries of registered branches */
101101
std::vector<std::string> m_branchNames; /**< names of registered branches */

background/modules/BGOverlayInput/src/BGOverlayInputModule.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void BGOverlayInputModule::initialize()
7171
if (m_skipExperimentCheck) {
7272
B2WARNING(R"RAW(The BGOverlayInput module will skip the check on the experiment number
7373
consistency between the basf2 process and the beam background files.
74-
It will also ingnore run numbers in case of run-dependent MC.
74+
It will also ignore run numbers in case of run-dependent MC.
7575
7676
This should be done only if you are extremely sure about what you are doing.
7777
@@ -208,7 +208,7 @@ void BGOverlayInputModule::event()
208208
}
209209

210210
if (m_eventCount == m_firstEvent and !m_start) {
211-
B2INFO("BGOverlayInput: events for BG overlay will be re-used");
211+
B2INFO("BGOverlayInput: events for BG overlay will be reused");
212212
bkgInfo->incrementReusedCounter(m_index);
213213
}
214214
m_start = false;

background/modules/BeamBkgHitRateMonitor/include/CDCHitRateCounter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ namespace Belle2 {
118118
{
119119
if (m_timeWindowUpperEdge_smallCell - m_timeWindowLowerEdge_smallCell <= 0 ||
120120
m_timeWindowUpperEdge_normalCell - m_timeWindowLowerEdge_normalCell <= 0) {
121-
B2FATAL("invalid seting of CDC time window");
121+
B2FATAL("invalid setting of CDC time window");
122122
}
123123
}
124124
/**

background/modules/BeamBkgHitRateMonitor/include/ECLHitRateCounter.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ namespace Belle2 {
9393
* Segment 1 contains crystals with 135deg < phi < 225deg,
9494
* Segment 2 contains crystals with 225deg < phi < 315deg,
9595
* Segment 3 contains crystals with phi < 45deg or phi > 315deg,
96-
* With the same angular patter continuing for barrel and BWD encap segments
96+
* With the same angular pattern continuing for barrel and BWD encap segments
9797
*/
9898
void segmentECL();
9999

@@ -128,7 +128,7 @@ namespace Belle2 {
128128
// other
129129
Belle2::ECL::ECLGeometryPar* m_geometry{nullptr}; /**< pointer to ECLGeometryPar */
130130
std::map<int, int> m_segmentMap; /**< map with keys containing ECL CellID and values containing segment number */
131-
int m_crystalsInSegment[16] = {0}; /**< array cotaining the number of crystals in given segment */
131+
int m_crystalsInSegment[16] = {0}; /**< array containing the number of crystals in given segment */
132132
};
133133
}
134134
}

background/modules/BeamBkgHitRateMonitor/include/PXDHitRateCounter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ namespace Belle2 {
110110
// other
111111
double m_activePixels[40] = {0}; /**< number of active pixels in sensor */
112112
double m_activeAreas[40] = {0}; /**< area of active pixels in sensor */
113-
double m_segmentActivePixels[240] = {0}; /**< number of active pixels in v segements */
113+
double m_segmentActivePixels[240] = {0}; /**< number of active pixels in v segments */
114114
double m_segmentActiveAreas[240] = {0}; /**< area of active pixels in v segments */
115115
};
116116

background/modules/BeamBkgHitRateMonitor/include/SVDHitRateCounter.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ namespace Belle2 {
143143

144144
/**
145145
* Returns the (active) mass of the given sensor in Kg.
146-
* @param layer tha layer number (starting from 0, not 3)
146+
* @param layer the layer number (starting from 0, not 3)
147147
* @param ladder the ladder number (starting from 0, not 1)
148148
* @param sensor the sensor number (starting from 0, not 1)
149149
*/
150150
double massOfSensor(int layer, int ladder, int sensor);
151151

152152
/**
153-
* Returns wether a strips is active (neither hot nor masked),
153+
* Returns whether a strips is active (neither hot nor masked),
154154
* taking into account the ignoreHotStrips and ignoreMaskedStrips
155155
* settings.
156156
* @param sensorID The VxdID of the sensor

background/modules/BeamBkgHitRateMonitor/src/ARICHHitRateCounter.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace Belle2 {
5757
// increment event counter
5858
rates.numEvents++;
5959

60-
// count and weight hits accoring to channel efficiecny
60+
// count and weight hits according to channel efficiecny
6161
for (const auto& hit : m_hits) {
6262
if (hit.getModule() < 1 || hit.getModule() > 420) continue;
6363
auto effi = m_modulesInfo->getChannelQE(hit.getModule(), hit.getChannel());

background/modules/BeamBkgHitRateMonitor/src/PXDHitRateCounter.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ namespace Belle2 {
156156
m_rates.hardPhotonFluxes[index] *= (1.0 / currentSensorArea) * (1.0 / (currentComponentTime / Unit::s));
157157
m_rates.chargedFluxes[index] *= (1.0 / currentSensorArea) * (1.0 / (currentComponentTime / Unit::s));
158158

159-
// Loop over v segements
159+
// Loop over v segments
160160
for (int vBin = 0; vBin < 6; ++vBin) {
161161
double currentSegmentMass = m_segmentActiveAreas[vBin + index * 6] * info.getThickness() * c_densitySi;
162162
double currentSegmentArea = m_segmentActiveAreas[vBin + index * 6];
@@ -187,7 +187,7 @@ namespace Belle2 {
187187
// Compute nominal area of sensor
188188
m_activeAreas[index] = info.getWidth() * info.getLength();
189189

190-
// Loop over v segements
190+
// Loop over v segments
191191
for (int vBin = 0; vBin < 6; ++vBin) {
192192
// Compute nominal number of pixel per segment
193193
// Sgements have same number of rows, but due to pitch change a different length

background/modules/BeamBkgHitRateMonitor/src/SVDHitRateCounter.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ namespace Belle2 {
162162

163163
// accumulate hits
164164
for (const auto& digit : m_digits) {
165-
// select digits to count (usualy only good ones)
165+
// select digits to count (usually only good ones)
166166
VxdID sensorID = digit.getSensorID();
167167
int layer = sensorID.getLayerNumber() - 3;
168168
int ladder = sensorID.getLadderNumber() - 1;

background/modules/BeamBkgMixer/include/BeamBkgMixerModule.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ namespace Belle2 {
116116
tree(nullptr), numFiles(0), numEvents(0), eventCount(0), rate(0.0), index(0)
117117
{}
118118
/**
119-
* usefull constructor
119+
* useful constructor
120120
* @param bkgTag background tag
121121
* @param bkgType background type
122122
* @param fileName file name
@@ -279,7 +279,7 @@ namespace Belle2 {
279279

280280
std::map<std::string, int> m_rejected; /**< messages: rejected events */
281281
std::map<std::string, int> m_reused; /**< messages: rejused events */
282-
int m_rejectedCount = 0; /**< counter for suppresing "rejected event" messages */
282+
int m_rejectedCount = 0; /**< counter for suppressing "rejected event" messages */
283283

284284
};
285285

background/modules/BeamBkgMixer/src/BeamBkgMixerModule.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void BeamBkgMixerModule::initialize()
148148
continue;
149149
}
150150

151-
// check the file existance
151+
// check the file existence
152152
TFile* f = TFile::Open(file.c_str(), "READ");
153153
if (!f) {
154154
B2ERROR(file << ": file not found");
@@ -388,7 +388,7 @@ void BeamBkgMixerModule::event()
388388
bkg.eventCount++;
389389
if (bkg.eventCount >= bkg.numEvents) {
390390
bkg.eventCount = 0;
391-
std::string message = "BeamBkgMixer: events of " + bkg.type + " will be re-used";
391+
std::string message = "BeamBkgMixer: events of " + bkg.type + " will be reused";
392392
m_reused[message] += 1;
393393
if (m_reused[message] == 1) B2INFO(message);
394394
bkgInfo->incrementReusedCounter(bkg.index);
@@ -435,7 +435,7 @@ void BeamBkgMixerModule::event()
435435
bkg.eventCount++;
436436
if (bkg.eventCount >= bkg.numEvents) {
437437
bkg.eventCount = 0;
438-
std::string message = "BeamBkgMixer: events of " + bkg.type + " will be re-used";
438+
std::string message = "BeamBkgMixer: events of " + bkg.type + " will be reused";
439439
m_reused[message] += 1;
440440
if (m_reused[message] == 1) B2INFO(message);
441441
bkgInfo->incrementReusedCounter(bkg.index);
@@ -469,7 +469,7 @@ void BeamBkgMixerModule::event()
469469
bkg.eventCount++;
470470
if (bkg.eventCount >= bkg.numEvents) {
471471
bkg.eventCount = 0;
472-
std::string message = "BeamBkgMixer: events of " + bkg.type + " will be re-used";
472+
std::string message = "BeamBkgMixer: events of " + bkg.type + " will be reused";
473473
m_reused[message] += 1;
474474
if (m_reused[message] == 1) B2INFO(message);
475475
bkgInfo->incrementReusedCounter(bkg.index);
@@ -490,11 +490,11 @@ void BeamBkgMixerModule::terminate()
490490

491491
B2INFO("BeamBkgMixer - reused samples:");
492492
for (const auto& message : m_reused) {
493-
B2INFO(message.first << "(occured " << message.second << " times)");
493+
B2INFO(message.first << "(occurred " << message.second << " times)");
494494
}
495495
B2INFO("BeamBkgMixer - rejected events:");
496496
for (const auto& message : m_rejected) {
497-
B2INFO(message.first << "(occured " << message.second << " times)");
497+
B2INFO(message.first << "(occurred " << message.second << " times)");
498498
}
499499

500500
for (auto& bkg : m_backgrounds) {

background/scripts/background.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_background_files(folder=None, output_file_info=True):
3737

3838
if folder is None:
3939
if env_name not in os.environ:
40-
raise RuntimeError("Environment variable {} for backgound files not set. Terminanting this script.".format(env_name))
40+
raise RuntimeError("Environment variable {} for background files not set. Terminanting this script.".format(env_name))
4141
folder = os.environ[env_name]
4242

4343
bg = glob.glob(folder + '/*.root')

background/steering_tools/backgroundInfo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def event(self):
3636
i = 0
3737
for bgInfo in bgInfos:
3838
print("===========================")
39-
print("* Backgroud info: entry", str(i))
39+
print("* Background info: entry", str(i))
4040
print("===========================")
4141
bgInfo.print()
4242
i += 1

background/validation/validateOverlay.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def initialize(self):
6262
self.hist2.append(TH1F('CDCOuterHitRate', 'CDC Hit Rate per wire for the Outer layers', 100, 0, 1000))
6363
self.hist2.append(TH1F('CDCHitRate', 'CDC Hit Rate per wire', 100, 0, 1000))
6464
self.hist2.append(TH1F("TOPHitTime", "TOP Hit Time Distribution; time [ns]", 300, -150, 150))
65-
#: numnber of events
65+
#: number of events
6666
self.nTOPev = 0
6767
#: min TOP hit time
6868
self.minTOPTime = None

dqm/analysis/modules/include/DQMHistAnalysisSVDOnMiraBelle.h

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ namespace Belle2 {
6464

6565
/**
6666
* Calculate avg offline occupancy for one specific sensor, especially
67-
* @param iLayer index of layer
6867
* @param hU, hV pointers to histograms
6968
* @param layer layer index
7069
* @param ladder ladder index

0 commit comments

Comments
 (0)