Skip to content

Commit

Permalink
ITS tracking: Introduce configurable minimum pt per track length
Browse files Browse the repository at this point in the history
The changes introduce a configurable minimum PT value per track length in the ITS
tracking parameters. This allows for more fine-grained control over the minimum
PT requirement, which can be useful for different tracking scenarios.

The main changes are:

- Modify the `TrackingParameters` struct to include an array of 4 minimum PT
  values, one for each track length (7, 6, 5, 4).
- Update the track fitting logic in `TrackerTraits::findRoads()` to use the
  appropriate minimum PT value based on the track length.
- Update the default minimum PT value in `TrackingInterface::initialise()` to
  use the new array-based approach.

These changes provide more flexibility in tuning the ITS tracking parameters.
  • Loading branch information
mpuccio committed Dec 11, 2024
1 parent 560a1e9 commit 6450331
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
11 changes: 9 additions & 2 deletions Detectors/ITSMFT/ITS/macros/test/CheckTracksCA.C
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ void CheckTracksCA(bool doFakeClStud = false,
TTree* mcTree = (TTree*)gFile->Get("o2sim");
mcTree->SetBranchStatus("*", 0); // disable all branches
mcTree->SetBranchStatus("MCTrack*", 1);
mcTree->SetBranchStatus("MCEventHeader*", 1);

std::vector<o2::MCTrack>* mcArr = nullptr;
mcTree->SetBranchAddress("MCTrack", &mcArr);
Expand Down Expand Up @@ -115,10 +116,13 @@ void CheckTracksCA(bool doFakeClStud = false,
std::cout << "** Filling particle table ... " << std::flush;
int lastEventIDcl = -1, cf = 0;
int nev = mcTree->GetEntriesFast();
std::vector<std::vector<ParticleInfo>> info(nev);
std::vector<std::vector<ParticleInfo>> info;
info.resize(nev);
TH1D* hZvertex = new TH1D("hZvertex", "Z vertex", 100, -20, 20);
for (int n = 0; n < nev; n++) { // loop over MC events
mcTree->GetEvent(n);
info[n].resize(mcArr->size());
hZvertex->Fill(mcEvent->GetZ());
for (unsigned int mcI{0}; mcI < mcArr->size(); ++mcI) {
auto part = mcArr->at(mcI);
info[n][mcI].event = n;
Expand Down Expand Up @@ -196,7 +200,6 @@ void CheckTracksCA(bool doFakeClStud = false,
info[evID][trackID].track.getImpactParams(info[evID][trackID].pvx, info[evID][trackID].pvy, info[evID][trackID].pvz, bz, ip);
info[evID][trackID].dcaxy = ip[0];
info[evID][trackID].dcaz = ip[1];
Info("", "dcaxy=%f dcaz=%f bz=%f", ip[0], ip[1], bz);
}

fakes += fake;
Expand Down Expand Up @@ -286,6 +289,10 @@ void CheckTracksCA(bool doFakeClStud = false,
clone->Divide(clone, den, 1, 1, "b");
clone->SetLineColor(3);
clone->Draw("histesame");
TCanvas* c2 = new TCanvas;
c2->SetGridx();
c2->SetGridy();
hZvertex->DrawClone();

std::cout << "** Streaming output TTree to file ... " << std::flush;
TFile file("CheckTracksCA.root", "recreate");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct TrackingParameters {
unsigned long MaxMemory = 12000000000UL;
float MaxChi2ClusterAttachment = 60.f;
float MaxChi2NDF = 30.f;
float MinPt = 0.f;
std::vector<float> MinPt = {0.f, 0.f, 0.f, 0.f};
unsigned char StartLayerMask = 0x7F;
bool FindShortTracks = false;
bool PerPrimaryVertexProcessing = false;
Expand Down
2 changes: 1 addition & 1 deletion Detectors/ITSMFT/ITS/tracking/src/TrackerTraits.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ void TrackerTraits::findRoads(const int iteration)
temporaryTrack.resetCovariance();
temporaryTrack.setChi2(0);
fitSuccess = fitTrack(temporaryTrack, mTrkParams[0].NLayers - 1, -1, -1, mTrkParams[0].MaxChi2ClusterAttachment, mTrkParams[0].MaxChi2NDF, 50.f);
if (!fitSuccess || temporaryTrack.getPt() < mTrkParams[iteration].MinPt) {
if (!fitSuccess || temporaryTrack.getPt() < mTrkParams[iteration].MinPt[mTrkParams[iteration].NLayers - temporaryTrack.getNClusters()]) {
continue;
}
tracks[trackIndex++] = temporaryTrack;
Expand Down
2 changes: 1 addition & 1 deletion Detectors/ITSMFT/ITS/tracking/src/TrackingInterface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void ITSTrackingInterface::initialise()
trackParams[2].TrackletMinPt = 0.1f;
trackParams[2].CellDeltaTanLambdaSigma *= 4.;
trackParams[2].MinTrackLength = 4;
trackParams[2].MinPt = 0.2f;
trackParams[2].MinPt[3] = 0.2f;
trackParams[2].StartLayerMask = (1 << 6) + (1 << 3);
if (o2::its::TrackerParamConfig::Instance().doUPCIteration) {
trackParams[3].TrackletMinPt = 0.1f;
Expand Down

0 comments on commit 6450331

Please sign in to comment.