CbmRoot
Loading...
Searching...
No Matches
CbmL1MCTrack.h
Go to the documentation of this file.
1/* Copyright (C) 2010-2017 Frankfurt Institute for Advanced Studies, Goethe-Universitaet Frankfurt, Frankfurt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Ivan Kisel, Sergey Gorbunov, Igor Kulakov [committer], Maksym Zyzak */
4
5/*
6 *====================================================================
7 *
8 * CBM Level 1 Reconstruction
9 *
10 * Authors: I.Kisel, S.Gorbunov
11 *
12 * e-mail : ikisel@kip.uni-heidelberg.de
13 *
14 *====================================================================
15 *
16 * L1 Monte Carlo information
17 *
18 *====================================================================
19 */
20
21#ifndef CbmL1MCTrack_H
22#define CbmL1MCTrack_H
23
24#include "CaVector.h"
25#include "CbmL1MCPoint.h"
26#include "TLorentzVector.h"
27#include "TVector3.h"
28
29#include <iostream>
30#include <string>
31
32namespace
33{
34 namespace cacore = cbm::algo::ca;
35}
36
37class CbmL1Track;
38
40 public:
41 CbmL1MCTrack() = default;
42
43 CbmL1MCTrack(int _ID) : ID(_ID){};
44
45 CbmL1MCTrack(double mass, double q, TVector3 vr, TLorentzVector vp, int ID, int mother_ID, int pdg,
46 unsigned int procID);
47 // CbmL1MCTrack(TmpMCPoints &mcPoint, TVector3 vr, TLorentzVector vp, int ID, int mother_ID);
48
49 bool IsPrimary() const { return mother_ID < 0; }
50 bool IsReconstructable() const { return isReconstructable; }
51 bool IsAdditional() const { return isAdditional; }
52 int NStations() const { return nStations; }
53 int NHitContStations() const { return nHitContStations; }
54 int NMCStations() const { return nMCStations; }
55 int NMCContStations() const { return nMCContStations; }
56
57 void Init();
58
62 int GetNClones() const { return rTracks.size() - 1; }
63 bool IsReconstructed() const { return rTracks.size(); }
64
67 bool IsDisturbed() const { return tTracks.size(); }
68
70 const auto& GetRecoTrackIndexes() const { return rTrackIndexes; }
71 const auto& GetTouchTrackIndexes() const { return tTrackIndexes; }
72
73 friend class CbmL1;
74
75 double pt() { return sqrt(px * px + py * py); }
76
78 std::string ToString(int verbose = 10, bool header = false) const;
79
80 private:
81 void CalculateMCCont();
82 void CountHitStations();
83 void CalculateMaxNStaMC();
85
86 public:
87 double mass = 0.;
88 double q = 0.;
89 double p = 0.;
90 double x = 0.;
91 double y = 0.;
92 double z = 0.;
93 double px = 0.;
94 double py = 0.;
95 double pz = 0.;
96 double time = 0.;
97 int ID = -1;
98 int iFile = -1;
99 int iEvent = -1;
100 int mother_ID = -1;
101 int chainID = -1; // ID of the first particle in the decay chain
102 int pdg = -1;
103 unsigned int process_ID = (unsigned int) -1;
104 bool isSignal{0};
105 cacore::Vector<int> Points{"CbmL1MCTrack::Points"}; // indices of pints in CbmL1::fvMCPoints
106 cacore::Vector<int> Hits{"CbmL1MCTrack::Hits"}; // indices of hits in algo->vHits or L1::vHits
107
108 private:
109 int nMCContStations = 0; // number of consecutive stations with mcPoints
110 int nHitContStations = 0; // number of consecutive stations with hits
111 int maxNStaMC = 0; // max number of mcPoints on station
112 int maxNSensorMC = 0; // max number of mcPoints with same z
113 int maxNStaHits = 0; // max number of hits on station
114
115 int nStations = 0; // number of stations with hits
116 int nMCStations = 0; // number of stations with MCPoints
117
118 bool isReconstructable = false;
119 bool isAdditional = false; // is not reconstructable, but stil interesting
120
121 // next members filled and used in Performance
122 cacore::Vector<CbmL1Track*> rTracks{"CbmL1MCTrack::rTracks"}; // array of associated recoTracks
123 cacore::Vector<CbmL1Track*> tTracks{"CbmL1MCTrack::tTracks"}; // array of recoTracks
124 // which aren't associated with this mcTrack,
125 // but use some hits from it.
126
127 // NOTE: SZh 14.12.2022: on the replacement from rTracks and tTracks
128 cacore::Vector<int> rTrackIndexes = {"CbmL1MCTrack::rTrackIndexes"}; // array of associated recoTrack indexes
129 cacore::Vector<int> tTrackIndexes = {"CbmL1MCTrack::tTrackIndexes"}; // .....
130};
131
132
133#endif
friend fvec sqrt(const fvec &a)
fscal v[fmask::Size]
Definition KfSimdPseudo.h:4
int NMCContStations() const
cacore::Vector< int > tTrackIndexes
cacore::Vector< int > Hits
cacore::Vector< CbmL1Track * > & GetRecoTracks()
void CalculateIsReconstructable()
int GetNClones() const
double pt()
void CalculateMCCont()
const auto & GetRecoTrackIndexes() const
int NHitContStations() const
cacore::Vector< int > Points
cacore::Vector< CbmL1Track * > rTracks
const auto & GetTouchTrackIndexes() const
void SetIsReconstructable(bool v)
unsigned int process_ID
void AddRecoTrack(CbmL1Track *rTr)
bool IsReconstructed() const
bool IsReconstructable() const
int NStations() const
CbmL1MCTrack(int _ID)
void CalculateMaxNStaMC()
void AddTouchTrack(CbmL1Track *tTr)
cacore::Vector< CbmL1Track * > tTracks
bool IsAdditional() const
bool isReconstructable
bool IsDisturbed() const
int NMCStations() const
bool IsPrimary() const
void CountHitStations()
void AddTouchTrackIndex(int iT)
void AddRecoTrackIndex(int iT)
CbmL1MCTrack()=default
std::string ToString(int verbose=10, bool header=false) const
String representation of the contents.
cacore::Vector< int > rTrackIndexes
Definition CbmL1.h:109
void push_back_no_warning(Tinput value)
Pushes back a value to the vector without testing for the memory re-alocation.
Definition CaVector.h:188
TODO: SZh 8.11.2022: add selection of parameterisation.
Definition CaBranch.h:14