Skip to content
Snippets Groups Projects
Commit 276a44bc authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

WIP: add user track info to record the extra information of track.

parent 9d036808
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
gaudi_add_library(DetSimInterface
SOURCES src/IDetSimSvc.cpp
src/CommonUserEventInfo.cc
src/CommonUserTrackInfo.cc
LINK Gaudi::GaudiKernel
${Geant4_LIBRARIES}
)
......
#ifndef CommonUserTrackInfo_hh
#define CommonUserTrackInfo_hh
/* Description:
* This class is a part of simulation framework to extend the G4Track.
*
* Some secondaries are created due to decay. However, their G4 Track IDs are
* not valid until the tracks are tracking by geant4. In order to associate
* these tracks and their edm4hep MC particle, we use the track information
* to record the extra track information.
*
* Author:
* Tao Lin <lintao AT ihep.ac.cn>
*/
#include "G4VUserTrackInformation.hh"
class CommonUserTrackInfo: public G4VUserTrackInformation {
public:
CommonUserTrackInfo();
~CommonUserTrackInfo();
public:
virtual void Print() const;
// get the idx in the EDM4hep MC particle collection
bool setIdxEdm4hep(int idxEdm4hep);
int idxEdm4hep() const;
private:
int m_idxEdm4hep = -1;
};
#endif
#include "DetSimInterface/CommonUserTrackInfo.hh"
#include <iostream>
CommonUserTrackInfo::CommonUserTrackInfo() {
}
CommonUserTrackInfo::~CommonUserTrackInfo() {
}
void CommonUserTrackInfo::Print() const {
}
bool CommonUserTrackInfo::setIdxEdm4hep(int idxEdm4hep) {
m_idxEdm4hep = idxEdm4hep;
}
int CommonUserTrackInfo::idxEdm4hep() const {
return m_idxEdm4hep;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment