BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
tracks3d.C File Reference
#include "BmnAlignModels.h"
#include "BmnDataFilters.h"
#include "BmnRootIterator.h"
#include "BmnSimpleProgressBar.h"
#include "TAxis3D.h"
#include "TCanvas.h"
#include "TMath.h"
#include "TPolyLine3D.h"
#include "TRandom3.h"
#include "TView.h"
#include <algorithm>
#include <array>
#include <vector>
#include "fairlogger/Logger.h"
Include dependency graph for tracks3d.C:

Go to the source code of this file.

Functions

int tracks3d (const char *fileListPath="/home/igor/data.cache/Run9compare/rc_aln.run_Top_9555_ev0_p0.lst", Int_t tracksToDraw=100, Int_t maxTracks=0)
 Draw a uniformly random sample of tracks as 3D polylines through their hits.

Function Documentation

◆ tracks3d()

int tracks3d ( const char * fileListPath = "/home/igor/data.cache/Run9compare/rc_aln.run_Top_9555_ev0_p0.lst",
Int_t tracksToDraw = 100,
Int_t maxTracks = 0 )

Tracks and hits are read through BmnRootIterator with the aligner's default filters, so the sample comes from exactly the tracks the aligner would use. Reservoir sampling makes it exact in size and uniform over all accepted tracks, at the cost of one full pass over the data. As in BmnAlignReport::Draw(), x and z are swapped: the beam runs along the horizontal axis of the view.

Parameters
fileListPathtext file listing the .root files, '#' lines are ignored
tracksToDrawsize of the sample
maxTrackssample among the first maxTracks accepted tracks only, 0 for all
Returns
0 on success, -1 if nothing could be read

Definition at line 50 of file tracks3d.C.

References BmnDefaultHitFilter(), BmnDefaultTrackFilter(), TCanvas::cd(), BmnSimpleProgressBar::Clear(), TView::CreateView(), TPolyLine3D::Draw(), TAxis3D::GetXaxis(), TAxis3D::GetYaxis(), TAxis3D::GetZaxis(), i, TMath::Infinity(), BmnDetectorModel::Init(), BmnSimpleProgressBar::Init(), TRandom::Integer(), TAttLine::SetLineColor(), TPolyLine3D::SetPoint(), TView::SetRange(), TNamed::SetTitle(), slot, and TAxis3D::ToggleRulers().

Here is the call graph for this function: