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
9
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
5b696022
Commit
5b696022
authored
3 years ago
by
lintao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
Start to develop the Beam Background generator.
parent
c4926c86
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
Generator/CMakeLists.txt
+1
-1
1 addition, 1 deletion
Generator/CMakeLists.txt
Generator/src/GtBeamBackgroundTool.cpp
+29
-0
29 additions, 0 deletions
Generator/src/GtBeamBackgroundTool.cpp
Generator/src/GtBeamBackgroundTool.h
+59
-0
59 additions, 0 deletions
Generator/src/GtBeamBackgroundTool.h
with
89 additions
and
1 deletion
Generator/CMakeLists.txt
+
1
−
1
View file @
5b696022
...
...
@@ -15,7 +15,7 @@ gaudi_add_module(GenAlgo
src/SLCIORdr.cpp
src/HepMCRdr.cpp
src/GtGunTool.cpp
src/GtBeamBackgroundTool.cpp
LINK
${
ROOT_LIBRARIES
}
k4FWCore::k4FWCore
Gaudi::GaudiAlgLib
...
...
This diff is collapsed.
Click to expand it.
Generator/src/GtBeamBackgroundTool.cpp
0 → 100644
+
29
−
0
View file @
5b696022
#include
"GtBeamBackgroundTool.h"
DECLARE_COMPONENT
(
GtBeamBackgroundTool
)
StatusCode
GtBeamBackgroundTool
::
initialize
()
{
// check the consistency of the properties
// create the instances of the background parsers
return
StatusCode
::
SUCCESS
;
}
StatusCode
GtBeamBackgroundTool
::
finalize
()
{
return
StatusCode
::
SUCCESS
;
}
bool
GtBeamBackgroundTool
::
mutate
(
MyHepMC
::
GenEvent
&
event
)
{
return
true
;
}
bool
GtBeamBackgroundTool
::
finish
()
{
return
true
;
}
bool
GtBeamBackgroundTool
::
configure_gentool
()
{
return
true
;
}
This diff is collapsed.
Click to expand it.
Generator/src/GtBeamBackgroundTool.h
0 → 100644
+
59
−
0
View file @
5b696022
#ifndef GtBeamBackgroundTool_h
#define GtBeamBackgroundTool_h
/*
* Description:
* This tool is used to simulation the non-collision beam backgrounds.
*
* The properties:
* - InputFileMap
* this is a map to store the label and the input filename
* - InputFormatMap
* this is a map to store the label and the input format
* - InputRateMap
* this is a map to store the label and the rate
*
* Note: the label (key) should be consistent
*
* About the design:
* IBeamBackgroundFileParser is the interface to load the next event.
* Different file formats should be implemented in the corresponding parsers.
* The format will be used to create the corresponding instance.
*
* Author:
* Tao Lin <lintao AT ihep.ac.cn>
*/
#include
<GaudiKernel/AlgTool.h>
#include
<Gaudi/Property.h>
#include
"IGenTool.h"
#include
<vector>
#include
<map>
class
IBeamBackgroundFileParser
;
class
GtBeamBackgroundTool
:
public
extends
<
AlgTool
,
IGenTool
>
{
public:
using
extends
::
extends
;
// Overriding initialize and finalize
StatusCode
initialize
()
override
;
StatusCode
finalize
()
override
;
// IGenTool
bool
mutate
(
MyHepMC
::
GenEvent
&
event
)
override
;
bool
finish
()
override
;
bool
configure_gentool
()
override
;
private:
Gaudi
::
Property
<
std
::
map
<
std
::
string
,
std
::
string
>>
m_inputmaps
{
this
,
"InputFileMap"
};
Gaudi
::
Property
<
std
::
map
<
std
::
string
,
std
::
string
>>
m_fomatmaps
{
this
,
"InputFormatMap"
};
Gaudi
::
Property
<
std
::
map
<
std
::
string
,
double
>>
m_ratemaps
{
this
,
"InputRateMap"
};
private
:
std
::
map
<
std
::
string
,
std
::
shared_ptr
<
IBeamBackgroundFileParser
>>
m_beaminputs
;
};
#endif
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