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

UpstreamTagger::ProcessHits / unique ID #356

Open
ThomasRuf opened this issue Jun 5, 2020 · 1 comment
Open

UpstreamTagger::ProcessHits / unique ID #356

ThomasRuf opened this issue Jun 5, 2020 · 1 comment

Comments

@ThomasRuf
Copy link
Contributor

Int_t uniqueId;
gMC->CurrentVolID(uniqueId);
if (uniqueId>1000000) //Solid scintillator case
{
  Int_t vcpy;
  gMC->CurrentVolOffID(1, vcpy);
  if (vcpy==5) uniqueId+=4; //Copy of half
}

This code seems to be copied from some old veto.cpp, when we had a liquid and solid scintiallator, and does not fit at all in the context.

My impression, this does not seem to give a uniqueID to the UpstreamTagger detector elements. As the volumes are labeled, I think there are only uniqueIDs within a Rpc_module_upstream. The detIDs seem to repeat from one module to another, therefore cannot be used to identify which detector has fired.

@ThomasRuf
Copy link
Contributor Author

My proposal:

in ProcessHits, you need in addition the VolID of the mother volume.

see https://root.cern.ch/doc/master/classTVirtualMC.html:
CurrentVolOffID (Int_t off, Int_t &copyNo) const =0

  | Return the current volume off upward in the geometrical tree ID and copy number. More...

in principle, all the code is already there:
gMC->CurrentVolID(uniqueId);
Int_t vcpy;
gMC->CurrentVolOffID(1, vcpy);
uniqueId+= 1000*vcpy;

then you need a method which converts detID into the correct path of the corresponding volume in the overall geometry. Setting the nav = gGeoManager->GetCurrentNavigator(); to this path will then give you all the geometric information.

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

No branches or pull requests

1 participant