Belle II Software  release-05-02-19
CDCMCHitLookUp.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2014 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/mclookup/ITrackType.h>
13 #include <tracking/trackFindingCDC/numerics/ERightLeft.h>
14 #include <tracking/trackFindingCDC/numerics/Index.h>
15 
16 namespace Belle2 {
21  class MCParticle;
22  class CDCSimHit;
23  class CDCHit;
24 
25  namespace TrackFindingCDC {
26 
27  class Vector3D;
28  class Vector2D;
29 
31 
33  class CDCMCHitLookUp {
34 
35  public:
37  static const CDCMCHitLookUp& getInstance();
38 
40  CDCMCHitLookUp() = default;
42  CDCMCHitLookUp(CDCMCHitLookUp&) = delete;
43  CDCMCHitLookUp& operator=(const CDCMCHitLookUp&) = delete;
44 
46  void fill() const;
47 
48  public:
50  const Belle2::CDCSimHit* getSimHit(const CDCHit* ptrHit) const;
51 
53  const Belle2::MCParticle* getMCParticle(const CDCHit* ptrHit) const;
54 
55 
57  const Vector2D getRefPos2D(const CDCHit* ptrHit) const;
58 
60  float getRefDriftLength(const CDCHit* ptrHit) const;
61 
63  const Vector3D getRecoPos3D(const CDCHit* ptrHit) const;
64 
66  const Vector3D getClosestPrimaryRecoPos3D(const CDCHit* ptrHit) const;
67 
68  public:
70  bool isReassignedSecondary(const CDCHit* ptrHit) const;
71 
73  const CDCSimHit* getClosestPrimarySimHit(const CDCHit* ptrHit) const;
74 
76  ITrackType getMCTrackId(const CDCHit* ptrHit) const;
77 
79  bool isBackground(const CDCHit* ptrHit) const;
80 
82  Index getInTrackId(const CDCHit* ptrHit) const;
83 
85  Index getInTrackSegmentId(const CDCHit* ptrHit) const;
86 
88  Index getNPassedSuperLayers(const CDCHit* ptrHit) const;
89 
91  Index getNLoops(const CDCHit* ptrHit) const;
92 
94  ERightLeft getRLInfo(const CDCHit* ptrHit) const;
95  };
96  }
98 }
Belle2::TrackFindingCDC::CDCMCHitLookUp::getMCParticle
const Belle2::MCParticle * getMCParticle(const CDCHit *ptrHit) const
Getter for the MCParticle which is related to the CDCHit contained in the given wire hit.
Definition: CDCMCHitLookUp.cc:50
Belle2::TrackFindingCDC::CDCMCHitLookUp::getRefDriftLength
float getRefDriftLength(const CDCHit *ptrHit) const
Getter for the reference drift length in the two dimensional projection.
Definition: CDCMCHitLookUp.cc:74
Belle2::Vector3D
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:35
Belle2::TrackFindingCDC::CDCMCHitLookUp::getRecoPos3D
const Vector3D getRecoPos3D(const CDCHit *ptrHit) const
Getter for the three dimensional position of the primary ionisation for the hit.
Definition: CDCMCHitLookUp.cc:84
Belle2::TrackFindingCDC::CDCMCHitLookUp::getClosestPrimarySimHit
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...
Definition: CDCMCHitLookUp.cc:103
Belle2::TrackFindingCDC::CDCMCHitLookUp::getNPassedSuperLayers
Index getNPassedSuperLayers(const CDCHit *ptrHit) const
Returns the number of superlayers the track traversed until this hit.
Definition: CDCMCHitLookUp.cc:141
Belle2::CDCSimHit
Example Detector.
Definition: CDCSimHit.h:33
Belle2::TrackFindingCDC::CDCMCHitLookUp::getMCTrackId
ITrackType getMCTrackId(const CDCHit *ptrHit) const
Returns the track id for the hit.
Definition: CDCMCHitLookUp.cc:122
Belle2::TrackFindingCDC::CDCMCHitLookUp::isReassignedSecondary
bool isReassignedSecondary(const CDCHit *ptrHit) const
Indicates if the hit was reassigned to a different mc particle because it was caused by a secondary.
Definition: CDCMCHitLookUp.cc:96
Belle2::TrackFindingCDC::CDCMCHitLookUp::getRefPos2D
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...
Definition: CDCMCHitLookUp.cc:56
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::CDCMCHitLookUp::getNLoops
Index getNLoops(const CDCHit *ptrHit) const
Returns the number of loops the track traversed until this hit.
Definition: CDCMCHitLookUp.cc:147
Belle2::TrackFindingCDC::NRightLeft::ERightLeft
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Definition: ERightLeft.h:35
Belle2::TrackFindingCDC::CDCMCHitLookUp::getSimHit
const Belle2::CDCSimHit * getSimHit(const CDCHit *ptrHit) const
Getter for the CDCSimHit which is related to the CDCHit contained in the given wire hit.
Definition: CDCMCHitLookUp.cc:44
Belle2::TrackFindingCDC::CDCMCHitLookUp::getInstance
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
Definition: CDCMCHitLookUp.cc:32
Belle2::TrackFindingCDC::CDCMCHitLookUp::getClosestPrimaryRecoPos3D
const Vector3D getClosestPrimaryRecoPos3D(const CDCHit *ptrHit) const
Getter for the three dimensional position of the ionisation of the primary simulated hit for the hit.
Definition: CDCMCHitLookUp.cc:90
Belle2::TrackFindingCDC::CDCMCHitLookUp::getInTrackId
Index getInTrackId(const CDCHit *ptrHit) const
Returns the position of the wire hit in the track along the travel direction.
Definition: CDCMCHitLookUp.cc:129
Belle2::TrackFindingCDC::CDCMCHitLookUp::CDCMCHitLookUp
CDCMCHitLookUp()=default
Default constructor, needs to be public for initialization in CDCMCManager.
Belle2::TrackFindingCDC::CDCMCHitLookUp::getRLInfo
ERightLeft getRLInfo(const CDCHit *ptrHit) const
Returns the true right left passage information.
Definition: CDCMCHitLookUp.cc:109
Belle2::TrackFindingCDC::CDCMCHitLookUp::isBackground
bool isBackground(const CDCHit *ptrHit) const
Returns if this hit is considered background.
Definition: CDCMCHitLookUp.cc:115
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:43
Belle2::TrackFindingCDC::CDCMCHitLookUp::getInTrackSegmentId
Index getInTrackSegmentId(const CDCHit *ptrHit) const
Returns the id of the segment in the track.
Definition: CDCMCHitLookUp.cc:135
Belle2::TrackFindingCDC::CDCMCHitLookUp::fill
void fill() const
Method for forwarding a request to fill the Monte Carlo lookup tables from Python.
Definition: CDCMCHitLookUp.cc:38