Belle II Software development
CDCMCHitLookUp.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/mclookup/ITrackType.h>
11#include <tracking/trackFindingCDC/numerics/ERightLeft.h>
12#include <tracking/trackFindingCDC/numerics/Index.h>
13
14namespace Belle2 {
19 class MCParticle;
20 class CDCSimHit;
21 class CDCHit;
22
23 namespace TrackFindingCDC {
24
25 class Vector3D;
26 class Vector2D;
27
29
32
33 public:
35 static const CDCMCHitLookUp& getInstance();
36
38 CDCMCHitLookUp() = default;
39
42
45
47 void fill() const;
48
49 public:
51 const Belle2::CDCSimHit* getSimHit(const CDCHit* ptrHit) const;
52
54 const Belle2::MCParticle* getMCParticle(const CDCHit* ptrHit) const;
55
56
58 const Vector2D getRefPos2D(const CDCHit* ptrHit) const;
59
61 float getRefDriftLength(const CDCHit* ptrHit) const;
62
64 const Vector3D getRecoPos3D(const CDCHit* ptrHit) const;
65
67 const Vector3D getClosestPrimaryRecoPos3D(const CDCHit* ptrHit) const;
68
69 public:
71 bool isReassignedSecondary(const CDCHit* ptrHit) const;
72
74 const CDCSimHit* getClosestPrimarySimHit(const CDCHit* ptrHit) const;
75
77 ITrackType getMCTrackId(const CDCHit* ptrHit) const;
78
80 bool isBackground(const CDCHit* ptrHit) const;
81
83 Index getInTrackId(const CDCHit* ptrHit) const;
84
86 Index getInTrackSegmentId(const CDCHit* ptrHit) const;
87
89 Index getNPassedSuperLayers(const CDCHit* ptrHit) const;
90
92 Index getNLoops(const CDCHit* ptrHit) const;
93
95 ERightLeft getRLInfo(const CDCHit* ptrHit) const;
96 };
97 }
99}
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:40
Example Detector.
Definition: CDCSimHit.h:21
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
Interface class to the Monte Carlo information for individual hits.
Index getNPassedSuperLayers(const CDCHit *ptrHit) const
Returns the number of superlayers the track traversed until this hit.
const Vector3D getClosestPrimaryRecoPos3D(const CDCHit *ptrHit) const
Getter for the three dimensional position of the ionisation of the primary simulated hit for the hit.
void fill() const
Method for forwarding a request to fill the Monte Carlo lookup tables from Python.
bool isReassignedSecondary(const CDCHit *ptrHit) const
Indicates if the hit was reassigned to a different mc particle because it was caused by a secondary.
float getRefDriftLength(const CDCHit *ptrHit) const
Getter for the reference drift length in the two dimensional projection.
CDCMCHitLookUp()=default
Default constructor, needs to be public for initialization in CDCMCManager.
const CDCSimHit * getClosestPrimarySimHit(const CDCHit *ptrHit) const
Getter for the closest simulated hit of a primary particle to the given hit - may return nullptr of n...
CDCMCHitLookUp & operator=(const CDCMCHitLookUp &)=delete
Operator =.
bool isBackground(const CDCHit *ptrHit) const
Returns if this hit is considered background.
Index getInTrackSegmentId(const CDCHit *ptrHit) const
Returns the id of the segment in the track.
Index getNLoops(const CDCHit *ptrHit) const
Returns the number of loops the track traversed until this hit.
const Vector2D getRefPos2D(const CDCHit *ptrHit) const
Getter for the two dimensional reference position of the wire the given hit is located on - mainly fo...
ITrackType getMCTrackId(const CDCHit *ptrHit) const
Returns the track id for the hit.
const Belle2::MCParticle * getMCParticle(const CDCHit *ptrHit) const
Getter for the MCParticle which is related to the CDCHit contained in the given wire hit.
const Belle2::CDCSimHit * getSimHit(const CDCHit *ptrHit) const
Getter for the CDCSimHit which is related to the CDCHit contained in the given wire hit.
Index getInTrackId(const CDCHit *ptrHit) const
Returns the position of the wire hit in the track along the travel direction.
CDCMCHitLookUp(CDCMCHitLookUp &)=delete
Singleton: Delete copy constructor and assignment operator.
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
ERightLeft getRLInfo(const CDCHit *ptrHit) const
Returns the true right left passage information.
const Vector3D getRecoPos3D(const CDCHit *ptrHit) const
Getter for the three dimensional position of the primary ionisation for the hit.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
Definition: Vector2D.h:32
A three dimensional vector.
Definition: Vector3D.h:33
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:34
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Definition: ERightLeft.h:25
Abstract base class for different kinds of events.