//////////////////////////////////////////////////////////////////// // // File: HepgVariables.cc // Authors: Abe DeBenedetti // Description: High level analysis hepg variables defined as functions // Created: 4/17/2002 // Note: I feel doing this is very silly // Revision History: none so far // //////////////////////////////////////////////////////////////////// #include "HighLevelObjects/HepgVariables.hh" namespace HepgVariables { // PDGCode Int_t hepgPDGCode (const HEPG_StorableBank::particleIter& hepgParticle) { return hepgParticle.idhep(); } // Status Int_t hepgStatus (const HEPG_StorableBank::particleIter& hepgParticle) { return hepgParticle.istdhep(); } // Mother Int_t hepgMother (const HEPG_StorableBank::particleIter& hepgParticle,Int_t mother) { if (mother==2) return hepgParticle.jmo2hep()-1; else return hepgParticle.jmo1hep()-1; } // Daughter Int_t hepgDaughter (const HEPG_StorableBank::particleIter& hepgParticle,Int_t daughter) { if (daughter==2) return hepgParticle.jda2hep()-1; else return hepgParticle.jda1hep()-1; } // Px Float_t hepgPx(const HEPG_StorableBank::particleIter& hepgParticle) { return hepgParticle.Px(); } // Py Float_t hepgPy(const HEPG_StorableBank::particleIter& hepgParticle) { return hepgParticle.Py(); } // Pz Float_t hepgPz(const HEPG_StorableBank::particleIter& hepgParticle) { return hepgParticle.Pz(); } // E Float_t hepgE(const HEPG_StorableBank::particleIter& hepgParticle) { return hepgParticle.E(); } // Vx Float_t hepgVx(const HEPG_StorableBank::particleIter& hepgParticle) { return hepgParticle.Vx(); } // Vy Float_t hepgVy(const HEPG_StorableBank::particleIter& hepgParticle) { return hepgParticle.Vy(); } // Vz Float_t hepgVz(const HEPG_StorableBank::particleIter& hepgParticle) { return hepgParticle.Vz(); } // Vt Float_t hepgVt(const HEPG_StorableBank::particleIter& hepgParticle) { return hepgParticle.Vt(); } } // end of name space bracket