Skip to content

WIP: generator interface for beam background simulation - #191

Merged
mirguest merged 6 commits into
cepc:masterfrom
mirguest:master
Oct 19, 2021
Merged

mirguest merged 6 commits into
cepc:masterfrom
mirguest:master

Conversation

@mirguest

Copy link
Copy Markdown
Member

In this PR, a simple beam background parser is implemented and the tool is used to load the data and rotate the position and momemtum.

The python option could be configured as following:

from Configurables import GtBeamBackgroundTool

beambackground = GtBeamBackgroundTool("GtBeamBackgroundTool")
beambackground.InputFileMap = {"default": "ToCEPCSW.out"}
beambackground.InputBeamEnergyMap = {"default": 120.} # GeV
beambackground.RotationAlongYMap = {"default": 16.5e-3} # radian

The input file ToCEPCSW.out contains:

Generation Position/Loss Turn/Z(m)/X(m)/Y(m)/COSX/COSY/DZ(m)/DP(相对)

.05 1 3.13 .0099031 .0015125 5.2244448856E-4 3.2319664286E-4 7.9379217745E-4 -.9283404
.06 1 .45 .0087919 4.1827066853E-5 -.0047124 -2.250601162E-5 -.0038878 -.9981363
.07 1 2.6 -.0098533 -8.663444181E-4 .0011546 -3.771734981E-4 -1.514607787E-4 -.9727916
.16 1 3.76 -.0097491 -.0016431 .0010998 4.3913115533E-5 .0031015 -.916231
.16 1 3.6 .0098465 .0019703 -3.525921016E-4 -1.276482926E-4 -1.469879258E-4 -.8801277
.31 1 3.93 .0099583 .0018898 7.628897907E-4 4.8905586168E-5 9.9398225094E-4 -.8938091
.6 1 2.31 .0096349 3.2225104948E-4 .0011916 -4.803281957E-5 -.0043484 -.9933451
.61 1 3.71 .0098166 .0015159 6.5752863363E-4 8.7605346629E-6 -.0044354 -.9297897
.68 1 4.17 -.0098875 -.0022476 -8.632797545E-4 -1.306586453E-4 .0029546 -.8476272

@mirguest

Copy link
Copy Markdown
Member Author

@fucd Chengdong, could you help me review my PR? Thanks.
Tao

@mirguest

Copy link
Copy Markdown
Member Author

@xuwei152

@mirguest

Copy link
Copy Markdown
Member Author

@shyshi

@mirguest

Copy link
Copy Markdown
Member Author

Task:

  • Use the CEPC reference geometry, with endcap
  • Use fake samples (cosx=1)
  • Use real large samples

@fucd

fucd commented Oct 14, 2021

Copy link
Copy Markdown
Contributor

@mirguest Hi Tao, I have some questions: where (which algorithm) is GtBeamBackgroundTool called? Or has it been called automatically? If needed, could you add more configure for python option file?
BTW, for double p = m_beam_energy*(1+dp); in Generator/src/BeamBackgroundFileParserV0.cpp, it is easy to cause people pay attention on it, although energy is almost same as momentum.

@fucd Chengdong, could you help me review my PR? Thanks. Tao

@mirguest

Copy link
Copy Markdown
Member Author

@mirguest Hi Tao, I have some questions: where (which algorithm) is GtBeamBackgroundTool called? Or has it been called automatically? If needed, could you add more configure for python option file? BTW, for double p = m_beam_energy*(1+dp); in Generator/src/BeamBackgroundFileParserV0.cpp, it is easy to cause people pay attention on it, although energy is almost same as momentum.

@fucd Chengdong, could you help me review my PR? Thanks. Tao

@fucd
Thanks for your comment. I will add an example in the Python option file. About the energy, I will confirm with Haoyu.
Tao

@fucd

fucd commented Oct 15, 2021

Copy link
Copy Markdown
Contributor

@mirguest Hi Tao, I have some questions: where (which algorithm) is GtBeamBackgroundTool called? Or has it been called automatically? If needed, could you add more configure for python option file? BTW, for double p = m_beam_energy*(1+dp); in Generator/src/BeamBackgroundFileParserV0.cpp, it is easy to cause people pay attention on it, although energy is almost same as momentum.

@fucd Chengdong, could you help me review my PR? Thanks. Tao

@fucd Thanks for your comment. I will add an example in the Python option file. About the energy, I will confirm with Haoyu. Tao

@mirguest Yes, thank you for your reply. I think maybe we can import first, and then people will easily do more test, since this will not run in default job.

@mirguest mirguest mentioned this pull request Oct 19, 2021
3 tasks
@mirguest
mirguest merged commit ec8bcca into cepc:master Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants