FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
PndGemCluster Class Reference

#include <PndGemCluster.h>

Inheritance diagram for PndGemCluster:

Public Member Functions

 PndGemCluster ()
 
 PndGemCluster (Int_t iDetectorId, Double_t iChannel, Int_t bChannel, Int_t eChannel, std::vector< Int_t > index)
 
 PndGemCluster (Int_t iDetectorId, Double_t iChannel, Int_t bChannel, Int_t eChannel, Double_t signal, Double_t time, std::vector< Int_t > index)
 
virtual ~PndGemCluster ()
 
void SetCharge (Double_t iCharge)
 
void SetCor (Double_t iCor)
 
void SetClusterBeg (Int_t bChan)
 
void SetClusterEnd (Int_t eChan)
 
void AddCharge (Double_t iCharge)
 
Int_t GetDetectorId () const
 
Double_t GetChannelNr () const
 
Int_t GetSystemId () const
 
Int_t GetStationNr () const
 
Int_t GetSensorNr () const
 
Int_t GetSide () const
 
Int_t GetClusterBeg () const
 
Int_t GetClusterEnd () const
 
Double_t GetCharge () const
 
Double_t GetCor () const
 
std::vector< Int_t > GetIndices () const
 
Int_t GetNIndices ()
 
Int_t GetIndex (int i=0) const
 
void AddIndex (int index)
 
void AddIndex (std::vector< Int_t > index)
 
virtual bool equal (FairTimeStamp *data)
 
virtual bool operator< (const PndGemCluster &myCluster) const
 
virtual bool operator> (const PndGemCluster &myCluster) const
 
virtual bool operator== (const PndGemCluster &myCluster) const
 

Private Member Functions

 ClassDef (PndGemCluster, 1)
 

Private Attributes

Int_t fDetectorId
 
Double_t fChannelNr
 
Int_t fClusterBeg
 
Int_t fClusterEnd
 
Double_t fClusterCharge
 
Double_t fClusterCor
 

Friends

std::ostreamoperator<< (std::ostream &out, PndGemCluster &cluster)
 

Detailed Description

PndGemCluster.h

Author
R.Karabowicz r.kar.nosp@m.abow.nosp@m.icz@g.nosp@m.si.d.nosp@m.e
Since
03.06.2013
Version
1.0

Data class for first reconstruction stage of the GEM Tracker Data level: cluster

Definition at line 31 of file PndGemCluster.h.

Constructor & Destructor Documentation

PndGemCluster::PndGemCluster ( )

Default constructor

Definition at line 15 of file PndGemCluster.cxx.

15  :
16  FairTimeStamp(),
17  fDetectorId (0),
18  fChannelNr (0),
19  fClusterBeg (0),
20  fClusterEnd (0),
21  fClusterCharge (0.),
22  fClusterCor (0.0)
23 {
24 }
Double_t fClusterCharge
Double_t fChannelNr
Double_t fClusterCor
PndGemCluster::PndGemCluster ( Int_t  iDetectorId,
Double_t  iChannel,
Int_t  bChannel,
Int_t  eChannel,
std::vector< Int_t >  index 
)

Constructor from station number, sector number, front/back side and channel number

Parameters
iStationstation number (0-255)
iSectorsector number (0-32767)
iSide0=front side; 1=back side
iChannelchannel number

Definition at line 28 of file PndGemCluster.cxx.

References AddIndex().

28  :
29  FairTimeStamp(),
30  fDetectorId (iDetectorId),
31  fChannelNr (iChannel),
32  fClusterBeg (bChannel),
33  fClusterEnd (eChannel),
34  fClusterCharge (0.),
35  fClusterCor (0.0)
36 {
37  AddIndex(index);
38 }
Double_t fClusterCharge
Double_t fChannelNr
Double_t fClusterCor
void AddIndex(int index)
PndGemCluster::PndGemCluster ( Int_t  iDetectorId,
Double_t  iChannel,
Int_t  bChannel,
Int_t  eChannel,
Double_t  signal,
Double_t  time,
std::vector< Int_t >  index 
)

Definition at line 42 of file PndGemCluster.cxx.

References AddIndex().

42  :
43  FairTimeStamp(time),
44  fDetectorId (iDetectorId),
45  fChannelNr (iChannel),
46  fClusterBeg (bChannel),
47  fClusterEnd (eChannel),
48  fClusterCharge (signal),
49  fClusterCor (0.0)
50 {
51  AddIndex(index);
52 }
Double_t fClusterCharge
Double_t fChannelNr
Double_t fClusterCor
void AddIndex(int index)
PndGemCluster::~PndGemCluster ( )
virtual

Destructor

Definition at line 56 of file PndGemCluster.cxx.

56 { }

Member Function Documentation

void PndGemCluster::AddCharge ( Double_t  iCharge)
inline

Definition at line 80 of file PndGemCluster.h.

References fClusterCharge.

80 { fClusterCharge+= iCharge; }
Double_t fClusterCharge
void PndGemCluster::AddIndex ( int  index)
inline

Definition at line 111 of file PndGemCluster.h.

Referenced by PndGemCluster().

111  {
112  AddLink(FairLink("GEMDigi", index));
113  }
void PndGemCluster::AddIndex ( std::vector< Int_t >  index)
inline

Definition at line 114 of file PndGemCluster.h.

114  {
115  SetLinks(FairMultiLinkedData("GEMDigi", index));
116  }
PndGemCluster::ClassDef ( PndGemCluster  ,
 
)
private
virtual bool PndGemCluster::equal ( FairTimeStamp *  data)
inlinevirtual

Definition at line 118 of file PndGemCluster.h.

References fDetectorId, and GetDetectorId().

118  {
119  PndGemCluster* myCluster = dynamic_cast <PndGemCluster*> (data);
120  if (myCluster != 0){
121  if (fDetectorId == myCluster->GetDetectorId() )
122  return kTRUE;
123  }
124  return false;
125  }
Int_t GetDetectorId() const
Definition: PndGemCluster.h:83
Double_t PndGemCluster::GetChannelNr ( ) const
inline

Definition at line 84 of file PndGemCluster.h.

References fChannelNr.

Referenced by operator<(), operator==(), and operator>().

84 { return fChannelNr; }
Double_t fChannelNr
Double_t PndGemCluster::GetCharge ( ) const
inline

Definition at line 97 of file PndGemCluster.h.

References fClusterCharge.

Referenced by PndGemMonitor::EnableCluster(), and PndGemFindHits::FindHits2().

97 { return fClusterCharge; }
Double_t fClusterCharge
Int_t PndGemCluster::GetClusterBeg ( ) const
inline

Definition at line 95 of file PndGemCluster.h.

References fClusterBeg.

Referenced by PndGemFindHits::ConfirmHits(), PndGemMonitor::EnableCluster(), and PndGemFindHits::FindHits2().

95 { return fClusterBeg; }
Int_t PndGemCluster::GetClusterEnd ( ) const
inline

Definition at line 96 of file PndGemCluster.h.

References fClusterEnd.

Referenced by PndGemFindHits::ConfirmHits(), PndGemMonitor::EnableCluster(), and PndGemFindHits::FindHits2().

96 { return fClusterEnd; }
Double_t PndGemCluster::GetCor ( ) const
inline

Definition at line 98 of file PndGemCluster.h.

References fClusterCor.

98 { return fClusterCor; }
Double_t fClusterCor
Int_t PndGemCluster::GetDetectorId ( ) const
inline

Accessors

Definition at line 83 of file PndGemCluster.h.

References fDetectorId.

Referenced by equal(), operator<(), operator==(), and operator>().

83 { return fDetectorId; }
Int_t PndGemCluster::GetIndex ( int  i = 0) const
inline

Definition at line 109 of file PndGemCluster.h.

References i.

109 { return GetLink(i).GetIndex();}
Int_t i
Definition: run_full.C:25
std::vector<Int_t> PndGemCluster::GetIndices ( ) const
inline

Definition at line 100 of file PndGemCluster.h.

100  {
101  std::vector<Int_t> result;
102  std::set<FairLink> myLinks = GetLinks();
103  for (std::set<FairLink>::iterator it = myLinks.begin(); it != myLinks.end(); it++){
104  result.push_back(it->GetIndex());
105  }
106  return result;
107  }
Int_t PndGemCluster::GetNIndices ( )
inline

Definition at line 108 of file PndGemCluster.h.

108 {return GetNLinks();}
Int_t PndGemCluster::GetSensorNr ( ) const
inline

Definition at line 90 of file PndGemCluster.h.

References fDetectorId.

Referenced by PndGemFindHits::ConfirmHits(), and PndGemMonitor::EnableCluster().

90  { // sensor number within station
91  return ( ( fDetectorId & ( 3<< 6) ) >> 6 ); }
Int_t PndGemCluster::GetSide ( ) const
inline

Definition at line 92 of file PndGemCluster.h.

References fDetectorId.

Referenced by PndGemFindHits::ConfirmHits(), and PndGemMonitor::EnableCluster().

92  {
93  return ( ( fDetectorId & ( 1<< 5) ) >> 5 ); } // 0=front, 1=back
Int_t PndGemCluster::GetStationNr ( ) const
inline

Definition at line 88 of file PndGemCluster.h.

References fDetectorId.

Referenced by PndGemFindHits::ConfirmHits(), and PndGemMonitor::EnableCluster().

88  {
89  return ( ( fDetectorId & (8191<< 8) ) >> 8 ); }
Int_t PndGemCluster::GetSystemId ( ) const
inline

Definition at line 86 of file PndGemCluster.h.

References fDetectorId.

86  {
87  return ( ( fDetectorId & ( 31<<27) ) >> 27); }
virtual bool PndGemCluster::operator< ( const PndGemCluster myCluster) const
inlinevirtual

Definition at line 127 of file PndGemCluster.h.

References fChannelNr, fDetectorId, GetChannelNr(), and GetDetectorId().

127  {
128  if (fDetectorId < myCluster.GetDetectorId()) return true; else if (fDetectorId > myCluster.GetDetectorId()) return false;
129  if (fChannelNr < myCluster.GetChannelNr ()) return true; else if (fChannelNr > myCluster.GetChannelNr ()) return false;
130  return false;
131  }
Double_t GetChannelNr() const
Definition: PndGemCluster.h:84
Double_t fChannelNr
Int_t GetDetectorId() const
Definition: PndGemCluster.h:83
virtual bool PndGemCluster::operator== ( const PndGemCluster myCluster) const
inlinevirtual

Definition at line 139 of file PndGemCluster.h.

References fChannelNr, fDetectorId, GetChannelNr(), and GetDetectorId().

139  {
140  if (fDetectorId == myCluster.GetDetectorId())
141  if (fChannelNr == myCluster.GetChannelNr ())
142  return true;
143  return false;
144  }
Double_t GetChannelNr() const
Definition: PndGemCluster.h:84
Double_t fChannelNr
Int_t GetDetectorId() const
Definition: PndGemCluster.h:83
virtual bool PndGemCluster::operator> ( const PndGemCluster myCluster) const
inlinevirtual

Definition at line 133 of file PndGemCluster.h.

References fChannelNr, fDetectorId, GetChannelNr(), and GetDetectorId().

133  {
134  if (fDetectorId > myCluster.GetDetectorId()) return true; else if (fDetectorId < myCluster.GetDetectorId()) return false;
135  if (fChannelNr > myCluster.GetChannelNr ()) return true; else if (fChannelNr < myCluster.GetChannelNr ()) return false;
136  return false;
137  }
Double_t GetChannelNr() const
Definition: PndGemCluster.h:84
Double_t fChannelNr
Int_t GetDetectorId() const
Definition: PndGemCluster.h:83
void PndGemCluster::SetCharge ( Double_t  iCharge)
inline

Definition at line 74 of file PndGemCluster.h.

References fClusterCharge.

74 { fClusterCharge = iCharge; }
Double_t fClusterCharge
void PndGemCluster::SetClusterBeg ( Int_t  bChan)
inline

Definition at line 77 of file PndGemCluster.h.

References fClusterBeg.

77 { fClusterBeg = bChan; }
void PndGemCluster::SetClusterEnd ( Int_t  eChan)
inline

Definition at line 78 of file PndGemCluster.h.

References fClusterEnd.

78 { fClusterEnd = eChan; }
void PndGemCluster::SetCor ( Double_t  iCor)
inline

Definition at line 75 of file PndGemCluster.h.

References fClusterCor.

75 { fClusterCor = iCor; }
Double_t fClusterCor

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream out,
PndGemCluster cluster 
)
friend

Definition at line 33 of file PndGemCluster.h.

33  {
34  out << "PndGemCluster in: " << cluster.GetDetectorId()
35  << "( system = " << cluster.GetSystemId()
36  << ", station = " << cluster.GetStationNr()
37  << ", sensor = " << cluster.GetSensorNr()
38  << ", side = " << cluster.GetSide()
39  << "), channelNr = " << cluster.GetChannelNr()
40  << " < from " << cluster.GetClusterBeg()
41  << " to " << cluster.GetClusterEnd()
42  << " > charge = " << cluster.GetCharge()
43  << ", cor = " << cluster.GetCor()
44  << ", timestamp "<< cluster.GetTimeStamp()
45  << ", from Point(s) ";
46  std::vector<Int_t>indices = cluster.GetIndices();
47  for (unsigned int i = 0; i < indices.size(); i++){
48  out << indices[i] << " ";
49  }
50  out << std::endl;
51 
52  return out;
53  }
Double_t GetCor() const
Definition: PndGemCluster.h:98
Double_t GetChannelNr() const
Definition: PndGemCluster.h:84
Int_t GetSensorNr() const
Definition: PndGemCluster.h:90
Int_t GetClusterBeg() const
Definition: PndGemCluster.h:95
Int_t i
Definition: run_full.C:25
Int_t GetSide() const
Definition: PndGemCluster.h:92
TFile * out
Definition: reco_muo.C:20
Int_t GetClusterEnd() const
Definition: PndGemCluster.h:96
Int_t GetDetectorId() const
Definition: PndGemCluster.h:83
std::vector< Int_t > GetIndices() const
Double_t GetCharge() const
Definition: PndGemCluster.h:97
Int_t GetStationNr() const
Definition: PndGemCluster.h:88
Int_t GetSystemId() const
Definition: PndGemCluster.h:86

Member Data Documentation

Double_t PndGemCluster::fChannelNr
private

Definition at line 149 of file PndGemCluster.h.

Referenced by GetChannelNr(), operator<(), operator==(), and operator>().

Int_t PndGemCluster::fClusterBeg
private

Definition at line 151 of file PndGemCluster.h.

Referenced by GetClusterBeg(), and SetClusterBeg().

Double_t PndGemCluster::fClusterCharge
private

Definition at line 154 of file PndGemCluster.h.

Referenced by AddCharge(), GetCharge(), and SetCharge().

Double_t PndGemCluster::fClusterCor
private

Definition at line 155 of file PndGemCluster.h.

Referenced by GetCor(), and SetCor().

Int_t PndGemCluster::fClusterEnd
private

Definition at line 152 of file PndGemCluster.h.

Referenced by GetClusterEnd(), and SetClusterEnd().

Int_t PndGemCluster::fDetectorId
private

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