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/trackingUtilities/numerics/ERightLeft.h>
12#include <tracking/trackingUtilities/numerics/Index.h>
13
14#include <Math/Vector3D.h>
15#include <Math/Vector2D.h>
16
17namespace Belle2 {
22 class MCParticle;
23 class CDCSimHit;
24 class CDCHit;
25
26 namespace TrackFindingCDC {
27
29
32
33 public:
35 static const CDCMCHitLookUp& getInstance();
36
38 CDCMCHitLookUp() = default;
39
42
45
47 static void fill();
48
49 public:
51 static const Belle2::CDCSimHit* getSimHit(const CDCHit* ptrHit);
52
54 static const Belle2::MCParticle* getMCParticle(const CDCHit* ptrHit);
55
56
58 static const ROOT::Math::XYVector getRefPos2D(const CDCHit* ptrHit);
59
61 static float getRefDriftLength(const CDCHit* ptrHit);
62
64 static const ROOT::Math::XYZVector getRecoPos3D(const CDCHit* ptrHit);
65
67 static const ROOT::Math::XYZVector getClosestPrimaryRecoPos3D(const CDCHit* ptrHit);
68
69 public:
71 static bool isReassignedSecondary(const CDCHit* ptrHit);
72
74 static const CDCSimHit* getClosestPrimarySimHit(const CDCHit* ptrHit);
75
77 static ITrackType getMCTrackId(const CDCHit* ptrHit);
78
80 static bool isBackground(const CDCHit* ptrHit);
81
83 static TrackingUtilities::Index getInTrackId(const CDCHit* ptrHit);
84
86 static TrackingUtilities::Index getInTrackSegmentId(const CDCHit* ptrHit);
87
89 static TrackingUtilities::Index getNPassedSuperLayers(const CDCHit* ptrHit);
90
92 static TrackingUtilities::Index getNLoops(const CDCHit* ptrHit);
93
95 static TrackingUtilities::ERightLeft getRLInfo(const CDCHit* ptrHit);
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
static TrackingUtilities::Index getInTrackSegmentId(const CDCHit *ptrHit)
Returns the id of the segment in the track.
static TrackingUtilities::Index getInTrackId(const CDCHit *ptrHit)
Returns the position of the wire hit in the track along the travel direction.
static bool isBackground(const CDCHit *ptrHit)
Returns if this hit is considered background.
CDCMCHitLookUp()=default
Default constructor, needs to be public for initialization in CDCMCManager.
static const Belle2::CDCSimHit * getSimHit(const CDCHit *ptrHit)
Getter for the CDCSimHit which is related to the CDCHit contained in the given wire hit.
static float getRefDriftLength(const CDCHit *ptrHit)
Getter for the reference drift length in the two dimensional projection.
static const CDCSimHit * getClosestPrimarySimHit(const CDCHit *ptrHit)
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 =.
static ITrackType getMCTrackId(const CDCHit *ptrHit)
Returns the track id for the hit.
static const ROOT::Math::XYZVector getRecoPos3D(const CDCHit *ptrHit)
Getter for the three dimensional position of the primary ionisation for the hit.
static const Belle2::MCParticle * getMCParticle(const CDCHit *ptrHit)
Getter for the MCParticle which is related to the CDCHit contained in the given wire hit.
static TrackingUtilities::Index getNPassedSuperLayers(const CDCHit *ptrHit)
Returns the number of superlayers the track traversed until this hit.
static TrackingUtilities::ERightLeft getRLInfo(const CDCHit *ptrHit)
Returns the true right left passage information.
static const ROOT::Math::XYVector getRefPos2D(const CDCHit *ptrHit)
Getter for the two dimensional reference position of the wire the given hit is located on - mainly fo...
static const ROOT::Math::XYZVector getClosestPrimaryRecoPos3D(const CDCHit *ptrHit)
Getter for the three dimensional position of the ionisation of the primary simulated hit for the hit.
static TrackingUtilities::Index getNLoops(const CDCHit *ptrHit)
Returns the number of loops the track traversed until this hit.
CDCMCHitLookUp(CDCMCHitLookUp &)=delete
Singleton: Delete copy constructor and assignment operator.
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
static void fill()
Method for forwarding a request to fill the Monte Carlo lookup tables from Python.
static bool isReassignedSecondary(const CDCHit *ptrHit)
Indicates if the hit was reassigned to a different mc particle because it was caused by a secondary.
Abstract base class for different kinds of events.