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

represents a mc hit in an emc crystal More...

#include <PndEmcPoint.h>

Inheritance diagram for PndEmcPoint:

Public Member Functions

 PndEmcPoint ()
 
 PndEmcPoint (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, Bool_t entering=kFALSE, Bool_t exiting=kFALSE)
 
 PndEmcPoint (const PndEmcPoint &point)
 
virtual ~PndEmcPoint ()
 
Double_t GetTheta () const
 
Double_t GetPhi () const
 
Short_t GetXPad () const
 
Short_t GetYPad () const
 
Short_t GetModule () const
 
Short_t GetRow () const
 
Short_t GetCrystal () const
 
Short_t GetCopy () const
 
Bool_t GetEntering () const
 
Bool_t GetExiting () const
 
void SetModule (Short_t mod)
 
void SetRow (Short_t row)
 
void SetCrystal (Short_t crys)
 
virtual void SetTrackID (Int_t trackId)
 
virtual void Print (const Option_t *opt) const
 

Protected Attributes

Short_t nModule
 
Short_t nRow
 
Short_t nCrystal
 
Short_t nCopy
 
Bool_t fEntering
 
Bool_t fExiting
 

Detailed Description

represents a mc hit in an emc crystal

Definition at line 19 of file PndEmcPoint.h.

Constructor & Destructor Documentation

PndEmcPoint::PndEmcPoint ( )

Default constructor

Definition at line 19 of file PndEmcPoint.cxx.

19  : FairMCPoint(),
20  nModule(-1), nRow(-1), nCrystal(-1), nCopy(-1), fEntering(kFALSE), fExiting(kFALSE)
21 {
22 }
Short_t nRow
Definition: PndEmcPoint.h:79
Short_t nModule
Definition: PndEmcPoint.h:78
Short_t nCopy
Definition: PndEmcPoint.h:81
Bool_t fEntering
Definition: PndEmcPoint.h:82
Bool_t fExiting
Definition: PndEmcPoint.h:83
Short_t nCrystal
Definition: PndEmcPoint.h:80
PndEmcPoint::PndEmcPoint ( 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,
Bool_t  entering = kFALSE,
Bool_t  exiting = kFALSE 
)

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]
enteringExisting particle entering the crystal (needed for MC match)
exitingParticle leaving the crystal (needed for MC match)

Definition at line 28 of file PndEmcPoint.cxx.

31  : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss, evtID),
32  nModule(mod), nRow(row), nCrystal(crys), nCopy(copy), fEntering(entering), fExiting(exiting)
33 {
34  SetLink(FairLink("MCTrack", trackID));
35 }
int row
Definition: anaLmdDigi.C:67
TVector3 pos
Short_t nRow
Definition: PndEmcPoint.h:79
Short_t nModule
Definition: PndEmcPoint.h:78
Double_t mom
Definition: plot_dirc.C:14
Short_t nCopy
Definition: PndEmcPoint.h:81
Bool_t fEntering
Definition: PndEmcPoint.h:82
Bool_t fExiting
Definition: PndEmcPoint.h:83
Short_t nCrystal
Definition: PndEmcPoint.h:80
PndEmcPoint::PndEmcPoint ( const PndEmcPoint point)

Copy constructor

Definition at line 39 of file PndEmcPoint.cxx.

40  :FairMCPoint(point.fTrackID, point.fDetectorID, TVector3(point.fX, point.fY, point.fZ), TVector3(point.fPx, point.fPy, point.fPz),
41  point.fTime, point.fLength, point.fELoss, point.fEventId),
42  nModule(point.nModule), nRow(point.nRow), nCrystal(point.nCrystal), nCopy(point.nCopy), fEntering(point.fEntering), fExiting(point.fExiting)
43 
44 {
45  SetLinks(point.GetLinks());
46 }
Short_t nRow
Definition: PndEmcPoint.h:79
Short_t nModule
Definition: PndEmcPoint.h:78
Short_t nCopy
Definition: PndEmcPoint.h:81
Bool_t fEntering
Definition: PndEmcPoint.h:82
Bool_t fExiting
Definition: PndEmcPoint.h:83
Short_t nCrystal
Definition: PndEmcPoint.h:80
PndEmcPoint::~PndEmcPoint ( )
virtual

Destructor

Definition at line 50 of file PndEmcPoint.cxx.

50 { }

Member Function Documentation

Short_t PndEmcPoint::GetCopy ( ) const
inline

Definition at line 63 of file PndEmcPoint.h.

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

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

Definition at line 62 of file PndEmcPoint.h.

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

62 { return (fDetectorID%10000);};
Bool_t PndEmcPoint::GetEntering ( ) const
inline

Definition at line 64 of file PndEmcPoint.h.

References fEntering.

Referenced by PndEmcHitProducer::Exec(), and Print().

64 { return fEntering;}
Bool_t fEntering
Definition: PndEmcPoint.h:82
Bool_t PndEmcPoint::GetExiting ( ) const
inline

Definition at line 65 of file PndEmcPoint.h.

References fExiting.

Referenced by PndEmcHitProducer::Exec(), and Print().

65 { return fExiting;}
Bool_t fExiting
Definition: PndEmcPoint.h:83
Short_t PndEmcPoint::GetModule ( ) const
inline

Definition at line 60 of file PndEmcPoint.h.

Referenced by FairGeaneTrEmc::Exec(), PndEmcHitProducer::Exec(), GetEntriesFast(), GetXPad(), and GetYPad().

60 { return (fDetectorID/100000000);};
Double_t PndEmcPoint::GetPhi ( ) const
inline

Definition at line 56 of file PndEmcPoint.h.

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

Referenced by PndEmcHitProducer::AcceptDayOne().

56 { 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 PndEmcPoint::GetRow ( ) const
inline

Definition at line 61 of file PndEmcPoint.h.

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

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

Accessors

Definition at line 55 of file PndEmcPoint.h.

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

55 { 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 PndEmcPoint::GetXPad ( ) const

Definition at line 72 of file PndEmcPoint.cxx.

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

Referenced by GetEntriesFast().

72  {
73  // Return the X pad value for clusterization
74 
75  // Barrel EMC
76  if (GetModule()==1 || GetModule()==2)
77  return (GetCrystal()+(GetCopy()-1)*10);
78 
79  // BwEndCap and forward EMC
80  if ((GetModule()==4) || (GetModule()==5))
81  {
82  if (GetCopy()==1) { return -GetRow()+1;}
83  if (GetCopy()==2) { return -GetRow()+1; }
84  if (GetCopy()==3) { return GetRow();}
85  if (GetCopy()==4) { return GetRow();}
86  }
87 
88  // FwEndCap
89  if (GetModule()==3)
90  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;
91  //this rotation was done in turn due to the way the geometry was defined in the geometry file of the forward end cap
92 
93  /*
94  if (GetModule()==3 && GetCrystal()==999 && GetRow()==999)
95  return GetCrystal();
96  */
97 
98  // Test EMC
99  if (GetModule()==6)
100  return GetRow();
101 
102  return -1000; // failure
103 }
Short_t GetModule() const
Definition: PndEmcPoint.h:60
Short_t GetRow() const
Definition: PndEmcPoint.h:61
Short_t GetCrystal() const
Definition: PndEmcPoint.h:62
Short_t GetCopy() const
Definition: PndEmcPoint.h:63
Short_t PndEmcPoint::GetYPad ( ) const

Definition at line 105 of file PndEmcPoint.cxx.

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

Referenced by GetEntriesFast().

105  {
106  // Return the Y pad value for clusterization
107 
108  // Barrel EMC
109  if (GetModule()==1)
110  return (GetRow()+29);
111 
112  if (GetModule()==2)
113  return (-GetRow()+30);
114 
115  // BwEndCap and forward EMC
116  if ((GetModule()==4) || (GetModule()==5))
117  {
118  if (GetCopy()==1) { return GetCrystal(); }
119  if (GetCopy()==2) { return -GetCrystal()+1; }
120  if (GetCopy()==3) { return -GetCrystal()+1; }
121  if (GetCopy()==4) { return GetCrystal(); }
122  }
123 
124  // FwEndCap
125  if (GetModule()==3)
126  return GetRow()-37;
127 
128  /*
129  if (GetModule()==3 && GetCrystal()==999 && GetRow()==999)
130  return GetRow();
131  */
132 
133  // Test EMC
134  if (GetModule()==6)
135  return GetCrystal();
136 
137  return -1000; // failure
138 }
Short_t GetModule() const
Definition: PndEmcPoint.h:60
Short_t GetRow() const
Definition: PndEmcPoint.h:61
Short_t GetCrystal() const
Definition: PndEmcPoint.h:62
Short_t GetCopy() const
Definition: PndEmcPoint.h:63
void PndEmcPoint::Print ( const Option_t *  opt) const
virtual

Output to screen

Definition at line 54 of file PndEmcPoint.cxx.

References fX, fY, fZ, GetEntering(), and GetExiting().

54  {
55  cout << "-I- PndEmcPoint: EMC Point for track " << fTrackID
56  << " in detector " << fDetectorID << endl;
57  cout << " Position (" << fX << ", " << fY << ", " << fZ
58  << ") cm" << endl;
59  cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz
60  << ") GeV" << endl;
61  cout << " Time " << fTime << " ns, Length " << fLength
62  << " cm, Energy loss " << fELoss*1.0e06 << " keV" << endl;
63  if (GetEntering() == kTRUE){
64  cout << " Particle entering the crystal!" << std::endl;
65  }
66  if (GetExiting() == kFALSE){
67  cout << " Particle exiting the crystal!" << std::endl;
68  }
69 }
Double_t fX
Definition: PndCaloDraw.cxx:34
Double_t fZ
Definition: PndCaloDraw.cxx:34
Bool_t GetExiting() const
Definition: PndEmcPoint.h:65
Double_t fY
Definition: PndCaloDraw.cxx:34
Bool_t GetEntering() const
Definition: PndEmcPoint.h:64
void PndEmcPoint::SetCrystal ( Short_t  crys)
inline

Definition at line 70 of file PndEmcPoint.h.

References nCrystal.

70 { nCrystal = crys;};
Short_t nCrystal
Definition: PndEmcPoint.h:80
void PndEmcPoint::SetModule ( Short_t  mod)
inline

Modifiers

Definition at line 68 of file PndEmcPoint.h.

References nModule.

68 { nModule = mod;};
Short_t nModule
Definition: PndEmcPoint.h:78
void PndEmcPoint::SetRow ( Short_t  row)
inline

Definition at line 69 of file PndEmcPoint.h.

References nRow, and row.

69 { nRow = row;};
int row
Definition: anaLmdDigi.C:67
Short_t nRow
Definition: PndEmcPoint.h:79
virtual void PndEmcPoint::SetTrackID ( Int_t  trackId)
inlinevirtual

Definition at line 71 of file PndEmcPoint.h.

Referenced by PndEmc::CopyClones().

71 {FairMCPoint::SetTrackID(trackId); SetLink(FairLink("MCTrack", trackId));} //14.09.10 Stefano FIX

Member Data Documentation

Bool_t PndEmcPoint::fEntering
protected

Definition at line 82 of file PndEmcPoint.h.

Referenced by GetEntering().

Bool_t PndEmcPoint::fExiting
protected

Definition at line 83 of file PndEmcPoint.h.

Referenced by GetExiting().

Short_t PndEmcPoint::nCopy
protected

Definition at line 81 of file PndEmcPoint.h.

Short_t PndEmcPoint::nCrystal
protected

Definition at line 80 of file PndEmcPoint.h.

Referenced by SetCrystal().

Short_t PndEmcPoint::nModule
protected

Definition at line 78 of file PndEmcPoint.h.

Referenced by SetModule().

Short_t PndEmcPoint::nRow
protected

Definition at line 79 of file PndEmcPoint.h.

Referenced by SetRow().


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