Skip to content

Commit f2642cc

Browse files
committed
Fix
1 parent d2a5c4f commit f2642cc

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

ALICE3/Core/DetLayer.cxx

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,29 @@ namespace o2::fastsim
2828
{
2929

3030
// Parametric constructor
31-
DetLayer::DetLayer(const TString& name_,
32-
float r_,
33-
float z_,
34-
float x0_,
35-
float xrho_,
36-
float resRPhi_,
37-
float resZ_,
38-
float eff_,
39-
int type_)
40-
: name(name_),
41-
r(r_),
42-
z(z_),
43-
x0(x0_),
44-
xrho(xrho_),
45-
resRPhi(resRPhi_),
46-
resZ(resZ_),
47-
eff(eff_),
48-
type(type_)
31+
DetLayer::DetLayer(const TString& name,
32+
float r,
33+
float z,
34+
float x0,
35+
float xrho,
36+
float resRPhi,
37+
float resZ,
38+
float eff,
39+
int type)
40+
: mName(name),
41+
mR(r),
42+
mZ(z),
43+
mX0(x0),
44+
mXrho(xrho),
45+
mResRPhi(resRPhi),
46+
mResZ(resZ),
47+
mEff(eff),
48+
mType(type)
4949
{
5050
}
5151

5252
DetLayer::DetLayer(const DetLayer& other)
53-
: name(other.name), r(other.r), z(other.z), x0(other.x0), xrho(other.xrho), resRPhi(other.resRPhi), resZ(other.resZ), eff(other.eff), type(other.type)
53+
: mName(other.mName), mR(other.mR), mZ(other.mZ), mX0(other.mX0), mXrho(other.mXrho), mResRPhi(other.mResRPhi), mResZ(other.mResZ), mEff(other.mEff), mType(other.mType)
5454
{
5555
}
5656

@@ -60,12 +60,12 @@ void DetLayer::addDeadPhiRegion(float phiStart, float phiEnd)
6060
static constexpr float kPhiTolerance = 1e-4f;
6161
if (mDeadPhiRegions == nullptr) {
6262
mDeadPhiRegions = new TGraph();
63-
mDeadPhiRegions->SetNameTitle(Form("deadPhiRegions_%s", name.Data()), Form("Dead phi regions for layer %s", name.Data()));
63+
mDeadPhiRegions->SetNameTitle(Form("deadPhiRegions_%s", mName.Data()), Form("Dead phi regions for layer %s", mName.Data()));
6464
mDeadPhiRegions->AddPoint(0, kDefaultValue);
6565
mDeadPhiRegions->AddPoint(o2::constants::math::TwoPI, kDefaultValue);
6666
}
6767
if (phiStart < 0 || phiStart >= o2::constants::math::TwoPI || phiEnd < 0 || phiEnd >= o2::constants::math::TwoPI) {
68-
LOG(fatal) << "Cannot add dead phi region with invalid range [" << phiStart << ", " << phiEnd << "] to layer " << name;
68+
LOG(fatal) << "Cannot add dead phi region with invalid range [" << phiStart << ", " << phiEnd << "] to layer " << mName;
6969
return;
7070
}
7171
mDeadPhiRegions->AddPoint(phiStart, kDefaultValue);
@@ -77,14 +77,14 @@ void DetLayer::addDeadPhiRegion(float phiStart, float phiEnd)
7777

7878
void DetLayer::setDeadPhiRegions(TGraph* graph)
7979
{
80-
LOG(debug) << "Setting dead phi regions for layer " << name << " with graph " << (graph ? graph->GetName() : "nullptr");
80+
LOG(debug) << "Setting dead phi regions for layer " << mName << " with graph " << (graph ? graph->GetName() : "nullptr");
8181
if (mDeadPhiRegions != nullptr) {
82-
LOG(warning) << "Overriding existing dead phi regions for layer " << name;
82+
LOG(warning) << "Overriding existing dead phi regions for layer " << mName;
8383
delete mDeadPhiRegions;
8484
}
8585
mDeadPhiRegions = graph;
8686
if (mDeadPhiRegions->GetN() == 0) {
87-
LOG(warning) << "Dead phi regions graph for layer " << name << " is empty, clearing dead regions";
87+
LOG(warning) << "Dead phi regions graph for layer " << mName << " is empty, clearing dead regions";
8888
mDeadPhiRegions = nullptr;
8989
return; // cleared the dead regions
9090
}
@@ -95,42 +95,42 @@ void DetLayer::setDeadPhiRegions(TGraph* graph)
9595
const float y = mDeadPhiRegions->GetY()[i];
9696
// First point has to be at 0, last point has to be at 2PI
9797
if ((i == 0 && x != 0.f) || (i == mDeadPhiRegions->GetN() - 1 && x != o2::constants::math::TwoPI)) {
98-
LOG(fatal) << "Dead phi regions graph for layer " << name << " has invalid x value " << x << " at point " << i << ", first point should be 0 and last point should be 2PI";
98+
LOG(fatal) << "Dead phi regions graph for layer " << mName << " has invalid x value " << x << " at point " << i << ", first point should be 0 and last point should be 2PI";
9999
}
100100
LOG(debug) << "Point " << i << ": (" << x << ", " << y << ")";
101101
if (x < 0 || x > o2::constants::math::TwoPI) {
102-
LOG(fatal) << "Dead phi regions graph for layer " << name << " has invalid x value " << x << " at point " << i;
102+
LOG(fatal) << "Dead phi regions graph for layer " << mName << " has invalid x value " << x << " at point " << i;
103103
}
104104
if (y != 0.f && y != 2.f) {
105-
LOG(fatal) << "Dead phi regions graph for layer " << name << " has invalid y value " << y << " at point " << i << ", should be 0 or 2";
105+
LOG(fatal) << "Dead phi regions graph for layer " << mName << " has invalid y value " << y << " at point " << i << ", should be 0 or 2";
106106
}
107107
}
108108
} else {
109-
LOG(info) << "Cleared dead phi regions for layer " << name;
109+
LOG(info) << "Cleared dead phi regions for layer " << mName;
110110
}
111111
}
112112

113113
std::string DetLayer::toString() const
114114
{
115115
std::string out = "";
116116
out.append("DetLayer: ");
117-
out.append(name.Data());
117+
out.append(mName.Data());
118118
out.append(" | r: ");
119-
out.append(std::to_string(r));
119+
out.append(std::to_string(mR));
120120
out.append(" cm | z: ");
121-
out.append(std::to_string(z));
121+
out.append(std::to_string(mZ));
122122
out.append(" cm | x0: ");
123-
out.append(std::to_string(x0));
123+
out.append(std::to_string(mX0));
124124
out.append(" cm | xrho: ");
125-
out.append(std::to_string(xrho));
125+
out.append(std::to_string(mXrho));
126126
out.append(" g/cm^3 | resRPhi: ");
127-
out.append(std::to_string(resRPhi));
127+
out.append(std::to_string(mResRPhi));
128128
out.append(" cm | resZ: ");
129-
out.append(std::to_string(resZ));
129+
out.append(std::to_string(mResZ));
130130
out.append(" cm | eff: ");
131-
out.append(std::to_string(eff));
131+
out.append(std::to_string(mEff));
132132
out.append(" | type: ");
133-
switch (type) {
133+
switch (mType) {
134134
case kLayerInert:
135135
out.append("Inert");
136136
break;

0 commit comments

Comments
 (0)