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

#include <PndEmcApdHit.h>

Inheritance diagram for PndEmcApdHit:

Public Member Functions

 PndEmcApdHit ()
 
 PndEmcApdHit (Int_t trackid, Int_t id, Float_t energy, Float_t time, Float_t X, Float_t Y, Float_t Z)
 
 PndEmcApdHit (Int_t trackid, Int_t id, Float_t energy, Float_t time, Float_t X, Float_t Y, Float_t Z, Int_t npoint, Int_t pointIndex[10])
 
 PndEmcApdHit (Int_t trackid, Int_t id, Float_t energy, Float_t time, Float_t X, Float_t Y, Float_t Z, std::vector< PndEmcApdPoint * > PointList)
 
 PndEmcApdHit (const PndEmcApdHit &)
 
virtual ~PndEmcApdHit ()
 
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
 
Int_t GetNPoints () const
 
Int_t GetMCIndex (Short_t ind) const
 
std::vector< PndEmcApdPoint * > & GetPointList ()
 

Protected Attributes

Double32_t fTime
 
Double32_t fEnergy
 
Int_t fPointIndex [10]
 
std::vector< PndEmcApdPoint * > fPointList
 
Int_t fNPoints
 

Detailed Description

Definition at line 23 of file PndEmcApdHit.h.

Constructor & Destructor Documentation

PndEmcApdHit::PndEmcApdHit ( )

Default constructor

Definition at line 17 of file PndEmcApdHit.cxx.

References fPointList.

18 :FairHit(), fTime(0), fEnergy(0), fPointList(0), fNPoints(0)
19 {
20  fPointList.clear();
21 }
Double32_t fTime
Definition: PndEmcApdHit.h:72
Int_t fNPoints
Definition: PndEmcApdHit.h:79
Double32_t fEnergy
Definition: PndEmcApdHit.h:73
std::vector< PndEmcApdPoint * > fPointList
Definition: PndEmcApdHit.h:78
PndEmcApdHit::PndEmcApdHit ( Int_t  trackid,
Int_t  id,
Float_t  energy,
Float_t  time,
Float_t  X,
Float_t  Y,
Float_t  Z 
)

Definition at line 26 of file PndEmcApdHit.cxx.

References fPointIndex, fX, fY, fZ, X, Y, and Z.

27 :FairHit(), fTime(time), fEnergy(energy), fPointList(0), fNPoints(0)
28 {
29  fRefIndex = trackid;
30  fDetectorID = id;
31  fX = X; fY = Y; fZ = Z;
32  fDx = 0.; fDy = 0.; fDz = 0.;
33  for (Int_t ii=0; ii<10; ii++) fPointIndex[ii] = -1;
34 }
Double_t fX
Definition: PndCaloDraw.cxx:34
double Y
Definition: anaLmdDigi.C:68
Double_t fZ
Definition: PndCaloDraw.cxx:34
Int_t fPointIndex[10]
Definition: PndEmcApdHit.h:74
Double32_t fTime
Definition: PndEmcApdHit.h:72
double X
Definition: anaLmdDigi.C:68
Int_t fNPoints
Definition: PndEmcApdHit.h:79
Double_t fY
Definition: PndCaloDraw.cxx:34
Double32_t fEnergy
Definition: PndEmcApdHit.h:73
double Z
Definition: anaLmdDigi.C:68
std::vector< PndEmcApdPoint * > fPointList
Definition: PndEmcApdHit.h:78
Double_t energy
Definition: plot_dirc.C:15
PndEmcApdHit::PndEmcApdHit ( Int_t  trackid,
Int_t  id,
Float_t  energy,
Float_t  time,
Float_t  X,
Float_t  Y,
Float_t  Z,
Int_t  npoint,
Int_t  pointIndex[10] 
)

Definition at line 36 of file PndEmcApdHit.cxx.

References fPointIndex, fX, fY, fZ, X, Y, and Z.

37 :FairHit(), fTime(time), fEnergy(energy), fPointList(0), fNPoints(points)
38 {
39  fRefIndex = trackid;
40  fDetectorID = id;
41  fX = X; fY = Y; fZ = Z;
42  fDx = 0.; fDy = 0.; fDz = 0.;
43  for (Int_t ii=0; ii<10; ii++) fPointIndex[ii] = pointIndex[ii];
44 }
Double_t fX
Definition: PndCaloDraw.cxx:34
double Y
Definition: anaLmdDigi.C:68
Double_t fZ
Definition: PndCaloDraw.cxx:34
Int_t fPointIndex[10]
Definition: PndEmcApdHit.h:74
Double32_t fTime
Definition: PndEmcApdHit.h:72
double X
Definition: anaLmdDigi.C:68
Int_t fNPoints
Definition: PndEmcApdHit.h:79
Double_t fY
Definition: PndCaloDraw.cxx:34
Double32_t fEnergy
Definition: PndEmcApdHit.h:73
double Z
Definition: anaLmdDigi.C:68
std::vector< PndEmcApdPoint * > fPointList
Definition: PndEmcApdHit.h:78
Double_t energy
Definition: plot_dirc.C:15
PndEmcApdHit::PndEmcApdHit ( Int_t  trackid,
Int_t  id,
Float_t  energy,
Float_t  time,
Float_t  X,
Float_t  Y,
Float_t  Z,
std::vector< PndEmcApdPoint * >  PointList 
)

Definition at line 46 of file PndEmcApdHit.cxx.

References fPointIndex, fX, fY, fZ, X, Y, and Z.

47 :FairHit(), fTime(time), fEnergy(energy), fPointList(0), fNPoints(0)
48 {
49  fRefIndex = trackid;
50  fDetectorID = id;
51  fX = X; fY = Y; fZ = Z;
52  fDx = 0.; fDy = 0.; fDz = 0.;
53  for (Int_t ii=0; ii<10; ii++) fPointIndex[ii] = -1;
54 }
Double_t fX
Definition: PndCaloDraw.cxx:34
double Y
Definition: anaLmdDigi.C:68
Double_t fZ
Definition: PndCaloDraw.cxx:34
Int_t fPointIndex[10]
Definition: PndEmcApdHit.h:74
Double32_t fTime
Definition: PndEmcApdHit.h:72
double X
Definition: anaLmdDigi.C:68
Int_t fNPoints
Definition: PndEmcApdHit.h:79
Double_t fY
Definition: PndCaloDraw.cxx:34
Double32_t fEnergy
Definition: PndEmcApdHit.h:73
double Z
Definition: anaLmdDigi.C:68
std::vector< PndEmcApdPoint * > fPointList
Definition: PndEmcApdHit.h:78
Double_t energy
Definition: plot_dirc.C:15
PndEmcApdHit::PndEmcApdHit ( const PndEmcApdHit copy)

Copy

Definition at line 57 of file PndEmcApdHit.cxx.

References fPointIndex, fX, fY, and fZ.

58 :FairHit(copy), fTime(copy.fTime),fEnergy(copy.fEnergy), fPointList(copy.fPointList), fNPoints(copy.fNPoints)
59 {
60  fRefIndex=copy.fRefIndex;
61  fDetectorID=copy.fDetectorID;
62  fX=copy.fX;
63  fY=copy.fY;
64  fZ=copy.fZ;
65  for (Int_t ii=0; ii<10; ii++) fPointIndex[ii] = copy.fPointIndex[ii];
66 }
Double_t fX
Definition: PndCaloDraw.cxx:34
Double_t fZ
Definition: PndCaloDraw.cxx:34
Int_t fPointIndex[10]
Definition: PndEmcApdHit.h:74
Double32_t fTime
Definition: PndEmcApdHit.h:72
Int_t fNPoints
Definition: PndEmcApdHit.h:79
Double_t fY
Definition: PndCaloDraw.cxx:34
Double32_t fEnergy
Definition: PndEmcApdHit.h:73
std::vector< PndEmcApdPoint * > fPointList
Definition: PndEmcApdHit.h:78
PndEmcApdHit::~PndEmcApdHit ( )
virtual

Destructor

Definition at line 68 of file PndEmcApdHit.cxx.

References fPointList.

69 {
70  fPointList.clear();
71 }
std::vector< PndEmcApdPoint * > fPointList
Definition: PndEmcApdHit.h:78

Member Function Documentation

Short_t PndEmcApdHit::GetCopy ( ) const
inline

Definition at line 58 of file PndEmcApdHit.h.

Referenced by GetXPad(), and GetYPad().

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

Definition at line 57 of file PndEmcApdHit.h.

Referenced by GetXPad(), and GetYPad().

57 { return (fDetectorID%10000) ;};
virtual Double_t PndEmcApdHit::GetEnergy ( ) const
inlinevirtual

Accessors

Definition at line 51 of file PndEmcApdHit.h.

References fEnergy.

Referenced by for().

51 { return fEnergy ;};
Double32_t fEnergy
Definition: PndEmcApdHit.h:73
Int_t PndEmcApdHit::GetMCIndex ( Short_t  ind) const
inline

Definition at line 64 of file PndEmcApdHit.h.

References fPointIndex.

Referenced by for().

64 { return fPointIndex[ind];};
Int_t fPointIndex[10]
Definition: PndEmcApdHit.h:74
Short_t PndEmcApdHit::GetModule ( ) const
inline

Definition at line 55 of file PndEmcApdHit.h.

Referenced by GetXPad(), and GetYPad().

55 { return (fDetectorID/100000000) ;};
Int_t PndEmcApdHit::GetNPoints ( ) const
inline

Definition at line 63 of file PndEmcApdHit.h.

References fNPoints.

Referenced by for().

63 { return fNPoints;};
Int_t fNPoints
Definition: PndEmcApdHit.h:79
Float_t PndEmcApdHit::GetPhi ( ) const
inline

Definition at line 54 of file PndEmcApdHit.h.

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

54 { 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<PndEmcApdPoint*>& PndEmcApdHit::GetPointList ( )
inline

Definition at line 67 of file PndEmcApdHit.h.

References fPointList.

67 {return fPointList;}
std::vector< PndEmcApdPoint * > fPointList
Definition: PndEmcApdHit.h:78
Short_t PndEmcApdHit::GetRow ( ) const
inline

Definition at line 56 of file PndEmcApdHit.h.

Referenced by GetXPad(), and GetYPad().

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

Definition at line 53 of file PndEmcApdHit.h.

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

53 { 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 PndEmcApdHit::GetTime ( ) const
inlinevirtual

Definition at line 52 of file PndEmcApdHit.h.

References fTime.

52 { return fTime ;};
Double32_t fTime
Definition: PndEmcApdHit.h:72
Short_t PndEmcApdHit::GetXPad ( ) const

Definition at line 83 of file PndEmcApdHit.cxx.

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

83  {
84  // Return the X pad value for clusterization
85 
86  // Barrel EMC
87  if (GetModule()==1 || GetModule()==2)
88  return (GetCrystal()+(GetCopy()-1)*10);
89 
90  // BwEndCap and forward EMC
91  if ((GetModule()==4) || (GetModule()==5))
92  {
93  if (GetCopy()==1) { return -GetRow()+1;}
94  if (GetCopy()==2) { return -GetRow()+1; }
95  if (GetCopy()==3) { return GetRow();}
96  if (GetCopy()==4) { return GetRow();}
97  }
98 
99  // FwEndCap
100  if (GetModule()==3)
101  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;
102  //this rotation was done in turn due to the way the geometry was defined in the geometry file of the forward end cap
103 
104  /*
105  if (GetModule()==3 && GetCrystal()==999 && GetRow()==999)
106  return GetCrystal();
107  */
108 
109  // Test EMC
110  if (GetModule()==6)
111  return (GetRow());
112 
113  return -1000; // failure
114 }
Short_t GetCopy() const
Definition: PndEmcApdHit.h:58
Short_t GetRow() const
Definition: PndEmcApdHit.h:56
Short_t GetCrystal() const
Definition: PndEmcApdHit.h:57
Short_t GetModule() const
Definition: PndEmcApdHit.h:55
Short_t PndEmcApdHit::GetYPad ( ) const

Definition at line 116 of file PndEmcApdHit.cxx.

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

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

Output to screen

Definition at line 76 of file PndEmcApdHit.cxx.

References fEnergy.

76  {
77  cout << "EMC hit: cellid=" << GetDetectorID() << ", Energy=" << fEnergy;
78  if (fRefIndex>0) cout << ", TrackID= " << fRefIndex;
79 // cout << ", x=" << GetX() << ", y=" << GetY() << endl << flush;
80 }
Double32_t fEnergy
Definition: PndEmcApdHit.h:73
virtual void PndEmcApdHit::SetEnergy ( Double32_t  energy)
inlinevirtual

Modifiers

Definition at line 47 of file PndEmcApdHit.h.

References energy, and fEnergy.

47 { fEnergy = energy ;};
Double32_t fEnergy
Definition: PndEmcApdHit.h:73
Double_t energy
Definition: plot_dirc.C:15
virtual void PndEmcApdHit::SetTime ( Double32_t  time)
inlinevirtual

Definition at line 48 of file PndEmcApdHit.h.

References fTime.

48 { fTime = time ;};
Double32_t fTime
Definition: PndEmcApdHit.h:72

Member Data Documentation

Double32_t PndEmcApdHit::fEnergy
protected

Definition at line 73 of file PndEmcApdHit.h.

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

Int_t PndEmcApdHit::fNPoints
protected

Definition at line 79 of file PndEmcApdHit.h.

Referenced by GetNPoints().

Int_t PndEmcApdHit::fPointIndex[10]
protected

Definition at line 74 of file PndEmcApdHit.h.

Referenced by GetMCIndex(), and PndEmcApdHit().

std::vector<PndEmcApdPoint*> PndEmcApdHit::fPointList
protected

Definition at line 78 of file PndEmcApdHit.h.

Referenced by GetPointList(), PndEmcApdHit(), and ~PndEmcApdHit().

Double32_t PndEmcApdHit::fTime
protected

Definition at line 72 of file PndEmcApdHit.h.

Referenced by GetTime(), and SetTime().


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