ROOT logo
HYDRA - THE HADES ANALYSIS PACKAGE » (UNKNOWN) » HEDTransform

class HEDTransform: public TObject

Function Members (Methods)

public:
HEDTransform()
HEDTransform(const HEDTransform&)
~HEDTransform()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static Bool_tcalcEmcClusterPointLab(HEmcCluster* hit, HGeomVector& p)
static Bool_tcalcMdcGeantLayerPointLab(Int_t s, Int_t m, Int_t l, HGeomVector& p)
static Float_tcalcPhiToLab(Int_t sec)
static Bool_tcalcRichGeantPadplanePointLab(Int_t s, HGeomVector& p)
static Bool_tcalcRichLinePointLab(HRichHit* hit, HGeomVector& p1, HGeomVector& p2, HParticleCand* cand = 0)
static Bool_tcalcRichMirrorHit(const HGeomVector& p1, const HGeomVector& p2, HGeomVector& pout)
static Bool_tcalcRichPadPlaneToLab(Int_t sec, HGeomVector& p, HGeomTransform& trans)
static Bool_tcalcRichPadSector(HRichCal* cal, HGeomTransform& trans, Float_t* coord)
static TEveFrameBox*calcRichSectorFrame(Int_t sec, HGeomTransform& trans)
static Bool_tcalcRpcClustPointLab(HRpcCluster* hit, HGeomVector& p)
static Bool_tcalcRpcGeantPointLab(Int_t s, HGeomVector& p)
static Bool_tcalcSegKickPlanePointLab(HMdcSeg* seg, HGeomVector& p)
static Bool_tcalcSegPointsLab(HMdcSeg* seg, HGeomVector& p1, HGeomVector& p2)
static Bool_tcalcShowerGeantPointLab(Int_t s, Int_t m, HGeomVector& p)
static Bool_tcalcShowerHitPointLab(HShowerHit* hit, HGeomVector& p)
static Bool_tcalcTofGeantPointLab(Int_t s, Int_t m, Int_t c, HGeomVector& p)
static Bool_tcalcTofHitPointLab(HTofHit* hit, HGeomVector& p)
static Bool_tcalcVertexPoint(HGeomVector& p)
static Bool_tcalcWallCell(HWallHit* hit, Float_t* coord)
static TEveFrameBox*calcWallFrame()
static Bool_tcalcWallGeantPointLab(Int_t c, HGeomVector& p)
static Bool_tcalcWallHitPointLab(HWallHit* hit, HGeomVector& p)
static Bool_tcalcWirePointsLab(Int_t s, Int_t m, Int_t l, Int_t c, HGeomVector& p1, HGeomVector& p2)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
static TEveTrack*createKineParticle(HGeantKine*, TEveTrackPropagator*)
static TEveTrack*createParticle(Int_t pid, Double_t vx, Double_t vy, Double_t vz, Double_t px, Double_t py, Double_t pz, TEveTrackPropagator* prop)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
static TGeoSphere*getRichMirror()
static HGeomTransform*getRichMirrorTrans()
static HGeomTransform*getRichSecTrans()
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
static Bool_tisEmc()
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
static Bool_tisNewRich()
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
HEDTransform&operator=(const HEDTransform&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidsetIsEmc(Bool_t is = kTRUE)
static voidsetIsNewRich(Bool_t newrich = kTRUE)
static voidTObject::SetObjectStat(Bool_t stat)
static voidsetRichMirror(TGeoSphere* mirr)
static voidsetRichMirrorTrans(Double_t x, Double_t y, Double_t z, Double_t rot1, Double_t rot2, Double_t rot3)
static voidsetRichSecTrans(Double_t x, Double_t y, Double_t z, Double_t rot1, Double_t rot2, Double_t rot3)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

private:
static Bool_tfisEmc
static Bool_tfisNewRich
static TGeoSphere*richMirror
static HGeomTransform*richMirrorTrans
static HGeomTransform*richSecTrans

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Float_t calcPhiToLab(Int_t sec)
 returns the lower phi bound of the sector
 in LAB [Deg].
void setRichSecTrans(Double_t x, Double_t y, Double_t z, Double_t rot1, Double_t rot2, Double_t rot3)
 offset xyz + rotation in deg
void setRichMirrorTrans(Double_t x, Double_t y, Double_t z, Double_t rot1, Double_t rot2, Double_t rot3)
 offset xyz + rotation in deg
HGeomTransform* getRichSecTrans()
 get Rich sector trans. If the trans has not been initialized
 before a default transformation of -20 deg theta rotation
 will be set.
HGeomTransform* getRichMirrorTrans()
 get Rich Mirror trans. If the trans has not been initialized
 before a default transformation 0 will be set.
Bool_t calcSegPointsLab(HMdcSeg* seg, HGeomVector& p1, HGeomVector& p2)
 takes HMdcSeg object and calculates hits points on both
 modules in Lab cordinates (in cm !)
Bool_t calcWirePointsLab(Int_t s, Int_t m, Int_t l, Int_t c, HGeomVector& p1, HGeomVector& p2)
 calculates end points of a wire in Lab cordinates (in cm !)
Bool_t calcSegKickPlanePointLab(HMdcSeg* seg, HGeomVector& p)
 takes HMdcSeg object and calculates hit point on
 kickplane in Lab cordinates (in cm !)
Bool_t calcWallHitPointLab(HWallHit* hit, HGeomVector& p)
 calc WALL hit point in LAB ccordinate sys (cm!)
Bool_t calcTofHitPointLab(HTofHit* hit, HGeomVector& p)
 calc TOF hit point in LAB ccordinate sys (cm!)
Bool_t calcShowerHitPointLab(HShowerHit* hit, HGeomVector& p)
 calc SHOWER hit point in LAB ccordinate sys (cm!)
Bool_t calcEmcClusterPointLab(HEmcCluster* hit, HGeomVector& p)
 calc EMC Cluster point in LAB ccordinate sys (cm!)
Bool_t calcRpcClustPointLab(HRpcCluster* hit, HGeomVector& p)
 calc RPC cluster point in LAB ccordinate sys (cm!)
Bool_t calcRichGeantPadplanePointLab(Int_t s, HGeomVector& p)
 calc RICH geant point (on Pad plane) in LAB ccordinate sys (cm!)
Bool_t calcMdcGeantLayerPointLab(Int_t s, Int_t m, Int_t l, HGeomVector& p)
 calculates points on MDC layer to Lab cordinates (in cm !)
Bool_t calcWallGeantPointLab(Int_t c, HGeomVector& p)
 calc WALL geant point (Module system) in LAB ccordinate sys (cm!)
Bool_t calcTofGeantPointLab(Int_t s, Int_t m, Int_t c, HGeomVector& p)
 calc RPC geant point (Module system) in LAB ccordinate sys (cm!)
Bool_t calcShowerGeantPointLab(Int_t s, Int_t m, HGeomVector& p)
 calc SHOWER geant point (Module system) in LAB ccordinate sys (cm!)
Bool_t calcRpcGeantPointLab(Int_t s, HGeomVector& p)
 calc RPC geant point (Module system) in LAB ccordinate sys (cm!)
Bool_t calcVertexPoint(HGeomVector& p)
 calc vertex point in LAB coordinate sys (cm!)
Bool_t calcRichLinePointLab(HRichHit* hit, HGeomVector& p1, HGeomVector& p2, HParticleCand* cand = 0)
 calculates Line from event vertex to MDCI
 with theta, phi from richhit. The points
 of the line are in LAB coordiante sys (cm!)
TEveFrameBox* calcRichSectorFrame(Int_t sec, HGeomTransform& trans)
 calc the RICH frame of sector sec in LAB coordinate sys (cm!)
 transformation trans provides the theta rotation and offset to
 go to sector system. Phi rotation by sector gives LAB sys.
TEveFrameBox* calcWallFrame()
 calc the WALL frame in LAB coordinate sys (cm!)
Bool_t calcWallCell(HWallHit* hit,Float_t* coord /* [12], xyz 4 corners*/)
Bool_t calcRichPadPlaneToLab(Int_t sec, HGeomVector& p, HGeomTransform& trans)
 calc space coordinates of a RichPad in LAB coordinate sys
 transformation trans provides the theta rotation and offset to
 go to sector system. Phi rotation by sector gives LAB sys.
Bool_t calcRichPadSector(HRichCal* cal, HGeomTransform& trans, Float_t* coord /* [12], xyz 4 corners*/)
 calc space coordinates of a RichPad in LAB coordinate sys (!cm)
 transformation trans provides the theta rotation and offset to
 go to sector system. Phi rotation by sector gives LAB sys.
Bool_t calcRichMirrorHit(const HGeomVector& p1, const HGeomVector& p2, HGeomVector& pout)
 calculates hit point of a line (represented by p1,p2, LAB [cm])
 with the RICH mirror. Result is returned in pout (LAB [cm])

 To calculate a line-sphere intersection  we need:
    * A ray with a known point of origin offset, and
      direction vector dir.
    * a sphere with a known centre at a point c and a
      known radius r
 Given the above mentioned sphere, a point p lies on the surface
 of the sphere if
 (p-c)*(p-c) = r^2
 Given a line with a point of origin offset, and a direction vector dir:
 line(t) = offset + t*dir  t > 0
 setting both equal
 (offset + t*dir - c)*(offset + t*dir - c) = r^2
 (dir*dir)*t^2 + 2*(offset-c)*dir*t + (offset-c)*(offset-c) - r^2 = 0
  == > At2 + Bt + C = 0
 where
   A = dir*dir
   B = 2(offset-c)*dir
   C =  (offset-c)*(offset-c) - r^2
 solve using quadratic formular
 no positive real root mean no intersection

 Simplification:
 If a sphere is centred at origin, a point p lies on a sphere
 of radius r2 if
 p * p = r^2
 we can find the t at which the (transformed) line
 (shifted by center vector c) intersects the sphere by
 (offset1 + t*dir) * (offset1 + t*dir) = r^2
 quadratic form :
 At2 + Bt + C = 0
 which now has coefficients:
    A = dir*dir
    B = 2(dir*offset1)
    C = offset1*offset1 - r^2

 There are two possible solutions to the quadratic equation:
 t_0 = (-B -\sqrt(B^2 - 4AC)) / 2A
 t_1 = (-B +\sqrt(B^2 - 4AC)) / 2A

 if the discriminant is negative, i.e. (B2 - 4AC) < 0,
 line has missed the sphere.
 To avoid poor numeric precision when B ~ \sqrt(B^2 - 4AC)
 t0 and t1 can be rewritten:
 t_0 = q/A
 t_1 = C/q
 where
 q = (-B + \sqrt(B^2 - 4AC)) / 2       B < 0
     (-B - \sqrt(B^2 - 4AC)) / 2       otherwise.

 The calculated hit point has to shifted back finally
TEveTrack* createParticle(Int_t pid, Double_t vx, Double_t vy, Double_t vz, Double_t px, Double_t py, Double_t pz, TEveTrackPropagator* prop)
TEveTrack* createKineParticle(HGeantKine* , TEveTrackPropagator* )
void setIsNewRich(Bool_t newrich = kTRUE)
{ fisNewRich = newrich;}
Bool_t isNewRich()
{ return fisNewRich;}
void setIsEmc(Bool_t is = kTRUE)
{ fisEmc = is;}
Bool_t isEmc()
{ return fisEmc;}
void setRichMirror(TGeoSphere* mirr)
{richMirror = mirr;}
TGeoSphere* getRichMirror()
{ return richMirror;}