LArSoft  v08_32_01
Liquid Argon Software toolkit - http://larsoft.org/
anab::CosmicTag Class Reference

#include "CosmicTag.h"

Public Member Functions

 CosmicTag ()
 
 CosmicTag (std::vector< float > ePt1, std::vector< float > ePt2, float cScore, CosmicTagID_t cTypes)
 
 CosmicTag (float cScore)
 
float & CosmicScore ()
 
CosmicTagID_tCosmicType ()
 
float getXInteraction (float oldX, float xDrift, int tSample, float realTime, int tick) const
 
const std::vector< float > & EndPoint1 () const
 
const std::vector< float > & EndPoint2 () const
 
const float & CosmicScore () const
 
const CosmicTagID_tCosmicType () const
 

Private Attributes

std::vector< float > endPt1
 
std::vector< float > endPt2
 
float fCosmicScore
 
CosmicTagID_t fCosmicType
 

Friends

std::ostream & operator<< (std::ostream &o, CosmicTag const &a)
 

Detailed Description

Definition at line 36 of file CosmicTag.h.

Constructor & Destructor Documentation

anab::CosmicTag::CosmicTag ( )

Definition at line 16 of file CosmicTag.cxx.

17  : endPt1(0)
18  , endPt2(0)
19  , fCosmicScore(0)
21  {
22  }
Unknown view.
Definition: geo_types.h:84
std::vector< float > endPt1
Definition: CosmicTag.h:43
std::vector< float > endPt2
Definition: CosmicTag.h:44
float fCosmicScore
Definition: CosmicTag.h:45
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:48
anab::CosmicTag::CosmicTag ( std::vector< float >  ePt1,
std::vector< float >  ePt2,
float  cScore,
CosmicTagID_t  cTypes 
)

Definition at line 35 of file CosmicTag.cxx.

39  :
40  endPt1(ePt1),
41  endPt2(ePt2),
42  fCosmicScore(cScore),
43  fCosmicType(cType)
44  {
45  }
std::vector< float > endPt1
Definition: CosmicTag.h:43
std::vector< float > endPt2
Definition: CosmicTag.h:44
float fCosmicScore
Definition: CosmicTag.h:45
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:48
anab::CosmicTag::CosmicTag ( float  cScore)

Definition at line 25 of file CosmicTag.cxx.

25  :
26  endPt1(0),
27  endPt2(0),
28  fCosmicScore(f),
30  {
31 
32  }
Unknown view.
Definition: geo_types.h:84
TFile f
Definition: plotHisto.C:6
std::vector< float > endPt1
Definition: CosmicTag.h:43
std::vector< float > endPt2
Definition: CosmicTag.h:44
float fCosmicScore
Definition: CosmicTag.h:45
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:48

Member Function Documentation

const float & anab::CosmicTag::CosmicScore ( ) const
inline

Definition at line 80 of file CosmicTag.h.

References fCosmicScore.

80 {return fCosmicScore; }
float fCosmicScore
Definition: CosmicTag.h:45
CosmicTagID_t& anab::CosmicTag::CosmicType ( )
inline
const anab::CosmicTagID_t & anab::CosmicTag::CosmicType ( ) const
inline

Definition at line 81 of file CosmicTag.h.

References fCosmicType.

81 {return fCosmicType; }
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:48
const std::vector< float > & anab::CosmicTag::EndPoint1 ( ) const
inline

Definition at line 78 of file CosmicTag.h.

References endPt1.

Referenced by CosmicType().

78 {return endPt1;}
std::vector< float > endPt1
Definition: CosmicTag.h:43
const std::vector< float > & anab::CosmicTag::EndPoint2 ( ) const
inline

Definition at line 79 of file CosmicTag.h.

References endPt2.

Referenced by CosmicType().

79 {return endPt2;}
std::vector< float > endPt2
Definition: CosmicTag.h:44
float anab::CosmicTag::getXInteraction ( float  oldX,
float  xDrift,
int  tSample,
float  realTime,
int  tick 
) const

Definition at line 70 of file CosmicTag.cxx.

Referenced by CosmicType().

71  {
72  // fix this
73  int t =3*tSample;
74  if( (tick > 0*tSample) && (tick < 1*tSample) ) t = 0*tSample;
75  if( (tick > 1*tSample) && (tick < 2*tSample) ) t = 1*tSample;
76  if( (tick > 2*tSample) && (tick < 3*tSample) ) t = 2*tSample;
77 
78  float newX = oldX + (xDrift/tSample)*(t - realTime);
79  return newX;
80  }
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:74
Int_t oldX

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
CosmicTag const &  a 
)
friend

Definition at line 52 of file CosmicTag.cxx.

Referenced by CosmicType().

53  {
54  o //<< "Flash Time : " << a.flashTime // should go
55  << "\n Cosmic Score : " << a.fCosmicScore
56  << "\n Cosmic Type : " << a.fCosmicType
57  << "\n End Point 1: " <<std::endl;
58  for(size_t i=0;i<a.endPt1.size(); i++)
59  o << a.endPt1[i] << ", ";
60  o << std::endl;
61  o << "\n End Point 2: " <<std::endl;
62  for(size_t i=0;i<a.endPt2.size(); i++)
63  o << a.endPt2[i] << ", ";
64  o << std::endl;
65 
66 
67  return o;
68  }

Member Data Documentation

std::vector<float> anab::CosmicTag::endPt1
private

Definition at line 43 of file CosmicTag.h.

Referenced by EndPoint1(), and anab::operator<<().

std::vector<float> anab::CosmicTag::endPt2
private

Definition at line 44 of file CosmicTag.h.

Referenced by EndPoint2(), and anab::operator<<().

float anab::CosmicTag::fCosmicScore
private

Definition at line 45 of file CosmicTag.h.

Referenced by CosmicScore(), and anab::operator<<().

CosmicTagID_t anab::CosmicTag::fCosmicType
private

Definition at line 48 of file CosmicTag.h.

Referenced by CosmicType(), and anab::operator<<().


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