Belle II Software  release-08-01-10
TOPTrack Class Reference

Reconstructed track at TOP. More...

#include <TOPTrack.h>

Collaboration diagram for TOPTrack:

Classes

struct  AssumedEmission
 assumed photon emission point in local frame More...
 
struct  SelectedHit
 selected photon hit from TOPDigits More...
 
struct  TrackAngles
 Sine and cosine of track polar and azimuthal angles at assumed photon emission. More...
 

Public Member Functions

 TOPTrack ()
 Default constructor.
 
 TOPTrack (const Track &track, const std::string &digitsName="", const Const::ChargedStable &chargedStable=Const::pion)
 Constructor from mdst track - isValid() must be checked before using the object. More...
 
 TOPTrack (const ExtHit *extHit, const std::string &digitsName="")
 Constructor from extrapolated track hit - isValid() must be checked before using the object. More...
 
bool overrideTransformation (const ROOT::Math::Transform3D &transform)
 Overrides transformation from local to nominal frame, which is by default obtained from DB. More...
 
bool isValid () const
 Checks if track is successfully constructed. More...
 
int getModuleID () const
 Returns slot ID. More...
 
double getMomentumMag () const
 Returns momentum magnitude (extrapolated to TOP) More...
 
double getTransverseMomentum () const
 Returns transverse momentum (at POCA) More...
 
double getCharge () const
 Returns charge. More...
 
double getTrackLength () const
 Returns track length from IP to the average position of photon emission within quartz. More...
 
double getLengthInQuartz () const
 Returns track length within quartz. More...
 
double getBeta (const Const::ChargedStable &particle, double overrideMass=0) const
 Returns particle beta. More...
 
const TOPTrack::AssumedEmissiongetEmissionPoint (double dL=0) const
 Returns assumed photon emission position and track direction. More...
 
double getTOF (const Const::ChargedStable &particle, double dL=0, double overrideMass=0) const
 Returns time-of-flight from IP to photon emission position. More...
 
const TOP::HelixSwimmergetHelix () const
 Returns helix Helix is given in nominal slot frame and with reference position at average photon emission. More...
 
const TrackgetTrack () const
 Returns mdst track. More...
 
const ExtHitgetExtHit () const
 Returns extrapolated hit (track entrance to the bar) More...
 
const MCParticlegetMCParticle () const
 Returns MC particle assigned to this track (if any) More...
 
int getPDGCode () const
 Returns PDG code of associated MCParticle (returns 0 if none) More...
 
const TOPBarHitgetBarHit () const
 Returns bar hit of MC particle assigned to this track (if any) More...
 
const std::vector< SelectedHit > & getSelectedHits () const
 Returns selected photon hits from TOPDigits belonging to the slot ID. More...
 
double getBkgRate () const
 Returns estimated background hit rate. More...
 
bool isScanRequired (unsigned col, double time, double wid) const
 Checks if scan method of YScanner is needed to construct PDF for a given pixel column. More...
 

Private Member Functions

void set (const Track &track, const std::string &digitsName, const Const::ChargedStable &chargedStable)
 Sets the object (called by constructors) More...
 
bool setHelix (const ROOT::Math::Transform3D &transform)
 Sets helix (helix is given in nominal frame) More...
 
bool xsecPrism (std::vector< double > &lengths, std::vector< ROOT::Math::XYZPoint > &positions, const RaytracerBase::Prism &prism, const ROOT::Math::Transform3D &transform)
 Calculates intersection of trajectory with prism. More...
 

Private Attributes

int m_moduleID = 0
 slot ID
 
double m_momentum = 0
 track momentum magnitude at TOP
 
double m_pT = 0
 transverse momentum at POCA
 
double m_charge = 0
 track charge in units of elementary charge
 
double m_TOFLength = 0
 trajectory length corresponding to TOF of extrapolated hit
 
double m_trackLength = 0
 trajectory length from IP to average photon emission point
 
double m_length = 0
 trajectory length within quartz
 
TOP::HelixSwimmer m_helix
 trajectory helix in nominal slot frame
 
DBObjPtr< TOPCalModuleAlignmentm_alignment
 module alignment constants
 
DBObjPtr< TOPFrontEndSettingm_feSetting
 front-end settings
 
const Trackm_track = 0
 mdst track
 
const ExtHitm_extHit = 0
 extrapolated hit
 
const MCParticlem_mcParticle = 0
 MC particle.
 
const TOPBarHitm_barHit = 0
 bar hit
 
bool m_valid = false
 true for properly defined track
 
std::vector< SelectedHitm_selectedHits
 selected photon hits from TOPDigits belonging to this slot ID
 
double m_bkgRate = 0
 estimated background hit rate
 
std::unordered_multimap< unsigned, const SelectedHit * > m_columnHits
 selected hits mapped to pixel columns
 
std::map< double, TOPTrack::AssumedEmissionm_emissionPoints
 assumed emission points in module local frame
 

Detailed Description

Reconstructed track at TOP.

Definition at line 39 of file TOPTrack.h.

Constructor & Destructor Documentation

◆ TOPTrack() [1/2]

TOPTrack ( const Track track,
const std::string &  digitsName = "",
const Const::ChargedStable chargedStable = Const::pion 
)
explicit

Constructor from mdst track - isValid() must be checked before using the object.

Parameters
trackmdst track
digitsNamename of TOPDigits collection
chargedStablehypothesis used in mdst track extrapolation

Definition at line 40 of file TOPTrack.cc.

41  {
42  // find extrapolated track hit at TOP
43 
44  Const::EDetector myDetID = Const::EDetector::TOP;
45  const auto* geo = TOPGeometryPar::Instance()->getGeometry();
46  int numModules = geo->getNumModules();
47  int pdgCode = std::abs(chargedStable.getPDGCode());
48 
49  RelationVector<ExtHit> extHits = track.getRelationsWith<ExtHit>();
50  double tmin = 1e10; // some large time
51  for (const auto& extHit : extHits) {
52  if (std::abs(extHit.getPdgCode()) != pdgCode) continue;
53  if (extHit.getDetectorID() != myDetID) continue;
54  if (extHit.getCopyID() < 1 or extHit.getCopyID() > numModules) continue;
55  if (extHit.getTOF() < tmin) {
56  tmin = extHit.getTOF();
57  m_extHit = &extHit;
58  }
59  }
60  if (not m_extHit) return;
61 
62  // set the object
63 
64  set(track, digitsName, chargedStable);
65  }
EDetector
Enum for identifying the detector components (detector and subdetector).
Definition: Const.h:42
unsigned getNumModules() const
Returns number of modules.
Definition: TOPGeometry.h:136
const TOPGeometry * getGeometry() const
Returns pointer to geometry object using basf2 units.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
void set(const Track &track, const std::string &digitsName, const Const::ChargedStable &chargedStable)
Sets the object (called by constructors)
Definition: TOPTrack.cc:91
const ExtHit * m_extHit
extrapolated hit
Definition: TOPTrack.h:301

◆ TOPTrack() [2/2]

TOPTrack ( const ExtHit extHit,
const std::string &  digitsName = "" 
)
explicit

Constructor from extrapolated track hit - isValid() must be checked before using the object.

Parameters
extHitextrapolated track hit
digitsNamename of TOPDigits collection

Definition at line 68 of file TOPTrack.cc.

Member Function Documentation

◆ getBarHit()

const TOPBarHit* getBarHit ( ) const
inline

Returns bar hit of MC particle assigned to this track (if any)

Returns
bar hit or NULL pointer

Definition at line 238 of file TOPTrack.h.

238 {return m_barHit;}
const TOPBarHit * m_barHit
bar hit
Definition: TOPTrack.h:303

◆ getBeta()

double getBeta ( const Const::ChargedStable particle,
double  overrideMass = 0 
) const
inline

Returns particle beta.

Parameters
particleparticle mass hypothesis
overrideMassalternative mass value to be used to calculate beta. Ignored if <= 0.
Returns
particle beta

Definition at line 316 of file TOPTrack.h.

◆ getBkgRate()

double getBkgRate ( ) const
inline

Returns estimated background hit rate.

Returns
background hit rate per module

Definition at line 250 of file TOPTrack.h.

◆ getCharge()

double getCharge ( void  ) const
inline

Returns charge.

Returns
charge in units of elementary charge

Definition at line 161 of file TOPTrack.h.

◆ getEmissionPoint()

const TOPTrack::AssumedEmission & getEmissionPoint ( double  dL = 0) const

Returns assumed photon emission position and track direction.

Parameters
dLlength difference to the average emission position
Returns
assumed photon emission position and track direction in local frame

Definition at line 357 of file TOPTrack.cc.

◆ getExtHit()

const ExtHit* getExtHit ( ) const
inline

Returns extrapolated hit (track entrance to the bar)

Returns
extrapolated hit

Definition at line 216 of file TOPTrack.h.

◆ getHelix()

const TOP::HelixSwimmer& getHelix ( ) const
inline

Returns helix Helix is given in nominal slot frame and with reference position at average photon emission.

Returns
helix

Definition at line 204 of file TOPTrack.h.

◆ getLengthInQuartz()

double getLengthInQuartz ( ) const
inline

Returns track length within quartz.

Returns
track length within quartz

Definition at line 173 of file TOPTrack.h.

◆ getMCParticle()

const MCParticle* getMCParticle ( ) const
inline

Returns MC particle assigned to this track (if any)

Returns
MC particle or NULL pointer

Definition at line 222 of file TOPTrack.h.

◆ getModuleID()

int getModuleID ( ) const
inline

Returns slot ID.

Returns
slot ID

Definition at line 143 of file TOPTrack.h.

◆ getMomentumMag()

double getMomentumMag ( ) const
inline

Returns momentum magnitude (extrapolated to TOP)

Returns
momentum magnitude

Definition at line 149 of file TOPTrack.h.

◆ getPDGCode()

int getPDGCode ( void  ) const
inline

Returns PDG code of associated MCParticle (returns 0 if none)

Returns
PDG code or 0

Definition at line 228 of file TOPTrack.h.

◆ getSelectedHits()

const std::vector<SelectedHit>& getSelectedHits ( ) const
inline

Returns selected photon hits from TOPDigits belonging to the slot ID.

Returns
selected photon hits

Definition at line 244 of file TOPTrack.h.

◆ getTOF()

double getTOF ( const Const::ChargedStable particle,
double  dL = 0,
double  overrideMass = 0 
) const
inline

Returns time-of-flight from IP to photon emission position.

Parameters
particleparticle mass hypothesis
dLlength difference to the average emission position
overrideMassalternative mass value to be used to calculate beta. Ignored if <= 0.
Returns
time-of-flight

Definition at line 324 of file TOPTrack.h.

◆ getTrack()

const Track* getTrack ( ) const
inline

Returns mdst track.

Returns
mdst track

Definition at line 210 of file TOPTrack.h.

◆ getTrackLength()

double getTrackLength ( ) const
inline

Returns track length from IP to the average position of photon emission within quartz.

Returns
track length from IP

Definition at line 167 of file TOPTrack.h.

◆ getTransverseMomentum()

double getTransverseMomentum ( ) const
inline

Returns transverse momentum (at POCA)

Returns
transverse momentum

Definition at line 155 of file TOPTrack.h.

◆ isScanRequired()

bool isScanRequired ( unsigned  col,
double  time,
double  wid 
) const

Checks if scan method of YScanner is needed to construct PDF for a given pixel column.

Parameters
colpixel column (0-based)
timePDF peak time
widPDF peak width squared
Returns
true if at least one of the detected photons is within the PDF peak convoluted with TTS.

Definition at line 370 of file TOPTrack.cc.

◆ isValid()

bool isValid ( ) const
inline

Checks if track is successfully constructed.

Returns
true if successful

Definition at line 137 of file TOPTrack.h.

◆ overrideTransformation()

bool overrideTransformation ( const ROOT::Math::Transform3D &  transform)
inline

Overrides transformation from local to nominal frame, which is by default obtained from DB.

Needed for module alignment.

Parameters
transformtransformation from local to nominal frame
Returns
true if quartz bar intersection still exists

Definition at line 127 of file TOPTrack.h.

◆ set()

void set ( const Track track,
const std::string &  digitsName,
const Const::ChargedStable chargedStable 
)
private

Sets the object (called by constructors)

Parameters
trackmdst track
digitsNamename of TOPDigits collection
chargedStablehypothesis used in mdst track extrapolation

Definition at line 91 of file TOPTrack.cc.

◆ setHelix()

bool setHelix ( const ROOT::Math::Transform3D &  transform)
private

Sets helix (helix is given in nominal frame)

Parameters
transformtransformation from local to nominal frame
Returns
true if quartz bar intersection exists

Definition at line 170 of file TOPTrack.cc.

◆ xsecPrism()

bool xsecPrism ( std::vector< double > &  lengths,
std::vector< ROOT::Math::XYZPoint > &  positions,
const RaytracerBase::Prism prism,
const ROOT::Math::Transform3D &  transform 
)
private

Calculates intersection of trajectory with prism.

Parameters
lengthstrajectory lengths relative to extHit position of intersection points [in/out]
positionspositions of intersection points in module local frame [in/out]
prismprism geometry data
transformtransformation from local to nominal frame
Returns
true if intersection exists

Definition at line 273 of file TOPTrack.cc.


The documentation for this class was generated from the following files: