LArSoft  v08_16_00
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 40 of file CosmicTag.h.

Constructor & Destructor Documentation

anab::CosmicTag::CosmicTag ( )

Definition at line 13 of file CosmicTag.cxx.

14  : endPt1(0)
15  , endPt2(0)
16  , fCosmicScore(0)
18  {
19  }
Unknown view.
Definition: geo_types.h:83
std::vector< float > endPt1
Definition: CosmicTag.h:47
std::vector< float > endPt2
Definition: CosmicTag.h:48
float fCosmicScore
Definition: CosmicTag.h:49
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:52
anab::CosmicTag::CosmicTag ( std::vector< float >  ePt1,
std::vector< float >  ePt2,
float  cScore,
CosmicTagID_t  cTypes 
)

Definition at line 32 of file CosmicTag.cxx.

36  :
37  endPt1(ePt1),
38  endPt2(ePt2),
39  fCosmicScore(cScore),
40  fCosmicType(cType)
41  {
42  }
std::vector< float > endPt1
Definition: CosmicTag.h:47
std::vector< float > endPt2
Definition: CosmicTag.h:48
float fCosmicScore
Definition: CosmicTag.h:49
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:52
anab::CosmicTag::CosmicTag ( float  cScore)

Definition at line 22 of file CosmicTag.cxx.

22  :
23  endPt1(0),
24  endPt2(0),
25  fCosmicScore(f),
27  {
28 
29  }
Unknown view.
Definition: geo_types.h:83
TFile f
Definition: plotHisto.C:6
std::vector< float > endPt1
Definition: CosmicTag.h:47
std::vector< float > endPt2
Definition: CosmicTag.h:48
float fCosmicScore
Definition: CosmicTag.h:49
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:52

Member Function Documentation

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

Definition at line 84 of file CosmicTag.h.

References fCosmicScore.

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

Definition at line 85 of file CosmicTag.h.

References fCosmicType.

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

Definition at line 82 of file CosmicTag.h.

References endPt1.

Referenced by CosmicType().

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

Definition at line 83 of file CosmicTag.h.

References endPt2.

Referenced by CosmicType().

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

Definition at line 67 of file CosmicTag.cxx.

Referenced by CosmicType().

68  {
69  // fix this
70  int t =3*tSample;
71  if( (tick > 0*tSample) && (tick < 1*tSample) ) t = 0*tSample;
72  if( (tick > 1*tSample) && (tick < 2*tSample) ) t = 1*tSample;
73  if( (tick > 2*tSample) && (tick < 3*tSample) ) t = 2*tSample;
74 
75  float newX = oldX + (xDrift/tSample)*(t - realTime);
76  return newX;
77  }
tick_as<> tick
Tick number, represented by std::size_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 49 of file CosmicTag.cxx.

Referenced by CosmicType().

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

Member Data Documentation

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

Definition at line 47 of file CosmicTag.h.

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

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

Definition at line 48 of file CosmicTag.h.

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

float anab::CosmicTag::fCosmicScore
private

Definition at line 49 of file CosmicTag.h.

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

CosmicTagID_t anab::CosmicTag::fCosmicType
private

Definition at line 52 of file CosmicTag.h.

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


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