Status of Analysis Software Kanglin He
Outline Physics Tools Project Compose Tools Particle ID Analysis Event Data Model (BParticle Project) Dst Event Data Model Global Link and Event Assembly Analysis Event Data Model Physics Event Data Model Event Tag Project Physics Performance Check Next Plan
Compose Tools Telesis (TKinematicFit) Part of BESII telesis package, by SDU Klams(BKlamsVTX) BESII klams0 program, by B.J. Liu VertexFit: new stuff, by K.L He VertexFit SecondVertexFit KinematicFit
TKinematicFit #include "Telesis/TKinematicFit.h" TKinematicFit* kmfit = TKinematicFit::instance(); DstMdcTrack *pipTrk=xxx; DstMdcTrack *pimTrk = xxx; DstEmcTrack *g1Trk = xxx; DstEmcTrack *g2Trk = xxx; kmfit->init(ecms); kmfit->AddTrack(1, pipTrk, mpi, 0); kmfit->AddTrack(2, pimTrk, mpi, 0); kmfit->AddTrack(3, g1Trk, 0.0, 0); kmfit->AddTrack(4, g2Trk, 0.0, 0); kmfit->AddResonance(1, 0.135, 3, 4); If(kmfit->fit()) { HepLorentzVector ppip = kmfit->pfit(1); HepLorentzVector ppim = kmfit->pfit(2); HepLorentzVector ppi0 = kmfit->pfit(3) + kmfit->pfit(4); // user code, fill histogram/ntuple } // see Analysis/Physics/RhopiAlg/RhopiAlg for detail
BKlamsVTX See Liu Beijiang’s talk and Analysis/Physics/KlamsTestAlg for detail
VertexFit and KinematicFit Formulas(adopt from Paul Avery’s Lessons) WTrackParameter VertexParameter KinematicConstraints VertexConstraints BuildVirtualParticle SecondVertexFit
Formulas for Kinematic Fitting
Formulas for Kinematic Fitting (continue)
Formulas for Vertex Fitting
WTrackParameter and VertexParameter HepLorentzVector (px, py, pz, E) HepPoint3D (x, y, z) HepSymMatrix Ew HepPoint3D (vx, vy, vz) HepSymMatrix Ex
AddTrack Utility // event data model dependent void AddTrack(const int number, const double mass, const DstMdcTrack *trk); void AddTrack(const int number, const double mass, const DstMdcKalTrack *trk); void AddTrack(const int number, const double mass, const DstEmcTrack *trk); // event data model independent void AddTrack(const int number, const WTrackParameter wtrk);
Kinematic Constraints Invariant mass constraints AddResonance(number, mass, n1, n2,...) Total energy constraints AddTotalEnergy(number, energy, n1, n2, …) Total Momentum constraints AddTotalMomentum(number, ptot, n1, n2, …) Total 3-momentum constraints AddThreeMomentum(number, Hep3Vector p3, n1, n2, …) Total 4-momentum constraints AddFourMomentum(number, HepLorentzVector p4, n1, n2, …) AddFourMomentum(number, etot, n1, n2, …) Equal mass constraints Not well designed
Vertex Constraints Vertex constraint to a fixed position Beam Fit Vertex constraint to an unknown position SecondVertex Find Beam position General Vertex fit
Swimming after VertexFit
Build Virtual Particle Virtual Particle from KinematicFit Pi0, eta, … Virtual Particle from VertexFit Ks, Λ, … Can be treated as a normal particle in further kinematic/Vertex fit BuildVirtualParticle(number) in KinematicFit / VertexFit
SecondVertexFit
SecondVertexFit
How to use compose tools TKinematicFit *kmfit=TKinematicFit::instance(); VertexFit *vtxfit=VertexFit::instance(); SecondVertexFit *vtxfit = SecondVertexFit::instance(); KinematicFit *kmfit=KinematicFit::instance(); kmfit->init(); // Track and constraints if(kmfit->Fit()) {//extract kinematic fit information;} vtxfit->init(); // Track and constraints if(vtxfit->Fit()) {// extract (Second)VertexFit information;}
Particle ID DedxPID: dE/dx info Ready now, correction was made Tof1PID: inner barrel TOF Ready now, correction was made Tof2PID: outer barrel TOF Ready now, correction was made TofEPID: Endcap TOF Not readdy now, due to reconstruction TofQPID: Q of Barrel TOF Not ready now, need detail study EmcPID: energy deposit in EMC Not ready now, Wang Liangliang is working at ParticleID Combine the above info MuonID Develop by PKU ParticleIDBase For developer only
ParticleIDBase class (I) common interface public: virtual bool IsPidInfoValid() = 0; virtual double chi(int n) const = 0; virtual double prob(int n) const = 0; virtual int ndof() const = 0; DstTrkList* PidTrk() const {return m_trk;} protected: // PID calculation routines(include PID correction) virtual int particleIDCalculation() = 0;
Sub-PidSys class design class Tof1PID : public ParticleIDBase { public: // constructor & desconstructor Tof1PID(DstTrkList *dstTrk, double chi=4); ~Tof1PID(){;} bool IsPidInfoValid() {return (m_ndof > 0); } double chi(int n) const {return m_chi[n];} double prob(int n) const {return m_prob[n];} int ndof() const {return m_ndof;} protected: int particleIDCalculation(); double offsetTof1(int n, int cntr, double ptrk, double ztof, double ph); double sigmaTof1(int n, int cntr, double ptrk, double ztof, double ph); private: xxxxx; }
How to use ParticleID // Be careful to avoid memory leakage ParticleID *pid = 0; for (int i = 0; i < ncharg; i++) { DstTrkList *dstTrk = *(dstTrkListCol->begin() + i); if(pid) delete pid; pid = new ParticleID(dstTrk); pid->usePidSys(pid->useDedx() | pid->useTof1() | pid->useTof2() )|; // pid->usePidSys(pid->useDedx()); // pid->usePidSys(pid->useTof1()); // pid->usePidSys(pid->useTof2()); pid->identify(pid->onlyPion() | pid->onlyKaon()); // pid->identify(pid->onlyPion()); // pid->identify(pid->onlyKaon()); pid->calculate(); if(!(pid->IsPidInfoValid())) continue; // user's selections } if(pid) delete pid;
Analysis Event Data Model Dst Event Data Model From Reconstruction Dst Track List Global Link and Dst Event Assembly Analysis Event Data Model BParticle Project Physics Event Data Model Physics Group
TrackList(sub-detector level) DstMdcTrack DstMdcKalTrack DstDedx DstTofTrack DstEmcTrack DstMucTrack DstExtTrack Event/DstEvent subdirctory
TrackList (track level) int trackID() const {return m_trackID;} bool IsMdcTrkValid() {return (m_originMdcTrack != 0);} bool IsMdcKalTrkValid() {return (m_originMdcKalTrack != 0);} bool IsDedxValid() {return (m_originDedx != 0);} bool IsTofTrkValid() {return (m_originTofTrack != 0);} bool IsEmcTrkValid() {return (m_originEmcTrack != 0);} bool IsMucTrkValid() {return (m_originMucTrack != 0);} bool IsExtTrkValid() {return (m_originExtTrack != 0);} DstMdcTrack* MdcTrk() {return m_originMdcTrack;} DstMdcKalTrack* MdcKalTrk() {return m_originMdcKalTrack;} DstDedx* DedxTrk() {return m_originDedx;} DstTofTrack* TofTrk() {return m_originTofTrack;} DstEmcTrack* EmcTrk() {return m_originEmcTrack;} DstMucTrack* MucTrk() {return m_originMucTrack;} DstExtTrack* ExtTrk() {return m_originExtTrack ;}
How to access Dst Event Data In analysis source code: #include “Event/DstTrkList.h” SmartDataPtr dstCol ( eventSvc(), EventModel::Dst::DstTrackListCol) // To get Energy deposit in Emc DstTrkListCol::iterater itTrk = dstCol->begin() For(; itTrk end(); itTrk++) { if((*itTrk)->IsEmcTrkValid()) { DstEmcTrack *emcTrk = (*itTrk)->EmcTrk(); double energy = emcTrk->energy(); // piece of analysis code, fill histogram/ntuple } In analysis job option file: #include “$DSTEVENTASSEMBLYALGROOT/jobOptions_DstEventAssembly.txt”
BParticle Project Write Particle (Charged tracks, neutrals, Vertice and composed particle) information into TDS. Analysis Algorithm can access these info. May develop to a common standard platform, make Analysis job easily and friendly Allow Physics groups to design Physics Data model easily
Contents BParticle Event Analysis Event Data Model BParticleID Particle identification data BVertex (2nd)Vertex Reconstruction data BStableParticle Photon, Electron, Muon, Pion, Kaon, Proton BComposeParticle Pi0, Eta, K*, phi, Charm Meson, new Particle,……
Analysis Event Data Model BParticle // track List ID int m_trackID; // PDG ID int m_particleID; // reference point(0, 0, 0) HepPoint3D m_refpoint; // WTrackparameters(charge, px, py, pz, e, x, y, z) WTrackParameter m_wtrk; SmartRef m_dstTrk; // Dst TrackList SmartRef m_pid; // ParticleID info SmartRef m_vertex; // Vertex info SmartRef m_bcompart; // ComposeParticle SmartRef m_mother; // mother SmartRefVector m_daughters; //decay daughters
BParticleID int m_trackID; // TrackList ID int m_type; // 1: electron 2: muon 3: pi/K/p int m_ndof; double m_chiDedx[5]; double m_chiTof1[5]; double m_chiTof2[5]; double m_chiTofE[5]; double m_chiTofQ[5]; double m_chiEmc[5]; double m_prob[5]; double m_chisq[5];
BVertex int m_vertexID; VertexType m_vertexType; VertexParameter m_vpar; double m_chisq; int m_ndof; WTrackParameter m_wtrk; double m_lxyz; double m_lxyz_err; SmartRefVector m_outgo;
BComposedParticl e Pi0, Eta Ks, Lambda D, Ds, … K*, phi, omega, … Any “new” Particle
BParticle Frame work Tracklist duplication VeeVtxReconstruction KShortReconstruction, by B.J. Liu LambdaReconstruction, by K.L. He GoodTrackSelection GoodPhotonSelection, by M.Yang & M.S. Chen GoodElectronSelection GoodMuonSelection GoodHadronSelection, by K.L. He Pi0,Eta Reconstruction by M.S. Chen and M.Yang CharmMesonList, J.Y. Zhang, Y.Z. Sun & S.S.Sun Analysis Cuts are controlled through job option file
BParticle in Analysis #include “BParticle/BParticle.h” #include “BParticle/BParticleID.h” #include “BParticle/BVertex.h” #include “BParticle/StableParticle.h” #include “BParticle/BComposedParticle.h” // get pion Lists SmartDataPtr pionCol(eventSvc(), EventModel::Analysis::BPionCol); // get Kaon Lists SmartDataPtr kaonCol(eventSvc(), EventModel::Analysis::BKaonCol); // get Photon Lists SmartDataPtr photonCol(eventSvc(), EventModel::Analysis::BPhotonCol); //get KShort Lists SmartDataPtr ksCol(eventSvc(),EventModel::Analysis::BKShortCol); //get pi0 Lists SmartDataPtr pi0Col(eventSvc(), EventModel::Analysis::BPi0Col); //DO not forget to add following line in your job option file #include “$PARTICLESELECTIONALGROOT/share/jobOPtions_ParticleSelection.txt”
Physics Event Data Model Designed and developed by Physics Group D0, D+, Ds tags Psi’ pi pi J/psi
Physics Performance Neutrals Spatial resolution of photons (Yang Ming) Photon detection efficiencies (Yang Ming) Pi0 mass resolution (K.L. He, H.B. Li) Particle ID performance TOF (Wang Liangliang et.al) dE/dx(Wang Liangliang et.al) Muon (Wang Zheng) Charged Tracks Ks, Lambda mass resolution (Liu Beijiang) Phi, K*, Omega in Inclusive Production (K.L. He, H.B. Li) Tracking efficiencies (not ready) Physics Analysis D (J.Y Zhang, Y.Z Sun) J/psi -> gamma X, X->pi0 pi0 (Chen Mingshui) Psip -> pi pi (eta) J/psi (Li Gang)
( ) 关于 E 的分布 From Yang. M
( ) 关于 E 分布 From Yang. M
Del_phiDel_Theta Angle From Yang M.
7o7o Angle between gamma gamma From Yang M
J/psi->rho pi M_gg, 4C fit J/psi->rho pi M_gg, raw From Li H.B
E>20MeV E>30MeV Yang M Chen M S
E>40MeV E>50MeVYang M Chen M S
E>60MeV E>70MeV E>80MeV Yang M Chen M S
Pi0 Reconstruction Efficiencies J/psi->gamma X, X(1270)->pi0 + pi0 12.8MeV From Chen M S
Sigma_chi, dE/dx Mean_chi, dE/dx From Wang LL etal
TOF 1, From Wang LL etal
TOF 2, From WangLL etal
M_gg, ~5.1MeV From Li H B
M_ppi M_pi+pi- ~3MeV ~1.2MeV From Liu B J
M_phi M_omega ~10MeV From Li H B
K*0 K*+/- From Li H B
D0 K pi D0 K pi pi0 From Sun YZ, Zhang J Y
D+ K pi pi D0 K pi pi pi From Sun YZ, Zhang J Y
Psi’ pi+ pi- J/Psi, J/Psi mu+ mu-, raw From Li G
Psi’ pi+ pi- J/Psi, J/Psi mu+ mu-, 4C Fit From Li. G
Next Plan Finish EmcPID More Manpower in ParticleID Tracking and PID efficiencies check Applying Kalman filter in KinematicFit and VertexFit Start 1st Vertex Reconstruction Continue the BParticle project Design and develop the EVENT TAG project Some Physics Analysis Tools (BWFIT, ROOFit,… etc) Applying more generator in future