ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics
VP1
VP1Systems
VP1AODSystems
src
IParticleHandleBase.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
7
// //
8
// Implementation of class IParticleHandleBase //
9
// //
10
// //
12
13
#include "
IParticleHandleBase.h
"
14
#include "
IParticleCollHandleBase.h
"
15
#include "
VP1AODSystems/AODSystemController.h
"
16
#include "
VP1AODSystems/VP1AODSystem.h
"
17
#include "
VP1Utils/VP1ParticleData.h
"
18
#include "
VP1Utils/VP1LinAlgUtils.h
"
19
20
#include "
VP1Utils/VP1JobConfigInfo.h
"
21
#include "
VP1Base/VP1ExtraSepLayerHelper.h
"
22
#include "
VP1Base/VP1Msg.h
"
23
#include "
VP1Base/VP1MaterialButton.h
"
24
#include "
VP1Base/VP1QtUtils.h
"
25
26
#include "
VP1Utils/SurfaceToSoNode.h
"
27
28
#include <Inventor/C/errors/debugerror.h>
29
#include <Inventor/nodes/SoLineSet.h>
30
#include <Inventor/nodes/SoVertexProperty.h>
31
#include <Inventor/nodes/SoSeparator.h>
32
#include <Inventor/nodes/SoMaterial.h>
33
#include <Inventor/nodes/SoPickStyle.h>
34
#include <Inventor/nodes/SoCylinder.h>
35
#include <Inventor/nodes/SoMatrixTransform.h>
36
#include <Inventor/SbRotation.h>
37
#include <Inventor/SbMatrix.h>
38
#include <Inventor/nodes/SoTranslation.h>
39
#include <Inventor/nodes/SoText2.h>
40
41
#include "
GeoPrimitives/AmgStringHelpers.h
"
42
#include "
GeoPrimitives/GeoPrimitives.h
"
43
44
#include <cassert>
45
46
#include "
xAODBase/IParticle.h
"
47
48
49
//____________________________________________________________________
50
class
IParticleHandleBase::Imp
{
51
public
:
52
static
double
dist
(
const
SbVec3f& p1,
const
SbVec3f& p2);
53
Imp
(
IParticleHandleBase
*
tc
) :
theclass
(
tc
){}
54
~Imp
() { }
55
IParticleHandleBase
*
theclass
;
56
};
57
58
//____________________________________________________________________
59
IParticleHandleBase::IParticleHandleBase
(
IParticleCollHandleBase
*ch)
60
:
AODHandleBase
(ch),
m_d
(new
Imp
(this))
61
{
62
}
63
64
//____________________________________________________________________
65
IParticleHandleBase::~IParticleHandleBase
()
66
{
67
delete
m_d
;
68
}
69
70
//____________________________________________________________________
71
SoMaterial *
IParticleHandleBase::determineMaterial
() {
72
// By default we use the collection material.
73
// std::cout<<"AODHandleBase::determineMaterial() - collHandle()->material()"<<collHandle()->material()<<std::endl;
74
return
collHandle
()->
material
();
75
}
76
77
//____________________________________________________________________
78
double
IParticleHandleBase::mass
()
const
79
{
80
return
0.0;
81
}
82
83
84
//____________________________________________________________________
85
QStringList
IParticleHandleBase::baseInfo
()
const
86
{
87
QStringList l;
88
Amg::Vector3D
mom =
momentum
()/1000;
89
if
(mom.mag2()==0.0) {
90
l <<
"Momentum : 0 (undefined)"
;
91
}
else
{
92
l <<
"Momentum [GeV]: "
+
VP1Msg::str
(mom);
93
l <<
"|Pt|/|P| [GeV]: "
+
VP1Msg::str
(mom.perp())+
" / "
+
VP1Msg::str
(mom.mag());
94
l <<
VP1Msg::str
(
"("
)+QChar(0x03B7)+
","
+QChar(0x03D5)+
VP1Msg::str
(
")=("
)
95
+
VP1Msg::str
(mom.eta())+
VP1Msg::str
(
","
)+
VP1Msg::str
(
VP1LinAlgUtils::phiFromXY
(mom.x(), mom.y() ))+
VP1Msg::str
(
")"
);
96
97
l <<
"Eta: "
+
VP1Msg::str
(mom.eta());
98
l <<
"Phi: "
+
VP1Msg::str
(
VP1LinAlgUtils::phiFromXY
(mom.x(), mom.y() ));
99
}
100
// l<<"Hit summary: Pix["+VP1Msg::str(getNPixelHits())+"], SCT["+VP1Msg::str(getNSCTHits())+"], TRT["+VP1Msg::str(getNTRTHits())
101
// +"], MDT["+QString::number(getNMDTHits())+"], RPC["+QString::number(getNRPCHits())+"], TGC["+QString::number(getNTGCHits())+"], CSC["+QString::number(getNCSCHits())+"].";
102
//
103
// return l;
104
// int pdg = pdgCode();
105
// if (pdg) {
106
// bool ok;
107
// QString name = VP1ParticleData::particleName(pdg,ok);
108
// if (ok)
109
// l << "pdg: "+QString::number(pdg)+" ["+name+"]";
110
// else
111
// l << "pdg: "+QString::number(pdg);
112
// }
113
114
return
l;
115
}
AODSystemController.h
AmgStringHelpers.h
IParticle.h
GeoPrimitives.h
IParticleCollHandleBase.h
IParticleHandleBase.h
tc
static Double_t tc
Definition
LArPhysWaveHECTool.cxx:38
SurfaceToSoNode.h
VP1AODSystem.h
VP1ExtraSepLayerHelper.h
VP1JobConfigInfo.h
VP1LinAlgUtils.h
VP1MaterialButton.h
VP1Msg.h
VP1ParticleData.h
VP1QtUtils.h
AODHandleBase::collHandle
const AODCollHandleBase * collHandle() const
Definition
AODHandleBase.h:55
AODHandleBase::AODHandleBase
AODHandleBase(AODCollHandleBase *)
Definition
AODHandleBase.cxx:73
IParticleCollHandleBase
Base class for collections holding AOD objects of iParticle type Handles pt etc cuts Local data:
Definition
IParticleCollHandleBase.h:50
IParticleHandleBase::Imp
Definition
IParticleHandleBase.cxx:50
IParticleHandleBase::Imp::theclass
IParticleHandleBase * theclass
Definition
IParticleHandleBase.cxx:55
IParticleHandleBase::Imp::~Imp
~Imp()
Definition
IParticleHandleBase.cxx:54
IParticleHandleBase::Imp::Imp
Imp(IParticleHandleBase *tc)
Definition
IParticleHandleBase.cxx:53
IParticleHandleBase::Imp::dist
static double dist(const SbVec3f &p1, const SbVec3f &p2)
IParticleHandleBase::IParticleHandleBase
IParticleHandleBase(IParticleCollHandleBase *)
Definition
IParticleHandleBase.cxx:59
IParticleHandleBase::mass
virtual double mass() const
Returns unknown() in case of trouble.
Definition
IParticleHandleBase.cxx:78
IParticleHandleBase::determineMaterial
SoMaterial * determineMaterial()
Should be implemented by children, in order to change the material depending on the interface etc.
Definition
IParticleHandleBase.cxx:71
IParticleHandleBase::~IParticleHandleBase
virtual ~IParticleHandleBase()
Definition
IParticleHandleBase.cxx:65
IParticleHandleBase::momentum
virtual Amg::Vector3D momentum() const
Definition
IParticleHandleBase.h:52
IParticleHandleBase::m_d
Imp * m_d
Definition
IParticleHandleBase.h:71
IParticleHandleBase::baseInfo
virtual QStringList baseInfo() const
Definition
IParticleHandleBase.cxx:85
VP1LinAlgUtils::phiFromXY
static double phiFromXY(const double &x, const double &y)
Definition
VP1LinAlgUtils.cxx:374
VP1StdCollection::material
SoMaterial * material() const
Definition
VP1StdCollection.cxx:220
VP1String::str
static QString str(const QString &s)
Definition
VP1String.h:49
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
Generated on
for ATLAS Offline Software by
1.17.0