You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOG(debug) << "Setting dead phi regions for layer " << name << " with graph " << (graph ? graph->GetName() : "nullptr");
81
+
if (mDeadPhiRegions != nullptr) {
82
+
LOG(warning) << "Overriding existing dead phi regions for layer " << name;
83
+
deletemDeadPhiRegions;
84
+
}
85
+
mDeadPhiRegions = graph;
86
+
if (mDeadPhiRegions->GetN() == 0) {
87
+
LOG(warning) << "Dead phi regions graph for layer " << name << " is empty, clearing dead regions";
88
+
mDeadPhiRegions = nullptr;
89
+
return; // cleared the dead regions
90
+
}
91
+
// Check sanity of the graph
92
+
if (mDeadPhiRegions != nullptr) {
93
+
for (int i = 0; i < mDeadPhiRegions->GetN(); i++) {
94
+
constfloat x = mDeadPhiRegions->GetX()[i];
95
+
constfloat y = mDeadPhiRegions->GetY()[i];
96
+
// First point has to be at 0, last point has to be at 2PI
97
+
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";
99
+
}
100
+
LOG(debug) << "Point " << i << ": (" << x << ", " << y << ")";
101
+
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;
103
+
}
104
+
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";
106
+
}
107
+
}
108
+
} else {
109
+
LOG(info) << "Cleared dead phi regions for layer " << name;
/// @brief Set the dead regions in phi for this layer with a TGraph containing all regions. The graph should have y=2 for dead regions and y=0 for alive regions.
59
+
/// @param graph graph of the dead regions. Can be nullptr to clear the dead regions.
0 commit comments