4 #include "StEvent/StMeasuredPoint.h"
5 #include "StarClassLibrary/StThreeVectorF.hh"
6 #include "StEmcUtil/others/emcInternalDef.h"
7 #include "StEmcUtil/geometry/StEmcGeom.h"
22 if(vertex) p1 = &vertex->position();
23 p2 = &point->position();
25 if(p1) vt = (*p2) - (*p1);
28 eta = vt.pseudoRapidity();
39 if(etaPhi(point,vertex, eta,phi))
return eta;
47 if(etaPhi(point,vertex, eta,phi))
return phi;
52 StEmcMath::detectorId(
const StDetectorId stId)
55 Int_t
id = stId - kBarrelEmcTowerIdentifier + 1;
56 if(id<BEMC || id> ESMDP)
return 0;
57 else return UInt_t(
id);
61 StEmcMath::detectorId(
const UInt_t
id)
64 StDetectorId stId = StDetectorId(
id + kBarrelEmcTowerIdentifier - 1);
65 if(stId<kBarrelEmcTowerIdentifier || stId >kEndcapSmdVStripIdentifier)
71 StEmcMath::getPhiPlusMinusPi(
const Double_t phi)
75 while(phiw >= M_PI) phiw -= 2.*M_PI;
76 while(phiw < -M_PI) phiw += 2.*M_PI;
80 TArrayD *StEmcMath::binForSmde(Bool_t kprint)
83 StEmcGeom* geom = StEmcGeom::getEmcGeom(3);
84 const Int_t neta = geom->NEta();
86 const Float_t *eb = geom->Eta();
87 TArrayD *xb =
new TArrayD(2*neta+1);
89 for(Int_t ik=0; ik<neta; ik++){
92 Float_t x1 = eb[ik], x2, xw;
101 printf(
" iw1 %i %f => iw2 %i %f => eta %f\n", iw1,(*xb)[iw1], iw2,(*xb)[iw2], eb[ik]);