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