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;
void addTrack(TrackWithHistory *iTrack, bool inHistory, bool withAncestor)
int getOrCreateVertex(TrackWithHistory *, int, G4SimEvent *simEvent)
bool m_collapsePrimaryVertices
bool operator()(TrackWithHistory *&p, const unsigned int &i) const
std::map< int, MapVertexPositionVector > MotherParticleToVertexMap
TrackWithHistory * getTrackByID(unsigned int trackID, bool strict=false) const
SimTrackManager(bool iCollapsePrimaryVertices=false)
bool operator()(TrackWithHistory *trk1, TrackWithHistory *trk2) const
const SimTrackManager & operator=(const SimTrackManager &)=delete
void cleanTkCaloStateInfoMap()
virtual ~SimTrackManager()
TrackContainer * m_trksForThisEvent
U second(std::pair< T, U > const &p)
void addTkCaloStateInfo(uint32_t t, const std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > &p)
bool trackExists(unsigned int i) const
std::vector< TrackWithHistory * > TrackContainer
void cleanTracksWithHistory()
MotherParticleToVertexMap m_vertexMap
void storeTracks(G4SimEvent *simEvent)
std::vector< std::pair< int, int > > idsave
std::map< uint32_t, std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > > mapTkCaloStateInfo
const TrackContainer * trackContainer() const
std::pair< int, math::XYZVectorD > MapVertexPosition
this map contains association between vertex number and position
void saveTrackAndItsBranch(TrackWithHistory *)
this saves a track and all its parents looping over the non ordered vector
void setLHCTransportLink(const edm::LHCTransportLinkContainer *thisLHCTlink)
std::vector< LHCTransportLink > LHCTransportLinkContainer
const edm::LHCTransportLinkContainer * theLHCTlink
void reallyStoreTracks(G4SimEvent *simEvent)
int giveMotherNeeded(int i) const
int idSavedTrack(int) const
std::vector< std::pair< int, int > > ancestorList
void setCollapsePrimaryVertices(bool iSet)
MotherParticleToVertexMap VertexMap
std::vector< std::pair< int, math::XYZVectorD > > MapVertexPositionVector
unsigned int trackID() const