FairRoot/PandaRoot
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | Private Member Functions | Static Private Member Functions | Static Private Attributes | Friends | List of all members
PndEmcDigi Class Reference

represents the reconstructed hit of one emc crystal More...

#include <PndEmcDigi.h>

Inheritance diagram for PndEmcDigi:
PndEmcSharedDigi

Public Types

enum  PositionMethod { surface, depth }
 

Public Member Functions

 PndEmcDigi ()
 
 PndEmcDigi (Int_t trackid, Int_t id, Float_t energy, Float_t time, Int_t hitIndex=-1)
 
 PndEmcDigi (const PndEmcDigi &)
 
virtual ~PndEmcDigi ()
 
virtual bool operator== (const PndEmcDigi &otherDigi) const
 
virtual bool operator!= (const PndEmcDigi &otherDigi) const
 
virtual bool operator< (const PndEmcDigi &otherDigi) const
 
virtual bool equal (FairTimeStamp *data)
 
virtual void Print (const Option_t *opt="") const
 
void SetEnergy (Double32_t energy)
 
void SetTrackId (Int_t id)
 
void SetDetectorId (Int_t id)
 
virtual void AbsorbEnergy (PndEmcDigi &otherDigi)
 
bool isNeighbour (const PndEmcDigi *theDigi) const
 
virtual Double_t GetEnergy () const
 
Int_t GetTrackId () const
 
Int_t GetDetectorId () const
 
PndEmcTwoCoordIndexGetTCI () const
 
Int_t GetThetaInt () const
 
Int_t GetPhiInt () const
 
Double_t GetTheta () const
 
Double_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 GetHitIndex ()
 
const TVector3 & where () const
 
virtual PndEmcSharedDigidynamic_cast_PndEmcSharedDigi ()
 
virtual const PndEmcSharedDigidynamic_cast_PndEmcSharedDigi () const
 

Static Public Member Functions

static void InitDigiArrayTBD ()
 
static Double_t getRescaleFactor ()
 
static Double_t getPositionDepthPWO ()
 
static Double_t getPositionDepthShashlyk ()
 

Public Attributes

Int_t fEvtNo
 

Static Public Attributes

static TClonesArray * fDigiArrayTBD = NULL
 

Protected Attributes

Double_t fEnergy
 
Int_t fTrackId
 
Int_t fDetectorId
 
Int_t fHitIndex
 
TVector3 fWhere
 
Int_t fThetaInd
 
Int_t fPhiInd
 
Double_t fTheta
 
Double_t fPhi
 

Private Member Functions

 ClassDef (PndEmcDigi, 5)
 

Static Private Member Functions

static void selectDigiPositionMethod (PositionMethod, double positionDepthPWO=0., double positionDepthShahslyk=0., double rescaleFactor=1.)
 
static TVector3 surfacePosition (const PndEmcXtal *xtal)
 
static TVector3 depthPosition (const PndEmcXtal *xtal)
 

Static Private Attributes

static TVector3(*&)(const
PndEmcXtal *) 
algPointer ()
 
static double fRescaleFactor = 1.0
 
static double fPositionDepthPWO = 6.2
 
static double fPositionDepthShashlyk = 20.9
 

Friends

class PndEmcWaveformToDigi
 
class PndEmcWaveformToDigiFPGA
 
class PndEmcWaveformToCalibratedDigi
 
class PndEmcMultiWaveformToCalibratedDigi
 
class PndEmcFWEndcapDigi
 
class PndEmcTmpWaveformToDigi
 
class PndEmcMakeDigi
 
class PndEmcCorrBump
 
std::ostreamoperator<< (std::ostream &out, PndEmcDigi &digi)
 

Detailed Description

represents the reconstructed hit of one emc crystal

Definition at line 40 of file PndEmcDigi.h.

Member Enumeration Documentation

Enumerator
surface 
depth 

Definition at line 81 of file PndEmcDigi.h.

Constructor & Destructor Documentation

PndEmcDigi::PndEmcDigi ( )

Default constructor

Definition at line 40 of file PndEmcDigi.cxx.

40  :FairTimeStamp(0), fEvtNo(-1),fEnergy(0),fTrackId(-1),fDetectorId(-1),fHitIndex(-1),fWhere(0,0,0), fThetaInd(0), fPhiInd(0),fTheta(0), fPhi(0)
41 {
42 }
Int_t fTrackId
Definition: PndEmcDigi.h:125
Double_t fEnergy
Definition: PndEmcDigi.h:124
TVector3 fWhere
Definition: PndEmcDigi.h:128
Int_t fHitIndex
Definition: PndEmcDigi.h:127
Double_t fTheta
Definition: PndEmcDigi.h:131
Int_t fPhiInd
Definition: PndEmcDigi.h:130
Int_t fEvtNo
Definition: PndEmcDigi.h:118
Int_t fDetectorId
Definition: PndEmcDigi.h:126
Int_t fThetaInd
Definition: PndEmcDigi.h:129
Double_t fPhi
Definition: PndEmcDigi.h:132
PndEmcDigi::PndEmcDigi ( Int_t  trackid,
Int_t  id,
Float_t  energy,
Float_t  time,
Int_t  hitIndex = -1 
)

Definition at line 50 of file PndEmcDigi.cxx.

References algPointer, emcMap, fPhi, fPhiInd, fTheta, fThetaInd, fWhere, PndEmcMapper::GetTCI(), PndEmcStructure::GetTciXtalMap(), PndEmcMapper::Instance(), PndEmcStructure::Instance(), PndEmcTwoCoordIndex::XCoord(), and PndEmcTwoCoordIndex::YCoord().

50  :FairTimeStamp(time),fEnergy(energy),fTrackId(trackid),fDetectorId(id),fHitIndex(hitIndex),fWhere(0,0,0), fThetaInd(0), fPhiInd(0),fTheta(0), fPhi(0)
51 {
53  PndEmcTwoCoordIndex* tci=emcMap->GetTCI(id);
54  fThetaInd=tci->XCoord();
55  fPhiInd=tci->YCoord();
56 
58  PndEmcXtal* xtal = tciXtalMap.find(tci)->second;
59  fWhere = algPointer()(xtal);
60  fTheta = fWhere.Theta();
61  fPhi = fWhere.Phi();
62  SetLink(FairLink(-1, FairRootManager::Instance()->GetEntryNr(), "EmcHit", hitIndex));
63 }
Int_t fTrackId
Definition: PndEmcDigi.h:125
represents coordinates of one crystal
Definition: PndEmcXtal.h:36
stores crystal index coordinates (x,y) or (theta,phi)
PndEmcTwoCoordIndex * GetTCI(Int_t DetectorId)
Emc geometry mapper.
Definition: PndEmcMapper.h:22
Double_t fEnergy
Definition: PndEmcDigi.h:124
TVector3 fWhere
Definition: PndEmcDigi.h:128
Int_t fHitIndex
Definition: PndEmcDigi.h:127
PndEmcMapper * emcMap
Double_t fTheta
Definition: PndEmcDigi.h:131
const PndEmcTciXtalMap & GetTciXtalMap() const
Int_t fPhiInd
Definition: PndEmcDigi.h:130
std::map< PndEmcTwoCoordIndex *, PndEmcXtal * > PndEmcTciXtalMap
Int_t fDetectorId
Definition: PndEmcDigi.h:126
static TVector3(*&)(const PndEmcXtal *) algPointer()
Definition: PndEmcDigi.h:154
Int_t fThetaInd
Definition: PndEmcDigi.h:129
static PndEmcStructure * Instance()
Double_t fPhi
Definition: PndEmcDigi.h:132
static PndEmcMapper * Instance()
Double_t energy
Definition: plot_dirc.C:15
PndEmcDigi::PndEmcDigi ( const PndEmcDigi other)

Definition at line 69 of file PndEmcDigi.cxx.

References algPointer, emcMap, fDetectorId, fPhi, fPhiInd, fTheta, fThetaInd, fWhere, PndEmcMapper::GetTCI(), PndEmcStructure::GetTciXtalMap(), PndEmcMapper::Instance(), PndEmcStructure::Instance(), PndEmcTwoCoordIndex::XCoord(), and PndEmcTwoCoordIndex::YCoord().

70 : FairTimeStamp(other), fEvtNo(other.fEvtNo),
71  fEnergy( other.fEnergy ),
72  fTrackId(other.fTrackId),
73  fDetectorId( other.fDetectorId),
74  fHitIndex( other.fHitIndex), fWhere(0,0,0),
75  fThetaInd(0), fPhiInd(0),fTheta(0),fPhi(0)
76 {
79  fThetaInd=tci->XCoord();
80  fPhiInd=tci->YCoord();
81 
83  PndEmcXtal* xtal = tciXtalMap.find(tci)->second;
84  fWhere = algPointer()(xtal);
85  fTheta = fWhere.Theta();
86  fPhi = fWhere.Phi();
87 }
Int_t fTrackId
Definition: PndEmcDigi.h:125
represents coordinates of one crystal
Definition: PndEmcXtal.h:36
stores crystal index coordinates (x,y) or (theta,phi)
PndEmcTwoCoordIndex * GetTCI(Int_t DetectorId)
Emc geometry mapper.
Definition: PndEmcMapper.h:22
Double_t fEnergy
Definition: PndEmcDigi.h:124
TVector3 fWhere
Definition: PndEmcDigi.h:128
Int_t fHitIndex
Definition: PndEmcDigi.h:127
PndEmcMapper * emcMap
Double_t fTheta
Definition: PndEmcDigi.h:131
const PndEmcTciXtalMap & GetTciXtalMap() const
Int_t fPhiInd
Definition: PndEmcDigi.h:130
Int_t fEvtNo
Definition: PndEmcDigi.h:118
std::map< PndEmcTwoCoordIndex *, PndEmcXtal * > PndEmcTciXtalMap
Int_t fDetectorId
Definition: PndEmcDigi.h:126
static TVector3(*&)(const PndEmcXtal *) algPointer()
Definition: PndEmcDigi.h:154
Int_t fThetaInd
Definition: PndEmcDigi.h:129
static PndEmcStructure * Instance()
Double_t fPhi
Definition: PndEmcDigi.h:132
static PndEmcMapper * Instance()
PndEmcDigi::~PndEmcDigi ( )
virtual

Destructor

Definition at line 47 of file PndEmcDigi.cxx.

47 {}

Member Function Documentation

void PndEmcDigi::AbsorbEnergy ( PndEmcDigi otherDigi)
virtual

Definition at line 118 of file PndEmcDigi.cxx.

References equal(), fEnergy, and GetEnergy().

Referenced by PndEmcClusterRemoveDuplCrys::Exec().

118  {
119  if(otherDigi.equal(this)) {
120  fEnergy += otherDigi.GetEnergy();
121  } else {
122  std::cerr << "-E- in PndEmcDigi::AbsorbEnergy Mismatch in DetectorId. Cannot absorb energy." << std::endl;
123  }
124 }
virtual Double_t GetEnergy() const
Definition: PndEmcDigi.cxx:296
Double_t fEnergy
Definition: PndEmcDigi.h:124
virtual bool equal(FairTimeStamp *data)
Definition: PndEmcDigi.h:69
PndEmcDigi::ClassDef ( PndEmcDigi  ,
 
)
private
TVector3 PndEmcDigi::depthPosition ( const PndEmcXtal xtal)
staticprivate

Definition at line 134 of file PndEmcDigi.cxx.

References PndEmcXtal::axisVector(), fPositionDepthPWO, fPositionDepthShashlyk, PndEmcXtal::frontCentre(), PndEmcTwoCoordIndex::Index(), PndEmcXtal::myIndex(), and pos.

Referenced by selectDigiPositionMethod().

135 {
136  //cout << "depth" << endl;
137 
138  TVector3 pos = xtal->frontCentre();
139  TVector3 norm = xtal->axisVector();
140  int module=xtal->myIndex()->Index()/100000000;
141 
142  if (module==5) //shahslyk
144  else
145  norm*=fPositionDepthPWO;
146 
147  pos += norm;
148 
149  return pos;
150 }
TVector3 pos
const PndEmcTwoCoordIndex * myIndex() const
Definition: PndEmcXtal.cxx:133
static double fPositionDepthPWO
Definition: PndEmcDigi.h:157
const TVector3 & frontCentre() const
Definition: PndEmcXtal.cxx:145
const TVector3 & axisVector() const
Definition: PndEmcXtal.cxx:157
static double fPositionDepthShashlyk
Definition: PndEmcDigi.h:158
PndEmcSharedDigi * PndEmcDigi::dynamic_cast_PndEmcSharedDigi ( )
virtual

Reimplemented in PndEmcSharedDigi.

Definition at line 346 of file PndEmcDigi.cxx.

347 {
348  return 0;
349 }
const PndEmcSharedDigi * PndEmcDigi::dynamic_cast_PndEmcSharedDigi ( ) const
virtual

Reimplemented in PndEmcSharedDigi.

Definition at line 352 of file PndEmcDigi.cxx.

353 {
354  return 0;
355 }
virtual bool PndEmcDigi::equal ( FairTimeStamp *  data)
inlinevirtual

Definition at line 69 of file PndEmcDigi.h.

References fDetectorId, and GetDetectorId().

Referenced by AbsorbEnergy().

69  {
70  PndEmcDigi* myDigi = dynamic_cast <PndEmcDigi*> (data);
71  if (myDigi != 0){
72  if (fDetectorId == myDigi->GetDetectorId())
73  return true;
74  }
75  return false;
76  }
represents the reconstructed hit of one emc crystal
Definition: PndEmcDigi.h:40
Int_t GetDetectorId() const
Definition: PndEmcDigi.h:97
Int_t fDetectorId
Definition: PndEmcDigi.h:126
Short_t PndEmcDigi::GetCopy ( ) const
inline

Definition at line 106 of file PndEmcDigi.h.

References fDetectorId.

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

106 { return ((fDetectorId/10000)%100);};
Int_t fDetectorId
Definition: PndEmcDigi.h:126
Short_t PndEmcDigi::GetCrystal ( ) const
inline

Definition at line 105 of file PndEmcDigi.h.

References fDetectorId.

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

105 { return (fDetectorId%10000);};
Int_t fDetectorId
Definition: PndEmcDigi.h:126
Int_t PndEmcDigi::GetDetectorId ( ) const
inline
Double_t PndEmcDigi::GetEnergy ( ) const
virtual
Int_t PndEmcDigi::GetHitIndex ( )
inline

Definition at line 110 of file PndEmcDigi.h.

References fHitIndex.

Referenced by PndEmcAnalysis::Exec().

110 {return fHitIndex;}
Int_t fHitIndex
Definition: PndEmcDigi.h:127
Short_t PndEmcDigi::GetModule ( ) const
inline
Double_t PndEmcDigi::GetPhi ( ) const
inline
Int_t PndEmcDigi::GetPhiInt ( ) const
inline

Definition at line 100 of file PndEmcDigi.h.

References fPhiInd.

Referenced by for(), PndEmc2DLocMaxFinder::isALocalMax(), PndEmcClusterProperties::LiloWhere(), and operator==().

100 {return fPhiInd;};
Int_t fPhiInd
Definition: PndEmcDigi.h:130
static Double_t PndEmcDigi::getPositionDepthPWO ( )
inlinestatic

Definition at line 117 of file PndEmcDigi.h.

References fPositionDepthPWO.

117 { return fPositionDepthPWO; };
static double fPositionDepthPWO
Definition: PndEmcDigi.h:157
static Double_t PndEmcDigi::getPositionDepthShashlyk ( )
inlinestatic

Definition at line 118 of file PndEmcDigi.h.

References fPositionDepthShashlyk.

118 { return fPositionDepthShashlyk; };
static double fPositionDepthShashlyk
Definition: PndEmcDigi.h:158
static Double_t PndEmcDigi::getRescaleFactor ( )
inlinestatic

Definition at line 116 of file PndEmcDigi.h.

References fRescaleFactor.

Referenced by PndEmcXClMoments::Init().

116 { return fRescaleFactor; };
static double fRescaleFactor
Definition: PndEmcDigi.h:156
Short_t PndEmcDigi::GetRow ( ) const
inline

Definition at line 104 of file PndEmcDigi.h.

References fDetectorId.

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

104 { return ((fDetectorId/1000000)%100);};
Int_t fDetectorId
Definition: PndEmcDigi.h:126
PndEmcTwoCoordIndex * PndEmcDigi::GetTCI ( ) const

Definition at line 216 of file PndEmcDigi.cxx.

References emcMap, fDetectorId, PndEmcMapper::GetTCI(), and PndEmcMapper::Instance().

Referenced by PndEmcExpClusterSplitter::Exec(), isNeighbour(), PndEmcClusterProperties::LiloWhere(), and PndEmcClusterDistances::RadialDistance().

217 {
219  PndEmcTwoCoordIndex* tci=emcMap->GetTCI(fDetectorId);
220  return tci;
221 };
stores crystal index coordinates (x,y) or (theta,phi)
PndEmcTwoCoordIndex * GetTCI(Int_t DetectorId)
Emc geometry mapper.
Definition: PndEmcMapper.h:22
PndEmcMapper * emcMap
Int_t fDetectorId
Definition: PndEmcDigi.h:126
static PndEmcMapper * Instance()
Double_t PndEmcDigi::GetTheta ( ) const
inline
Int_t PndEmcDigi::GetThetaInt ( ) const
inline

Definition at line 99 of file PndEmcDigi.h.

References fThetaInd.

Referenced by for(), PndEmc2DLocMaxFinder::isALocalMax(), PndEmcClusterProperties::LiloWhere(), and operator==().

99 {return fThetaInd;};
Int_t fThetaInd
Definition: PndEmcDigi.h:129
Int_t PndEmcDigi::GetTrackId ( ) const
inline

Definition at line 96 of file PndEmcDigi.h.

References fTrackId.

Referenced by PndEmcCluster::addDigi(), and PndEmcCluster::removeDigi().

96 { return fTrackId ;};
Int_t fTrackId
Definition: PndEmcDigi.h:125
Short_t PndEmcDigi::GetXPad ( ) const

Definition at line 223 of file PndEmcDigi.cxx.

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

Referenced by for().

223  {
224  // Return the X pad value for clusterization
225 
226  // Barrel EMC
227  if (GetModule()==1 || GetModule()==2)
228  return (GetCrystal()+(GetCopy()-1)*10);
229 
230  // BwEndCap and forward EMC
231  if ((GetModule()==4) || (GetModule()==5))
232  {
233  if (GetCopy()==1) { return -GetRow()+1;}
234  if (GetCopy()==2) { return -GetRow()+1; }
235  if (GetCopy()==3) { return GetRow();}
236  if (GetCopy()==4) { return GetRow();}
237  }
238 
239  // FwEndCap
240  if (GetModule()==3)
241  return -(GetCrystal()-36);//the minus sign before the paranthesis
242  //is introduced since the geometry of
243  //FwEndCap gets rotated by 180 deg
244  //around the y-axis in PndEmc.cxx;
245 
246  //this rotation was done in turn due to the way the geometry was
247  //defined in the geometry file of the forward end cap
248 
249  /*
250  if (GetModule()==3 && GetCrystal()==999 && GetRow()==999)
251  return GetCrystal();
252  */
253 
254  // Test EMC
255  if (GetModule()==6)
256  return GetRow();
257 
258  return -1000; // failure
259 }
Short_t GetCrystal() const
Definition: PndEmcDigi.h:105
Short_t GetCopy() const
Definition: PndEmcDigi.h:106
Short_t GetModule() const
Definition: PndEmcDigi.h:103
Short_t GetRow() const
Definition: PndEmcDigi.h:104
Short_t PndEmcDigi::GetYPad ( ) const

Definition at line 261 of file PndEmcDigi.cxx.

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

Referenced by for().

261  {
262  // Return the Y pad value for clusterization
263 
264  // Barrel EMC
265  if (GetModule()==1)
266  return (GetRow()+29);
267 
268  if (GetModule()==2)
269  return (-GetRow()+30);
270 
271  // BwEndCap and forward EMC
272  if ((GetModule()==4) || (GetModule()==5))
273  {
274  if (GetCopy()==1) { return GetCrystal(); }
275  if (GetCopy()==2) { return -GetCrystal() + 1; }
276  if (GetCopy()==3) { return -GetCrystal() + 1; }
277  if (GetCopy()==4) { return GetCrystal(); }
278  }
279 
280  // FwEndCap
281  if (GetModule()==3)
282  return (GetRow()- 37);
283 
284  /*
285  if (GetModule()==3 && GetCrystal()==999 && GetRow()==999)
286  return GetRow();
287  */
288 
289  // Test EMC
290  if (GetModule()==6)
291  return GetCrystal();
292 
293  return -1000; // failure
294 }
Short_t GetCrystal() const
Definition: PndEmcDigi.h:105
Short_t GetCopy() const
Definition: PndEmcDigi.h:106
Short_t GetModule() const
Definition: PndEmcDigi.h:103
Short_t GetRow() const
Definition: PndEmcDigi.h:104
void PndEmcDigi::InitDigiArrayTBD ( )
static

Definition at line 89 of file PndEmcDigi.cxx.

References fDigiArrayTBD.

Referenced by PndEmcCorrBump::Init(), and PndEmcWaveformToDigi::Init().

90 {
91  if (fDigiArrayTBD==NULL)
92  fDigiArrayTBD = new TClonesArray("PndEmcDigi");
93 }
static TClonesArray * fDigiArrayTBD
Definition: PndEmcDigi.h:52
bool PndEmcDigi::isNeighbour ( const PndEmcDigi theDigi) const

Definition at line 201 of file PndEmcDigi.cxx.

References GetTCI(), PndEmcMapper::Instance(), and PndEmcTwoCoordIndex::IsNeighbour().

Referenced by PndEmcClusterEnergySums::E25(), PndEmcClusterEnergySums::E9(), and PndEmcCluster::isInCluster().

202 {
203  PndEmcMapper::Instance(); //: unused variable?PndEmcMapper *emcMap= //[R.K.03/2017] unused variable
204  PndEmcTwoCoordIndex* tci=this->GetTCI();
205 
206  if ((theDigi->GetTCI()==0)||(tci==0)){
207  std::cout<<"TwoCoordIndex of digi is not defined"<<std::endl;
208  abort();
209  }
210 
211  if (tci->IsNeighbour(theDigi->GetTCI())) return true;
212 
213  return false;
214 }
stores crystal index coordinates (x,y) or (theta,phi)
bool IsNeighbour(PndEmcTwoCoordIndex *_tci)
static PndEmcMapper * Instance()
PndEmcTwoCoordIndex * GetTCI() const
Definition: PndEmcDigi.cxx:216
bool PndEmcDigi::operator!= ( const PndEmcDigi otherDigi) const
virtual

Definition at line 317 of file PndEmcDigi.cxx.

318 {
319  return ! ( *this == otherDigi );
320 }
bool PndEmcDigi::operator< ( const PndEmcDigi otherDigi) const
virtual

Definition at line 322 of file PndEmcDigi.cxx.

References fEnergy, fPhi, and fTheta.

323 {
324  if (fEnergy < otherDigi.fEnergy)
325  return true;
326  else if (fEnergy == otherDigi.fEnergy && fTheta< otherDigi.fTheta)
327  return true;
328  else if (fEnergy == otherDigi.fEnergy && fTheta == otherDigi.fTheta && fPhi < otherDigi.fPhi)
329  return true;
330 
331  return false;
332 }
Double_t fEnergy
Definition: PndEmcDigi.h:124
Double_t fTheta
Definition: PndEmcDigi.h:131
Double_t fPhi
Definition: PndEmcDigi.h:132
bool PndEmcDigi::operator== ( const PndEmcDigi otherDigi) const
virtual

Definition at line 303 of file PndEmcDigi.cxx.

References Double_t, GetEnergy(), GetPhiInt(), and GetThetaInt().

304 {
305  bool isEqual = false;
306 
307  // 2 EmcDigis are equal is their relative energy difference whithin the folloowing tolerance
308  Double_t energy_tolerance=1e-5;
309 
310  if ( this->GetThetaInt() == otherDigi.GetThetaInt() &&
311  this->GetPhiInt() == otherDigi.GetPhiInt() &&
312  ((this->GetEnergy() - otherDigi.GetEnergy())/this->GetEnergy()<energy_tolerance )) isEqual =true;
313 
314  return isEqual;
315 }
virtual Double_t GetEnergy() const
Definition: PndEmcDigi.cxx:296
Int_t GetThetaInt() const
Definition: PndEmcDigi.h:99
Double_t
Int_t GetPhiInt() const
Definition: PndEmcDigi.h:100
void PndEmcDigi::Print ( const Option_t *  opt = "") const
virtual

Output to screen

Definition at line 337 of file PndEmcDigi.cxx.

References fEnergy, fEvtNo, fTrackId, and GetDetectorId().

Referenced by PndEmcCorrBump::Exec(), and PndEmcXClMoments::Print().

337  {
338  cout << "EMC digi: cellid=" << GetDetectorId() << ", Energy=" << fEnergy<<", Time="<<GetTimeStamp()<<", Evt="<<fEvtNo;
339  if (fTrackId>0) cout << ", TrackID= " << fTrackId;
340  //cout<<endl;
341 // cout << ", x=" << GetX() << ", y=" << GetY() << endl << flush;
342 }
Int_t GetDetectorId() const
Definition: PndEmcDigi.h:97
Int_t fTrackId
Definition: PndEmcDigi.h:125
Double_t fEnergy
Definition: PndEmcDigi.h:124
Int_t fEvtNo
Definition: PndEmcDigi.h:118
void PndEmcDigi::selectDigiPositionMethod ( PositionMethod  alg,
double  positionDepthPWO = 0.,
double  positionDepthShahslyk = 0.,
double  rescaleFactor = 1. 
)
staticprivate

Definition at line 153 of file PndEmcDigi.cxx.

References algPointer, depth, depthPosition(), fPositionDepthPWO, fPositionDepthShashlyk, fRescaleFactor, surface, and surfacePosition().

Referenced by PndEmcFWEndcapDigi::Init(), PndEmcMakeDigi::Init(), PndEmcTmpWaveformToDigi::Init(), PndEmcWaveformToDigi::Init(), PndEmcWaveformToCalibratedDigi::Init(), and PndEmcMultiWaveformToCalibratedDigi::Init().

157 {
158 
159  TVector3 (*algorithm)( const PndEmcXtal* ) = 0;
160 
161  switch ( alg )
162  {
163  case surface:
164  algorithm = PndEmcDigi::surfacePosition;
165  fRescaleFactor = rescaleFactor;
166  fPositionDepthPWO = positionDepthPWO;
167  fPositionDepthShashlyk = positionDepthShashlyk;
168  break;
169 
170  case depth:
171  algorithm = PndEmcDigi::depthPosition;
172  fRescaleFactor = rescaleFactor;
173  fPositionDepthPWO = positionDepthPWO;
174  fPositionDepthShashlyk = positionDepthShashlyk;
175  break;
176 
177  default:
178  cout << "PndEmcDigi::selectDigiPositionMethod. "
179  << "Attempted to select unknown digi position method."
180  << endl;
181  }
182 
183  // Now actually set the pointer
184  algPointer() = algorithm;
185 }
static double fPositionDepthPWO
Definition: PndEmcDigi.h:157
static double fRescaleFactor
Definition: PndEmcDigi.h:156
represents coordinates of one crystal
Definition: PndEmcXtal.h:36
static TVector3 depthPosition(const PndEmcXtal *xtal)
Definition: PndEmcDigi.cxx:134
static double fPositionDepthShashlyk
Definition: PndEmcDigi.h:158
static TVector3 surfacePosition(const PndEmcXtal *xtal)
Definition: PndEmcDigi.cxx:128
static TVector3(*&)(const PndEmcXtal *) algPointer()
Definition: PndEmcDigi.h:154
void PndEmcDigi::SetDetectorId ( Int_t  id)

Definition at line 95 of file PndEmcDigi.cxx.

References algPointer, emcMap, fDetectorId, fPhi, fPhiInd, fTheta, fThetaInd, fWhere, PndEmcMapper::GetTCI(), PndEmcStructure::GetTciXtalMap(), PndEmcMapper::Instance(), PndEmcStructure::Instance(), PndEmcTwoCoordIndex::XCoord(), and PndEmcTwoCoordIndex::YCoord().

96 {
97 // PndEmcMapper assumed to instantiate first time with correct parameter before
99  PndEmcTwoCoordIndex* tci=emcMap->GetTCI(id);
100  fThetaInd=tci->XCoord();
101  fPhiInd=tci->YCoord();
102  fDetectorId=id;
103 
104  fThetaInd=tci->XCoord();
105  fPhiInd=tci->YCoord();
106 
108  PndEmcXtal* xtal = tciXtalMap.find(tci)->second;
109  fWhere = algPointer()(xtal);
110  fTheta = fWhere.Theta();
111  fPhi = fWhere.Phi();
112 
113 }
represents coordinates of one crystal
Definition: PndEmcXtal.h:36
stores crystal index coordinates (x,y) or (theta,phi)
PndEmcTwoCoordIndex * GetTCI(Int_t DetectorId)
Emc geometry mapper.
Definition: PndEmcMapper.h:22
TVector3 fWhere
Definition: PndEmcDigi.h:128
PndEmcMapper * emcMap
Double_t fTheta
Definition: PndEmcDigi.h:131
const PndEmcTciXtalMap & GetTciXtalMap() const
Int_t fPhiInd
Definition: PndEmcDigi.h:130
std::map< PndEmcTwoCoordIndex *, PndEmcXtal * > PndEmcTciXtalMap
Int_t fDetectorId
Definition: PndEmcDigi.h:126
static TVector3(*&)(const PndEmcXtal *) algPointer()
Definition: PndEmcDigi.h:154
Int_t fThetaInd
Definition: PndEmcDigi.h:129
static PndEmcStructure * Instance()
Double_t fPhi
Definition: PndEmcDigi.h:132
static PndEmcMapper * Instance()
void PndEmcDigi::SetEnergy ( Double32_t  energy)
inline

Modifiers

Definition at line 84 of file PndEmcDigi.h.

References energy, and fEnergy.

Referenced by PndEmcWaveformToDigi::Exec().

84 { fEnergy = energy ;};
Double_t fEnergy
Definition: PndEmcDigi.h:124
Double_t energy
Definition: plot_dirc.C:15
void PndEmcDigi::SetTrackId ( Int_t  id)
inline

Definition at line 85 of file PndEmcDigi.h.

References fTrackId.

85 { fTrackId = id ;};
Int_t fTrackId
Definition: PndEmcDigi.h:125
TVector3 PndEmcDigi::surfacePosition ( const PndEmcXtal xtal)
staticprivate

Definition at line 128 of file PndEmcDigi.cxx.

References PndEmcXtal::frontCentre().

Referenced by selectDigiPositionMethod().

129 {
130  return xtal->frontCentre();
131 }
const TVector3 & frontCentre() const
Definition: PndEmcXtal.cxx:145
const TVector3& PndEmcDigi::where ( ) const
inline

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream out,
PndEmcDigi digi 
)
friend

Definition at line 43 of file PndEmcDigi.h.

43  {
44  out << "PndEmc Digi in crystal: " << digi.GetDetectorId()
45  << " energy: " << digi.GetEnergy()
46  << " timestamp: "<<digi.GetTimeStamp();
47  return out;
48  }
virtual Double_t GetEnergy() const
Definition: PndEmcDigi.cxx:296
Int_t GetDetectorId() const
Definition: PndEmcDigi.h:97
TFile * out
Definition: reco_muo.C:20
friend class PndEmcCorrBump
friend

Definition at line 144 of file PndEmcDigi.h.

friend class PndEmcFWEndcapDigi
friend

Definition at line 141 of file PndEmcDigi.h.

friend class PndEmcMakeDigi
friend

Definition at line 143 of file PndEmcDigi.h.

Definition at line 140 of file PndEmcDigi.h.

friend class PndEmcTmpWaveformToDigi
friend

Definition at line 142 of file PndEmcDigi.h.

friend class PndEmcWaveformToCalibratedDigi
friend

Definition at line 139 of file PndEmcDigi.h.

friend class PndEmcWaveformToDigi
friend

Definition at line 137 of file PndEmcDigi.h.

friend class PndEmcWaveformToDigiFPGA
friend

Definition at line 138 of file PndEmcDigi.h.

Member Data Documentation

TVector3( *&)( const PndEmcXtal* ) PndEmcDigi::algPointer()
staticprivate

Definition at line 154 of file PndEmcDigi.h.

Referenced by PndEmcDigi(), selectDigiPositionMethod(), and SetDetectorId().

Int_t PndEmcDigi::fDetectorId
protected
TClonesArray * PndEmcDigi::fDigiArrayTBD = NULL
static

Definition at line 52 of file PndEmcDigi.h.

Referenced by PndEmcCorrBump::Exec(), PndEmcWaveformToDigi::Exec(), and InitDigiArrayTBD().

Double_t PndEmcDigi::fEnergy
protected
Int_t PndEmcDigi::fEvtNo
Int_t PndEmcDigi::fHitIndex
protected

Definition at line 127 of file PndEmcDigi.h.

Referenced by GetHitIndex().

Double_t PndEmcDigi::fPhi
protected

Definition at line 132 of file PndEmcDigi.h.

Referenced by GetPhi(), operator<(), PndEmcDigi(), and SetDetectorId().

Int_t PndEmcDigi::fPhiInd
protected

Definition at line 130 of file PndEmcDigi.h.

Referenced by GetPhiInt(), PndEmcDigi(), and SetDetectorId().

double PndEmcDigi::fPositionDepthPWO = 6.2
staticprivate

Definition at line 157 of file PndEmcDigi.h.

Referenced by depthPosition(), getPositionDepthPWO(), and selectDigiPositionMethod().

double PndEmcDigi::fPositionDepthShashlyk = 20.9
staticprivate

Definition at line 158 of file PndEmcDigi.h.

Referenced by depthPosition(), getPositionDepthShashlyk(), and selectDigiPositionMethod().

double PndEmcDigi::fRescaleFactor = 1.0
staticprivate

Definition at line 156 of file PndEmcDigi.h.

Referenced by getRescaleFactor(), and selectDigiPositionMethod().

Double_t PndEmcDigi::fTheta
protected

Definition at line 131 of file PndEmcDigi.h.

Referenced by GetTheta(), operator<(), PndEmcDigi(), and SetDetectorId().

Int_t PndEmcDigi::fThetaInd
protected

Definition at line 129 of file PndEmcDigi.h.

Referenced by GetThetaInt(), PndEmcDigi(), and SetDetectorId().

Int_t PndEmcDigi::fTrackId
protected

Definition at line 125 of file PndEmcDigi.h.

Referenced by GetTrackId(), Print(), and SetTrackId().

TVector3 PndEmcDigi::fWhere
protected

Definition at line 128 of file PndEmcDigi.h.

Referenced by PndEmcDigi(), SetDetectorId(), and where().


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