LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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.

18  {}
Unknown view.
Definition: geo_types.h:142
std::vector< float > endPt1
Definition: CosmicTag.h:41
std::vector< float > endPt2
Definition: CosmicTag.h:42
float fCosmicScore
Definition: CosmicTag.h:43
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:46
anab::CosmicTag::CosmicTag ( std::vector< float >  ePt1,
std::vector< float >  ePt2,
float  cScore,
CosmicTagID_t  cTypes 
)

Definition at line 26 of file CosmicTag.cxx.

31  : endPt1(ePt1), endPt2(ePt2), fCosmicScore(cScore), fCosmicType(cType)
32  {}
std::vector< float > endPt1
Definition: CosmicTag.h:41
std::vector< float > endPt2
Definition: CosmicTag.h:42
float fCosmicScore
Definition: CosmicTag.h:43
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:46
anab::CosmicTag::CosmicTag ( float  cScore)

Definition at line 21 of file CosmicTag.cxx.

23  {}
Unknown view.
Definition: geo_types.h:142
TFile f
Definition: plotHisto.C:6
std::vector< float > endPt1
Definition: CosmicTag.h:41
std::vector< float > endPt2
Definition: CosmicTag.h:42
float fCosmicScore
Definition: CosmicTag.h:43
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:46

Member Function Documentation

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

Definition at line 77 of file CosmicTag.h.

References fCosmicScore.

78 {
79  return fCosmicScore;
80 }
float fCosmicScore
Definition: CosmicTag.h:43
CosmicTagID_t& anab::CosmicTag::CosmicType ( )
inline

Definition at line 55 of file CosmicTag.h.

References CosmicScore(), EndPoint1(), EndPoint2(), fCosmicType, getXInteraction(), oldX, and operator<<.

55 { return fCosmicType; }
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:46
const anab::CosmicTagID_t & anab::CosmicTag::CosmicType ( ) const
inline

Definition at line 81 of file CosmicTag.h.

References fCosmicType.

82 {
83  return fCosmicType;
84 }
CosmicTagID_t fCosmicType
Definition: CosmicTag.h:46
const std::vector< float > & anab::CosmicTag::EndPoint1 ( ) const
inline

Definition at line 69 of file CosmicTag.h.

References endPt1.

Referenced by CosmicType().

70 {
71  return endPt1;
72 }
std::vector< float > endPt1
Definition: CosmicTag.h:41
const std::vector< float > & anab::CosmicTag::EndPoint2 ( ) const
inline

Definition at line 73 of file CosmicTag.h.

References endPt2.

Referenced by CosmicType().

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

Definition at line 53 of file CosmicTag.cxx.

Referenced by CosmicType().

58  {
59  // fix this
60  int t = 3 * tSample;
61  if ((tick > 0 * tSample) && (tick < 1 * tSample)) t = 0 * tSample;
62  if ((tick > 1 * tSample) && (tick < 2 * tSample)) t = 1 * tSample;
63  if ((tick > 2 * tSample) && (tick < 3 * tSample)) t = 2 * tSample;
64 
65  float newX = oldX + (xDrift / tSample) * (t - realTime);
66  return newX;
67  }
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:73
Int_t oldX

Friends And Related Function Documentation

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

Definition at line 37 of file CosmicTag.cxx.

Referenced by CosmicType().

38  {
39  o //<< "Flash Time : " << a.flashTime // should go
40  << "\n Cosmic Score : " << a.fCosmicScore << "\n Cosmic Type : " << a.fCosmicType
41  << "\n End Point 1: " << std::endl;
42  for (size_t i = 0; i < a.endPt1.size(); i++)
43  o << a.endPt1[i] << ", ";
44  o << std::endl;
45  o << "\n End Point 2: " << std::endl;
46  for (size_t i = 0; i < a.endPt2.size(); i++)
47  o << a.endPt2[i] << ", ";
48  o << std::endl;
49 
50  return o;
51  }
for(Int_t i=0;i< nentries;i++)
Definition: comparison.C:30

Member Data Documentation

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

Definition at line 41 of file CosmicTag.h.

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

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

Definition at line 42 of file CosmicTag.h.

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

float anab::CosmicTag::fCosmicScore
private

Definition at line 43 of file CosmicTag.h.

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

CosmicTagID_t anab::CosmicTag::fCosmicType
private

Definition at line 46 of file CosmicTag.h.

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


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