BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcUtilitySvc/MdcUtilitySvc/MdcUtilitySvc.h
Go to the documentation of this file.
1#ifndef MDCUTILITYSVC_H
2#define MDCUTILITYSVC_H
3
4#include "GaudiKernel/IInterface.h"
5#include "GaudiKernel/Kernel.h"
6#include "GaudiKernel/Service.h"
7#include "GaudiKernel/IDataProviderSvc.h"
8#include "CLHEP/Matrix/Vector.h"
9#include "CLHEP/Matrix/SymMatrix.h"
10
11#include "MdcRecEvent/RecMdcTrack.h"
12#include "MdcGeomSvc/MdcGeomSvc.h"
13#include "MagneticField/IMagneticFieldSvc.h"
14#include "MdcUtilitySvc/IMdcUtilitySvc.h"
15
16#include <vector>
17
18
19class MdcUtilitySvc: public Service, virtual public IMdcUtilitySvc{
20 public:
21 MdcUtilitySvc( const std::string& name, ISvcLocator* svcloc );
23
24 virtual StatusCode initialize();
25 virtual StatusCode finalize();
26 StatusCode queryInterface(const InterfaceID& riid, void** ppvUnknown);
27
28 int nLayerTrackPassed(const HepVector helix) const;
29 int nLayerTrackPassed(const double helix[5]) const;
30
31 HepVector patPar2BesPar(const HepVector& helixPar) const;
32 HepSymMatrix patErr2BesErr(const HepSymMatrix& err) const;
33 HepVector besPar2PatPar(const HepVector& helixPar) const;
34 HepSymMatrix besErr2PatErr(const HepSymMatrix& err) const;
35
36 double doca(int layer, int cell, const HepVector helix, const HepSymMatrix errMat, bool passCellRequired = true, bool doSag = true) const;
37 double doca(int layer, int cell, HepPoint3D eastP, HepPoint3D westP, const HepVector helixBes,const HepSymMatrix errMatBes, bool passCellRequired = true, bool doSag = true) const;
38 double doca(int layer, int cell, const MdcSWire* sWire, const HepVector helixPat, const HepSymMatrix errMatPat, bool passCellRequired = true) const;
39 double docaPatPar(int layer, int cell, const HepVector helixPat, const HepSymMatrix errMatPat, bool passCellRequired = true, bool doSag = true) const;
40 double docaPatPar(int layer, int cell, HepPoint3D eastP, HepPoint3D westP, const HepVector helixBes,const HepSymMatrix errMatBes, bool passCellRequired = true, bool doSag = true) const;
41 double docaPatPar(int layer, int cell, const MdcSWire* sWire, const HepVector helixPat, const HepSymMatrix errMatPat, bool passCellRequired = true) const;
42
43 HepPoint3D pointOnHelix(const HepVector helixPar, int lay, int innerOrOuter) const;
44 HepPoint3D pointOnHelixPatPar(const HepVector helixPat, int lay, int innerOrOuter) const;
45 bool cellTrackPassedByPhi(const HepVector helix,int layer, int& cellId_in, int& cellId_out) const;
46 bool cellTrackPassedByPhiPatPar(const HepVector helix,int layer, int& cellId_in, int& cellId_out) const;
47 bool cellTrackPassed(const HepVector helix,int layer, int& cellId_in, int& cellId_out) const;
48 bool cellTrackPassedPatPar(const HepVector helix,int layer,int& cellId_in,int& cellId_out) const;
49
50 HepPoint3D Hel(HepPoint3D piv, double dr,double phi0,double Alpha_L,double kappa,double dz,double dphi,double tanl) const;
51 double p_cms(HepVector helix, int runNo, double mass) const;
52 Hep3Vector momentum(const RecMdcTrack* trk) const;
53 double probab(const int& ndof, const double& chisq) const;
54
55 private:
56
57 double Bz() const { return m_pIMF->getReferField()*1000.; };
58
59 IMdcGeomSvc* m_mdcGeomSvc;
60 IMagneticFieldSvc* m_pIMF;
61 int m_debug;
62 bool m_doSag;
63
64};
65#endif /* MDCUTILITYSVC_H*/
**********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
double mass
int runNo
Definition: DQA_TO_DB.cxx:12
virtual double getReferField()=0
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
HepSymMatrix besErr2PatErr(const HepSymMatrix &err) const
bool cellTrackPassedByPhiPatPar(const HepVector helix, int layer, int &cellId_in, int &cellId_out) const
HepVector patPar2BesPar(const HepVector &helixPar) const
StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown)
virtual StatusCode finalize()
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
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