Skip to content
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
12 changes: 12 additions & 0 deletions Detectors/ITSMFT/ITS/macros/EVE/DisplayEventsComp.C
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ void Data::loadClusters(int entry)
int first = 0, last = mClusterBuffer->size();
if (!mClustersROF->empty()) {
auto rof = (*mClustersROF)[entry];
auto ir = rof.getBCData();
std::cout << "Orbit: " << ir.orbit << " BC: " << ir.bc << '\n';
first = rof.getFirstEntry();
last = first + rof.getNEntries();
}
Expand Down Expand Up @@ -335,8 +337,12 @@ TEveElement* Data::getEveTracks()
for (const auto& rec : mTracks) {
std::array<float, 3> p;
rec.getPxPyPzGlo(p);
std::array<float, 3> v;
rec.getXYZGlo(v);
TEveRecTrackD t;
t.fP = {p[0], p[1], p[2]};
t.fV = {v[0], v[1], v[2]};
//t.fV = {v[0] - p[0] / p[1] * v[1], 0, v[2] - p[2] / p[1] * v[1]};
t.fSign = (rec.getSign() < 0) ? -1 : 1;
TEveTrack* track = new TEveTrack(&t, prop);
track->SetLineColor(kMagenta);
Expand Down Expand Up @@ -421,6 +427,12 @@ void load(int entry, int chip)
evdata.displayData(entry, chip);
}

void load(int tf, int trigger, int chip)
{
evdata.loadTF(tf);
load(trigger, chip);
}

void init(int tf, int trigger, int chip,
std::string digifile = "itsdigits.root",
bool rawdata = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include "DataFormatsITSMFT/ROFRecord.h"
#include "ReconstructionDataFormats/Vertex.h"

using Point3Df = o2::math_utils::Point3D<float>;

namespace o2
{
class MCCompLabel;
Expand Down Expand Up @@ -57,6 +59,37 @@ class CookedTracker
CookedTracker& operator=(const CookedTracker& tr) = delete;
~CookedTracker() = default;

void setParameters(const std::vector<float>& par)
{
gzWin = par[0];
gminPt = par[1];
gmaxDCAxy = par[3];
gmaxDCAz = par[4];
gSeedingLayer1 = par[5];
gSeedingLayer2 = par[6];
gSeedingLayer3 = par[7];
gSigma2 = par[8];
gmaxChi2PerCluster = par[9];
gmaxChi2PerTrack = par[10];
gRoadY = par[11];
gRoadZ = par[12];
gminNumberOfClusters = par[13];
}
void setParametersCosmics()
{
// seed "windows" in z and phi: makeSeeds
gzWin = 84.; // length of the L3
gminPt = 10.;
// Maximal accepted impact parameters for the seeds
gmaxDCAxy = 19.4; // radius of the L3
gmaxDCAz = 42.; // half-lenght of the L3
// Space point resolution
gSigma2 = 0.2 * 0.2;
// Tracking "road" from layer to layer
gRoadY = 1.5; // Chip size in Y
gRoadZ = 3.0; // Chip size in Z
}

void setVertices(const std::vector<Vertex>& vertices)
{
mVertices = &vertices;
Expand Down Expand Up @@ -110,7 +143,7 @@ class CookedTracker
void setContinuousMode(bool mode) { mContinuousMode = mode; }
bool getContinuousMode() { return mContinuousMode; }

static void setMostProbalePt(float pt) { mMostProbablePt = pt; }
static void setMostProbablePt(float pt) { mMostProbablePt = pt; }
static auto getMostProbablePt() { return mMostProbablePt; }

// internal helper classes
Expand All @@ -124,6 +157,7 @@ class CookedTracker
std::tuple<int, int> processLoadedClusters(TrackInserter& inserter);

std::vector<TrackITSExt> trackInThread(Int_t first, Int_t last);
o2::its::TrackITSExt cookSeed(const Point3Df& r1, Point3Df& r2, const Point3Df& tr3, float rad2, float rad3, float_t alpha, float_t bz);
void makeSeeds(std::vector<TrackITSExt>& seeds, Int_t first, Int_t last);
void trackSeeds(std::vector<TrackITSExt>& seeds);

Expand All @@ -133,6 +167,29 @@ class CookedTracker
bool makeBackPropParam(TrackITSExt& track) const;

private:
/*** Tracking parameters ***/
// seed "windows" in z and phi: makeSeeds
static Float_t gzWin;
static Float_t gminPt;
static Float_t mMostProbablePt; ///< settable most probable pt
// Maximal accepted impact parameters for the seeds
static Float_t gmaxDCAxy;
static Float_t gmaxDCAz;
// Layers for the seeding
static Int_t gSeedingLayer1;
static Int_t gSeedingLayer2;
static Int_t gSeedingLayer3;
// Space point resolution
static Float_t gSigma2;
// Max accepted chi2
static Float_t gmaxChi2PerCluster;
static Float_t gmaxChi2PerTrack;
// Tracking "road" from layer to layer
static Float_t gRoadY;
static Float_t gRoadZ;
// Minimal number of attached clusters
static Int_t gminNumberOfClusters;
Comment on lines +170 to +191

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this better define as ConfigurableParam (in a separate PR)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this better define as ConfigurableParam (in a separate PR)

Good point ! This would make setting the parameters much more flexible.


bool mContinuousMode = true; ///< triggered or cont. mode
const o2::its::GeometryTGeo* mGeom = nullptr; /// interface to geometry
const o2::dataformats::MCTruthContainer<o2::MCCompLabel>* mClsLabels = nullptr; /// Cluster MC labels
Expand All @@ -157,8 +214,6 @@ class CookedTracker

std::vector<Cluster> mClusterCache;

static float mMostProbablePt; ///< settable most probable pt

ClassDefNV(CookedTracker, 1);
};

Expand Down
Loading