LArObjectHelper.cc
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArHelpers/LArObjectHelper.cc
3  *
4  * @brief Implementation of the object helper class.
5  *
6  * $Log: $
7  */
8 
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
Header file for the object helper class.