Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITS tracking: Introduce configurable minimum pt per track length #13792

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading