Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
LArObjectHelper.cc
Go to the documentation of this file.
1
9
#include "
larpandoracontent/LArHelpers/LArObjectHelper.h
"
10
11
using namespace
pandora
;
12
13
namespace
lar_content
14
{
15
16
template
<>
17
CartesianVector
LArObjectHelper::TypeAdaptor::GetPosition
(
const
CartesianVector
&t)
18
{
19
return
t;
20
}
21
22
template
<>
23
CartesianVector
LArObjectHelper::TypeAdaptor::GetPosition
(
const
CaloHit
*
const
&pT)
24
{
25
return
pT->
GetPositionVector
();
26
}
27
28
//------------------------------------------------------------------------------------------------------------------------------------------
29
30
template
<>
31
const
CaloHit
*
LArObjectHelper::TypeAdaptor::GetCaloHit
(
const
CartesianVector
&)
32
{
33
return
nullptr
;
34
}
35
36
template
<>
37
const
CaloHit
*
LArObjectHelper::TypeAdaptor::GetCaloHit
(
const
CaloHit
*
const
&pCaloHit3D)
38
{
39
const
CaloHit
*
const
pCaloHit2D =
static_cast<
const
CaloHit
*
>
(pCaloHit3D->
GetParentAddress
());
40
return
pCaloHit2D;
41
}
42
43
}
// namespace lar_content
LArObjectHelper.h
Header file for the object helper class.
lar_content::LArObjectHelper::TypeAdaptor::GetCaloHit
static const pandora::CaloHit * GetCaloHit(const T &t)
Get the associated calo hit, or nullptr if none.
lar_content::LArObjectHelper::TypeAdaptor::GetPosition
static pandora::CartesianVector GetPosition(const T &t)
Get the associated position.
pandora::CaloHit
CaloHit class.
Definition
CaloHit.h:26
pandora::CaloHit::GetPositionVector
const CartesianVector & GetPositionVector() const
Get the position vector of center of calorimeter cell, units mm.
Definition
CaloHit.h:350
pandora::CaloHit::GetParentAddress
const void * GetParentAddress() const
Get the address of the parent calo hit in the user framework.
Definition
CaloHit.h:532
pandora::CartesianVector
CartesianVector class.
Definition
CartesianVector.h:24
lar_content
Definition
CheatingBeamParticleIdTool.cc:19
pandora
Definition
LArContent.h:12
LArContent
larpandoracontent
LArHelpers
LArObjectHelper.cc