4#include "CLHEP/Geometry/Point3D.h"
5#include "CLHEP/Geometry/Vector3D.h"
6#include "CLHEP/Matrix/SymMatrix.h"
7#include "CLHEP/Matrix/Vector.h"
8#include "GaudiKernel/IDataProviderSvc.h"
9#include "GaudiKernel/IInterface.h"
10#include "GaudiKernel/Kernel.h"
11#include "GaudiKernel/Service.h"
13#include "Identifier/MdcID.h"
14#include "MagneticFieldSvc/IBesMagFieldSvc.h"
15#include "McTruth/McParticle.h"
16#include "McTruth/MdcMcHit.h"
17#include "MdcGeomSvc/IMdcGeomSvc.h"
18#include "MdcRawEvent/MdcDigi.h"
19#include "MdcRecEvent/RecMdcTrack.h"
20#include "MdcUtilitySvc/IMdcUtilitySvc.h"
21#include "RawDataProviderSvc/IRawDataProviderSvc.h"
22#include "RawDataProviderSvc/MdcRawDataProvider.h"
23#include "TrackUtil/Helix.h"
30#ifndef ENABLE_BACKWARDS_COMPATIBILITY
35#ifndef ENABLE_BACKWARDS_COMPATIBILITY
43 MdcUtilitySvc(
const std::string& name, ISvcLocator* svcloc );
58 double doca(
int layer,
int cell,
const HepVector helix,
const HepSymMatrix errMat,
59 bool passCellRequired =
true,
bool doSag =
true )
const;
61 const HepVector helixBes,
const HepSymMatrix errMatBes,
62 bool passCellRequired =
true,
bool doSag =
true )
const;
63 double doca(
int layer,
int cell,
const MdcSWire* sWire,
const HepVector helixPat,
64 const HepSymMatrix errMatPat,
bool passCellRequired =
true )
const;
65 double docaPatPar(
int layer,
int cell,
const HepVector helixPat,
66 const HepSymMatrix errMatPat,
bool passCellRequired =
true,
67 bool doSag =
true )
const;
69 const HepVector helixBes,
const HepSymMatrix errMatBes,
70 bool passCellRequired =
true,
bool doSag =
true )
const;
71 double docaPatPar(
int layer,
int cell,
const MdcSWire* sWire,
const HepVector helixPat,
72 const HepSymMatrix errMatPat,
bool passCellRequired =
true )
const;
77 int& cellId_out )
const;
79 int& cellId_out )
const;
81 int& cellId_out )
const;
83 int& cellId_out )
const;
86 double dz,
double dphi,
double tanl )
const;
89 double probab(
const int& ndof,
const double& chisq )
const;
102 const std::map<
int, std::map<MdcDigi*, Event::MdcMcHit*>> mdcMCAssociation,
106 int trackIndex,
const std::vector<MdcDigi*> mdcDigiVecInput,
107 std::map<
int, std::map<MdcDigi*, Event::MdcMcHit*>>& mdcMCAssociation );
110 double Bz()
const {
return m_pIMF->getReferField() * 1000.; }
112 int myOuterWire[43][288][2];
113 int myInnerWire[43][288][2];
114 double myWirePhi[43][288];
115 double dPhi(
double phi1,
double phi2 );
HepGeom::Vector3D< double > HepVector3D
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER jdahep COMMON hepevt $ !serial number $ !number of particles $ !status code $ !particle ident KF $ !parent particles $ !childreen particles $ !four momentum
HepGeom::Point3D< double > HepPoint3D
std::vector< MdcDigi * > MdcDigiVec
HepGeom::Point3D< double > HepPoint3D
HepGeom::Vector3D< double > HepVector3D
MdcUtilitySvc(const std::string &name, ISvcLocator *svcloc)
HepVector besPar2PatPar(const HepVector &helixPar) const
bool cellTrackPassedByPhi(const HepVector helix, int layer, int &cellId_in, int &cellId_out) const
virtual StatusCode initialize()
HepSymMatrix patErr2BesErr(const HepSymMatrix &err) const
HepPoint3D Hel(HepPoint3D piv, double dr, double phi0, double Alpha_L, double kappa, double dz, double dphi, double tanl) const
MdcDigiVec getMdcDigiVec() const
HepSymMatrix besErr2PatErr(const HepSymMatrix &err) const
float getChargeOfMcParticle(const Event::McParticle *mcParticle)
void getMdcMCAssoiciation(int trackIndex, const std::vector< MdcDigi * > mdcDigiVecInput, std::map< int, std::map< MdcDigi *, Event::MdcMcHit * > > &mdcMCAssociation)
Get association of MdcDigi and MdcMcHit according to track id.
bool cellTrackPassedByPhiPatPar(const HepVector helix, int layer, int &cellId_in, int &cellId_out) const
HepVector patPar2BesPar(const HepVector &helixPar) const
void getHelixOfMcParticle(const Event::McParticle *mcParticle, Helix &helix)
virtual StatusCode finalize()
void getMomPosOfMcParticle(const Event::McParticle *mcParticle, HepVector3D &pos, HepVector3D &mom)
double probab(const int &ndof, const double &chisq) const
double doca(int layer, int cell, const HepVector helix, const HepSymMatrix errMat, bool passCellRequired=true, bool doSag=true) const
int nLayerTrackPassed(const HepVector helix) const
bool cellTrackPassed(const HepVector helix, int layer, int &cellId_in, int &cellId_out) const
void getMdcDigiOnMcParticle(int trackIndex, const std::map< int, std::map< MdcDigi *, Event::MdcMcHit * > > mdcMCAssociation, MdcDigiVec &mdcDigiInput, MdcDigiVec &mdcDigiAssociated)
double p_cms(HepVector helix, int runNo, double mass) const
double docaPatPar(int layer, int cell, const HepVector helixPat, const HepSymMatrix errMatPat, bool passCellRequired=true, bool doSag=true) const
HepPoint3D pointOnHelixPatPar(const HepVector helixPat, int lay, int innerOrOuter) const
HepPoint3D pointOnHelix(const HepVector helixPar, int lay, int innerOrOuter) const
bool cellTrackPassedPatPar(const HepVector helix, int layer, int &cellId_in, int &cellId_out) const