All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ShowerRecoTools::IShowerTool Class Referenceabstract

#include <IShowerTool.h>

Inheritance diagram for ShowerRecoTools::IShowerTool:
ShowerRecoTools::Shower2DLinearRegressionTrackHitFinder ShowerRecoTools::Shower3DCylinderTrackHitFinder ShowerRecoTools::ShowerBayesianTrucatingdEdx ShowerRecoTools::ShowerDirectionCheater ShowerRecoTools::ShowerDirectionTopologyDecisionTool ShowerRecoTools::ShowerExampleTool ShowerRecoTools::ShowerIncrementalTrackHitFinder ShowerRecoTools::ShowerLengthPercentile ShowerRecoTools::ShowerLinearEnergy ShowerRecoTools::ShowerNumElectronsEnergy ShowerRecoTools::ShowerPandoraSlidingFitTrackFinder ShowerRecoTools::ShowerPCADirection ShowerRecoTools::ShowerPCAEigenvalueLength ShowerRecoTools::ShowerPCAPropergationStartPosition ShowerRecoTools::ShowerPFPVertexStartPosition ShowerRecoTools::ShowerSkeletonTool ShowerRecoTools::ShowerStartPositionCheater ShowerRecoTools::ShowerTrackColinearTrajPointDirection ShowerRecoTools::ShowerTrackDirection ShowerRecoTools::ShowerTrackFinderCheater ShowerRecoTools::ShowerTrackHitDirection ShowerRecoTools::ShowerTrackPCADirection ShowerRecoTools::ShowerTrackSpacePointDirection ShowerRecoTools::ShowerTrackStartPosition ShowerRecoTools::ShowerTrackTrajPointDirection ShowerRecoTools::ShowerTrackTrajToSpacePoint ShowerRecoTools::ShowerTrajPointdEdx ShowerRecoTools::ShowerUnidirectiondEdx

Public Member Functions

 IShowerTool (const fhicl::ParameterSet &pset)
 
virtual ~IShowerTool () noexcept=default
 
virtual int CalculateElement (const art::Ptr< recob::PFParticle > &pfparticle, art::Event &Event, reco::shower::ShowerElementHolder &ShowerEleHolder)=0
 
int RunShowerTool (const art::Ptr< recob::PFParticle > &pfparticle, art::Event &Event, reco::shower::ShowerElementHolder &ShowerEleHolder, std::string evd_display_name_append="")
 
virtual void InitialiseProducers ()
 
void SetPtr (art::ProducesCollector *collector)
 
void InitaliseProducerPtr (reco::shower::ShowerProducedPtrsHolder &uniqueproducerPtrs)
 
virtual int AddAssociations (const art::Ptr< recob::PFParticle > &pfpPtr, art::Event &Event, reco::shower::ShowerElementHolder &ShowerEleHolder)
 

Protected Member Functions

const shower::LArPandoraShowerAlgGetLArPandoraShowerAlg () const
 
template<class T >
art::Ptr< T > GetProducedElementPtr (std::string Name, reco::shower::ShowerElementHolder &ShowerEleHolder, int iter=-1)
 
template<class T >
void InitialiseProduct (std::string Name, std::string InstanceName="")
 
template<class T , class A , class B >
void AddSingle (A &a, B &b, std::string Name)
 
int GetVectorPtrSize (std::string Name)
 
void PrintPtrs ()
 
void PrintPtr (std::string Name)
 

Private Attributes

reco::shower::ShowerProducedPtrsHolderUniquePtrs
 
shower::LArPandoraShowerAlg fLArPandoraShowerAlg
 
bool fRunEventDisplay
 
art::ProducesCollector * collectorPtr
 

Detailed Description

Definition at line 26 of file IShowerTool.h.

Constructor & Destructor Documentation

ShowerRecoTools::IShowerTool::IShowerTool ( const fhicl::ParameterSet &  pset)
inline

Definition at line 29 of file IShowerTool.h.

30  : fLArPandoraShowerAlg(pset.get<fhicl::ParameterSet>("LArPandoraShowerAlg"))
31  , fRunEventDisplay(pset.get<bool>("EnableEventDisplay")){};
shower::LArPandoraShowerAlg fLArPandoraShowerAlg
Definition: IShowerTool.h:98
virtual ShowerRecoTools::IShowerTool::~IShowerTool ( )
virtualdefaultnoexcept

Member Function Documentation

virtual int ShowerRecoTools::IShowerTool::AddAssociations ( const art::Ptr< recob::PFParticle > &  pfpPtr,
art::Event &  Event,
reco::shower::ShowerElementHolder ShowerEleHolder 
)
inlinevirtual
template<class T , class A , class B >
void ShowerRecoTools::IShowerTool::AddSingle ( A &  a,
B &  b,
std::string  Name 
)
inlineprotected

Definition at line 161 of file IShowerTool.h.

162  {
163  UniquePtrs->AddSingle<T>(a, b, Name);
164  }
reco::shower::ShowerProducedPtrsHolder * UniquePtrs
Definition: IShowerTool.h:91
process_name gaushit a
void AddSingle(A &a, B &b, const std::string &Name)
BEGIN_PROLOG vertical distance to the surface Name
virtual int ShowerRecoTools::IShowerTool::CalculateElement ( const art::Ptr< recob::PFParticle > &  pfparticle,
art::Event &  Event,
reco::shower::ShowerElementHolder ShowerEleHolder 
)
pure virtual
const shower::LArPandoraShowerAlg& ShowerRecoTools::IShowerTool::GetLArPandoraShowerAlg ( ) const
inlineprotected

Definition at line 88 of file IShowerTool.h.

89  {
90  return fLArPandoraShowerAlg;
91  };
shower::LArPandoraShowerAlg fLArPandoraShowerAlg
Definition: IShowerTool.h:98
template<class T >
art::Ptr<T> ShowerRecoTools::IShowerTool::GetProducedElementPtr ( std::string  Name,
reco::shower::ShowerElementHolder ShowerEleHolder,
int  iter = -1 
)
inlineprotected

Definition at line 109 of file IShowerTool.h.

112  {
113 
114  //Check the element has been set
115  bool check_element = ShowerEleHolder.CheckElement(Name);
116  if (!check_element) {
117  throw cet::exception("IShowerTool") << "tried to get a element that does not exist. Failed "
118  "at making the art ptr for Element: "
119  << Name << std::endl;
120  }
121 
122  //Check the unique ptr has been set.
123  bool check_ptr = UniquePtrs->CheckUniqueProduerPtr(Name);
124  if (!check_ptr) {
125  throw cet::exception("IShowerTool")
126  << "tried to get a ptr that does not exist. Failed at making the art ptr for Element"
127  << Name;
128  }
129 
130  //Check if the user has defined an index if not just use the current shower index/
131  int index;
132  if (iter != -1) { index = iter; }
133  else {
134  index = ShowerEleHolder.GetShowerNumber();
135  }
136 
137  //Make the ptr
138  return UniquePtrs->GetArtPtr<T>(Name, index);
139  }
reco::shower::ShowerProducedPtrsHolder * UniquePtrs
Definition: IShowerTool.h:91
bool CheckUniqueProduerPtr(const std::string &Name) const
bool CheckElement(const std::string &Name) const
BEGIN_PROLOG vertical distance to the surface Name
art::Ptr< T > GetArtPtr(const std::string &Name, const int &iter) const
int ShowerRecoTools::IShowerTool::GetVectorPtrSize ( std::string  Name)
inlineprotected

Definition at line 168 of file IShowerTool.h.

169  {
171  }
reco::shower::ShowerProducedPtrsHolder * UniquePtrs
Definition: IShowerTool.h:91
BEGIN_PROLOG vertical distance to the surface Name
int GetVectorPtrSize(const std::string &Name) const
void ShowerRecoTools::IShowerTool::InitaliseProducerPtr ( reco::shower::ShowerProducedPtrsHolder uniqueproducerPtrs)
inline

Definition at line 72 of file IShowerTool.h.

73  {
74  UniquePtrs = &uniqueproducerPtrs;
75  }
reco::shower::ShowerProducedPtrsHolder * UniquePtrs
Definition: IShowerTool.h:91
virtual void ShowerRecoTools::IShowerTool::InitialiseProducers ( )
inlinevirtual
template<class T >
void ShowerRecoTools::IShowerTool::InitialiseProduct ( std::string  Name,
std::string  InstanceName = "" 
)
inlineprotected

Definition at line 145 of file IShowerTool.h.

146  {
147 
148  if (collectorPtr == nullptr) {
149  mf::LogWarning("IShowerTool") << "The art::ProducesCollector ptr has not been set";
150  return;
151  }
152 
153  collectorPtr->produces<T>(InstanceName);
155  }
reco::shower::ShowerProducedPtrsHolder * UniquePtrs
Definition: IShowerTool.h:91
art::ProducesCollector * collectorPtr
Definition: IShowerTool.h:103
BEGIN_PROLOG vertical distance to the surface Name
int SetShowerUniqueProduerPtr(type< T >, const std::string &Name, const std::string &Instance="")
void ShowerRecoTools::IShowerTool::PrintPtr ( std::string  Name)
inlineprotected

Definition at line 180 of file IShowerTool.h.

181  {
183  }
reco::shower::ShowerProducedPtrsHolder * UniquePtrs
Definition: IShowerTool.h:91
void PrintPtr(const std::string &Name) const
BEGIN_PROLOG vertical distance to the surface Name
void ShowerRecoTools::IShowerTool::PrintPtrs ( )
inlineprotected

Definition at line 174 of file IShowerTool.h.

175  {
177  }
reco::shower::ShowerProducedPtrsHolder * UniquePtrs
Definition: IShowerTool.h:91
int ShowerRecoTools::IShowerTool::RunShowerTool ( const art::Ptr< recob::PFParticle > &  pfparticle,
art::Event &  Event,
reco::shower::ShowerElementHolder ShowerEleHolder,
std::string  evd_display_name_append = "" 
)
inline

Definition at line 43 of file IShowerTool.h.

47  {
48 
49  int calculation_status = CalculateElement(pfparticle, Event, ShowerEleHolder);
50  if (calculation_status != 0) return calculation_status;
51  if (fRunEventDisplay) {
53  pfparticle, Event, ShowerEleHolder, evd_display_name_append);
54  }
55  return calculation_status;
56  }
void DebugEVD(art::Ptr< recob::PFParticle > const &pfparticle, art::Event const &Event, const reco::shower::ShowerElementHolder &ShowerEleHolder, std::string const &evd_disp_name_append="") const
virtual int CalculateElement(const art::Ptr< recob::PFParticle > &pfparticle, art::Event &Event, reco::shower::ShowerElementHolder &ShowerEleHolder)=0
const shower::LArPandoraShowerAlg & GetLArPandoraShowerAlg() const
Definition: IShowerTool.h:88
void ShowerRecoTools::IShowerTool::SetPtr ( art::ProducesCollector *  collector)
inline

Definition at line 65 of file IShowerTool.h.

66  {
67  collectorPtr = collector;
68  }
art::ProducesCollector * collectorPtr
Definition: IShowerTool.h:103

Member Data Documentation

art::ProducesCollector* ShowerRecoTools::IShowerTool::collectorPtr
private

Definition at line 103 of file IShowerTool.h.

shower::LArPandoraShowerAlg ShowerRecoTools::IShowerTool::fLArPandoraShowerAlg
private

Definition at line 98 of file IShowerTool.h.

bool ShowerRecoTools::IShowerTool::fRunEventDisplay
private

Definition at line 101 of file IShowerTool.h.

reco::shower::ShowerProducedPtrsHolder* ShowerRecoTools::IShowerTool::UniquePtrs
private

Definition at line 91 of file IShowerTool.h.


The documentation for this class was generated from the following file: