BPFPId.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////
2 //
3 // \file BPFPId.h
4 // \brief Header for the energy object created by
5 // BPFPId_module.cc.
6 // \version
7 // \author Michael Baird - mbaird42@fnal.gov & Jonathan Davies - jpdavies@sussex.ac.uk
8 //
9 ///////////////////////////////////////////////////////////
10 #ifndef BPFIT_BPFPID_H
11 #define BPFIT_BPFPID_H
12 
13 #include <vector>
14 
15 #include "RecoBase/Track.h"
16 #include "RecoBase/PID.h"
17 
18 #ifndef __GCCXML__
20 #endif // __GCCXML__
21 
22 namespace bpfit
23 {
24 
25  class BPFPId : public rb::PID
26  {
27  public:
28 
29  BPFPId();
30  BPFPId(int pdg, double val);
31 
32  ///Set fLength, fChi2T, fdEdXLL and fHitRatio to default values
33  void SetDefaults();
34 
35  //Setter Functions
36  void SetLength(double length){ fLength = length; }
37  void SetChi2T(double chi2T){ fChi2T = chi2T; }
38  void SetdEdXLL(double dEdXLL){ fdEdXLL = dEdXLL; }
39  void SetHitRatio(double hitRatio){ fHitRatio = hitRatio; }
40 
41  //Getter Functions
42  float GetLength() const { return fLength; }
43  float GetChi2T() const { return fChi2T; }
44  float GetdEdXLL() const { return fdEdXLL; }
45  float GetHitRatio() const { return fHitRatio; }
46 
47  // HighestPIDTrack
48 
49 
50  private:
51 
52  ///Track Length
53  float fLength;
54  ///BreakPointFitter track total chi^2 (sum of hit plus plane chi^2)
55  float fChi2T;
56  ///dE/dX log likelihood total for the BreakPointFitter Track
57  float fdEdXLL;
58  ///Ratio of on track to on + off track hits
59  float fHitRatio;
60 
61  };
62 
63 #ifndef __GCCXML__
64 /// Function which finds index of the best BPF track among a vector of tracks.
65 /// Requires the event to fetch associated BPF objects and the module label
66 unsigned int HighestPIDTrack(
67  const std::vector< art::Ptr<rb::Track> >& sliceTracks,
68  const std::string& bpfpidModuleLabel,
69  const int & pdg,
70  const art::Event& e);
71 #endif // __GCCXML__
72 
73 }
74 #endif // BPFIT_BPFPIF_H
A pid value and corresponding pdg code.
Definition: PID.h:13
float fdEdXLL
dE/dX log likelihood total for the BreakPointFitter Track
Definition: BPFPId.h:57
pdg code and pid value
void SetdEdXLL(double dEdXLL)
Definition: BPFPId.h:38
void SetHitRatio(double hitRatio)
Definition: BPFPId.h:39
void SetLength(double length)
Definition: BPFPId.h:36
float fChi2T
BreakPointFitter track total chi^2 (sum of hit plus plane chi^2)
Definition: BPFPId.h:55
float GetdEdXLL() const
Definition: BPFPId.h:44
float GetLength() const
Definition: BPFPId.h:42
length
Definition: demo0.py:21
void SetChi2T(double chi2T)
Definition: BPFPId.h:37
float GetHitRatio() const
Definition: BPFPId.h:45
unsigned int HighestPIDTrack(const std::vector< art::Ptr< rb::Track > > &sliceTracks, const std::string &bpfpidModuleLabel, const int &pdg, const art::Event &e)
Definition: BPFPId.cxx:45
void SetDefaults()
Set fLength, fChi2T, fdEdXLL and fHitRatio to default values.
Definition: BPFPId.cxx:35
float fLength
Track Length.
Definition: BPFPId.h:53
Float_t e
Definition: plot.C:35
float GetChi2T() const
Definition: BPFPId.h:43
float fHitRatio
Ratio of on track to on + off track hits.
Definition: BPFPId.h:59
enum BeamMode string