Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CEPCSW
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
7
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
CEPCSW
Commits
7d98e86f
Commit
7d98e86f
authored
2 years ago
by
lintao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
WIP: add example to test the sim data.
fix.
parent
1468691f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Analysis/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Analysis/CMakeLists.txt
Analysis/DumpEvent/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Analysis/DumpEvent/CMakeLists.txt
Analysis/DumpEvent/src/DumpSimHitAlg.cpp
+65
-0
65 additions, 0 deletions
Analysis/DumpEvent/src/DumpSimHitAlg.cpp
with
67 additions
and
0 deletions
Analysis/CMakeLists.txt
+
1
−
0
View file @
7d98e86f
add_subdirectory
(
TotalInvMass
)
add_subdirectory
(
TrackInspect
)
add_subdirectory
(
DumpEvent
)
This diff is collapsed.
Click to expand it.
Analysis/DumpEvent/CMakeLists.txt
+
1
−
0
View file @
7d98e86f
gaudi_add_module
(
DumpEvent
SOURCES src/DumpMCParticleAlg.cpp
src/DumpSimHitAlg.cpp
#src/DumpHitAlg.cpp
src/DumpTrackAlg.cpp
#src/DumpCalorimeterAlg.cpp
...
...
This diff is collapsed.
Click to expand it.
Analysis/DumpEvent/src/DumpSimHitAlg.cpp
0 → 100644
+
65
−
0
View file @
7d98e86f
/*
* Description:
* Dump the simulated information.
*
* Author:
* Tao Lin <lintao AT ihep.ac.cn>
*/
#include
"k4FWCore/DataHandle.h"
#include
"GaudiKernel/Algorithm.h"
#include
"edm4hep/MCParticleCollection.h"
#include
"edm4hep/SimTrackerHitCollection.h"
#include
"edm4hep/SimCalorimeterHitCollection.h"
#include
"edm4hep/CaloHitContributionCollection.h"
#include
"GaudiKernel/NTuple.h"
class
DumpSimHitAlg
:
public
Algorithm
{
public:
DumpSimHitAlg
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
);
// Three mandatory member functions of any algorithm
StatusCode
initialize
()
override
;
StatusCode
execute
()
override
;
StatusCode
finalize
()
override
;
private:
// - collection MCParticleG4: the simulated particles in Geant4
DataHandle
<
edm4hep
::
MCParticleCollection
>
m_mcParCol
{
"MCParticle"
,
Gaudi
::
DataHandle
::
Reader
,
this
};
// Dedicated collections for CEPC
DataHandle
<
edm4hep
::
SimTrackerHitCollection
>
m_VXDCol
{
"VXDCollection"
,
Gaudi
::
DataHandle
::
Reader
,
this
};
};
DECLARE_COMPONENT
(
DumpSimHitAlg
)
DumpSimHitAlg
::
DumpSimHitAlg
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
)
:
Algorithm
(
name
,
pSvcLocator
)
{
}
StatusCode
DumpSimHitAlg
::
initialize
()
{
return
StatusCode
::
SUCCESS
;
}
StatusCode
DumpSimHitAlg
::
execute
()
{
auto
mcCol
=
m_mcParCol
.
get
();
auto
vxdCol
=
m_VXDCol
.
get
();
for
(
auto
hit
:
*
vxdCol
)
{
}
return
StatusCode
::
SUCCESS
;
}
StatusCode
DumpSimHitAlg
::
finalize
()
{
return
StatusCode
::
SUCCESS
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment