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

#include <PndEmcApdPoint.h>

Inheritance diagram for PndEmcApdPoint:

Public Member Functions

 PndEmcApdPoint ()
 
 PndEmcApdPoint (Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t mod, Short_t row, Short_t crys, Short_t copy, Short_t flag)
 
 PndEmcApdPoint (const PndEmcApdPoint &point)
 
virtual ~PndEmcApdPoint ()
 
Double_t GetTheta () const
 
Double_t GetPhi () const
 
Short_t GetFlag () const
 
Short_t GetXPad () const
 
Short_t GetYPad () const
 
void Position (TVector3 &pos)
 
void Momentum (TVector3 &mom)
 
Short_t GetModule () const
 
Short_t GetRow () const
 
Short_t GetCrystal () const
 
Short_t GetCopy () const
 
void SetModule (Short_t mod)
 
void SetRow (Short_t row)
 
void SetCrystal (Short_t crys)
 
void SetFlag (Short_t flag)
 
virtual void Print (const Option_t *opt) const
 

Protected Attributes

Short_t nModule
 
Short_t nRow
 
Short_t nCrystal
 
Short_t nCopy
 
Short_t fFlag
 

Detailed Description

Definition at line 14 of file PndEmcApdPoint.h.

Constructor & Destructor Documentation

PndEmcApdPoint::PndEmcApdPoint ( )

Default constructor

Definition at line 19 of file PndEmcApdPoint.cxx.

19  : FairMCPoint(),
20  nModule(-1), nRow(-1), nCrystal(-1), nCopy(-1), fFlag(-10)
21 {
22 }
PndEmcApdPoint::PndEmcApdPoint ( Int_t  trackID,
Int_t  detID,
Int_t  evtID,
TVector3  pos,
TVector3  mom,
Double_t  tof,
Double_t  length,
Double_t  eLoss,
Short_t  mod,
Short_t  row,
Short_t  crys,
Short_t  copy,
Short_t  flag 
)

Constructor with arguments

Parameters
trackIDIndex of MCTrack
detIDDetector ID
posInCcoordinates at entrance to active volume [cm]
posOutCoordinates at exit of active volume [cm]
momInMomentum of track at entrance [GeV]
momOutMomentum of track at exit [GeV]
tofTime since event start [ns]
lengthTrack length since creation [cm]
eLossEnergy deposit [GeV]

Definition at line 28 of file PndEmcApdPoint.cxx.

31  : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss, evtID),
32  nModule(mod), nRow(row), nCrystal(crys), nCopy(copy), fFlag(flag)
33 {
34  SetLink(FairLink("MCTrack", trackID));
35 }
int row
Definition: anaLmdDigi.C:67
TVector3 pos
Double_t mom
Definition: plot_dirc.C:14
PndEmcApdPoint::PndEmcApdPoint ( const PndEmcApdPoint point)

Copy constructor

Definition at line 38 of file PndEmcApdPoint.cxx.

39  :FairMCPoint(point.fTrackID, point.fDetectorID, TVector3(point.fX, point.fY, point.fZ), TVector3(point.fPx, point.fPy, point.fPz),
40  point.fTime, point.fLength, point.fELoss),
41  nModule(point.nModule), nRow(point.nRow), nCrystal(point.nCrystal), nCopy(point.nCopy), fFlag(point.fFlag)
42 
43 {
44  SetLinks(point.GetLinks());
45 }
PndEmcApdPoint::~PndEmcApdPoint ( )
virtual

Destructor

Definition at line 48 of file PndEmcApdPoint.cxx.

48 { }

Member Function Documentation

Short_t PndEmcApdPoint::GetCopy ( ) const
inline

Definition at line 60 of file PndEmcApdPoint.h.

Referenced by GetXPad(), and GetYPad().

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

Definition at line 59 of file PndEmcApdPoint.h.

Referenced by GetXPad(), and GetYPad().

59 { return (fDetectorID%10000);};
Short_t PndEmcApdPoint::GetFlag ( ) const
inline

Definition at line 50 of file PndEmcApdPoint.h.

References fFlag.

Referenced by PndEmcApdHitProducer::Exec().

50 { return fFlag; };
Short_t PndEmcApdPoint::GetModule ( ) const
inline

Definition at line 57 of file PndEmcApdPoint.h.

Referenced by GetXPad(), and GetYPad().

57 { return (fDetectorID/100000000);};
Double_t PndEmcApdPoint::GetPhi ( ) const
inline

Definition at line 49 of file PndEmcApdPoint.h.

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

49 { 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
Short_t PndEmcApdPoint::GetRow ( ) const
inline

Definition at line 58 of file PndEmcApdPoint.h.

Referenced by GetXPad(), and GetYPad().

58 { return ((fDetectorID/1000000)%100);};
Double_t PndEmcApdPoint::GetTheta ( ) const
inline

Accessors

Definition at line 48 of file PndEmcApdPoint.h.

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

48 { 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
Short_t PndEmcApdPoint::GetXPad ( ) const

Definition at line 64 of file PndEmcApdPoint.cxx.

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

64  {
65  // Return the X pad value for clusterization
66 
67  // Barrel EMC
68  if (GetModule()==1 || GetModule()==2)
69  return (GetCrystal()+(GetCopy()-1)*10);
70 
71  // BwEndCap and forward EMC
72  if ((GetModule()==4) || (GetModule()==5))
73  {
74  if (GetCopy()==1) { return -GetRow()+1;}
75  if (GetCopy()==2) { return -GetRow()+1; }
76  if (GetCopy()==3) { return GetRow();}
77  if (GetCopy()==4) { return GetRow();}
78  }
79 
80  // FwEndCap
81  if (GetModule()==3)
82  return -(GetCrystal()-36);
83 
84  /*
85  if (GetModule()==3 && GetCrystal()==999 && GetRow()==999)
86  return GetCrystal();
87  */
88 
89  // Test EMC
90  if (GetModule()==6)
91  return GetRow();
92 
93  return -1000; // failure
94 }
Short_t GetRow() const
Short_t GetCrystal() const
Short_t GetCopy() const
Short_t GetModule() const
Short_t PndEmcApdPoint::GetYPad ( ) const

Definition at line 96 of file PndEmcApdPoint.cxx.

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

96  {
97  // Return the Y pad value for clusterization
98 
99  // Barrel EMC
100  if (GetModule()==1)
101  return (GetRow()+29);
102 
103  if (GetModule()==2)
104  return (-GetRow()+30);
105 
106  // BwEndCap and forward EMC
107  if ((GetModule()==4) || (GetModule()==5))
108  {
109  if (GetCopy()==1) { return GetCrystal(); }
110  if (GetCopy()==2) { return -GetCrystal()+1; }
111  if (GetCopy()==3) { return -GetCrystal()+1; }
112  if (GetCopy()==4) { return GetCrystal(); }
113  }
114 
115  // FwEndCap
116  if (GetModule()==3)
117  return GetRow()-37;
118 
119  /*
120  if (GetModule()==3 && GetCrystal()==999 && GetRow()==999)
121  return GetRow();
122  */
123 
124  // Test EMC
125  if (GetModule()==6)
126  return GetCrystal();
127 
128  return -1000; // failure
129 }
Short_t GetRow() const
Short_t GetCrystal() const
Short_t GetCopy() const
Short_t GetModule() const
void PndEmcApdPoint::Momentum ( TVector3 &  mom)
inline

Definition at line 56 of file PndEmcApdPoint.h.

56 { mom.SetXYZ(fPx, fPy, fPz); };
Double_t mom
Definition: plot_dirc.C:14
void PndEmcApdPoint::Position ( TVector3 &  pos)
inline

Definition at line 55 of file PndEmcApdPoint.h.

References fX, fY, and fZ.

55 { pos.SetXYZ(fX, fY, fZ); };
TVector3 pos
Double_t fX
Definition: PndCaloDraw.cxx:34
Double_t fZ
Definition: PndCaloDraw.cxx:34
Double_t fY
Definition: PndCaloDraw.cxx:34
void PndEmcApdPoint::Print ( const Option_t *  opt) const
virtual

Output to screen

Definition at line 52 of file PndEmcApdPoint.cxx.

References fX, fY, and fZ.

52  {
53  cout << "-I- PndEmcApdPoint: EMCAPD Point for track " << fTrackID
54  << " in detector " << fDetectorID << endl;
55  cout << " Position (" << fX << ", " << fY << ", " << fZ
56  << ") cm" << endl;
57  cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz
58  << ") GeV" << endl;
59  cout << " Time " << fTime << " ns, Length " << fLength
60  << " cm, Energy loss " << fELoss*1.0e06 << " keV" << endl;
61 }
Double_t fX
Definition: PndCaloDraw.cxx:34
Double_t fZ
Definition: PndCaloDraw.cxx:34
Double_t fY
Definition: PndCaloDraw.cxx:34
void PndEmcApdPoint::SetCrystal ( Short_t  crys)
inline

Definition at line 64 of file PndEmcApdPoint.h.

References nCrystal.

64 { nCrystal = crys;};
void PndEmcApdPoint::SetFlag ( Short_t  flag)
inline

Definition at line 65 of file PndEmcApdPoint.h.

References fFlag.

65 { fFlag = flag;};
void PndEmcApdPoint::SetModule ( Short_t  mod)
inline

Modifiers

Definition at line 62 of file PndEmcApdPoint.h.

References nModule.

62 { nModule = mod;};
void PndEmcApdPoint::SetRow ( Short_t  row)
inline

Definition at line 63 of file PndEmcApdPoint.h.

References nRow, and row.

63 { nRow = row;};
int row
Definition: anaLmdDigi.C:67

Member Data Documentation

Short_t PndEmcApdPoint::fFlag
protected

Definition at line 76 of file PndEmcApdPoint.h.

Referenced by GetFlag(), and SetFlag().

Short_t PndEmcApdPoint::nCopy
protected

Definition at line 75 of file PndEmcApdPoint.h.

Short_t PndEmcApdPoint::nCrystal
protected

Definition at line 74 of file PndEmcApdPoint.h.

Referenced by SetCrystal().

Short_t PndEmcApdPoint::nModule
protected

Definition at line 72 of file PndEmcApdPoint.h.

Referenced by SetModule().

Short_t PndEmcApdPoint::nRow
protected

Definition at line 73 of file PndEmcApdPoint.h.

Referenced by SetRow().


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