FairRoot/PandaRoot
Public Member Functions | Protected Attributes | List of all members
PndEmcHit Class Reference

represents the deposited energy of one emc crystal from simulation More...

#include <PndEmcHit.h>

Inheritance diagram for PndEmcHit:

Public Member Functions

 PndEmcHit ()
 
 PndEmcHit (Int_t trackid, Int_t id, Float_t energy, Float_t time, Float_t X, Float_t Y, Float_t Z)
 
 PndEmcHit (Int_t trackid, Int_t id, Float_t energy, Float_t time, Float_t X, Float_t Y, Float_t Z, std::vector< PndEmcPoint * > PointList)
 
 PndEmcHit (Int_t trackid, Int_t id, Float_t energy, Float_t time, Float_t X, Float_t Y, Float_t Z, std::vector< Int_t > McTruth, FairMultiLinkedData enteringTrack, FairMultiLinkedData exitingTrack)
 
 PndEmcHit (const PndEmcHit &)
 
virtual ~PndEmcHit ()
 
virtual void Print (const Option_t *opt="") const
 
virtual void SetEnergy (Double32_t energy)
 
virtual void SetTime (Double32_t time)
 
virtual Double_t GetEnergy () const
 
virtual Double_t GetTime () const
 
Float_t GetTheta () const
 
Float_t GetPhi () const
 
Short_t GetModule () const
 
Short_t GetRow () const
 
Short_t GetCrystal () const
 
Short_t GetCopy () const
 
Short_t GetXPad () const
 
Short_t GetYPad () const
 
FairMultiLinkedData GetTrackEntering () const
 
FairMultiLinkedData GetTrackExiting () const
 
std::vector< PndEmcPoint * > & GetPointList ()
 
const std::vector< Int_t > & GetMcList ()
 

Protected Attributes

Double32_t fEnergy
 
std::vector< Int_t > fMcList
 
std::vector< PndEmcPoint * > fPointList
 
FairMultiLinkedData fTrackEntering
 
FairMultiLinkedData fTrackExiting
 

Detailed Description

represents the deposited energy of one emc crystal from simulation

Definition at line 26 of file PndEmcHit.h.

Constructor & Destructor Documentation

PndEmcHit::PndEmcHit ( )

Default constructor

Definition at line 18 of file PndEmcHit.cxx.

References fMcList, and fPointList.

19  :FairHit(), fEnergy(0), fMcList(0), fPointList(0), fTrackEntering(), fTrackExiting()
20 {
21  fMcList.clear();
22  fPointList.clear();
23 }
FairMultiLinkedData fTrackExiting
Definition: PndEmcHit.h:78
std::vector< PndEmcPoint * > fPointList
Definition: PndEmcHit.h:76
std::vector< Int_t > fMcList
Definition: PndEmcHit.h:75
FairMultiLinkedData fTrackEntering
Definition: PndEmcHit.h:77
Double32_t fEnergy
Definition: PndEmcHit.h:72
PndEmcHit::PndEmcHit ( Int_t  trackid,
Int_t  id,
Float_t  energy,
Float_t  time,
Float_t  X,
Float_t  Y,
Float_t  Z 
)

Definition at line 27 of file PndEmcHit.cxx.

References fMcList, fPointList, fX, fY, fZ, SetTime(), X, Y, and Z.

28  :FairHit(), fEnergy(energy), fMcList(0), fPointList(0), fTrackEntering(), fTrackExiting()
29 {
30  SetTime(time);
31  fRefIndex = trackid;
32  fDetectorID = id;
33  fX = X; fY = Y; fZ = Z;
34  fDx = 0.; fDy = 0.; fDz = 0.;
35  fMcList.clear();
36  fPointList.clear();
37 }
Double_t fX
Definition: PndCaloDraw.cxx:34
FairMultiLinkedData fTrackExiting
Definition: PndEmcHit.h:78
double Y
Definition: anaLmdDigi.C:68
Double_t fZ
Definition: PndCaloDraw.cxx:34
std::vector< PndEmcPoint * > fPointList
Definition: PndEmcHit.h:76
std::vector< Int_t > fMcList
Definition: PndEmcHit.h:75
double X
Definition: anaLmdDigi.C:68
Double_t fY
Definition: PndCaloDraw.cxx:34
FairMultiLinkedData fTrackEntering
Definition: PndEmcHit.h:77
double Z
Definition: anaLmdDigi.C:68
virtual void SetTime(Double32_t time)
Definition: PndEmcHit.h:51
Double32_t fEnergy
Definition: PndEmcHit.h:72
Double_t energy
Definition: plot_dirc.C:15
PndEmcHit::PndEmcHit ( Int_t  trackid,
Int_t  id,
Float_t  energy,
Float_t  time,
Float_t  X,
Float_t  Y,
Float_t  Z,
std::vector< PndEmcPoint * >  PointList 
)

Definition at line 51 of file PndEmcHit.cxx.

References fX, fY, fZ, SetTime(), X, Y, and Z.

52  :FairHit(), fEnergy(energy), fMcList(0), fPointList(PointList), fTrackEntering(), fTrackExiting()
53 {
54  SetTime(time);
55  fRefIndex = trackid;
56  fDetectorID = id;
57  fX = X; fY = Y; fZ = Z;
58  fDx = 0.; fDy = 0.; fDz = 0.;
59 }
Double_t fX
Definition: PndCaloDraw.cxx:34
FairMultiLinkedData fTrackExiting
Definition: PndEmcHit.h:78
double Y
Definition: anaLmdDigi.C:68
Double_t fZ
Definition: PndCaloDraw.cxx:34
std::vector< PndEmcPoint * > fPointList
Definition: PndEmcHit.h:76
std::vector< Int_t > fMcList
Definition: PndEmcHit.h:75
double X
Definition: anaLmdDigi.C:68
Double_t fY
Definition: PndCaloDraw.cxx:34
FairMultiLinkedData fTrackEntering
Definition: PndEmcHit.h:77
double Z
Definition: anaLmdDigi.C:68
virtual void SetTime(Double32_t time)
Definition: PndEmcHit.h:51
Double32_t fEnergy
Definition: PndEmcHit.h:72
Double_t energy
Definition: plot_dirc.C:15
PndEmcHit::PndEmcHit ( Int_t  trackid,
Int_t  id,
Float_t  energy,
Float_t  time,
Float_t  X,
Float_t  Y,
Float_t  Z,
std::vector< Int_t >  McTruth,
FairMultiLinkedData  enteringTrack,
FairMultiLinkedData  exitingTrack 
)

Definition at line 39 of file PndEmcHit.cxx.

References fX, fY, fZ, SetTime(), X, Y, and Z.

40  :FairHit(), fEnergy(energy), fMcList(McList), fPointList(0), fTrackEntering(enteringTracks), fTrackExiting(exitingTracks)
41 {
42  SetTime(time);
43  fRefIndex = trackid;
44  fDetectorID = id;
45  fX = X; fY = Y; fZ = Z;
46  fDx = 0.; fDy = 0.; fDz = 0.;
47  //SetLinks(FairMultiLinkedData("MCTrack", McList));
48  //SetLinks(enteringTracks);
49 }
Double_t fX
Definition: PndCaloDraw.cxx:34
FairMultiLinkedData fTrackExiting
Definition: PndEmcHit.h:78
double Y
Definition: anaLmdDigi.C:68
Double_t fZ
Definition: PndCaloDraw.cxx:34
std::vector< PndEmcPoint * > fPointList
Definition: PndEmcHit.h:76
std::vector< Int_t > fMcList
Definition: PndEmcHit.h:75
double X
Definition: anaLmdDigi.C:68
Double_t fY
Definition: PndCaloDraw.cxx:34
FairMultiLinkedData fTrackEntering
Definition: PndEmcHit.h:77
double Z
Definition: anaLmdDigi.C:68
virtual void SetTime(Double32_t time)
Definition: PndEmcHit.h:51
Double32_t fEnergy
Definition: PndEmcHit.h:72
Double_t energy
Definition: plot_dirc.C:15
PndEmcHit::PndEmcHit ( const PndEmcHit copy)

Copy

Definition at line 62 of file PndEmcHit.cxx.

References fX, fY, and fZ.

62  :
64 {
65  fRefIndex=copy.fRefIndex;
66  fDetectorID=copy.fDetectorID;
67  fX=copy.fX;
68  fY=copy.fY;
69  fZ=copy.fZ;
70  // PointList and McList not copied...
71 }
Double_t fX
Definition: PndCaloDraw.cxx:34
FairMultiLinkedData fTrackExiting
Definition: PndEmcHit.h:78
Double_t fZ
Definition: PndCaloDraw.cxx:34
std::vector< PndEmcPoint * > fPointList
Definition: PndEmcHit.h:76
std::vector< Int_t > fMcList
Definition: PndEmcHit.h:75
Double_t fY
Definition: PndCaloDraw.cxx:34
FairMultiLinkedData fTrackEntering
Definition: PndEmcHit.h:77
Double32_t fEnergy
Definition: PndEmcHit.h:72
PndEmcHit::~PndEmcHit ( )
virtual

Destructor

Definition at line 73 of file PndEmcHit.cxx.

73 {}

Member Function Documentation

Short_t PndEmcHit::GetCopy ( ) const
inline

Definition at line 61 of file PndEmcHit.h.

Referenced by for(), GetXPad(), and GetYPad().

61 { return ((fDetectorID/10000)%100) ;};
Short_t PndEmcHit::GetCrystal ( ) const
inline

Definition at line 60 of file PndEmcHit.h.

Referenced by PndEmcMakeDigi::Exec(), for(), GetXPad(), and GetYPad().

60 { return (fDetectorID%10000) ;};
virtual Double_t PndEmcHit::GetEnergy ( ) const
inlinevirtual
const std::vector<Int_t>& PndEmcHit::GetMcList ( )
inline

Definition at line 69 of file PndEmcHit.h.

References fMcList.

Referenced by PndEmcHitsToWaveform::Exec(), and vis_mc_ids().

69 {return fMcList;}
std::vector< Int_t > fMcList
Definition: PndEmcHit.h:75
Short_t PndEmcHit::GetModule ( ) const
inline
Float_t PndEmcHit::GetPhi ( ) const
inline

Definition at line 57 of file PndEmcHit.h.

References CAMath::ATan2(), fX, and fY.

Referenced by PndEmcAnalysis::Exec().

57 { return fX == 0.0 && fY == 0.0 ? 0.0 : TMath::ATan2(fY,fX)*TMath::RadToDeg() ;};
Double_t fX
Definition: PndCaloDraw.cxx:34
static T ATan2(const T &y, const T &x)
Double_t fY
Definition: PndCaloDraw.cxx:34
std::vector<PndEmcPoint*>& PndEmcHit::GetPointList ( )
inline

Definition at line 68 of file PndEmcHit.h.

References fPointList.

Referenced by PndEmcAnalysis::Exec(), and for().

68 {return fPointList;}
std::vector< PndEmcPoint * > fPointList
Definition: PndEmcHit.h:76
Short_t PndEmcHit::GetRow ( ) const
inline

Definition at line 59 of file PndEmcHit.h.

Referenced by PndEmcMakeDigi::Exec(), for(), GetXPad(), and GetYPad().

59 { return ((fDetectorID/1000000)%100);};
Float_t PndEmcHit::GetTheta ( ) const
inline

Definition at line 56 of file PndEmcHit.h.

References CAMath::ATan2(), fX, fY, fZ, and sqrt().

Referenced by PndEmcAnalysis::Exec().

56 { return fX == 0.0 && fY == 0.0 && fZ == 0.0 ? 0.0 : TMath::ATan2(sqrt(fX*fX+fY*fY),fZ)*TMath::RadToDeg() ;};
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t fX
Definition: PndCaloDraw.cxx:34
Double_t fZ
Definition: PndCaloDraw.cxx:34
static T ATan2(const T &y, const T &x)
Double_t fY
Definition: PndCaloDraw.cxx:34
virtual Double_t PndEmcHit::GetTime ( ) const
inlinevirtual

Definition at line 55 of file PndEmcHit.h.

Referenced by PndEmcFWEndcapTimebasedWaveforms::Exec(), PndEmcMakeDigi::Exec(), PndEmcHitsToWaveform::Exec(), and PndEmcAnalysis::Exec().

55 { return fTimeStamp / 1E9;};
FairMultiLinkedData PndEmcHit::GetTrackEntering ( ) const
inline

Definition at line 65 of file PndEmcHit.h.

References fTrackEntering.

Referenced by PndEmcMakeCluster::Exec().

65 { return fTrackEntering;}
FairMultiLinkedData fTrackEntering
Definition: PndEmcHit.h:77
FairMultiLinkedData PndEmcHit::GetTrackExiting ( ) const
inline

Definition at line 66 of file PndEmcHit.h.

References fTrackExiting.

Referenced by PndEmcMakeCluster::Exec().

66 { return fTrackExiting;}
FairMultiLinkedData fTrackExiting
Definition: PndEmcHit.h:78
Short_t PndEmcHit::GetXPad ( ) const

Definition at line 87 of file PndEmcHit.cxx.

References GetCopy(), GetCrystal(), GetModule(), and GetRow().

Referenced by PndEmcAnalysis::Exec(), for(), and if().

87  {
88  // Return the X pad value for clusterization
89 
90  // Barrel EMC
91  if (GetModule()==1 || GetModule()==2)
92  return (GetCrystal()+(GetCopy()-1)*10);
93 
94  // BwEndCap and forward EMC
95  if ((GetModule()==4) || (GetModule()==5))
96  {
97  if (GetCopy()==1) { return -GetRow()+1;}
98  if (GetCopy()==2) { return -GetRow()+1; }
99  if (GetCopy()==3) { return GetRow();}
100  if (GetCopy()==4) { return GetRow();}
101  }
102 
103  // FwEndCap
104  if (GetModule()==3)
105  return -(GetCrystal()-36); //the minus sign before the paranthesis is introduced since the geometry of FwEndCap gets rotated by 180 deg around the y-axis in PndEmc.cxx;
106  //this rotation was done in turn due to the way the geometry was defined in the geometry file of the forward end cap
107 
108  /*
109  if (GetModule()==3 && GetCrystal()==999 && GetRow()==999)
110  return GetCrystal();
111  */
112 
113  // Test EMC
114  if (GetModule()==6)
115  return (GetRow());
116 
117  return -1000; // failure
118 }
Short_t GetCrystal() const
Definition: PndEmcHit.h:60
Short_t GetRow() const
Definition: PndEmcHit.h:59
Short_t GetCopy() const
Definition: PndEmcHit.h:61
Short_t GetModule() const
Definition: PndEmcHit.h:58
Short_t PndEmcHit::GetYPad ( ) const

Definition at line 120 of file PndEmcHit.cxx.

References GetCopy(), GetCrystal(), GetModule(), and GetRow().

Referenced by PndEmcAnalysis::Exec(), for(), and if().

120  {
121  // Return the Y pad value for clusterization
122 
123  // Barrel EMC
124  if (GetModule()==1)
125  return (GetRow()+29);
126 
127  if (GetModule()==2)
128  return (-GetRow()+30);
129 
130  // BwEndCap and forward EMC
131  if ((GetModule()==4) || (GetModule()==5))
132  {
133  if (GetCopy()==1) { return GetCrystal(); }
134  if (GetCopy()==2) { return -GetCrystal()+1; }
135  if (GetCopy()==3) { return -GetCrystal()+1; }
136  if (GetCopy()==4) { return GetCrystal(); }
137  }
138 
139  // FwEndCap
140  if (GetModule()==3)
141  return GetRow()-37;
142 
143  /*
144  if (GetModule()==3 && GetCrystal()==999 && GetRow()==999)
145  return GetRow();
146  */
147 
148  // Test EMC
149  if (GetModule()==6)
150  return (GetCrystal());
151 
152  return -1000; // failure
153 }
Short_t GetCrystal() const
Definition: PndEmcHit.h:60
Short_t GetRow() const
Definition: PndEmcHit.h:59
Short_t GetCopy() const
Definition: PndEmcHit.h:61
Short_t GetModule() const
Definition: PndEmcHit.h:58
void PndEmcHit::Print ( const Option_t *  opt = "") const
virtual

Output to screen

Definition at line 78 of file PndEmcHit.cxx.

References fEnergy, fTrackEntering, and fTrackExiting.

78  {
79  cout << "EMC hit: cellid=" << GetDetectorID() << ", Energy=" << fEnergy;
80  if (fRefIndex>0) cout << ", TrackID= " << fRefIndex << std::endl;
81  cout << " TrackEntering: " << fTrackEntering << std::endl;
82  cout << "TrackExiting: " << fTrackExiting << std::endl;
83 // cout << ", x=" << GetX() << ", y=" << GetY() << endl << flush;
84 }
FairMultiLinkedData fTrackExiting
Definition: PndEmcHit.h:78
FairMultiLinkedData fTrackEntering
Definition: PndEmcHit.h:77
Double32_t fEnergy
Definition: PndEmcHit.h:72
virtual void PndEmcHit::SetEnergy ( Double32_t  energy)
inlinevirtual
virtual void PndEmcHit::SetTime ( Double32_t  time)
inlinevirtual

Member Data Documentation

Double32_t PndEmcHit::fEnergy
protected

Definition at line 72 of file PndEmcHit.h.

Referenced by GetEnergy(), Print(), and SetEnergy().

std::vector<Int_t> PndEmcHit::fMcList
protected

Definition at line 75 of file PndEmcHit.h.

Referenced by GetMcList(), and PndEmcHit().

std::vector<PndEmcPoint*> PndEmcHit::fPointList
protected

Definition at line 76 of file PndEmcHit.h.

Referenced by GetPointList(), and PndEmcHit().

FairMultiLinkedData PndEmcHit::fTrackEntering
protected

Definition at line 77 of file PndEmcHit.h.

Referenced by GetTrackEntering(), and Print().

FairMultiLinkedData PndEmcHit::fTrackExiting
protected

Definition at line 78 of file PndEmcHit.h.

Referenced by GetTrackExiting(), and Print().


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