StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcPosition.h
1 //******************************************************************************
2 //
3 // StEmcPosition.h
4 //
5 // Authors: Marcia Maria de Moura
6 //
7 // Initial version: 2001/12/21
8 //
9 //******************************************************************************
10 
19 #ifndef StEmcPosition_H
20 #define StEmcPosition_H
21 
22 #include "TObject.h"
23 
24 #include "StarClassLibrary/StThreeVectorD.hh"
25 #include "StarClassLibrary/StThreeVectorF.hh"
26 #include "StPhysicalHelixD.hh"
27 
28 class StTrack;
29 class StMuTrack;
30 class StMcTrack;
31 class StEmcGeom;
32 class StVertex;
33 class StMcVertex;
34 
35 class StEmcPosition : public TObject
36 {
37  public:
38 
39  StEmcPosition();
40  virtual ~StEmcPosition();
41 
42  Bool_t projTrack(StThreeVectorD* atFinal,StThreeVectorD* momentumAtFinal,const StTrack* const track,Double_t magField,Double_t radius=225.405,Int_t option=1) const;
43  Bool_t projTrack(StThreeVectorD* atFinal,StThreeVectorD* momentumAtFinal,const StMuTrack* const track,Double_t magField,Double_t radius=225.405,Int_t option=1) const;
44  Bool_t projTrack(StThreeVectorD* atFinal,StThreeVectorD* momentumAtFinal,const StMcTrack* const mcTrack,Double_t magField,Double_t radius=225.405,Int_t option=1) const;
45  Bool_t projTrack(StThreeVectorD* atFinal,StThreeVectorD* momentumAtFinal,const StPhysicalHelixD* const helix,Double_t magField,Double_t radius=225.405,Int_t option=1) const;
46 
47  Bool_t trackOnEmc(StThreeVectorD* position,StThreeVectorD* momentum,const StTrack* const track,Double_t magField,Double_t emcRadius=225.405) const;
48  Bool_t trackOnEmc(StThreeVectorD* position,StThreeVectorD* momentum,const StMuTrack* const track,double magField,double emcRadius=225.405) const;
49  Bool_t trackOnEmc(StThreeVectorD* position,StThreeVectorD* momentum,const StMcTrack* const mcTrack,Double_t magField,Double_t emcRadius=225.405) const;
50 
51  Int_t getTowerEtaPhi(Double_t eta, Double_t phi, Float_t* towerEta, Float_t* towerPhi) const;
52 
53  Int_t getNextTowerId(Float_t eta, Float_t phi, Int_t nTowersdEta, Int_t nTowersdPhi) const;
54  Int_t getNextTowerId(Int_t softId, Int_t nTowersdEta, Int_t nTowersdPhi) const;
55  Int_t getNextTowerId(Int_t m, Int_t e, Int_t s, Int_t nTowersdEta, Int_t nTowersdPhi) const;
56  Int_t getNextId(Int_t det, Int_t m, Int_t e, Int_t s, Int_t nEta, Int_t nPhi) const;
57  Int_t getNextId(Int_t det, Int_t softId, Int_t nEta, Int_t nPhi)const;
58 
59  Float_t getDistTowerToTrack(Double_t trackEta, Double_t trackPhi, Int_t nTowersdEta, Int_t nTowersdPhi) const;
60 
61  StThreeVectorF getPosFromVertex(const StVertex* const vertex, Int_t TowerId) const;
62  StThreeVectorF getPosFromVertex(const StThreeVectorF& position, Int_t TowerId) const;
63  StThreeVectorF getPosFromVertex(const StMcVertex* const vertex, Int_t TowerId) const;
64  Float_t getThetaFromVertex(const StVertex* const vertex, Int_t TowerId) const;
65  Float_t getThetaFromVertex(const StThreeVectorF& vertex, Int_t TowerId) const;
66  Float_t getThetaFromVertex(const StMcVertex* const vertex, Int_t TowerId) const;
67  Float_t getEtaFromVertex(const StVertex* const vertex, Int_t TowerId) const;
68  Float_t getEtaFromVertex(const StThreeVectorF& vertex, Int_t TowerId) const;
69  Float_t getEtaFromVertex(const StMcVertex* const vertex, Int_t TowerId) const;
70  Float_t getPhiFromVertex(const StVertex* const vertex, Int_t TowerId) const;
71  Float_t getPhiFromVertex(const StThreeVectorF& vertex, Int_t TowerId) const;
72  Float_t getPhiFromVertex(const StMcVertex* const vertex, Int_t TowerId) const;
73 
74  protected:
75 
76  StEmcGeom* mGeom[4];
77 
78  ClassDef(StEmcPosition,2)
79 
80 };
81 #endif
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
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's.
StThreeVectorF getPosFromVertex(const StVertex *const vertex, Int_t TowerId) const
Return Position from collision vertex.
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.
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.