|
|
Go to the documentation of this file. 1 #ifndef Notification_SimTrackManager_h
2 #define Notification_SimTrackManager_h
70 std::pair<int, int> thisPair(iTrack->
trackID(), 0);
76 std::map<uint32_t, std::pair<math::XYZVectorD, math::XYZTLorentzVectorD> >::const_iterator it =
80 mapTkCaloStateInfo.insert(std::pair<uint32_t, std::pair<math::XYZVectorD, math::XYZTLorentzVectorD> >(
t,
p));
86 for (
unsigned int itr = 0; itr <
idsave.size(); itr++) {
96 for (
unsigned int itr = 0; itr < (*m_trksForThisEvent).size(); ++itr) {
105 bool trackFound =
false;
108 throw cms::Exception(
"Unknown",
"SimTrackManager") <<
"m_trksForThisEvent is a nullptr, cannot get any track!";
110 for (
unsigned int itr = 0; itr < (*m_trksForThisEvent).size(); ++itr) {
112 track = (*m_trksForThisEvent)[itr];
120 <<
"Attempted to get track " << trackID <<
" from SimTrackManager, but it's not in m_trksForThisEvent ("
121 << (*m_trksForThisEvent).size() <<
" tracks in m_trksForThisEvent)"
152 std::vector<std::pair<int, int> >
idsave;
TrackContainer * m_trksForThisEvent
MotherParticleToVertexMap m_vertexMap
std::vector< std::pair< int, math::XYZVectorD > > MapVertexPositionVector
std::vector< LHCTransportLink > LHCTransportLinkContainer
void storeTracks(G4SimEvent *simEvent)
std::map< uint32_t, std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > > mapTkCaloStateInfo
bool trackExists(unsigned int i) const
MotherParticleToVertexMap VertexMap
std::pair< int, math::XYZVectorD > MapVertexPosition
this map contains association between vertex number and position
U second(std::pair< T, U > const &p)
void setCollapsePrimaryVertices(bool iSet)
virtual ~SimTrackManager()
const edm::LHCTransportLinkContainer * theLHCTlink
void reallyStoreTracks(G4SimEvent *simEvent)
int giveMotherNeeded(int i) const
bool m_collapsePrimaryVertices
void addTkCaloStateInfo(uint32_t t, const std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > &p)
int getOrCreateVertex(TrackWithHistory *, int, G4SimEvent *simEvent)
std::vector< std::pair< int, int > > ancestorList
std::map< int, MapVertexPositionVector > MotherParticleToVertexMap
void cleanTkCaloStateInfoMap()
std::vector< std::pair< int, int > > idsave
void addTrack(TrackWithHistory *iTrack, bool inHistory, bool withAncestor)
TrackWithHistory * getTrackByID(unsigned int trackID, bool strict=false) const
void cleanTracksWithHistory()
void saveTrackAndItsBranch(TrackWithHistory *)
this saves a track and all its parents looping over the non ordered vector
void setLHCTransportLink(const edm::LHCTransportLinkContainer *thisLHCTlink)
unsigned int trackID() const
std::vector< TrackWithHistory * > TrackContainer
bool operator()(TrackWithHistory *trk1, TrackWithHistory *trk2) const
const SimTrackManager & operator=(const SimTrackManager &)=delete
SimTrackManager(bool iCollapsePrimaryVertices=false)
int idSavedTrack(int) const
const TrackContainer * trackContainer() const
bool operator()(TrackWithHistory *&p, const unsigned int &i) const