Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file ReMId.h
3 // \brief A pid object for muon identification
4 // \version $Id: ReMId.h,v 2012-09-26 18:38:44 raddatz Exp $
5 // \author Nicholas Raddatz -
6 ////////////////////////////////////////////////////////////////////////
7 #ifndef REMID_REMID_H
8 #define REMID_REMID_H
10 #include <vector>
12 #include "TVector3.h"
13 #include "RecoBase/Track.h"
14 #include "RecoBase/PID.h"
16 #ifndef __GCCXML__
18 #endif // __GCCXML__
21 namespace remid
22 {
23  class ReMId : public rb::PID
24  {
25  public:
27  ReMId();
28  ReMId(int pdg, double val);
29  void AddScatter(TVector3 pos, double cosScat);
30  void AddDedx(double dedx, double distFromStart, bool used = true, bool vert = false);
31  void SetMuonDedxLL(double ll);
32  void SetPionDedxLL(double ll);
33  void SetMuonScatLL(double ll);
34  void SetPionScatLL(double ll);
35  void SetDedxUsed(unsigned int idx, bool used);
36  void SetDedxVertex(unsigned int idx, bool vert);
37  void SetContained(bool cont);
38  double AvgDedx() const;
39  double AvgDedxUsed() const;
40  unsigned int NScatters() const;
41  unsigned int NDedx() const;
42  TVector3 ScatLocation(unsigned int i) const;
43  double CosScat(unsigned int i) const;
44  double DedxLocation(unsigned int i) const;
45  double Dedx(unsigned int i) const;
46  bool DedxUsed(unsigned int i) const;
47  bool DedxVertex(unsigned int i) const;
48  double MuonDedxLL() const;
49  double PionDedxLL() const;
50  double MuonScatLL() const;
51  double PionScatLL() const;
52  double DedxSeparation() const;
53  double ScatSeparation() const;
54  double MeasurementFraction() const;
55  int NMeasurementPlanes() const;
56  int NVertexPlanes() const;
57  bool Contained() const;
59  protected:
61  double fMuonScatLL;
62  double fPionScatLL;
63  double fMuonDedxLL;
64  double fPionDedxLL;
65  bool fCont;
67  std::vector<TVector3> fscatLocation;
68  std::vector<double> fcosScatAngle;
69  std::vector<double> fdedx;
70  std::vector<int> fdedxvert;
71  std::vector<int> fdedxused;
72  std::vector<double> ffracDistFromStart;
74  };
76 #ifndef __GCCXML__
77 /// Function which finds index of the best ReMId track among a vector of tracks.
78 /// Requires the event to fetch associated ReMId objects and the module label
79 unsigned int HighestPIDTrack(
80  const std::vector< art::Ptr<rb::Track> >& sliceTracks,
81  const std::string& remidModuleLabel, const art::Event& e);
83 unsigned int HighestPIDTrack(std::vector< art::Ptr<rb::Track> > const& sliceTracks,
84  art::InputTag const& remidTag,
85  art::Event const& e);
86 #endif // __GCCXML__
88 }
89 #endif
double PionDedxLL() const
Definition: ReMId.cxx:150
std::vector< double > fdedx
Definition: ReMId.h:69
A pid value and corresponding pdg code.
Definition: PID.h:13
double Dedx(unsigned int i) const
Definition: ReMId.cxx:126
void SetPionScatLL(double ll)
Definition: ReMId.cxx:162
unsigned int NScatters() const
Definition: ReMId.cxx:96
double MuonDedxLL() const
Definition: ReMId.cxx:144
pdg code and pid value
std::vector< int > fdedxvert
Definition: ReMId.h:70
double fMuonDedxLL
Definition: ReMId.h:63
double ScatSeparation() const
Return the scattering separation variable used as an input to the kNN that determines the pid value...
Definition: ReMId.cxx:206
bool fCont
Definition: ReMId.h:65
void SetDedxVertex(unsigned int idx, bool vert)
Definition: ReMId.cxx:174
double MuonScatLL() const
Definition: ReMId.cxx:186
std::vector< int > fdedxused
Definition: ReMId.h:71
void SetDedxUsed(unsigned int idx, bool used)
Definition: ReMId.cxx:168
std::vector< TVector3 > fscatLocation
Definition: ReMId.h:67
void SetContained(bool cont)
Definition: ReMId.cxx:180
double AvgDedx() const
Definition: ReMId.cxx:68
double fPionDedxLL
Definition: ReMId.h:64
bool DedxVertex(unsigned int i) const
Definition: ReMId.cxx:138
void SetMuonDedxLL(double ll)
Definition: ReMId.cxx:56
void AddDedx(double dedx, double distFromStart, bool used=true, bool vert=false)
Definition: ReMId.cxx:47
int NMeasurementPlanes() const
Definition: ReMId.cxx:223
TVector3 ScatLocation(unsigned int i) const
Definition: ReMId.cxx:108
double CosScat(unsigned int i) const
Definition: ReMId.cxx:114
std::vector< double > ffracDistFromStart
Definition: ReMId.h:72
void SetPionDedxLL(double ll)
Definition: ReMId.cxx:62
int NVertexPlanes() const
Definition: ReMId.cxx:233
bool DedxUsed(unsigned int i) const
Definition: ReMId.cxx:132
bool Contained() const
Definition: ReMId.cxx:243
double fMuonScatLL
Definition: ReMId.h:61
void AddScatter(TVector3 pos, double cosScat)
Definition: ReMId.cxx:40
void SetMuonScatLL(double ll)
Definition: ReMId.cxx:156
double AvgDedxUsed() const
Definition: ReMId.cxx:81
unsigned int NDedx() const
Definition: ReMId.cxx:102
double fPionScatLL
Definition: ReMId.h:62
double DedxLocation(unsigned int i) const
Definition: ReMId.cxx:120
double MeasurementFraction() const
Return the measurement fraction variable used as an input to the kNN that determines the pid value...
Definition: ReMId.cxx:213
std::vector< double > fcosScatAngle
Definition: ReMId.h:68
double PionScatLL() const
Definition: ReMId.cxx:192
A PID for muons.
Definition: FillPIDs.h:10
Float_t e
Definition: plot.C:35
double DedxSeparation() const
Return the dE/dx separation variable used as an input to the kNN that determines the pid value...
Definition: ReMId.cxx:199
unsigned int HighestPIDTrack(const std::vector< art::Ptr< rb::Track > > &sliceTracks, const std::string &remidModuleLabel, const art::Event &e)
Definition: ReMId.cxx:249
enum BeamMode string