Public Member Functions | Private Attributes | List of all members
showerAna::ShowerParticle Class Reference

Public Member Functions

 ShowerParticle ()
 
 ShowerParticle (int id)
 
 ShowerParticle (const ShowerParticle &particle)
 
 ~ShowerParticle ()
 
void SetEnergy (double energy)
 
void SetDepositedEnergy (std::map< int, double > depositedEnergy)
 
void SetDirection (TVector3 direction)
 
void SetStart (TVector3 start)
 
void SetEnd (TVector3 end)
 
void SetPDG (int pdg)
 
void AddAssociatedHit (const art::Ptr< recob::Hit > &hit)
 
void AddAssociatedCluster (const art::Ptr< recob::Cluster > &cluster, const std::vector< art::Ptr< recob::Hit > > &hits, const std::vector< art::Ptr< recob::Hit > > &trueHits)
 
void AddAssociatedShower (const art::Ptr< recob::Shower > &shower, const std::vector< art::Ptr< recob::Hit > > &hits, const std::vector< art::Ptr< recob::Hit > > &trueHits)
 
int ID () const
 
int PDG () const
 
TVector3 Start () const
 
TVector3 End () const
 
TVector3 Direction () const
 
double Energy () const
 
double DepositedEnergy () const
 
double DepositedEnergy (int plane) const
 
TVector3 ShowerStart () const
 
TVector3 ShowerStart (int shower) const
 
TVector3 ShowerDirection () const
 
TVector3 ShowerDirection (int shower) const
 
double ShowerEnergy () const
 
double ShowerEnergy (int shower) const
 
double ShowerdEdx () const
 
double ShowerdEdx (int shower) const
 
int NumHits () const
 
int NumClusters () const
 
int NumShowers () const
 
int LargestCluster () const
 
bool LargestCluster (int cluster) const
 
int LargestShower () const
 
bool LargestShower (int shower) const
 
double ClusterCompleteness (int cluster) const
 
double ClusterPurity (int cluster) const
 
double ShowerCompleteness (int shower) const
 
double ShowerPurity (int shower) const
 

Private Attributes

int fID
 
int fPDG
 
TVector3 fStart
 
TVector3 fEnd
 
TVector3 fDirection
 
double fEnergy
 
std::map< int, double > fDepositedEnergy
 
std::vector< art::Ptr< recob::Hit > > fHits
 
std::vector< art::Ptr< recob::Cluster > > fClusters
 
std::vector< std::vector< art::Ptr< recob::Hit > > > fClusterHits
 
std::vector< std::vector< art::Ptr< recob::Hit > > > fClusterTrueHits
 
std::vector< art::Ptr< recob::Shower > > fShowers
 
std::vector< std::vector< art::Ptr< recob::Hit > > > fShowerHits
 
std::vector< std::vector< art::Ptr< recob::Hit > > > fShowerTrueHits
 
int fLargestCluster
 
int fLargestShower
 

Detailed Description

Definition at line 58 of file ShowerAnalysis_module.cc.

Constructor & Destructor Documentation

showerAna::ShowerParticle::ShowerParticle ( )
showerAna::ShowerParticle::ShowerParticle ( int  id)
showerAna::ShowerParticle::ShowerParticle ( const ShowerParticle particle)

Definition at line 137 of file ShowerAnalysis_module.cc.

showerAna::ShowerParticle::~ShowerParticle ( )

Definition at line 143 of file ShowerAnalysis_module.cc.

143  {
144 }

Member Function Documentation

void showerAna::ShowerParticle::AddAssociatedCluster ( const art::Ptr< recob::Cluster > &  cluster,
const std::vector< art::Ptr< recob::Hit > > &  hits,
const std::vector< art::Ptr< recob::Hit > > &  trueHits 
)

Definition at line 174 of file ShowerAnalysis_module.cc.

176  {
177  fClusters.push_back(cluster);
178  fClusterHits.push_back(hits);
179  fClusterTrueHits.push_back(trueHits);
180  if (hits.size() > fClusterHits[fLargestCluster].size())
181  fLargestCluster = fClusters.size() - 1;
182 }
std::vector< art::Ptr< recob::Cluster > > fClusters
std::vector< std::vector< art::Ptr< recob::Hit > > > fClusterHits
std::vector< std::vector< art::Ptr< recob::Hit > > > fClusterTrueHits
void showerAna::ShowerParticle::AddAssociatedHit ( const art::Ptr< recob::Hit > &  hit)

Definition at line 170 of file ShowerAnalysis_module.cc.

170  {
171  fHits.push_back(hit);
172 }
std::vector< art::Ptr< recob::Hit > > fHits
void showerAna::ShowerParticle::AddAssociatedShower ( const art::Ptr< recob::Shower > &  shower,
const std::vector< art::Ptr< recob::Hit > > &  hits,
const std::vector< art::Ptr< recob::Hit > > &  trueHits 
)

Definition at line 184 of file ShowerAnalysis_module.cc.

186  {
187  fShowers.push_back(shower);
188  fShowerHits.push_back(hits);
189  fShowerTrueHits.push_back(trueHits);
190  if (hits.size() > fShowerHits[fLargestShower].size())
191  fLargestShower = fShowers.size() - 1;
192 }
std::vector< std::vector< art::Ptr< recob::Hit > > > fShowerHits
std::vector< art::Ptr< recob::Shower > > fShowers
std::vector< std::vector< art::Ptr< recob::Hit > > > fShowerTrueHits
double showerAna::ShowerParticle::ClusterCompleteness ( int  cluster) const
inline

Definition at line 107 of file ShowerAnalysis_module.cc.

107 { return fClusterTrueHits.at(cluster).size() / (double)fHits.size(); }
Cluster finding and building.
std::vector< std::vector< art::Ptr< recob::Hit > > > fClusterTrueHits
std::vector< art::Ptr< recob::Hit > > fHits
double showerAna::ShowerParticle::ClusterPurity ( int  cluster) const
inline

Definition at line 108 of file ShowerAnalysis_module.cc.

108 { return fClusterTrueHits.at(cluster).size() / (double)fClusterHits.at(cluster).size(); }
Cluster finding and building.
std::vector< std::vector< art::Ptr< recob::Hit > > > fClusterHits
std::vector< std::vector< art::Ptr< recob::Hit > > > fClusterTrueHits
double showerAna::ShowerParticle::DepositedEnergy ( ) const
inline

Definition at line 86 of file ShowerAnalysis_module.cc.

int best_plane() const
Definition: Shower.h:200
std::vector< art::Ptr< recob::Shower > > fShowers
static QCString * s
Definition: config.cpp:1042
double showerAna::ShowerParticle::DepositedEnergy ( int  plane) const
inline

Definition at line 87 of file ShowerAnalysis_module.cc.

87 { return fDepositedEnergy.at(plane); }
std::map< int, double > fDepositedEnergy
TVector3 showerAna::ShowerParticle::Direction ( ) const
inline

Definition at line 84 of file ShowerAnalysis_module.cc.

TVector3 showerAna::ShowerParticle::End ( ) const
inline

Definition at line 83 of file ShowerAnalysis_module.cc.

83 { return fEnd; }
double showerAna::ShowerParticle::Energy ( ) const
inline

Definition at line 85 of file ShowerAnalysis_module.cc.

int showerAna::ShowerParticle::ID ( ) const
inline

Definition at line 79 of file ShowerAnalysis_module.cc.

int showerAna::ShowerParticle::LargestCluster ( ) const
inline

Definition at line 102 of file ShowerAnalysis_module.cc.

bool showerAna::ShowerParticle::LargestCluster ( int  cluster) const
inline

Definition at line 103 of file ShowerAnalysis_module.cc.

103 { return fLargestCluster == cluster; }
void cluster(In first, In last, Out result, Pred *pred)
Definition: NNClusters.h:41
int showerAna::ShowerParticle::LargestShower ( ) const
inline

Definition at line 104 of file ShowerAnalysis_module.cc.

bool showerAna::ShowerParticle::LargestShower ( int  shower) const
inline
int showerAna::ShowerParticle::NumClusters ( ) const
inline

Definition at line 99 of file ShowerAnalysis_module.cc.

99 { return fClusters.size(); }
std::vector< art::Ptr< recob::Cluster > > fClusters
int showerAna::ShowerParticle::NumHits ( ) const
inline

Definition at line 98 of file ShowerAnalysis_module.cc.

98 { return fHits.size(); }
std::vector< art::Ptr< recob::Hit > > fHits
int showerAna::ShowerParticle::NumShowers ( ) const
inline

Definition at line 100 of file ShowerAnalysis_module.cc.

100 { return fShowers.size(); }
std::vector< art::Ptr< recob::Shower > > fShowers
int showerAna::ShowerParticle::PDG ( ) const
inline

Definition at line 80 of file ShowerAnalysis_module.cc.

void showerAna::ShowerParticle::SetDepositedEnergy ( std::map< int, double >  depositedEnergy)

Definition at line 150 of file ShowerAnalysis_module.cc.

150  {
151  fDepositedEnergy = depositedEnergy;
152 }
std::map< int, double > fDepositedEnergy
void showerAna::ShowerParticle::SetDirection ( TVector3  direction)

Definition at line 154 of file ShowerAnalysis_module.cc.

void showerAna::ShowerParticle::SetEnd ( TVector3  end)

Definition at line 162 of file ShowerAnalysis_module.cc.

162  {
163  fEnd = end;
164 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
void showerAna::ShowerParticle::SetEnergy ( double  energy)

Definition at line 146 of file ShowerAnalysis_module.cc.

void showerAna::ShowerParticle::SetPDG ( int  pdg)

Definition at line 166 of file ShowerAnalysis_module.cc.

void showerAna::ShowerParticle::SetStart ( TVector3  start)

Definition at line 158 of file ShowerAnalysis_module.cc.

158  {
159  fStart = start;
160 }
double showerAna::ShowerParticle::ShowerCompleteness ( int  shower) const
inline

Definition at line 109 of file ShowerAnalysis_module.cc.

109 { return fShowerTrueHits.at(shower).size() / (double)fHits.size(); }
std::vector< art::Ptr< recob::Hit > > fHits
std::vector< std::vector< art::Ptr< recob::Hit > > > fShowerTrueHits
double showerAna::ShowerParticle::ShowerdEdx ( ) const
inline
double showerAna::ShowerParticle::ShowerdEdx ( int  shower) const
inline

Definition at line 96 of file ShowerAnalysis_module.cc.

96 { art::Ptr<recob::Shower> s = fShowers.at(shower); return s->dEdx().at(s->best_plane()); }
int best_plane() const
Definition: Shower.h:200
const std::vector< double > & dEdx() const
Definition: Shower.h:203
std::vector< art::Ptr< recob::Shower > > fShowers
static QCString * s
Definition: config.cpp:1042
TVector3 showerAna::ShowerParticle::ShowerDirection ( ) const
inline
TVector3 showerAna::ShowerParticle::ShowerDirection ( int  shower) const
inline

Definition at line 92 of file ShowerAnalysis_module.cc.

92 { return fShowers.at(shower)->Direction(); }
std::vector< art::Ptr< recob::Shower > > fShowers
double showerAna::ShowerParticle::ShowerEnergy ( ) const
inline
double showerAna::ShowerParticle::ShowerEnergy ( int  shower) const
inline

Definition at line 94 of file ShowerAnalysis_module.cc.

94 { art::Ptr<recob::Shower> s = fShowers.at(shower); return s->Energy().at(s->best_plane()); }
int best_plane() const
Definition: Shower.h:200
const std::vector< double > & Energy() const
Definition: Shower.h:195
std::vector< art::Ptr< recob::Shower > > fShowers
static QCString * s
Definition: config.cpp:1042
double showerAna::ShowerParticle::ShowerPurity ( int  shower) const
inline

Definition at line 110 of file ShowerAnalysis_module.cc.

110 { return fShowerTrueHits.at(shower).size() / (double)fShowerHits.at(shower).size(); }
std::vector< std::vector< art::Ptr< recob::Hit > > > fShowerHits
std::vector< std::vector< art::Ptr< recob::Hit > > > fShowerTrueHits
TVector3 showerAna::ShowerParticle::ShowerStart ( ) const
inline
TVector3 showerAna::ShowerParticle::ShowerStart ( int  shower) const
inline

Definition at line 90 of file ShowerAnalysis_module.cc.

90 { return fShowers.at(shower)->ShowerStart(); }
std::vector< art::Ptr< recob::Shower > > fShowers
TVector3 showerAna::ShowerParticle::Start ( ) const
inline

Definition at line 82 of file ShowerAnalysis_module.cc.

82 { return fStart; }

Member Data Documentation

std::vector<std::vector<art::Ptr<recob::Hit> > > showerAna::ShowerParticle::fClusterHits
private

Definition at line 123 of file ShowerAnalysis_module.cc.

std::vector<art::Ptr<recob::Cluster> > showerAna::ShowerParticle::fClusters
private

Definition at line 122 of file ShowerAnalysis_module.cc.

std::vector<std::vector<art::Ptr<recob::Hit> > > showerAna::ShowerParticle::fClusterTrueHits
private

Definition at line 123 of file ShowerAnalysis_module.cc.

std::map<int,double> showerAna::ShowerParticle::fDepositedEnergy
private

Definition at line 119 of file ShowerAnalysis_module.cc.

TVector3 showerAna::ShowerParticle::fDirection
private

Definition at line 117 of file ShowerAnalysis_module.cc.

TVector3 showerAna::ShowerParticle::fEnd
private

Definition at line 117 of file ShowerAnalysis_module.cc.

double showerAna::ShowerParticle::fEnergy
private

Definition at line 118 of file ShowerAnalysis_module.cc.

std::vector<art::Ptr<recob::Hit> > showerAna::ShowerParticle::fHits
private

Definition at line 121 of file ShowerAnalysis_module.cc.

int showerAna::ShowerParticle::fID
private

Definition at line 114 of file ShowerAnalysis_module.cc.

int showerAna::ShowerParticle::fLargestCluster
private

Definition at line 127 of file ShowerAnalysis_module.cc.

int showerAna::ShowerParticle::fLargestShower
private

Definition at line 127 of file ShowerAnalysis_module.cc.

int showerAna::ShowerParticle::fPDG
private

Definition at line 115 of file ShowerAnalysis_module.cc.

std::vector<std::vector<art::Ptr<recob::Hit> > > showerAna::ShowerParticle::fShowerHits
private

Definition at line 125 of file ShowerAnalysis_module.cc.

std::vector<art::Ptr<recob::Shower> > showerAna::ShowerParticle::fShowers
private

Definition at line 124 of file ShowerAnalysis_module.cc.

std::vector<std::vector<art::Ptr<recob::Hit> > > showerAna::ShowerParticle::fShowerTrueHits
private

Definition at line 125 of file ShowerAnalysis_module.cc.

TVector3 showerAna::ShowerParticle::fStart
private

Definition at line 117 of file ShowerAnalysis_module.cc.


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