Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed Dec 17, 2024
1 parent c9aa485 commit 6a846b7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 21 deletions.
39 changes: 23 additions & 16 deletions ALICE3/Core/FastTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ DetLayer FastTracker::GetLayer(const int layer, bool ignoreBarrelLayers)
int layerIdx = layer;
if (ignoreBarrelLayers) {
for (uint32_t il = 0, trackingLayerIdx = 0; trackingLayerIdx <= layer; il++) {
if (layers[il].type == 0) continue;
if (layers[il].type == 0)
continue;
trackingLayerIdx++;
layerIdx = il;
}
Expand Down Expand Up @@ -211,19 +212,19 @@ int FastTracker::FastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
if (ok && applyElossCorrection && layers[il].xrho > 0) { // correct in small steps
for (int ise = xrhosteps; ise--;) {
ok = inputTrack.correctForMaterial(0, -layers[il].xrho / xrhosteps, applyAngularCorrection);
if (!ok) break;
if (!ok)
break;
}
}


// was there a problem on this layer?
if (!ok && il > 0) { // may fail to reach target layer due to the eloss
float rad2 = inputTrack.getX()*inputTrack.getX() + inputTrack.getY()*inputTrack.getY();
float rad2 = inputTrack.getX() * inputTrack.getX() + inputTrack.getY() * inputTrack.getY();
float fMinRadTrack = 132.;
float maxR = layers[il-1].r + kTrackingMargin*2;
float maxR = layers[il - 1].r + kTrackingMargin * 2;
float minRad = (fMinRadTrack > 0 && fMinRadTrack < maxR) ? fMinRadTrack : maxR;
if (rad2 - minRad*minRad < kTrackingMargin*kTrackingMargin) { // check previously reached layer
return -5; // did not reach min requested layer
if (rad2 - minRad * minRad < kTrackingMargin * kTrackingMargin) { // check previously reached layer
return -5; // did not reach min requested layer
} else {
break;
}
Expand All @@ -235,7 +236,6 @@ int FastTracker::FastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
if (layers[il].type == 0)
continue; // inert layer, skip


// layer is reached
if (firstLayerReached < 0)
firstLayerReached = il;
Expand All @@ -247,7 +247,6 @@ int FastTracker::FastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
// initialize track at outer point
o2::track::TrackParCov inwardTrack(inputTrack);


// Enlarge covariance matrix
std::array<float, 5> trPars = {0.};
for (int ip = 0; ip < 5; ip++) {
Expand Down Expand Up @@ -321,21 +320,29 @@ int FastTracker::FastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
const o2::track::TrackParametrization<float>::dim2_t hitpoint = {
static_cast<float>(xyz1[1]),
static_cast<float>(xyz1[2])};
// LOG(info) << "Using resolution for layer: " << layers[il].name << ". RPhi: " << layers[il].resRPhi << " , Z: " << layers[il].resZ;
// LOG(info) << "Using resolution for layer: " << layers[il].name << ". RPhi: " << layers[il].resRPhi << " , Z: " << layers[il].resZ;
const o2::track::TrackParametrization<float>::dim3_t hitpointcov = {layers[il].resRPhi * layers[il].resRPhi, 0.f, layers[il].resZ * layers[il].resZ};

inwardTrack.update(hitpoint, hitpointcov);
inwardTrack.checkCovariance();
}

if (applyMSCorrection && layers[il].x0>0) {
if (!inputTrack.correctForMaterial(layers[il].x0, 0, applyAngularCorrection)) { return -6; }
if (!inwardTrack.correctForMaterial(layers[il].x0, 0, applyAngularCorrection)) { return -6; }
if (applyMSCorrection && layers[il].x0 > 0) {
if (!inputTrack.correctForMaterial(layers[il].x0, 0, applyAngularCorrection)) {
return -6;
}
if (!inwardTrack.correctForMaterial(layers[il].x0, 0, applyAngularCorrection)) {
return -6;
}
}
if (applyElossCorrection && layers[il].xrho>0) {
if (applyElossCorrection && layers[il].xrho > 0) {
for (int ise = xrhosteps; ise--;) { // correct in small steps
if (!inputTrack.correctForMaterial(0, layers[il].xrho / xrhosteps, applyAngularCorrection)) { return -7; }
if (!inwardTrack.correctForMaterial(0, layers[il].xrho / xrhosteps, applyAngularCorrection)) { return -7; }
if (!inputTrack.correctForMaterial(0, layers[il].xrho / xrhosteps, applyAngularCorrection)) {
return -7;
}
if (!inwardTrack.correctForMaterial(0, layers[il].xrho / xrhosteps, applyAngularCorrection)) {
return -7;
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions ALICE3/Core/FastTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class FastTracker
bool applyZacceptance; // check z acceptance or not
float covMatFactor; // covmat off-diagonal factor to use for covmat fix (negative: no factor)
int verboseLevel; // 0: not verbose, >0 more verbose
bool applyMSCorrection; // Apply correction for multiple scattering
bool applyElossCorrection; // Apply correction for eloss (requires MS correction)
bool applyMSCorrection; // Apply correction for multiple scattering
bool applyElossCorrection; // Apply correction for eloss (requires MS correction)

uint64_t covMatOK; // cov mat has negative eigenvals
uint64_t covMatNotOK; // cov mat has negative eigenvals
Expand Down
6 changes: 3 additions & 3 deletions ALICE3/TableProducer/OTF/onTheFlyTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ struct OnTheFlyTracker {
} fastTrackerSettings; // allows for gap between peak and bg in case someone wants to

struct : ConfigurableGroup {
std::string prefix = "cascadeDecaySettings"; // Cascade decay settings
std::string prefix = "cascadeDecaySettings"; // Cascade decay settings
Configurable<bool> decayXi{"decayXi", false, "Manually decay Xi and fill tables with daughters"};
Configurable<bool> findXi{"findXi", false, "if decayXi on, find Xi and fill Tracks table also with Xi"};
Configurable<bool> trackXi{"trackXi", false, "if findXi on, attempt to track Xi"};
Configurable<bool> doXiQA{"doXiQA", false, "QA plots for when treating Xi"};
} cascadeDecaySettings;

using PVertex = o2::dataformats::PrimaryVertex;

// for secondary vertex finding
Expand Down Expand Up @@ -788,7 +788,7 @@ struct OnTheFlyTracker {

// Cascade found successfully
if (dcaFitterOK_Cascade) {
if (cascadeDecaySettings.doXiQA)
if (cascadeDecaySettings.doXiQA)
histos.fill(HIST("hXiBuilding"), 5.0f);
o2::track::TrackParCov bachelorTrackAtPCA = fitter.getTrack(1);

Expand Down

0 comments on commit 6a846b7

Please sign in to comment.