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

extend for drift chamber and TPC #179

Merged
merged 16 commits into from
Mar 2, 2023
Merged

Conversation

wenxingfang
Copy link
Contributor

BEGINRELEASENOTES

  • Extend for drift chamber and TPC study
  • The extended EDMs are tested within CEPCSW, and it works well
  • The extended edm4hep::TrackerPulse and edm4hep::TrackerData are similar to what they are in ILC TPC

ENDRELEASENOTES

Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

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

See also discussion in EDM4hep meeting

I have one more technical comment, that I did not raise during the meeting. Could you make all integer types a fixed width integer, especially the unsigned long long are somewhat loosely defined with only a minimal size and might change width depending on compiler, platform, etc. We have done this exercise for all other datatypes in EDM4hep, so for consistency it would be nice if it can also be done here.

edm4hep.yaml Outdated Show resolved Hide resolved
@tmadlener tmadlener mentioned this pull request Oct 18, 2022
Copy link
Collaborator

@andresailer andresailer left a comment

Choose a reason for hiding this comment

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

Similar to Thomas' comment about fixed length integer, and similar things. A few proposal for renaming to be consistent with other types with the same fields.

Except we have both "EDep" and "eDep" in existing types already...

edm4hep.yaml Outdated Show resolved Hide resolved
edm4hep.yaml Outdated
- edm4hep::Vector3d position //the primary ionization's position in [mm].
- int type //type.
VectorMembers:
- unsigned long long electronCellID //cell id.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- unsigned long long electronCellID //cell id.
- uint64_t electronCellID //cell id.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Which cellID is this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as ionized electrons from the same primary ionization cluster may be produced in different drift chamber cells, especially when they are produced close to the edge of a cell. So each ionized electron should have one cell id.

edm4hep.yaml Outdated Show resolved Hide resolved
edm4hep.yaml Outdated Show resolved Hide resolved
edm4hep.yaml Outdated Show resolved Hide resolved
edm4hep.yaml Outdated Show resolved Hide resolved
edm4hep.yaml Outdated Show resolved Hide resolved
edm4hep.yaml Outdated Show resolved Hide resolved
edm4hep.yaml Outdated Show resolved Hide resolved
edm4hep.yaml Outdated Show resolved Hide resolved
edm4hep.yaml Outdated Show resolved Hide resolved
edm4hep.yaml Show resolved Hide resolved
edm4hep.yaml Outdated Show resolved Hide resolved
Copy link
Contributor Author

@wenxingfang wenxingfang left a comment

Choose a reason for hiding this comment

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

to solve issue #25

@tmadlener tmadlener linked an issue Oct 18, 2022 that may be closed by this pull request
@wenxingfang
Copy link
Contributor Author

Hi @gaede , I renamed 'RecDndx' to 'RecDqdx' and used edm4hep::Quantity dQdx to save the type, value, and error. What is your opinion?

@wenxingfang
Copy link
Contributor Author

@andresailer Hi Andre, now the checks are successful. Do you think if this pull request can be merged?

@tmadlener
Copy link
Contributor

It looks like there are still a few formatting and whitespace issues. Could you fix them as well?

@wenxingfang
Copy link
Contributor Author

@tmadlener @andresailer, This time all the checks are successful. It seems at least 1 approving review is needed in order to merge the PR.

edm4hep.yaml Outdated
#---------- TPCHit
edm4hep::TPCHit:
#---------- TrackerRawData
edm4hep::TrackerRawData:
Description: "Time Projection Chamber Hit"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This description should be updated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, how about using "Raw data of a tracker hit"?

edm4hep.yaml Outdated
Members:
- uint64_t cellID // cell id
- uint32_t N // number of reconstructed ionization cluster.
- float eDep // energy deposit.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- float eDep // energy deposit.
- float eDep // energy deposit [GeV].

Copy link
Collaborator

Choose a reason for hiding this comment

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

eDep is the reconstructed energy deposit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it should be a reconstructed energy deposit.

edm4hep.yaml Outdated
Author : "Wenxing Fang, IHEP"
Members:
- uint64_t cellID //cell id.
- float time //time.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- float time //time.
- float time //time [ns].

edm4hep.yaml Outdated
- float expected // expected value
- float sigma // sigma value

# hit level data
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# hit level data
# Reconstructed hit information

edm4hep.yaml Outdated
- int16_t quality //quality.
- std::array<float,3> covMatrix //lower triangle covariance matrix of the charge(c) and time(t) measurements.
OneToOneRelations:
- edm4hep::TrackerData trackerData //Optionaly, the TrackerData that has been used to create the pulse can be stored with the pulse.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- edm4hep::TrackerData trackerData //Optionaly, the TrackerData that has been used to create the pulse can be stored with the pulse.
- edm4hep::TrackerData trackerData //Optionally, the TrackerData that has been used to create the pulse can be stored with the pulse.

edm4hep.yaml Outdated
Author : "Wenxing Fang, IHEP"
Members:
- uint64_t cellID //cell id.
- float time //begin time.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- float time //begin time.
- float time //begin time [ns].

edm4hep.yaml Outdated

#------------- RecDqdx
edm4hep::RecDqdx:
Description : "dN/dx or dEdx info of Track."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Description : "dN/dx or dEdx info of Track."
Description : "dN/dx or dE/dx info of Track."

edm4hep.yaml Outdated
Members:
- uint64_t cellID //cell id.
- float time //time.
- float charge //charge.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The charge is in coulomb or multiple or electron (or proton) charges?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is in coulomb.

edm4hep.yaml Outdated
- float time //begin time.
- float interval //interval of each sampling in [ns].
VectorMembers:
- float chargeValue //charge value.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add a unit with [fC]

@wenxingfang
Copy link
Contributor Author

@andresailer Thanks for your suggestions! The PR has been updated. Please let me know if you have any questions or suggestions.

@andresailer andresailer requested a review from tmadlener February 7, 2023 08:37
edm4hep.yaml Outdated
- edm4hep::TrackerPulse trackerPulse //the TrackerPulse used to create the ionization cluster.

#---------- TrackerData
edm4hep::TrackerData:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
edm4hep::TrackerData:
edm4hep::TimeSeries:

edm4hep.yaml Outdated
edm4hep::TPCHit:
Description: "Time Projection Chamber Hit"
#---------- TrackerRawData
edm4hep::TrackerRawData:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
edm4hep::TrackerRawData:
edm4hep::ADCTimeSeries:

Copy link
Collaborator

Choose a reason for hiding this comment

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

- - int32_t rawDataWords //raw data (32-bit) word at i.
+ - int32_t adcCounts    //raw data (32-bit) word at i.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Need an entry for interval?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am wondering whether ADCTimeSeries is not making this too specific? (In this case it is one, but in other cases a more general concept might be better, instead of having to introduce another type later?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am wondering whether ADCTimeSeries is not making this too specific? (In this case it is one, but in other cases a more general concept might be better, instead of having to introduce another type later?)

How about using "RawTimeSeries"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need an entry for interval?

I think it is needed.

edm4hep.yaml Outdated
Description: "Time Projection Chamber Hit"
#---------- TrackerRawData
edm4hep::TrackerRawData:
Description: "Raw data of a tracker hit"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Description: "Raw data of a tracker hit"
Description: "Raw data of a detector read out"

edm4hep.yaml Outdated
- float time //begin time [ns].
- float interval //interval of each sampling [ns].
VectorMembers:
- float chargeValue //charge value [fC].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- float chargeValue //charge value [fC].
- float amplitude // calibrated detector data.

edm4hep.yaml Outdated

#---------- TrackerData
edm4hep::TrackerData:
Description: "TrackerData"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Description: "TrackerData"
Description: "Calibrated Detector Data"

edm4hep.yaml Outdated
Members:
- uint64_t cellID // cell id
- uint32_t N // number of reconstructed ionization cluster.
- float eDep // energy deposited [GeV].
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- float eDep // energy deposited [GeV].
- float eDep // reconstructed energy deposit [GeV].

to further clarify according to: #179 (comment)

edm4hep.yaml Outdated
edm4hep::TPCHit:
Description: "Time Projection Chamber Hit"
#---------- TrackerRawData
edm4hep::TrackerRawData:
Copy link
Contributor

Choose a reason for hiding this comment

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

I am wondering whether ADCTimeSeries is not making this too specific? (In this case it is one, but in other cases a more general concept might be better, instead of having to introduce another type later?)

@wenxingfang
Copy link
Contributor Author

@andresailer @tmadlener, thanks for the comments! The PR has been updated. Welcome with further suggestions!

@jmcarcell
Copy link
Member

jmcarcell commented Feb 8, 2023

This is a possibly incomplete list of repos with files that will have to be changed: k4EDM4hep2LcioConv, k4MarlinWrapper, k4LCIOReader, key4DCMTSim and there is an example in k4geo. There is also README.md (there is a link to TPCHit) in this repo that will have to be changed, could you add that last change to this PR @wenxingfang for completeness?
For the other changes I would start by renaming TPCHitCollection and then TPCHit in this order and rawDataWords and I think that should (almost?) work

Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

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

Thanks for all the updates and the patience. This looks good to me now.

It would be nice if we can address the necessary README changes still in this PR, but since we have to update the diagram as well, I would also be OK with doing that in a separate PR, unless @andresailer has a strong opinion on that.

For the repositories that break with these changes mentioned by @jmcarcell, I suppose most of the changes should be rather straight forward fixes, and we could prepare those PRs before we merge this and then do a coherent build for all of them to see if we didn't miss anything.

@jmcarcell
Copy link
Member

jmcarcell commented Mar 1, 2023

After running a consistent build and finding no errors in https://github.com/key4hep/EDM4hep/actions/runs/4306734737/jobs/7510924036 (see downstream-build, the current error happens due to some issue when fetching for a different package that is not affected by this change but was included by the build) I'm decently confident we have found all the places inside key4hep that are affected. It's time to press those green buttons, and maybe the nightly will pick it up today

@wenxingfang
Copy link
Contributor Author

@jmcarcell Thanks a lot! Who should press the green button?

@jmcarcell jmcarcell merged commit 59b7c23 into key4hep:master Mar 2, 2023
@jmcarcell
Copy link
Member

It's done now @wenxingfang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Needs changes in dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend edm4hep::TrackerHit and edm4hep::Track for drift chamber study TPCHit too specific?
4 participants