StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcPosition.cxx
1 //******************************************************************************
2 //
3 // StEmcPosition.cxx
4 //
5 // Authors: Marcia Maria de Moura
6 //
7 // Initial version: 2001/12/21
8 //
9 //******************************************************************************
10 
11 #include "StEmcPosition.h"
12 #include <math.h>
13 #include "SystemOfUnits.h"
14 #include "PhysicalConstants.h"
15 #include "StPhysicalHelixD.hh"
16 
17 #include "StMcEvent.hh"
18 #include "StMcEventTypes.hh"
19 #include "StMcEventMaker/StMcEventMaker.h"
20 #include "StEvent.h"
21 #include "StEventTypes.h"
22 #include "StEmcUtil/geometry/StEmcGeom.h"
23 
24 //StMuDstMaker:
25 #include "StMuDSTMaker/COMMON/StMuTrack.h"
26 
27 ClassImp(StEmcPosition)
28 
29 //------------------------------------------------------------------------------
30 StEmcPosition::StEmcPosition():TObject()
31 {
32  mGeom[0] = StEmcGeom::getEmcGeom("bemc");
33  mGeom[1] = StEmcGeom::getEmcGeom("bprs");
34  mGeom[2] = StEmcGeom::getEmcGeom("bsmde");
35  mGeom[3] = StEmcGeom::getEmcGeom("bsmdp");
36 }
37 //------------------------------------------------------------------------------
38 StEmcPosition::~StEmcPosition()
39 {
40 }
41 //------------------------------------------------------------------------------
42 Bool_t StEmcPosition::projTrack(StThreeVectorD* atFinal, StThreeVectorD* momentumAtFinal,
43  const StMuTrack* const track, double magField, double radius, int option) const
44 {
45  StThreeVectorD Zero(0,0,0);
46  *atFinal=Zero;
47  *momentumAtFinal=Zero;
48 
49  /* this was for StTrack
50  const StThreeVectorF& origin = track->geometry()->origin();
51  const StThreeVectorF& momentum = track->geometry()->momentum();
52  double charge = track->geometry()->charge();
53  StPhysicalHelixD helix(momentum, origin, magField*tesla, charge);
54  */
55  StPhysicalHelixD helix = track->outerHelix();
56  const StThreeVectorF momentum = track->momentum();
57  pairD pathLength = helix.pathLength(radius);
58  double charge = track->charge();
59 
60  double s,s1,s2;
61  s=0;
62  s1 = pathLength.first;
63  s2 = pathLength.second;
64 
65  Bool_t goProj;
66  goProj = kFALSE;
67 
68  if (finite(s1) == 0 && finite(s2) == 0) { return kFALSE;} // Track couldn't be projected!
69 
70  if (option == 1) // Selects positive path lenght to project track forwards along its helix relative to
71  // first point of track. The smaller solution is taken when both are positive
72  {
73  if (s1 >= 0 && s2 >= 0) {s = s1; goProj = kTRUE; }
74  if (s1 >= 0 && s2 < 0) { s = s1; goProj = kTRUE; }
75  if (s1 < 0 && s2 >= 0) { s = s2; goProj = kTRUE; }
76  }
77 
78  if (option == -1) // Selects negative path lenght to project track backwards along its helix relative to
79  // first point of track. The smaller absolute solution is taken when both are negative
80  {
81  if (s1 <= 0 && s2 <= 0) { s = s2; goProj = kTRUE; }
82  if (s1 <= 0 && s2 > 0) { s = s1; goProj = kTRUE; }
83  if (s1 > 0 && s2 <= 0) { s = s2; goProj = kTRUE; }
84  }
85 
86  if (goProj)
87  {
88  *atFinal = helix.at( s );
89  *momentumAtFinal = helix.momentumAt( s, magField*tesla );
90  if (charge == 0) *momentumAtFinal = momentum;
91  }
92  return goProj;
93 }
94 //------------------------------------------------------------------------------
95 Bool_t StEmcPosition::projTrack(StThreeVectorD* atFinal, StThreeVectorD* momentumAtFinal,
96  const StPhysicalHelixD* const helix, Double_t magField, Double_t radius, Int_t option) const
97 {
98  StThreeVectorD Zero(0,0,0);
99  *atFinal=Zero;
100  *momentumAtFinal=Zero;
101 
102  pairD pathLength = helix->pathLength(radius);
103 
104  Double_t s,s1,s2;
105  s=0;
106  s1 = pathLength.first;
107  s2 = pathLength.second;
108 
109  Bool_t goProj;
110  goProj = kFALSE;
111 
112  if (finite(s1) == 0 && finite(s2) == 0) { return kFALSE;} // Track couldn't be projected!
113 
114  if (option == 1) // Selects positive path lenght to project track forwards along its helix relative to
115  // first point of track. The smaller solution is taken when both are positive
116  {
117  if (s1 >= 0 && s2 >= 0) {s = s1; goProj = kTRUE; }
118  if (s1 >= 0 && s2 < 0) { s = s1; goProj = kTRUE; }
119  if (s1 < 0 && s2 >= 0) { s = s2; goProj = kTRUE; }
120  }
121 
122  if (option == -1) // Selects negative path lenght to project track backwards along its helix relative to
123  // first point of track. The smaller absolute solution is taken when both are negative
124  {
125  if (s1 <= 0 && s2 <= 0) { s = s2; goProj = kTRUE; }
126  if (s1 <= 0 && s2 > 0) { s = s1; goProj = kTRUE; }
127  if (s1 > 0 && s2 <= 0) { s = s2; goProj = kTRUE; }
128  }
129 
130  if (goProj)
131  {
132  *atFinal = helix->at( s );
133  *momentumAtFinal = helix->momentumAt( s, magField*tesla );
134  }
135  return goProj;
136 }
137 
138 //------------------------------------------------------------------------------
139 Bool_t StEmcPosition::projTrack(StThreeVectorD* atFinal, StThreeVectorD* momentumAtFinal,
140  const StTrack* const track, Double_t magField, Double_t radius, Int_t option) const
141 {
142  StThreeVectorD Zero(0,0,0);
143  *atFinal=Zero;
144  *momentumAtFinal=Zero;
145 
146  const StThreeVectorF& origin = track->outerGeometry()->origin();
147  const StThreeVectorF& momentum = track->outerGeometry()->momentum();
148  Double_t charge = track->outerGeometry()->charge();
149  StPhysicalHelixD helix(momentum, origin, magField*tesla, charge);
150  pairD pathLength = helix.pathLength(radius);
151 
152  Double_t s,s1,s2;
153  s=0;
154  s1 = pathLength.first;
155  s2 = pathLength.second;
156 
157  Bool_t goProj;
158  goProj = kFALSE;
159 
160  if (finite(s1) == 0 && finite(s2) == 0) { return kFALSE;} // Track couldn't be projected!
161 
162  if (option == 1) // Selects positive path lenght to project track forwards along its helix relative to
163  // first point of track. The smaller solution is taken when both are positive
164  {
165  if (s1 >= 0 && s2 >= 0) {s = s1; goProj = kTRUE; }
166  if (s1 >= 0 && s2 < 0) { s = s1; goProj = kTRUE; }
167  if (s1 < 0 && s2 >= 0) { s = s2; goProj = kTRUE; }
168  }
169 
170  if (option == -1) // Selects negative path lenght to project track backwards along its helix relative to
171  // first point of track. The smaller absolute solution is taken when both are negative
172  {
173  if (s1 <= 0 && s2 <= 0) { s = s2; goProj = kTRUE; }
174  if (s1 <= 0 && s2 > 0) { s = s1; goProj = kTRUE; }
175  if (s1 > 0 && s2 <= 0) { s = s2; goProj = kTRUE; }
176  }
177 
178  if (goProj)
179  {
180  *atFinal = helix.at( s );
181  *momentumAtFinal = helix.momentumAt( s, magField*tesla );
182  if (charge == 0) *momentumAtFinal = momentum;
183  }
184  return goProj;
185 }
186 //------------------------------------------------------------------------------
187 Bool_t StEmcPosition::projTrack(StThreeVectorD* atFinal, StThreeVectorD* momentumAtFinal,
188  const StMcTrack* const mcTrack, Double_t magField, Double_t radius, Int_t option) const
189 {
190  StThreeVectorD Zero(0,0,0);
191  *atFinal=Zero;
192  *momentumAtFinal=Zero;
193 
194  const StThreeVectorF& origin = mcTrack->startVertex()->position();
195  const StThreeVectorF& momentum = mcTrack->momentum();
196  Double_t charge = mcTrack->particleDefinition()->charge();
197  StPhysicalHelixD helix(momentum, origin, magField*tesla, charge);
198  pairD pathLength = helix.pathLength(radius);
199 
200  Double_t s,s1,s2;
201  s=0;
202  s1 = pathLength.first;
203  s2 = pathLength.second;
204 
205  Bool_t goProj;
206  goProj = kFALSE;
207 
208  if (finite(s1) == 0 && finite(s2) == 0) { return kFALSE;} // Track couldn't be projected!
209 
210  if (option == 1) // Selects positive path lenght to project track forwards along its helix relative to
211  // first point of track. The smaller solution is taken when both are positive
212  {
213  if (s1 >= 0 && s2 >= 0) { s = s1; goProj = kTRUE; }
214  if (s1 >= 0 && s2 < 0) { s = s1; goProj = kTRUE; }
215  if (s1 < 0 && s2 >= 0) { s = s2; goProj = kTRUE; }
216  }
217 
218  if (option == -1) // Selects negative path lenght to project track backwards along its helix relative to
219  // first point of track. The smaller absolute solution is taken when both are negative
220  {
221  if (s1 <= 0 && s2 <= 0) { s = s2; goProj = kTRUE; }
222  if (s1 <= 0 && s2 > 0) { s = s1; goProj = kTRUE; }
223  if (s1 > 0 && s2 <= 0) { s = s2; goProj = kTRUE; }
224  }
225 
226  if (goProj)
227  {
228  *atFinal = helix.at( s );
229  *momentumAtFinal = helix.momentumAt( s, magField*tesla );
230  if (charge == 0) *momentumAtFinal = momentum;
231  }
232  return goProj;
233 }
234 //------------------------------------------------------------------------------
235 Bool_t StEmcPosition::trackOnEmc( StThreeVectorD* position, StThreeVectorD* momentum, const StMuTrack* const track, double magField, double emcRadius ) const
236 {
237  // There's no check for primary or secondary tracks
238 
239  /* this was for StTrack
240  if (!track->geometry()) return kFALSE;
241  const StThreeVectorD& origin = track->geometry()->origin();
242  */
243  StPhysicalHelixD helix = track->outerHelix();
244  const StThreeVectorD& origin = helix.origin();
245 
246 
247  float xO = origin.x();
248  float yO = origin.y();
249  float distToOrigin = ::sqrt( ::pow(xO, 2) + ::pow(yO, 2) );
250  if ( distToOrigin < emcRadius )
251  {
252  // LOG_DEBUG << "inside emcRadius" << endm;
253  Bool_t projTrackOk = projTrack( position, momentum, track, magField, emcRadius );
254  if ( projTrackOk )
255  {
256  // LOG_DEBUG << "projTrackOk==1" << endm;
257  int m = 0, e = 0, s = 0;
258  float phi = position->phi();
259  float eta = position->pseudoRapidity();
260  // LOG_DEBUG << "eta,phi = "<<eta<<","<<phi<<endm;
261  // LOG_DEBUG << mGeom[0]->getBin(phi, eta, m, e, s) << endm;
262  // LOG_DEBUG <<"m:e:s = "<<m<<":"<<e<<":"<<s<<endm;
263  if ( mGeom[0]->getBin(phi, eta, m, e, s) == 0 && s != -1 ) return kTRUE;
264  }
265  }
266 
267  return kFALSE;
268 }
269 //------------------------------------------------------------------------------
271  const StTrack* const track, Double_t magField, Double_t emcRadius ) const
272 {
273  // There's no check for primary or secondary tracks
274 
275  if (!track->outerGeometry()) return kFALSE;
276 
277  const StThreeVectorD& origin = track->outerGeometry()->origin();
278  Float_t xO = origin.x();
279  Float_t yO = origin.y();
280  Float_t distToOrigin = ::sqrt( ::pow(xO, 2) + ::pow(yO, 2) );
281  if ( distToOrigin < emcRadius )
282  {
283  Bool_t projTrackOk = projTrack( position, momentum, track, magField, emcRadius );
284  if ( projTrackOk )
285  {
286  Int_t m = 0, e = 0, s = 0;
287  Float_t phi = position->phi();
288  Float_t eta = position->pseudoRapidity();
289  if ( mGeom[0]->getBin(phi, eta, m, e, s) == 0 && s != -1 ) return kTRUE;
290  }
291  }
292 
293  return kFALSE;
294 }
295 //------------------------------------------------------------------------------
297  const StMcTrack* const mcTrack, Double_t magField, Double_t emcRadius ) const
298 {
299  Float_t startVertexX = mcTrack->startVertex()->position().x();
300  Float_t startVertexY = mcTrack->startVertex()->position().y();
301  Float_t startVtxToOrigin = ::sqrt( ::pow( startVertexX, 2 ) + ::pow( startVertexY, 2 ) );
302 
303  if ( !mcTrack->stopVertex() && startVtxToOrigin < emcRadius )
304  {
305  Bool_t projTrackOk = projTrack( position, momentum, mcTrack, magField, emcRadius );
306  if ( projTrackOk )
307  {
308  Int_t m = 0, e = 0, s = 0;
309  Float_t phi = position->phi();
310  Float_t eta = position->pseudoRapidity();
311  if ( mGeom[0]->getBin(phi, eta, m, e, s) == 0 && s != -1 ) return kTRUE;
312  }
313  }
314 
315  // Checking if stopVertex exists
316  Float_t stopVtxToOrigin = -1;
317  if ( mcTrack->stopVertex() )
318  {
319  Float_t stopVertexX = mcTrack->stopVertex()->position().x();
320  Float_t stopVertexY = mcTrack->stopVertex()->position().y();
321  stopVtxToOrigin = ::sqrt( ::pow( stopVertexX,2 ) + ::pow(stopVertexY,2) );
322  }
323 
324  if (stopVtxToOrigin >= emcRadius)
325  {
326  Bool_t projTrackOk = projTrack( position, momentum, mcTrack, magField, emcRadius );
327  if ( projTrackOk )
328  {
329  Int_t m = 0, e = 0, s = 0;
330  Float_t phi = position->phi();
331  Float_t eta = position->pseudoRapidity();
332  if ( mGeom[0]->getBin(phi, eta, m, e, s) == 0 && s != -1 ) return kTRUE;
333  }
334  }
335 
336  return kFALSE;
337 }
338 //------------------------------------------------------------------------------
339 Int_t StEmcPosition::getTowerEtaPhi(const Double_t eta, const Double_t phi,
340  Float_t* towerEta, Float_t* towerPhi ) const
341 {
342  *towerEta = 0; *towerPhi = 0;
343  Float_t tempTowerEta = 0, tempTowerPhi = 0;
344  Int_t m = 0, e = 0, s = 0, towerId = -1;
345 
346  mGeom[0]->getBin(phi, eta, m, e, s);
347  if (m==0) return -1;
348  if (s<0) s=1;
349  mGeom[0]->getId(m, e, s, towerId);
350  mGeom[0]->getEtaPhi(towerId, tempTowerEta, tempTowerPhi);
351  *towerEta = tempTowerEta;
352  *towerPhi = tempTowerPhi;
353  return 0;
354 }
355 //------------------------------------------------------------------------------
356 Int_t StEmcPosition::getNextTowerId(const Float_t eta, const Float_t phi, const Int_t nTowersdEta, const Int_t nTowersdPhi) const
357 {
358  Int_t m,e,s;
359  mGeom[0]->getBin( phi, eta, m, e, s );
360  if(m>0 && m<=120)
361  {
362  if(s<0) s=1;
363  return getNextTowerId(m,e,s,nTowersdEta,nTowersdPhi);
364  }
365  return 0;
366 }
367 //------------------------------------------------------------------------------
368 Int_t StEmcPosition::getNextTowerId(const Int_t softId, const Int_t nTowersdEta, const Int_t nTowersdPhi) const
369 {
370  if(softId<1 || softId>4800) return 0;
371  Int_t m,e,s;
372  mGeom[0]->getBin(softId,m,e,s);
373  return getNextTowerId(m,e,s,nTowersdEta,nTowersdPhi);
374 }
375 //------------------------------------------------------------------------------
376 Int_t StEmcPosition::getNextTowerId(const Int_t m, const Int_t e, const Int_t s, const Int_t nTowersdEta, const Int_t nTowersdPhi) const
377 {
378  if(m<1 || m>120) return 0;
379  if(e<1 || e>20) return 0;
380  if(s<1 || s>2) return 0;
381  return getNextId(1,m,e,s,nTowersdEta,nTowersdPhi);
382 }
383 //------------------------------------------------------------------------------
384 Int_t StEmcPosition::getNextId(const Int_t det, const Int_t m, const Int_t e, const Int_t s, const Int_t nEta, const Int_t nPhi) const
385 {
386  if(det<1 || det>4) return 0;
387  if(m<1 || m>120) return 0;
388  if(s<1 || s>mGeom[det-1]->NSub()) return 0;
389  if(e<1 || e>mGeom[det-1]->NEta()) return 0;
390 
391  Int_t ef=e+nEta;
392  Int_t sf=s+nPhi;
393  Int_t mf=m;
394 
395  Int_t NE=mGeom[det-1]->NEta();
396  Int_t NS=mGeom[det-1]->NSub();
397 
398  if(abs(ef)>NE) return 0;
399 
400  do
401  {
402  if(sf<=0)
403  {
404  sf += NS;
405  mf--;
406  if(mf==60) mf = 120;
407  if(mf==0) mf = 60;
408  }
409  if(sf>NS)
410  {
411  sf -= NS;
412  mf++;
413  if(mf==61) mf = 1;
414  if(mf==121) mf = 61;
415  }
416  } while(sf<=0 || sf>NS);
417 
418  if(ef<=0)
419  {
420  ef = 1-ef;
421  sf = NS-sf+1;
422  if(ef>NE) return 0;
423  Int_t rid,etmp,stmp;
424  Float_t eta,phi;
425  mGeom[det-1]->getId(mf, ef, sf, rid);
426  mGeom[det-1]->getEtaPhi(rid, eta, phi);
427  mGeom[det-1]->getBin(phi,-eta,mf,etmp,stmp);
428  }
429 
430  Int_t rid;
431  if(mf<1 || mf>120) return 0;
432  if(ef<1 || ef>NE) return 0;
433  if(sf<1 || sf>NS) return 0;
434  mGeom[det-1]->getId(mf, ef, sf, rid);
435  return rid;
436 
437 }
438 //------------------------------------------------------------------------------
439 Int_t StEmcPosition::getNextId(const Int_t det, const Int_t softId, const Int_t nEta, const Int_t nPhi)const
440 {
441  if(det<1 || det>4) return 0;
442  Int_t m,e,s;
443  if(softId<1)return 0;
444  if((det == 1 || det == 2) && softId > 4800)return 0;
445  if((det == 3 || det == 4) && softId > 18000)return 0;
446  mGeom[det-1]->getBin(softId,m,e,s);
447  if(m>0 && m<=120)
448  {
449  if(s<0) s=1;
450  return getNextId(det,m,e,s,nEta,nPhi);
451  }
452  return 0;
453 }
454 //------------------------------------------------------------------------------
455 Float_t StEmcPosition::getDistTowerToTrack( Double_t trackEta, Double_t trackPhi,
456  Int_t nTowersdEta, Int_t nTowersdPhi ) const
457 
458 {
459  Int_t towerId = 0;
460  Float_t towerEta = 0, towerToTrackdEta = 0;
461  Float_t towerPhi = 0, towerToTrackdPhi = 0;
462  Float_t mdistTowerToTrack = 0;
463 
464  towerId = getNextTowerId( trackEta, trackPhi, nTowersdEta, nTowersdPhi );
465  if (towerId != 0)
466  {
467  // Getting eta and phi of neighbour tower
468  mGeom[0]->getEtaPhi(towerId, towerEta, towerPhi);
469  towerToTrackdEta = towerEta-trackEta;
470  towerToTrackdPhi = towerPhi-trackPhi;
471 
472  mdistTowerToTrack = ::sqrt( ::pow(towerToTrackdEta, 2) + ::pow(towerToTrackdPhi, 2) );
473 
474  return mdistTowerToTrack;
475  }
476  else
477  return -1;
478 }
479 //------------------------------------------------------------------------------
481 {
482  StThreeVectorF Zero(0,0,0);
483  if(TowerId<1 || TowerId>4800) return Zero;
484 
485  Float_t xTower,yTower,zTower;
486  StThreeVectorF position = vertex->position();
487  mGeom[0]->getXYZ(TowerId, xTower, yTower, zTower);
488  StThreeVectorF towerPosition(xTower, yTower, zTower);
489  StThreeVectorF PositionFromVertex = towerPosition - position;
490 
491  return PositionFromVertex;
492 }
493 //------------------------------------------------------------------------------
495 {
496  StThreeVectorF Zero(0,0,0);
497  if(TowerId<1 || TowerId>4800) return Zero;
498 
499  float xTower,yTower,zTower;
500  //StThreeVectorF position = vertex->position(); //modified to work with StMuDst instead of StEvent
501  mGeom[0]->getXYZ(TowerId, xTower, yTower, zTower);
502  StThreeVectorF towerPosition(xTower, yTower, zTower);
503  StThreeVectorF PositionFromVertex = towerPosition - position;
504 
505  return PositionFromVertex;
506 }
507 //------------------------------------------------------------------------------
509 {
510  StThreeVectorF Zero(0,0,0);
511  if(TowerId<1 || TowerId>4800) return Zero;
512 
513  Float_t xTower,yTower,zTower;
514  StThreeVectorF position = vertex->position();
515  mGeom[0]->getXYZ(TowerId, xTower, yTower, zTower);
516  StThreeVectorF towerPosition(xTower, yTower, zTower);
517  StThreeVectorF PositionFromVertex = towerPosition - position;
518 
519  return PositionFromVertex;
520 }
521 //------------------------------------------------------------------------------
522 Float_t StEmcPosition::getThetaFromVertex( const StVertex* const vertex,Int_t TowerId ) const
523 {
524  StThreeVectorF p=getPosFromVertex(vertex,TowerId );
525  return p.theta();
526 }
527 //------------------------------------------------------------------------------
528 Float_t StEmcPosition::getThetaFromVertex( const StThreeVectorF& vertex,int TowerId ) const
529 {
530  StThreeVectorF p=getPosFromVertex(vertex,TowerId );
531  return p.theta();
532 }
533 //------------------------------------------------------------------------------
534 Float_t StEmcPosition::getThetaFromVertex( const StMcVertex* const vertex,Int_t TowerId ) const
535 {
536  StThreeVectorF p=getPosFromVertex(vertex,TowerId );
537  return p.theta();
538 }
539 //------------------------------------------------------------------------------
540 Float_t StEmcPosition::getEtaFromVertex( const StVertex* const vertex,Int_t TowerId ) const
541 {
542  StThreeVectorF p=getPosFromVertex(vertex,TowerId );
543  return p.pseudoRapidity();
544 }
545 //------------------------------------------------------------------------------
546 Float_t StEmcPosition::getEtaFromVertex( const StThreeVectorF& vertex,int TowerId ) const
547 {
548  StThreeVectorF p=getPosFromVertex(vertex,TowerId );
549  return p.pseudoRapidity();
550 }
551 //------------------------------------------------------------------------------
552 Float_t StEmcPosition::getEtaFromVertex( const StMcVertex* const vertex,Int_t TowerId ) const
553 {
554  StThreeVectorF p=getPosFromVertex(vertex,TowerId );
555  return p.pseudoRapidity();
556 }
557 //------------------------------------------------------------------------------
558 Float_t StEmcPosition::getPhiFromVertex( const StVertex* const vertex,Int_t TowerId ) const
559 {
560  StThreeVectorF p=getPosFromVertex(vertex,TowerId );
561  return p.phi();
562 }
563 //------------------------------------------------------------------------------
564 Float_t StEmcPosition::getPhiFromVertex( const StThreeVectorF& vertex,int TowerId ) const
565 {
566  StThreeVectorF p=getPosFromVertex(vertex,TowerId );
567  return p.phi();
568 }
569 //------------------------------------------------------------------------------
570 Float_t StEmcPosition::getPhiFromVertex( const StMcVertex* const vertex,Int_t TowerId ) const
571 {
572  StThreeVectorF p=getPosFromVertex(vertex,TowerId );
573  return p.phi();
574 }
Float_t getThetaFromVertex(const StVertex *const vertex, Int_t TowerId) const
Return theta of the tower considering the collision vertex.
Bool_t trackOnEmc(StThreeVectorD *position, StThreeVectorD *momentum, const StTrack *const track, Double_t magField, Double_t emcRadius=225.405) const
Track projection utility.
Float_t getDistTowerToTrack(Double_t trackEta, Double_t trackPhi, Int_t nTowersdEta, Int_t nTowersdPhi) const
Return distance from track to center of one tower.
Int_t getNextId(Int_t det, Int_t m, Int_t e, Int_t s, Int_t nEta, Int_t nPhi) const
Return neighbor id (works for all detectors 1=bemc, 2=bprs, 3=bsmde, 4=bsmdp)
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Definition: StMcTrack.hh:144
pair< double, double > pathLength(double r) const
path length at given r (cylindrical r)
Definition: StHelix.cc:351
Short_t charge() const
Returns charge.
Definition: StMuTrack.h:255
Int_t getTowerEtaPhi(Double_t eta, Double_t phi, Float_t *towerEta, Float_t *towerPhi) const
Return tower eta/phi.
Int_t getNextTowerId(Float_t eta, Float_t phi, Int_t nTowersdEta, Int_t nTowersdPhi) const
Return neighbor tower id&#39;s.
const StThreeVector< double > & origin() const
-sign(q*B);
Definition: StHelix.hh:224
StThreeVectorF getPosFromVertex(const StVertex *const vertex, Int_t TowerId) const
Return Position from collision vertex.
const StThreeVectorF & momentum() const
Returns 3-momentum at dca to primary vertex.
Definition: StMuTrack.h:260
Float_t getEtaFromVertex(const StVertex *const vertex, Int_t TowerId) const
Return eta of the tower considering the collision vertex.
Float_t getPhiFromVertex(const StVertex *const vertex, Int_t TowerId) const
Return phi of the tower considering the collision vertex.
Int_t getBin(const Float_t phi, const Float_t eta, Int_t &m, Int_t &e, Int_t &s) const
Definition: StEmcGeom.h:321
Bool_t projTrack(StThreeVectorD *atFinal, StThreeVectorD *momentumAtFinal, const StTrack *const track, Double_t magField, Double_t radius=225.405, Int_t option=1) const
Track projection utility.
StPhysicalHelixD outerHelix() const
Returns outer helix (last measured point)
Definition: StMuTrack.cxx:412