Status of Analysis Software

57
Status of Status of Analysis Analysis Software Software Kanglin He Kanglin He [email protected] [email protected]

description

Status of Analysis Software. Kanglin He [email protected]. 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 - PowerPoint PPT Presentation

Transcript of Status of Analysis Software

Page 1: Status of Analysis Software

Status of Analysis Status of Analysis SoftwareSoftware

Kanglin HeKanglin He

[email protected]@ihep.ac.cn

Page 2: Status of Analysis Software

OutlineOutline 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

Page 3: Status of Analysis Software

Compose ToolsCompose 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

Page 4: Status of Analysis Software

TKinematicFitTKinematicFit#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-00-00-02 for detail

Page 5: Status of Analysis Software

BKlamsVTXBKlamsVTX

See

Liu Beijiang’s talk

and

Analysis/Physics/KlamsTestAlg

for detail

Page 6: Status of Analysis Software

VertexFit and KinematicFitVertexFit and KinematicFit Formulas(adopt from Paul Avery’s

Lessons) WTrackParameter VertexParameter KinematicConstraints VertexConstraints BuildVirtualParticle SecondVertexFit

Page 7: Status of Analysis Software

Formulas for Kinematic FittingFormulas for Kinematic Fitting

n

2

1

α

α

α

α

n

r

2

r

1

r

n

2

2

2

1

2

n

1

2

1

1

1

α

H

α

H

α

H

α

H

α

H

α

H

α

H

α

H

D

r

2

1

H

H

H

d

0dD

0λD)α(αV

d)(Dδ2λ)α(αV)α(αχT

01

α

T0

T0

2

0

0

Page 8: Status of Analysis Software

Formulas for Kinematic Fitting Formulas for Kinematic Fitting (continue)(continue)

d)(DδλλVλχ

DVVDVVV

)D(DVV

d)(DδVλ

λDVαα

T1D

T2αD

Tααα

1TαD

D

T1α0

000

0

0

Page 9: Status of Analysis Software

Formulas for Vertex FittingFormulas for Vertex Fitting

DT

xDDD

0D0

D000D

0T

x01

xxT

x0

Tα0

VEEVVVV

d)(DδVλ

xEVλd)xE(DδVλ

λEVδxVVλEVδxδx

λDVδαδα

00

0

d)xE(Dδλχ

EVVDVx),cov(

DVVEEVVDVDVVDVVV

E)VE(VV

00T2

xDT

α

αDT

xDT

ααDT

ααα

1D

T1xx

0

00000

0

Page 10: Status of Analysis Software

WTrackParameter and WTrackParameter and VertexParameterVertexParameter

W

zyx

V

z)y,x,E,,p,p,(pW

charge

HepLorentzVector (px, py, pz, E)HepPoint3D (x, y, z)HepSymMatrix Ew

HepPoint3D (vx, vy, vz)HepSymMatrix Ex

Page 11: Status of Analysis Software

AddTrack UtilityAddTrack Utility

// event data model dependentvoid 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);

Page 12: Status of Analysis Software

Kinematic ConstraintsKinematic 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

Page 13: Status of Analysis Software

Vertex ConstraintsVertex Constraints Vertex constraint to a fixed position

Beam Fit Vertex constraint to an unknown position

SecondVertex Find Beam position

General Vertex fit

2

1

22

hp

)hx)(h(pΔxpasin

a

hphΔx0

)hx(Δx2

ahΔx)(p0

Page 14: Status of Analysis Software

Swimming after VertexFitSwimming after VertexFit

xx

BxAαp

)xa(xpp

V

V

00

V

V

VxVV

VVp

α V)p,cov(x

)x,cov(pVV

xx

xVV

Tx

TTTαp

VV

BVx),Acov()x,cov(p

BBV)ABcov(x,x)B,Acov(AAVV

V

V

Page 15: Status of Analysis Software

Build Virtual ParticleBuild 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

Page 16: Status of Analysis Software

SecondVertexFit SecondVertexFit

0cτm

pzz

0cτm

pyy

0cτm

pxx

)z,y,x,z,y,xE,,p,p,(pα

zdp

ydp

xdp

pppdddzyx

Page 17: Status of Analysis Software

SecondVertexFitSecondVertexFit

1D

Tcτ

0T

T

T0

E)V(EV

λEVδcτ

0dcτEαD

0λE

0λD)δαα(V0

d)cE(Dδ2λ)α(α)Vα(αχ T0

1α0

2

0

d)(Dδλχ

cEVλλ

λDVαα

)D(DVV

d)(DδVλ

0T2

D0

Tα0

1TαD

0D0

0

0

00000 αDT

cτDT

ααDT

ααα DVVEEVVDVDVVDVVV

Page 18: Status of Analysis Software

How to use compose toolsHow 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;}

Page 19: Status of Analysis Software

Particle IDParticle 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

Page 20: Status of Analysis Software

ParticleIDBase class (I)ParticleIDBase class (I) common interfacecommon 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;

Page 21: Status of Analysis Software

Sub-PidSys class designSub-PidSys class designclass 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;}

Page 22: Status of Analysis Software

How to use ParticleIDHow to use ParticleID// Be careful to avoid memory leakageParticleID *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;

Page 23: Status of Analysis Software

Analysis Event Data ModelAnalysis Event Data Model Dst Event Data Model

From Reconstruction Dst Track List

Global Link and Dst Event Assembly Analysis Event Data ModelBParticle Project

Physics Event Data Model Physics Group

Page 24: Status of Analysis Software

TrackList(sub-detector level)TrackList(sub-detector level) DstMdcTrack DstMdcKalTrack DstDedx DstTofTrack DstEmcTrack DstMucTrack DstExtTrack Event/DstEvent subdirctory

Page 25: Status of Analysis Software

TrackList (track level)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;}

Page 26: Status of Analysis Software

How to access Dst Event DataHow to access Dst Event DataIn analysis source code:

#include “Event/DstTrkList.h”SmartDataPtr<DstTrkListCol> dstCol ( eventSvc(),

EventModel::Dst::DstTrackListCol)// To get Energy deposit in EmcDstTrkListCol::iterater itTrk = dstCol->begin() For(; itTrk < dstCol->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”

Page 27: Status of Analysis Software

BParticleBParticle Project 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

Page 28: Status of Analysis Software

ContentsContentsBParticle

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,……

Page 29: Status of Analysis Software

Analysis Event Data ModelAnalysis Event Data Model

BParticleBParticle// track List IDint 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<DstTrkList> m_dstTrk; // Dst TrackList SmartRef<BParticleID> m_pid; // ParticleID infoSmartRef<BVertex> m_vertex; // Vertex infoSmartRef<BComposeParticle> m_bcompart; // ComposeParticleSmartRef<BParticle> m_mother; // motherSmartRefVector<BParticle> m_daughters; //decay daughters

Page 30: Status of Analysis Software

BParticleIDBParticleIDint m_trackID; // TrackList IDint m_type; // 1: electron 2: muon 3: pi/K/pint 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];

Page 31: Status of Analysis Software

BVertexBVertexint 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<BParticle> m_outgo;

Page 32: Status of Analysis Software

BComposedPartiBComposedParticleclePi0, Eta

Ks, Lambda

D, Ds, …

K*, phi, omega, …

Any “new” Particle

Page 33: Status of Analysis Software

BParticleBParticle Frame work 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

Page 34: Status of Analysis Software

BParticleBParticle in Analysis in Analysis #include “BParticle/BParticle.h”#include “BParticle/BParticleID.h”#include “BParticle/BVertex.h”#include “BParticle/StableParticle.h”#include “BParticle/BComposedParticle.h”// get pion ListsSmartDataPtr<BPionCol> pionCol(eventSvc(), EventModel::Analysis::BPionCol);// get Kaon ListsSmartDataPtr<BKaonCol> kaonCol(eventSvc(), EventModel::Analysis::BKaonCol);// get Photon ListsSmartDataPtr<BPhotonCol> photonCol(eventSvc(),

EventModel::Analysis::BPhotonCol);//get KShort ListsSmartDataPtr<BKShortCol> ksCol(eventSvc(),EventModel::Analysis::BKShortCol);//get pi0 ListsSmartDataPtr<BPi0Col> pi0Col(eventSvc(), EventModel::Analysis::BPi0Col);

//DO not forget to add following line in your job option file#include “$PARTICLESELECTIONALGROOT/share/jobOPtions_ParticleSelection.txt”

Page 35: Status of Analysis Software

Physics Event Data ModelPhysics Event Data Model

Designed and developed by Physics Group D0, D+, Ds tags Psi’pi pi J/psi

Page 36: Status of Analysis Software

Physics PerformancePhysics 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)

Page 37: Status of Analysis Software

(())关于关于 EE 的分布的分布

From Yang. M

Page 38: Status of Analysis Software

(())关于关于 EE 分布分布

From Yang. M

Page 39: Status of Analysis Software

Del_phi Del_Theta

Angle

From Yang M.

Page 40: Status of Analysis Software

7o

Angle between gamma gamma

From Yang M

Page 41: Status of Analysis Software

J/psi->rho piM_gg, 4C fit

J/psi->rho piM_gg, raw

From Li H.B

Page 42: Status of Analysis Software

E>20MeV

E>30MeV

Yang MChen M S

Page 43: Status of Analysis Software

E>40MeV

E>50MeV Yang MChen M S

Page 44: Status of Analysis Software

E>60MeV

E>70MeV

E>80MeVYang MChen M S

Page 45: Status of Analysis Software

Pi0 Reconstruction Efficiencies

J/psi->gamma X, X(1270)->pi0 + pi0

12.8MeV

From Chen M S

Page 46: Status of Analysis Software

Sigma_chi, dE/dx

Mean_chi, dE/dx

From Wang LL etal

Page 47: Status of Analysis Software

TOF 1, From Wang LL etal

Page 48: Status of Analysis Software

TOF 2, From WangLL etal

Page 49: Status of Analysis Software

M_gg, ~5.1MeV From Li H B

Page 50: Status of Analysis Software

M_ppi

M_pi+pi-~3MeV

~1.2MeV

From Liu B J

Page 51: Status of Analysis Software

M_phi

M_omega~10MeV

From Li H B

Page 52: Status of Analysis Software

K*0

K*+/-

From Li H B

Page 53: Status of Analysis Software

D0K pi

D0K pi pi0

From Sun YZ, Zhang J Y

Page 54: Status of Analysis Software

D+K pi pi

D0 K pi pi pi

From Sun YZ, Zhang J Y

Page 55: Status of Analysis Software

Psi’pi+ pi- J/Psi, J/Psi mu+ mu-, raw

From Li G

Page 56: Status of Analysis Software

Psi’pi+ pi- J/Psi, J/Psi mu+ mu-, 4C Fit

From Li. G

Page 57: Status of Analysis Software

Next PlanNext 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