Belle II Software development
hitXPDerivate.cc
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
9#include <tracking/dataobjects/hitXPDerivate.h>
10#include <tracking/dataobjects/MCParticleInfo.h>
11#include <framework/geometry/B2Vector3.h>
12
13using namespace Belle2;
14
15hitXPDerivate::hitXPDerivate(const SVDTrueHit& hit, const SVDCluster& cluster, const MCParticle& particle,
16 const VXD::SensorInfoBase& sensor)
17{
18 m_positionMid = sensor.pointToGlobal(ROOT::Math::XYZVector(hit.getU(), hit.getV(), hit.getW()), false);
19 m_positionEntry = sensor.pointToGlobal(ROOT::Math::XYZVector(hit.getEntryU(), hit.getEntryV(), hit.getEntryW()),
20 false);
21 m_positionExit = sensor.pointToGlobal(ROOT::Math::XYZVector(hit.getExitU(), hit.getExitV(), hit.getExitW()),
22 false);
23 m_momentumMid = sensor.vectorToGlobal(hit.getMomentum(), false);
24 m_momentumEntry = sensor.vectorToGlobal(hit.getEntryMomentum(), false);
25 m_momentumExit = sensor.vectorToGlobal(hit.getExitMomentum(), false);
26 m_positionLocalMid = ROOT::Math::XYZVector(hit.getU(), hit.getV(), hit.getW());
27 m_positionLocalEntry = ROOT::Math::XYZVector(hit.getEntryU(), hit.getEntryV(), hit.getEntryW());
28 m_positionLocalExit = ROOT::Math::XYZVector(hit.getExitU(), hit.getExitV(), hit.getExitW());
29 m_momentumLocalMid = hit.getMomentum();
30 m_momentumLocalEntry = hit.getEntryMomentum();
31 m_momentumLocalExit = hit.getExitMomentum();
32 m_PDGID = particle.getPDG();
33 m_position0 = B2Vector3D(particle.getVertex());
34 m_momentum0 = B2Vector3D(particle.getMomentum());
35 m_time = hit.getGlobalTime();
36 m_sensorSensor = hit.getSensorID().getSensorNumber();
37 m_sensorLayer = hit.getSensorID().getLayerNumber();
38 m_sensorLadder = hit.getSensorID().getLadderNumber();
39 m_info_d0 = MCParticleInfo(particle, ROOT::Math::XYZVector(0, 0, 1.5)).getD0();
40 m_info_z0 = MCParticleInfo(particle, ROOT::Math::XYZVector(0, 0, 1.5)).getZ0();
41 m_info_phi0 = MCParticleInfo(particle, ROOT::Math::XYZVector(0, 0, 1.5)).getPhi();
42 m_info_tanlambda = MCParticleInfo(particle, ROOT::Math::XYZVector(0, 0, 1.5)).getOmega();
43 m_info_omega = tan(MCParticleInfo(particle, ROOT::Math::XYZVector(0, 0, 1.5)).getLambda());
44 m_clusterU = cluster.isUCluster();
45 m_clusterV = cluster.isUCluster() ? 0 : 1;
46 m_reconstructed = false;
47 m_charge = particle.getCharge();
48}
49
50
51hitXPDerivate::hitXPDerivate(const PXDTrueHit& hit, const MCParticle& particle, const VXD::SensorInfoBase& sensor)
52{
53 m_positionMid = sensor.pointToGlobal(ROOT::Math::XYZVector(hit.getU(), hit.getV(), hit.getW()), false);
54 m_positionEntry = sensor.pointToGlobal(ROOT::Math::XYZVector(hit.getEntryU(), hit.getEntryV(), hit.getEntryW()),
55 false);
56 m_positionExit = sensor.pointToGlobal(ROOT::Math::XYZVector(hit.getExitU(), hit.getExitV(), hit.getExitW()),
57 false);
58 m_momentumMid = sensor.vectorToGlobal(hit.getMomentum(), false);
59 m_momentumEntry = sensor.vectorToGlobal(hit.getEntryMomentum(), false);
60 m_momentumExit = sensor.vectorToGlobal(hit.getExitMomentum(), false);
61 m_positionLocalMid = ROOT::Math::XYZVector(hit.getU(), hit.getV(), hit.getW());
62 m_positionLocalEntry = ROOT::Math::XYZVector(hit.getEntryU(), hit.getEntryV(), hit.getEntryW());
63 m_positionLocalExit = ROOT::Math::XYZVector(hit.getExitU(), hit.getExitV(), hit.getExitW());
64 m_momentumLocalMid = hit.getMomentum();
65 m_momentumLocalEntry = hit.getEntryMomentum();
66 m_momentumLocalExit = hit.getExitMomentum();
67 m_PDGID = particle.getPDG();
68 m_position0 = B2Vector3D(particle.getVertex());
69 m_momentum0 = B2Vector3D(particle.getMomentum());
70 m_time = hit.getGlobalTime();
71 m_sensorSensor = hit.getSensorID().getSensorNumber();
72 m_sensorLayer = hit.getSensorID().getLayerNumber();
73 m_sensorLadder = hit.getSensorID().getLadderNumber();
74 m_info_d0 = MCParticleInfo(particle, ROOT::Math::XYZVector(0, 0, 1.5)).getD0();
75 m_info_z0 = MCParticleInfo(particle, ROOT::Math::XYZVector(0, 0, 1.5)).getZ0();
76 m_info_phi0 = MCParticleInfo(particle, ROOT::Math::XYZVector(0, 0,
77 1.5)).getPhi();
78 m_info_tanlambda = MCParticleInfo(particle, ROOT::Math::XYZVector(0, 0,
79 1.5)).getOmega();
80 m_info_omega = tan(MCParticleInfo(particle, ROOT::Math::XYZVector(0, 0,
81 1.5)).getLambda());
82 m_reconstructed = false;
83 m_charge = particle.getCharge();
84}
This struct is used by the TrackingPerformanceEvaluation Module to save information of reconstructed ...
double getZ0()
Getter for Z0.
double getPhi()
Getter for Phi.
double getOmega()
Getter for Omega.
double getD0()
Getter for D0.
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
Class PXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: PXDTrueHit.h:31
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:29
Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: SVDTrueHit.h:33
Base class to provide Sensor Information for PXD and SVD.
hitXPDerivate()
empty constructor
Definition: hitXPDerivate.h:32
ROOT::Math::XYZVector m_momentumEntry
momentum of hit at entry of layer
Definition: hitXP.h:39
double m_info_phi0
phi0 from MCParticle info evaluation.
Definition: hitXP.h:56
ROOT::Math::XYZVector m_momentumMid
momentum of hit at midpoint of layer
Definition: hitXP.h:38
int m_sensorLadder
ladder of the hit
Definition: hitXP.h:53
double m_time
time of the hit
Definition: hitXP.h:50
double m_info_d0
d0 from MCParticle info evaluation.
Definition: hitXP.h:54
ROOT::Math::XYZVector m_momentumExit
momentum of hit at exit of layer
Definition: hitXP.h:40
ROOT::Math::XYZVector m_positionEntry
poition of hit at entrypoint of layer
Definition: hitXP.h:36
int m_clusterV
flag for v cluster
Definition: hitXP.h:60
double m_info_tanlambda
tanlambda from MCParticle info evaluation.
Definition: hitXP.h:57
int m_sensorLayer
layer of the hit
Definition: hitXP.h:52
ROOT::Math::XYZVector m_positionMid
poition of hit at midpoint of layer
Definition: hitXP.h:35
ROOT::Math::XYZVector m_positionLocalExit
poition of hit at exitpoint of layer, local coordinate
Definition: hitXP.h:43
ROOT::Math::XYZVector m_momentumLocalMid
momentum of hit at midpoint of layer, local coordinate
Definition: hitXP.h:44
ROOT::Math::XYZVector m_positionExit
poition of hit at exitpoint of layer
Definition: hitXP.h:37
bool m_reconstructed
flag for reconstructed track
Definition: hitXP.h:61
ROOT::Math::XYZVector m_positionLocalEntry
poition of hit at entrypoint of layer, local coordinate
Definition: hitXP.h:42
int m_clusterU
flag for u cluster
Definition: hitXP.h:59
double m_info_z0
z0 from MCParticle info evaluation.
Definition: hitXP.h:55
ROOT::Math::XYZVector m_positionLocalMid
poition of hit at midpoint of layer, local coordinate
Definition: hitXP.h:41
ROOT::Math::XYZVector m_momentumLocalEntry
momentum of hit at entrypoint of layer, local coordinate
Definition: hitXP.h:45
double m_charge
charge of the track
Definition: hitXP.h:62
ROOT::Math::XYZVector m_momentumLocalExit
momentum of hit at exitpoint of layer, local coordinate
Definition: hitXP.h:46
ROOT::Math::XYZVector m_momentum0
momentum at IP
Definition: hitXP.h:49
double m_info_omega
omega from MCParticle info evaluation.
Definition: hitXP.h:58
ROOT::Math::XYZVector m_position0
position at IP
Definition: hitXP.h:48
int m_PDGID
PDGID.
Definition: hitXP.h:47
int m_sensorSensor
sensor of the hit
Definition: hitXP.h:51
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516
Abstract base class for different kinds of events.