Download presentation
Presentation is loading. Please wait.
Published byDonald Wilkerson Modified over 9 years ago
1
BESIII Analysis Software and Event Data Model Kanglin He 23 Feb, 2006 hekl@ihep.ac.cn
2
Outline BESIII Analysis Software Analysis Tools -- K.L He Analysis Framework -- X.B Ji Event/Physics Tag -- X.H Mo BESIII Event Data Model MC Truth Event Data Model -- W.D Li Rec/Dst Event Data Model -- S.P Wen Analysis Event Data Model -- K.L He Physics Event Data Model -- Physics Group Statistic Analysis Software -- Y.S Zhu Statistical Significance Toy Monte Carlo PWA and Dalitz Analysis -- H.B Li
3
Analysis Software Tools Project (K.L. He) Particle ID Composition Tools BParticle Project (X. B. Ji) Charged, Neutral Track Selection Ks, Λ, π 0 /η Reconstruction Event/Physics Tag Project (X. H. Mo) Event Classification Luminosity Determination Event Collection, filter Physics Performance Check (X. B. Ji)
4
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 on Calibration 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
5
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;
6
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; }
7
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;
8
Composition Tools Telesis BESII Kinematic Fit package C++ implemented by SDU BKlamsVTX BESII Ks, Λ reconstruction package C++ implemented by Dr. B.J. Liu VertexFit New stuff, by K. L He VertexFit SecondVertexFit KinematicFit
9
Status of Telesis Track presentation (φ,κ,λ) for charged track (φ,λ, E) for neutral track Constraints Resonance Momentum-energy conservation Miss track Worked smoothly in BOSS
10
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-00-00-02 for detail
11
Status of BKlamsVTX Get the point (s) of intersection of two helices in transverse plane Check if the 2nd vertex candidate is located in reasonable region Worked smoothly in BOSS Analysis/Physics/KlamsTestAlg for detail
12
Status of Vertex Fit Formulas (adopt from Paul Avery’s Lessons) Include: VertexFit, KinematicFit and 3-D SecondVertexFit Support Composed Particle Reconstructed π 0, η Reconstructed Ks, Λ Particle and Vertex presentation
13
Formulas for Kinematic Fitting
14
Formulas for Kinematic Fitting (continue)
15
Formulas for Vertex Fitting
16
Vertex Constraints Vertex constraint to a fixed position Vertex constraint to an unknown position General Vertex fit Swimming Track parameters and Error matrix to vertex position
17
Swimming after VertexFit
18
SecondVertexFit Find decay vertex position of Ks /Λ through VertexFit Performing a 2-C fit by applying the alignment constraints Calculating the decay length and its error Xp: production position (beam position) Xd: decay position
19
SecondVertexFit
20
Build Virtual Particle Virtual Particle from KinematicFit π 0 /η,… Virtual Particle from VertexFit Ks/Λ, … Can be treated as a normal particle in further kinematic/Vertex fit BuildVirtualParticle(number) in KinematicFit / VertexFit
21
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);
22
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 AddEqualMass(kmfit AddList(n1, n2, …), kmfit AddList(m1, m2, ….))
23
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;}
24
Summary of Analysis Tools Particle ID package Hadron identification by combined TOF and dE/dx information Muon identification by MuonID Electron identification is not completed All Composition Tools packaged are worked smoothly and stably in BOSS
25
Analysis Event Data Flow
26
B(es)Particle 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
27
Contents BParticle Collection Event Analysis Event Data Model BParticleID Collection Particle identification data BTrack Collection Charged and Neutral Track infomation data BVertex Collection (2nd)Vertex Reconstruction data BStableParticle Collection Photon, Electron, Muon, Pion, Kaon, Proton BComposedParticle Collection π 0,η,Ks,Λ etc
28
B(es)Particle Project
29
Event/Physics Tags Project Event Classification Bhabha/Dimu/Hadron/etc. Luminosity Determination Bhabha/Dimu/Di-photon Physics Tags Charm Meson Tags (D 0, D +, Ds) J.Y Zhang, Y.Z Sun, S.S Sun, M. Yang are working on J/Ψ tags (Ψ’ ππJ/Ψ) X.H Mo, Li Gang are working on Other Physics Tags Event Collection/Filter (Y.Z Sun and Framework Team) Event Collection Filter: sub-sets of data containing selected tags
30
Statistic Analysis Statistic Significance Up Limit determination Systematic Uncertainties Theory Toy Monte Carlo
31
Event Data Model MC Truth information Monte Carlo Generator & Simulation Dst Event Data Model Reconstruction Truth Match MC track Rec/Dst track Analysis Event Data Model BParticle project Physics Event Data Model Defined by Physics/Working Group Histograms, ntuples Root, paw……
32
MC Truth Data Model Generator McParticle So on Kinematic and vertex info Simulation MdcMcHit TofMcHit EmcMcHit MucMcHit Please see Event/McTruth/ subdirectory For detail
33
Dst Event Data Model DstMdcTrack DstMdcKalTrack DstDedx DstTofTrack DstEmcTrack DstMucTrack DstExtTrack Please see Event/DstEvent subdirctory For detail
34
DstMdcTrack int trackID() int charge() Double helix(int i) Double pxy() Double px() Double py() Double pz() Double p() Double theta() Double phi() Double x() Double y() Double z() Double r() Int stat() Double chi2() Int ndof() Double rms() Double err(int i) Int nhits() Int nster()
35
How to use DstMdcTrack #include “Event/DstMdcTrack.h” MsgStream log(msgSvc(), name()); SmartDataPtr mdcCol(eventSvc(), EventModel::Dst::DstMdcTrackCol); If(!mdcCol) return StatusCode::SUCCESS; DstMdcTrackCol::iterator it = mdcCol begin(); for( ; it < mdcCol end() ; it++) { //px, py, pz log<<MSG::INFO<<“px, py, pz = “ <<(*it) px() <<“, “ // px <<(*it) py() <<“, “ // py <<(*it) pz() << endreq; // pz // x, y, z, r log<<MSG::INFO<<“ x0, y0, z0, rxy = “ << (*it) x() << “, “ // x0 <<(*it) y() << “, “ // y0 <<(*it) z() << “, “ // z0 <<(*it) r() << endreq; // rxy }
36
Global Link MDC reconstruction dE/dx, Kalman fit track Match to TOF and Muon counter Track Applying Track Extrapolatio information, done in Reconstruction Match to EMC Position difference of extTrk and emc Track, treat as Neutral tracks if not matched See Wang L.L ‘s talk for detail
37
Dst Track List Collection trackID() MdcTrk() DstMdcTrack MdcKalTrk() DstMdcKalTrack Dedx() DstDedx TofTrk() DstTofTrack EmcTrk() DstEmcTrack MucTrk() DstMucTrack ExtTrk() DstExtTrack Access sub-detector info through a set of pointers
38
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 ;}
39
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 < 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”
40
MC Truth Track Association Match MC truth track & Reconstructed Track Dubna group is working on MDC track part is ready now EventNavigator Package Documentation in BES3 Software Web Page
41
Analysis Event Data Model BParticle Collection Event Analysis Event Data Model BParticleID Collection Particle identification data BTrack Collection Charged and Neutral Track infomation data BVertex Collection (2nd)Vertex Reconstruction data BStableParticle Collection Photon, Electron, Muon, Pion, Kaon, Proton BComposedParticle Collection π 0,η,Ks,Λ etc
42
BParticle Collection // 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
43
BParticleID Collection 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];
44
BVertex Collection 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;
45
BTrack Collection bool isNeutral(); bool isCharged(); bool isGoodTrack(); bool isPhoton(); bool isDaughter(); bool isUnknown(); bool isElectron(); bool isMuon(); bool isPion(); bool isKaon(); bool isProton(); Selection Criteria controlled by job option file
46
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”
47
BParticleTestAlg Package: Analysis/Physics/BParticleTestAlg Contents Inclusive Photon Inclusive J/Psi Inclusive phi/omega/K* Inclusive pi0/eta Inclusive Ks/Lambda Job option file #include “BPARTICLETESTALGROOT”/share/joboptions_BParti cleTestAlg.txt
48
Physics Event Data Model BCharmMeson Collection D0 K pi, K pi pi0, K pi pi pi, … D+ Ks pi, K pi pi, K pi pi pi0, … Ds Phi pi, K*K, K0K, … BJPsi Collection J/Psi mu+ mu- J/Psi e+ e- Psi’ pi pi J/Psi Designed by Physics Group
49
Histogram and Ntuples Root data format HBOOK data format Both are supported by Gaudi ROOT PAW
50
Analysis Environment Versions Rec/Cal/Anal/MC/DAQ/… DAQ/Trigger Mode Cosmic Collision Separate Beam run Event Type Bhabha/Dimu/diphoton Calibration event Physics event … Run Status Good/Bad/Usable Run Parameters Beam parameters Luminosity Magnetic Field … Data Correction Constants PID (TOF, dE/dx, Emc, Muc) Momentum correction factor …
51
Analysis Demo Analysis/Physics/RhopiAlg RhopiAlg-00-00-02 TKinematicFit > 00-00-02 KinematicFit Analysis/Physics/KlamsTestAlg BKlamsVTX Analysis/Physics/BParticleTestAlg Analysis Event Data Model Analysis/AnalysisDemoAlg Dst Event Data Model Analysis/Physics/JPsi/KstarKAlg J/Psi Physics Analysis/Physics/PsiPrime/G2MuMuAlg Psi’ Physics Analysis/Physics/CharmMeson/ Charm Physics Analysis/Physics/TauPair/ Tau Physics Analysis/Physics/RValue/ R Physics Analysis/Physics/TwoPhoton/ TwoPhoton Physics
52
Physics Performance Check Charged Track Hadron Performance (X.B Ji’s talk) MuonID Performance (PKU) Photon( π 0 /η ) performance M.S Chen’s talk Decay Vertex Reconstruction B.J Liu’s talk J/Ψ,Ψ’, D/Ds Analysis X.H Mo, X.B Ji, J.Y Zhang ‘s talks
53
Energy threshold at 40MeV GeV Efficiencies(100%) Photon detection Efficiencies as a function of E 20MeV 30MeV 40MeV 50MeV 60MeV 70MeV
54
From Li H.B No 4C fit After 4C fit
55
From Li H B 50 K Inclusive Ψ ” MC data
56
~3MeV ~1.2MeV 50 K Inclusive Ψ ” MC data
59
From Y.Z Sun
60
From J. Y Zhang
61
From Li Gang
62
50K inclusive Ψ ’ MC data Inclusive photon Energy
63
Cheers and Thank you !!! Welcome to Join Analysis Software Team
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.