using sniper in besiii...
TRANSCRIPT
![Page 1: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/1.jpg)
Using SNiPER in BESIII analysis
XIA Xin, LI Teng
Shandong University
June 6 2016
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 1 / 21
![Page 2: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/2.jpg)
Outline
Motivation
Data Model
Particle identification and Vertex fit
Performance Test
Summary
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 2 / 21
![Page 3: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/3.jpg)
Outline
Motivation
Data Model
Particle identification and Vertex fit
Performance Test
Summary
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 3 / 21
![Page 4: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/4.jpg)
Motivation
1 Rapidly increased data samples in BESIIIWith time increases, statistics increases rapidly in BESIIIexperiment. Faster data processing method will help a lot.
2 SNiPER is light-weighted, effective and flexibleFrameworkSNiPER has been used in JUNO experiment in recent years,now also in LHAASO. It is another choice for physics dataanalysis.
3 Analysis the BESIII data under SNiPER frameworkOptimize data structure with Smart Reference.Transplant the BESIII analysis codes to SNiPER.
4 Preparing for the parallel computing in the near future.
BOSS version: 7.0.0
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 4 / 21
![Page 5: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/5.jpg)
Outline
Motivation
Data Model
Particle identification and Vertex fit
Performance Test
Summary
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 5 / 21
![Page 6: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/6.jpg)
A BESIII analysis workflow
1 Data Service retrieves data from DST via RootEventData2 PID will determine the type of particle for every track3 Vertex fit calculate the vertex position with informations of
the magnetic field and primary vertex from database.
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 6 / 21
![Page 7: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/7.jpg)
Data model in BOSS
In BOSS, DST files are stored in the form of TTree. All the classesin branches are derived from TObject.
Take data files as example, two TTree are included:1 JobInfoTree: BOSS version, job options etc.2 Event: all the informations of physics events,
part interested.
Data DST
JobInfoTree Event
TEvtRecObject
TDstEvent
TEvtHeaderWhen user read the files, TObject will be converted to theEventObject by Gaudi.
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 7 / 21
![Page 8: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/8.jpg)
New data model under SNiPER
1. RootEventData is migrated to SNiPER fordirect access to the TObjects in DST.2. Use corresponding TObjects instead ofEventObject.3. Additional branch named DstHeader is added,consists of
1 Parameters for fast pre-selection,2 Smart reference to the other trees.
4. Access to data with DataStoreMgr.
New DSTDstHeader
TEvtRecObject
TDstEventTEvtHeader
Smart Reference provides reference from header to events.Pre-selection can be done with header itself for lazy-loading.
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 8 / 21
![Page 9: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/9.jpg)
DST conversion
Since no big changes in structure, the conversion will be easy.1 ReBuildDST is developed to convert the BESIII DST to theSNiPER one.
• Read the old DSTs in the normal ROOT way,• Add parameters to DstHeader,• Write to new DSTs with DataStoreMgr, it will do the rest of
jobs automatically.2 Also provide a Service BesInputSvc to access to the BESIII
DST directly.• Parsing the DST file list,• Some useful functions to retrieve informations from files.
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 9 / 21
![Page 10: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/10.jpg)
Outline
Motivation
Data Model
Particle identification and Vertex fit
Performance Test
Summary
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 10 / 21
![Page 11: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/11.jpg)
Particle identification (ParticleID)
ParticleID is the process of using informations left by oneparticle passing through the detectors to identify the type ofparticle.
• Using dE/dx, TOF, TOFQ, Emc and Muc system
1 Calculate probability for every physical track2 In BOSS, EvtRecTrack is a logical track connecting the
sub-detectors3 EvtRecTrack is the input for PID.
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 11 / 21
![Page 12: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/12.jpg)
ParticleID in SNiPER
The main problem in new framework is how to get the correctsub-detectors information in one track.
• Need EvtRecTrack to manager the sub-tracks• Initialized from TEvtRecTrack and current scope
• TEvtRecTrack stores the trackIDs of sub-detectors in onereconstructed track
• Scope is used for getting informations like run number
• Connect the sub-tracks with trackID• Use TObjects directly in ParticleID code• Tool AbsCor is added to correct the energy of EMC Shower
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 12 / 21
![Page 13: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/13.jpg)
Data flow
For analysis, the data flow looks like
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 13 / 21
![Page 14: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/14.jpg)
Vertex fit
Vertex fit computes the best estimate of the vertex parameters(such as position) with a given set of tracks.Necessary parameters in VertexFit class,
1 Several MDC tracks after PID,2 Primary Vertex information from database,3 Magnetic field information.
To be used in SNiPER,
1 New constructors of WTrackParameter are added2 Run number is passed to VertexFit for database accessing3 MagneticField and DatabaseSvc are detached fromGaudi, rewrote as pure C++ class
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 14 / 21
![Page 15: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/15.jpg)
Outline
Motivation
Data Model
Particle identification and Vertex fit
Performance Test
Summary
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 15 / 21
![Page 16: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/16.jpg)
Performance Test
• Tested with the analysis e+e− → π+π−J/ψ, (Zc(3900))• Data sample at CM energy of 4.26 GeV, 24 files used in total.
NO. Selection BOSS SNiPER1 charged tracks 4771222 47712222 nGood==4 10028 100283 bnGam>=1 1352 13524 Pass pid 1274 12745 Pass 4C 252 2526 save result 27 277 cms energy 4.258 4.258
Table: The number of selected events under these two frameworks
The selected results are exactly the same.Further test is comparing the physics results.
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 16 / 21
![Page 17: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/17.jpg)
Mass spectrum comparison
]2) [GeV/cψM(J/
3 3.02 3.04 3.06 3.08 3.1 3.12 3.14
En
trie
s
0
5
10
15
20
25
BOSS
SNiPER
]2) [GeV/c-π+πM(
0.2 0.4 0.6 0.8 1 1.2 1.4
Ent
ries
0
5
10
15
20
25 BOSS
SNiPER
]2) [GeV/cψJ/+πM(
3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2
En
trie
s
02468
1012141618202224
BOSS
SNiPER
]2) [GeV/cψJ/-πM(
3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2
Ent
ries
0
2
4
6
8
10
12
14
16
18BOSS
SNiPER
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 17 / 21
![Page 18: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/18.jpg)
Performance comparisonC
PU
[/%
]
20
30
40
50
60
70
80
90
100
Total running time: 1212.5s
Red
iden
t M
emo
ry U
sag
e [M
B]
0
20
40
60
80
100
120
140
160
180
Time usage [s]0 200 400 600 800 1000 1200
Vir
tual
Mem
ory
Usa
ge
[MB
]
650
700
750
800
850
BOSS
CP
U [
/%]
10
20
30
40
50
60
70
Total running time: 758.0s
Red
iden
t M
emo
ry U
sag
e [M
B]
20
40
60
80
100
120
140
160
180
200
Time usage [s]0 100 200 300 400 500 600 700
Vir
tual
Mem
ory
Usa
ge
[MB
]
150
200
250
300
350
400
SNiPER
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 18 / 21
![Page 19: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/19.jpg)
Time consuming
Tim
e u
sag
e [s
]
600
700
800
900
1000
1100
SNiPER
BOSS
Test NO.0 2 4 6 8 10 12 14 16 18 20
Imp
rove
men
t
0.380.390.4
0.410.42
• Tested 20 times, with 20 different files each time.• SNiPER is about 40% faster than BOSS.
Improvement = (TBOSS − TSNiPER)/(TBOSS)XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 19 / 21
![Page 20: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/20.jpg)
Outline
Motivation
Data Model
Particle identification and Vertex fit
Performance Test
Summary
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 20 / 21
![Page 21: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/21.jpg)
Summary
1 Designed new data model for BESIII DST, which can beused under SNiPER.
2 Migrated the ParticleID and VertexFit to SNiPER forphysical analysis.
3 Tested with a real analysis, the SNiPER version workedproperly, and can be 40% faster than BOSS version.
Thanks for your attention!
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 21 / 21
![Page 22: Using SNiPER in BESIII analysisindico.ihep.ac.cn/event/5955/session/4/contribution/28/material/slide… · • TEvtRecTrackstores the trackIDs of sub-detectors in one reconstructed](https://reader035.vdocuments.site/reader035/viewer/2022070923/5fbaffe1e18d7e6d60016399/html5/thumbnails/22.jpg)
Summary
1 Designed new data model for BESIII DST, which can beused under SNiPER.
2 Migrated the ParticleID and VertexFit to SNiPER forphysical analysis.
3 Tested with a real analysis, the SNiPER version workedproperly, and can be 40% faster than BOSS version.
Thanks for your attention!
XIA Xin, LI Teng June 6 2016 Using SNiPER in BESIII analysis 21 / 21