Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add TrackHeedSimTool for DC cell simulation #248

Merged
merged 8 commits into from
Dec 21, 2023
Merged

Conversation

wenxingfang
Copy link
Contributor

This PR is for #247

@wenxingfang
Copy link
Contributor Author

@mirguest could you help to review this PR? Thanks!

@mirguest
Copy link
Member

mirguest commented Nov 9, 2023

@mirguest could you help to review this PR? Thanks!

Hi @wenxingfang, is IDedxSimTool invoked in DriftChamberSensitiveDetector? Maybe you can consider to save the data in this class. So the EDM writer is not coupled with IDedxSimTool.

@wenxingfang
Copy link
Contributor Author

Hi @mirguest thanks for your nice comments! I have updated the PR, please check it.

@@ -87,14 +88,17 @@ Edm4hepWriterAnaElemTool::BeginOfEventAction(const G4Event* anEvent) {
// reset
m_track2primary.clear();

auto SimPIonCol = m_SimPrimaryIonizationCol.createAndPut();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wenxingfang , thank you for your update. My last question: do you think that we can also move this part to the TrackHeedSimTool? Because I see you had to const_cast the collection. If you create it in the same tool, then I think you don't need to cast.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mirguest , I don't know if there is a way to judge if this G4 simulation step is the beginning of an event in TrackHeedSimTool, because m_SimPrimaryIonizationCol.createAndPut(); should be done at the beginning of an event. Do you have any idea?

@wenxingfang
Copy link
Contributor Author

Hi @mirguest , thanks for your suggestion! I have moved the m_SimPrimaryIonizationCol.createAndPut(); to the TrackHeedSimTool. Could you help to review it?

@wenxingfang
Copy link
Contributor Author

Hi @mirguest , Do you think if this MR could be merged?

@mirguest mirguest merged commit 4b59fde into cepc:master Dec 21, 2023
2 checks passed
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