You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I notice that in DDG4/include/DDG4/DDG4Dict.h
Geant4:Tracker::Hit has several methods
1 default constructor
2 initializing constructor
3 default destructor
4 assignment operator
5 clear hit content
6 store geant4 point and step
while Geant4Calorimeter only has default constructor, initializing constructor, and destructor.
I guess if I need any of these other methods, I can just put them into my own sensitive hit structure, But souldn't at least the assignment operator be useful for a generic Geant$Calorimeter::Hit? Or this is probably okay without it?
The text was updated successfully, but these errors were encountered:
In general the assignment operator should be present at the moment a copy constructor exists -- or both should be disabled.
Though, in DDG4 the hits are associated by reference (aka pointer) and neither the copy constructor
not the assignment is ever used (except the tracker copy, which is not a true copy either; see below).
On the contrary, copies and assignments in most cases would be harmful for MC truth tracking etc.
It just is not possible to copy these objects and properly track MC truth at the same time.
I think I will rather disable all copies ans moves in these classes.
Hi,
I notice that in DDG4/include/DDG4/DDG4Dict.h
Geant4:Tracker::Hit has several methods
1 default constructor
2 initializing constructor
3 default destructor
4 assignment operator
5 clear hit content
6 store geant4 point and step
while Geant4Calorimeter only has default constructor, initializing constructor, and destructor.
I guess if I need any of these other methods, I can just put them into my own sensitive hit structure, But souldn't at least the assignment operator be useful for a generic Geant$Calorimeter::Hit? Or this is probably okay without it?
The text was updated successfully, but these errors were encountered: