35 #include "Riostream.h"
40 PndEmcDigi::PndEmcDigi():FairTimeStamp(0), fEvtNo(-1),fEnergy(0),fTrackId(-1),fDetectorId(-1),fHitIndex(-1),fWhere(0,0,0), fThetaInd(0), fPhiInd(0),fTheta(0),
fPhi(0)
50 PndEmcDigi::PndEmcDigi(Int_t trackid, Int_t
id, Float_t
energy, Float_t time, Int_t hitIndex):FairTimeStamp(time),fEnergy(energy),fTrackId(trackid),fDetectorId(id),fHitIndex(hitIndex),fWhere(0,0,0), fThetaInd(0), fPhiInd(0),fTheta(0),
fPhi(0)
58 PndEmcXtal* xtal = tciXtalMap.find(tci)->second;
62 SetLink(FairLink(-1, FairRootManager::Instance()->GetEntryNr(),
"EmcHit", hitIndex));
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)
83 PndEmcXtal* xtal = tciXtalMap.find(tci)->second;
108 PndEmcXtal* xtal = tciXtalMap.find(tci)->second;
119 if(otherDigi.
equal(
this)) {
122 std::cerr <<
"-E- in PndEmcDigi::AbsorbEnergy Mismatch in DetectorId. Cannot absorb energy." << std::endl;
154 double positionDepthPWO,
155 double positionDepthShashlyk,
156 double rescaleFactor)
159 TVector3 (*algorithm)(
const PndEmcXtal* ) = 0;
178 cout <<
"PndEmcDigi::selectDigiPositionMethod. "
179 <<
"Attempted to select unknown digi position method."
206 if ((theDigi->
GetTCI()==0)||(tci==0)){
207 std::cout<<
"TwoCoordIndex of digi is not defined"<<std::endl;
305 bool isEqual =
false;
319 return ! ( *
this == otherDigi );
static void selectDigiPositionMethod(PositionMethod, double positionDepthPWO=0., double positionDepthShahslyk=0., double rescaleFactor=1.)
static TClonesArray * fDigiArrayTBD
const PndEmcTwoCoordIndex * myIndex() const
virtual Double_t GetEnergy() const
represents the reconstructed hit of one emc crystal
virtual PndEmcSharedDigi * dynamic_cast_PndEmcSharedDigi()
virtual bool operator<(const PndEmcDigi &otherDigi) const
Int_t GetThetaInt() const
Int_t GetDetectorId() const
static double fPositionDepthPWO
static double fRescaleFactor
const TVector3 & frontCentre() const
Short_t GetCrystal() const
represents coordinates of one crystal
stores crystal index coordinates (x,y) or (theta,phi)
PndEmcTwoCoordIndex * GetTCI(Int_t DetectorId)
static TVector3 depthPosition(const PndEmcXtal *xtal)
static void InitDigiArrayTBD()
Short_t GetModule() const
const TVector3 & axisVector() const
used to share PndEmcDigis between bumps
const PndEmcTciXtalMap & GetTciXtalMap() const
virtual bool equal(FairTimeStamp *data)
bool IsNeighbour(PndEmcTwoCoordIndex *_tci)
void SetDetectorId(Int_t id)
static double fPositionDepthShashlyk
std::map< PndEmcTwoCoordIndex *, PndEmcXtal * > PndEmcTciXtalMap
virtual bool operator==(const PndEmcDigi &otherDigi) const
static TVector3 surfacePosition(const PndEmcXtal *xtal)
virtual bool operator!=(const PndEmcDigi &otherDigi) const
static TVector3(*&)(const PndEmcXtal *) algPointer()
virtual void Print(const Option_t *opt="") const
bool isNeighbour(const PndEmcDigi *theDigi) const
static PndEmcStructure * Instance()
static PndEmcMapper * Instance()
virtual void AbsorbEnergy(PndEmcDigi &otherDigi)
PndEmcTwoCoordIndex * GetTCI() const