Closed saraheno closed 10 months ago
@MarkusFrankATcernch
The example you point me to there is what I think of as "simHits". That I already have, for example: https://github.com/saraheno/SingleDualCrystal/tree/main/src
You can see there I define a special simhit for the dual readout information and an SDAction to collect the information from the GEANT4 record.
But now I want to simulate the electronics etc and make an item that would go to reconstruction code. I think dd4hep has structure for this as well?
Hmmm. In principle this is what DDDigi is supposed to target. This however is work in progress where I only the last 6-8 weeks had considerable time to look into. Since I am not really an expert of the needs for the simulation of electronics and the data structures needed to enter the reconstruction.
The basic idea however is that at the end the results are captured in edm4hep structures, which looks like becoming some standard.
so right now all the ILC/CLIC/CEPC simulations that use dd4hep do their reconstruction right off the simhits?
ILC/CLIC/FCC use LCIO or edm4hep output to start the reconstruction which for them also includes the digitization. DDDigi was meant to separate digitization from reconstruction and therefore also allow e.g.
ah okay. Is there an example I can look at for going from the dd4hep simhit to LCIO/edm4hep? Especially I aim to put my detector eventually into a version of the IDEA simulation. Which format do they use?
There is an example from dd4hep::sim::Geant4XXXXHit to edm4hep in: https://github.com/AIDASoft/DD4hep/blob/master/DDG4/edm4hep/Geant4Output2EDM4hep.cpp For LCIO as well: https://github.com/AIDASoft/DD4hep/blob/master/DDG4/lcio/Geant4Output2LCIO.cpp
I do not know what IDEA uses...
Closing for lack of activity in this issue.
there is simply a lack of understanding what the various parameters really mean and what their value should be when they enter Geant4 -- for some I even had to guess the units for the conversion from TGeo to Geant4. If the parameters entering the game are far from what G4 expects, anything could go wrong.
For rechits or user defined hits, see
examples/DDG4_MySensDet
Have a look how the dictionary for theMyTrackerhits
is build. This should be all you need to e.g. save avector<MyTrackerHits(*)>
to a root tree. There is also the possibility to add a data structure to the Geant4Hit structure. This structure of course when it comes to persistency must be embedded in a user-defined structure, but at least then this string dependency is localized.Originally posted by @MarkusFrankATcernch in https://github.com/AIDASoft/DD4hep/issues/1027#issuecomment-1343011956