CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
SimTrackManager Class Reference

#include <SimG4Core/Application/interface/SimTrackManager.h>

Classes

class  StrictWeakOrdering
 

Public Types

typedef std::pair< int,
math::XYZVectorD
MapVertexPosition
 this map contains association between vertex number and position More...
 
typedef std::vector< std::pair
< int, math::XYZVectorD > > 
MapVertexPositionVector
 
typedef std::map< int,
MapVertexPositionVector
MotherParticleToVertexMap
 
typedef MotherParticleToVertexMap VertexMap
 

Public Member Functions

void addTkCaloStateInfo (uint32_t t, std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > p)
 
void addTrack (TrackWithHistory *iTrack, bool inHistory, bool withAncestor)
 
void cleanTkCaloStateInfoMap ()
 
void cleanTracksWithHistory ()
 
void deleteTracks ()
 
int giveMotherNeeded (int i) const
 
void reset ()
 
void setCollapsePrimaryVertices (bool iSet)
 
void setLHCTransportLink (const edm::LHCTransportLinkContainer *thisLHCTlink)
 
 SimTrackManager (bool iCollapsePrimaryVertices=false)
 
void storeTracks (G4SimEvent *simEvent)
 
const TrackContainertrackContainer () const
 
bool trackExists (unsigned int i) const
 
virtual ~SimTrackManager ()
 

Private Member Functions

void cleanVertexMap ()
 
void fillMotherList ()
 
int getOrCreateVertex (TrackWithHistory *, int, G4SimEvent *simEvent)
 
int idSavedTrack (int) const
 
const SimTrackManageroperator= (const SimTrackManager &)
 
void reallyStoreTracks (G4SimEvent *simEvent)
 
void resetGenID ()
 
void saveTrackAndItsBranch (TrackWithHistory *)
 this saves a track and all its parents looping over the non ordered vector More...
 
 SimTrackManager (const SimTrackManager &)
 

Private Attributes

std::vector< std::pair< int,
int > > 
ancestorList
 
std::vector< std::pair< int,
int > > 
idsave
 
unsigned int lastHist
 
unsigned int lastTrack
 
bool m_collapsePrimaryVertices
 
int m_nVertices
 
bool m_SaveSimTracks
 
TrackContainerm_trksForThisEvent
 
MotherParticleToVertexMap m_vertexMap
 
std::map< uint32_t, std::pair
< math::XYZVectorD,
math::XYZTLorentzVectorD > > 
mapTkCaloStateInfo
 
const
edm::LHCTransportLinkContainer
theLHCTlink
 

Detailed Description

Description: Holds tracking information used by the sensitive detectors

Usage: <usage>

Definition at line 35 of file SimTrackManager.h.

Member Typedef Documentation

this map contains association between vertex number and position

Definition at line 46 of file SimTrackManager.h.

typedef std::vector<std::pair<int,math::XYZVectorD> > SimTrackManager::MapVertexPositionVector

Definition at line 47 of file SimTrackManager.h.

Definition at line 48 of file SimTrackManager.h.

Definition at line 49 of file SimTrackManager.h.

Constructor & Destructor Documentation

SimTrackManager::SimTrackManager ( bool  iCollapsePrimaryVertices = false)

Definition at line 37 of file SimTrackManager.cc.

37  :
39  m_collapsePrimaryVertices(iCollapsePrimaryVertices),
40  lastTrack(0),lastHist(0),theLHCTlink(0){}
bool m_collapsePrimaryVertices
unsigned int lastHist
TrackContainer * m_trksForThisEvent
unsigned int lastTrack
const edm::LHCTransportLinkContainer * theLHCTlink
SimTrackManager::~SimTrackManager ( )
virtual

Definition at line 43 of file SimTrackManager.cc.

References deleteTracks(), and m_trksForThisEvent.

44 {
45  if ( m_trksForThisEvent != 0 ) deleteTracks() ;
46 }
TrackContainer * m_trksForThisEvent
SimTrackManager::SimTrackManager ( const SimTrackManager )
private

Member Function Documentation

void SimTrackManager::addTkCaloStateInfo ( uint32_t  t,
std::pair< math::XYZVectorD, math::XYZTLorentzVectorD p 
)
inline

Definition at line 74 of file SimTrackManager.h.

References mapTkCaloStateInfo.

Referenced by EventAction::addTkCaloStateInfo().

74  {
75  std::map<uint32_t,std::pair<math::XYZVectorD,math::XYZTLorentzVectorD> >::const_iterator it =
76  mapTkCaloStateInfo.find(t);
77 
78  if (it == mapTkCaloStateInfo.end())
79  mapTkCaloStateInfo.insert(std::pair<uint32_t,std::pair<math::XYZVectorD,math::XYZTLorentzVectorD> >(t,p));
80 
81  }
std::map< uint32_t, std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > > mapTkCaloStateInfo
void SimTrackManager::addTrack ( TrackWithHistory iTrack,
bool  inHistory,
bool  withAncestor 
)
inline

Definition at line 67 of file SimTrackManager.h.

References ancestorList, idsave, m_trksForThisEvent, TrackWithHistory::parentID(), and TrackWithHistory::trackID().

Referenced by EventAction::addTrack().

67  {
68  std::pair<int, int> thePair(iTrack->trackID(),iTrack->parentID());
69  idsave.push_back(thePair);
70  if (inHistory) m_trksForThisEvent->push_back(iTrack);
71  if (withAncestor) { std::pair<int,int> thisPair(iTrack->trackID(),0); ancestorList.push_back(thisPair); }
72  }
TrackContainer * m_trksForThisEvent
std::vector< std::pair< int, int > > idsave
unsigned int trackID() const
int parentID() const
std::vector< std::pair< int, int > > ancestorList
void SimTrackManager::cleanTkCaloStateInfoMap ( )

Definition at line 210 of file SimTrackManager.cc.

References mapTkCaloStateInfo, and swap().

Referenced by EventAction::EndOfEventAction(), and reset().

210  {
211  mapTkCaloStateInfo.clear();
212  std::map<uint32_t,std::pair<math::XYZVectorD,math::XYZTLorentzVectorD > >().swap(mapTkCaloStateInfo);
213 }
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
std::map< uint32_t, std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > > mapTkCaloStateInfo
void SimTrackManager::cleanTracksWithHistory ( )

Definition at line 250 of file SimTrackManager.cc.

References fillMotherList(), idsave, lastTrack, LogDebug, m_trksForThisEvent, TrackWithHistory::saved(), saveTrackAndItsBranch(), edm::second(), lumiQTWidget::t, and TrackWithHistory::trackID().

Referenced by EventAction::prepareForNewPrimary(), and storeTracks().

250  {
251 
252  using namespace std;
253 
254  if ((*m_trksForThisEvent).size() == 0 && idsave.size() == 0) return;
255 
256 #ifdef DebugLog
257  LogDebug("SimTrackManager") << "SimTrackManager::cleanTracksWithHistory has " << idsave.size()
258  << " mother-daughter relationships stored with lastTrack = " << lastTrack;
259 #endif
260 
261  if ( lastTrack > 0 && lastTrack >= (*m_trksForThisEvent).size() ) {
262  lastTrack = 0;
263  edm::LogError("SimTrackManager") << " SimTrackManager::cleanTracksWithHistory track index corrupted";
264  }
265 
266  stable_sort(m_trksForThisEvent->begin()+lastTrack,m_trksForThisEvent->end(),trkIDLess());
267 
268  stable_sort(idsave.begin(),idsave.end());
269 
270 #ifdef DebugLog
271  LogDebug("SimTrackManager") << " SimTrackManager::cleanTracksWithHistory knows " << m_trksForThisEvent->size()
272  << " tracks with history before branching";
273  for (unsigned int it =0; it <(*m_trksForThisEvent).size(); it++)
274  LogDebug("SimTrackManager") << " 1 - Track in position " << it << " G4 track number "
275  << (*m_trksForThisEvent)[it]->trackID()
276  << " mother " << (*m_trksForThisEvent)[it]->parentID()
277  << " status " << (*m_trksForThisEvent)[it]->saved();
278 #endif
279 
280  for (unsigned int it = lastTrack; it < m_trksForThisEvent->size(); it++)
281  {
282  TrackWithHistory * t = (*m_trksForThisEvent)[it];
283  if (t->saved()) saveTrackAndItsBranch(t);
284  }
285  unsigned int num = lastTrack;
286  for (unsigned int it = lastTrack; it < m_trksForThisEvent->size(); it++)
287  {
288  TrackWithHistory * t = (*m_trksForThisEvent)[it];
289  int g4ID = t->trackID();
290  if (t->saved() == true)
291  {
292  if (it>num) (*m_trksForThisEvent)[num] = t;
293  num++;
294  for (unsigned int itr=0; itr<idsave.size(); itr++) {
295  if ((idsave[itr]).first == g4ID) {
296  (idsave[itr]).second = g4ID; break; }
297  }
298  }
299  else
300  {
301  delete t;
302  }
303  }
304 
305  (*m_trksForThisEvent).resize(num);
306 
307 #ifdef DebugLog
308  LogDebug("SimTrackManager") << " AFTER CLEANING, I GET " << (*m_trksForThisEvent).size()
309  << " tracks to be saved persistently";
310  for (unsigned int it = 0; it < (*m_trksForThisEvent).size(); it++)
311  LogDebug("SimTrackManager") << " Track in position " << it
312  << " G4 track number " << (*m_trksForThisEvent)[it]->trackID()
313  << " mother " << (*m_trksForThisEvent)[it]->parentID()
314  << " Status " << (*m_trksForThisEvent)[it]->saved();
315 #endif
316 
317  fillMotherList();
318 
319  lastTrack = (*m_trksForThisEvent).size();
320 
321 }
#define LogDebug(id)
bool saved() const
TrackContainer * m_trksForThisEvent
U second(std::pair< T, U > const &p)
std::vector< std::pair< int, int > > idsave
unsigned int trackID() const
long long int num
Definition: procUtils.cc:71
void saveTrackAndItsBranch(TrackWithHistory *)
this saves a track and all its parents looping over the non ordered vector
unsigned int lastTrack
void SimTrackManager::cleanVertexMap ( )
private

Definition at line 204 of file SimTrackManager.cc.

References m_nVertices, and m_vertexMap.

Referenced by reset().

204  {
205  m_vertexMap.clear();
207  m_nVertices=0;
208 }
MotherParticleToVertexMap m_vertexMap
std::map< int, MapVertexPositionVector > MotherParticleToVertexMap
void SimTrackManager::deleteTracks ( )

Definition at line 81 of file SimTrackManager.cc.

References i, and m_trksForThisEvent.

Referenced by EventAction::EndOfEventAction(), and ~SimTrackManager().

82 {
83  for (unsigned int i = 0; i < m_trksForThisEvent->size(); i++) delete (*m_trksForThisEvent)[i];
84  delete m_trksForThisEvent;
86 }
int i
Definition: DBlmapReader.cc:9
TrackContainer * m_trksForThisEvent
void SimTrackManager::fillMotherList ( )
private

Definition at line 228 of file SimTrackManager.cc.

References ancestorList, first, idsave, idSavedTrack(), lastHist, LogDebug, and n.

Referenced by cleanTracksWithHistory().

228  {
229 
230  if ( ancestorList.size() > 0 && lastHist > ancestorList.size() ) {
231  lastHist = ancestorList.size();
232  edm::LogError("SimTrackManager") << " SimTrackManager::fillMotherList track index corrupted";
233  }
234 
235  for (unsigned int n = lastHist; n < ancestorList.size(); n++) {
236 
237  int theMotherId = idSavedTrack((ancestorList[n]).first);
238  ancestorList[n].second = theMotherId;
239 #ifdef DebugLog
240  LogDebug("SimTrackManager") << "Track ID = " << (ancestorList[n]).first << " Mother ID = " << (ancestorList[n]).second;
241 #endif
242  }
243 
244  lastHist = ancestorList.size();
245 
246  idsave.clear();
247 
248 }
#define LogDebug(id)
unsigned int lastHist
std::vector< std::pair< int, int > > idsave
int idSavedTrack(int) const
bool first
Definition: L1TdeRCT.cc:94
std::vector< std::pair< int, int > > ancestorList
int SimTrackManager::getOrCreateVertex ( TrackWithHistory trkH,
int  iParentID,
G4SimEvent simEvent 
)
private

Definition at line 172 of file SimTrackManager.cc.

References G4SimEvent::add(), CastorDataFrameFilter_impl::check(), first, TrackWithHistory::globalTime(), gen::k, m_nVertices, m_vertexMap, dbtoconf::parent, mathSSE::sqrt(), and TrackWithHistory::vertexPosition().

Referenced by reallyStoreTracks().

173  {
174 
175  int parent = iParentID;
176  int check = -1;
177 
178  for( std::vector<TrackWithHistory*>::const_iterator it = (*m_trksForThisEvent).begin();
179  it!= (*m_trksForThisEvent).end();it++){
180  if ((*it)->trackID() == uint32_t(parent)){
181  check = 0;
182  break;
183  }
184  }
185 
186  if(check==-1) parent = -1;
187 
188  VertexMap::const_iterator iterator = m_vertexMap.find(parent);
189  if (iterator != m_vertexMap.end()){
190  // loop over saved vertices
191  for (unsigned int k=0; k<m_vertexMap[parent].size(); k++){
192  if (sqrt((trkH->vertexPosition()-(((m_vertexMap[parent])[k]).second)).Mag2())<0.001)
193  return (((m_vertexMap[parent])[k]).first);
194  }
195  }
196 
197  simEvent->add(new G4SimVertex(trkH->vertexPosition(),trkH->globalTime(),parent));
199  m_nVertices++;
200  return (m_nVertices-1);
201 
202 }
list parent
Definition: dbtoconf.py:74
void add(G4SimTrack *t)
Definition: G4SimEvent.h:35
T sqrt(T t)
Definition: SSEVec.h:46
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
std::pair< int, math::XYZVectorD > MapVertexPosition
this map contains association between vertex number and position
MotherParticleToVertexMap m_vertexMap
bool first
Definition: L1TdeRCT.cc:94
int k[5][pyjets_maxn]
double globalTime() const
const math::XYZVectorD & vertexPosition() const
int SimTrackManager::giveMotherNeeded ( int  i) const
inline

Definition at line 85 of file SimTrackManager.h.

References i, idsave, and edm::second().

Referenced by CaloSD::saveHit().

85  {
86  int theResult = 0;
87  for (unsigned int itr=0; itr<idsave.size(); itr++) { if ((idsave[itr]).first == i) { theResult = (idsave[itr]).second; break; } }
88  return theResult ;
89  }
int i
Definition: DBlmapReader.cc:9
U second(std::pair< T, U > const &p)
std::vector< std::pair< int, int > > idsave
int SimTrackManager::idSavedTrack ( int  i) const
private

Definition at line 215 of file SimTrackManager.cc.

References i, errorMatrix2Lands_multiChannel::id, idsave, and edm::second().

Referenced by fillMotherList().

216 {
217 
218  int id = 0;
219  if (i > 0) {
220  for (unsigned int itr=0; itr<idsave.size(); itr++) { if ((idsave[itr]).first == i) { id = (idsave[itr]).second; break; } }
221  if (id != i) return idSavedTrack(id);
222  id = i;
223  }
224  return id;
225 }
int i
Definition: DBlmapReader.cc:9
U second(std::pair< T, U > const &p)
std::vector< std::pair< int, int > > idsave
int idSavedTrack(int) const
const SimTrackManager& SimTrackManager::operator= ( const SimTrackManager )
private
void SimTrackManager::reallyStoreTracks ( G4SimEvent simEvent)
private

Definition at line 136 of file SimTrackManager.cc.

References G4SimEvent::add(), TrackWithHistory::genParticleID(), getOrCreateVertex(), LogDebug, m_trksForThisEvent, mapTkCaloStateInfo, TrackWithHistory::momentum(), TrackWithHistory::parentID(), TrackWithHistory::particleID(), TrackWithHistory::totalEnergy(), and TrackWithHistory::trackID().

Referenced by storeTracks().

137 {
138  // loop over the (now ordered) vector and really save the tracks
139 #ifdef DebugLog
140  LogDebug("SimTrackManager") << "Inside the reallyStoreTracks method object to be stored = "
141  << m_trksForThisEvent->size();
142 #endif
143 
144  for (unsigned int it = 0; it < m_trksForThisEvent->size(); it++)
145  {
146  TrackWithHistory * trkH = (*m_trksForThisEvent)[it];
147  // at this stage there is one vertex per track, so the vertex id of track N is also N
148  int ivertex = -1;
149  int ig;
150 
151  math::XYZVectorD pm(0.,0.,0.);
152  unsigned int iParentID = trkH->parentID();
153  for(unsigned int iit = 0; iit < m_trksForThisEvent->size(); iit++)
154  {
155  if((*m_trksForThisEvent)[iit]->trackID()==iParentID){
156  pm = (*m_trksForThisEvent)[iit]->momentum();
157  break;
158  }
159  }
160  ig = trkH->genParticleID();
161  ivertex = getOrCreateVertex(trkH,iParentID,simEvent);
162  std::map<uint32_t,std::pair<math::XYZVectorD,math::XYZTLorentzVectorD> >::const_iterator cit = mapTkCaloStateInfo.find(trkH->trackID());
163  std::pair<math::XYZVectorD,math::XYZTLorentzVectorD> tcinfo;
164  if (cit != mapTkCaloStateInfo.end()){
165  tcinfo = cit->second;
166  }
167  simEvent->add(new G4SimTrack(trkH->trackID(),trkH->particleID(),
168  trkH->momentum(),trkH->totalEnergy(),ivertex,ig,pm,tcinfo.first,tcinfo.second));
169  }
170 }
#define LogDebug(id)
int getOrCreateVertex(TrackWithHistory *, int, G4SimEvent *simEvent)
double totalEnergy() const
std::map< uint32_t, std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > > mapTkCaloStateInfo
TrackContainer * m_trksForThisEvent
void add(G4SimTrack *t)
Definition: G4SimEvent.h:35
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:9
unsigned int trackID() const
int particleID() const
int parentID() const
const math::XYZVectorD & momentum() const
int genParticleID() const
void SimTrackManager::reset ( void  )

Definition at line 63 of file SimTrackManager.cc.

References ancestorList, cleanTkCaloStateInfoMap(), cleanVertexMap(), i, idsave, lastHist, lastTrack, m_trksForThisEvent, and swap().

Referenced by EventAction::BeginOfEventAction().

64 {
66  else
67  {
68  for (unsigned int i = 0; i < m_trksForThisEvent->size(); i++)
69  delete (*m_trksForThisEvent)[i];
70  delete m_trksForThisEvent;
72  }
75  std::vector<std::pair <int, int> >().swap(idsave);
76  ancestorList.clear();
77  lastTrack=0;
78  lastHist=0;
79 }
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
int i
Definition: DBlmapReader.cc:9
void cleanTkCaloStateInfoMap()
unsigned int lastHist
TrackContainer * m_trksForThisEvent
std::vector< TrackWithHistory * > TrackContainer
Definition: TrackContainer.h:8
std::vector< std::pair< int, int > > idsave
unsigned int lastTrack
std::vector< std::pair< int, int > > ancestorList
void SimTrackManager::resetGenID ( )
private

Definition at line 323 of file SimTrackManager.cc.

References TrackWithHistory::genParticleID(), m_trksForThisEvent, TrackWithHistory::setGenParticleID(), and theLHCTlink.

Referenced by storeTracks().

323  {
324 
325  if ( theLHCTlink == 0 ) return;
326 
327  for (unsigned int it = 0; it < m_trksForThisEvent->size(); it++)
328  {
329  TrackWithHistory * trkH = (*m_trksForThisEvent)[it];
330  int genParticleID_ = trkH->genParticleID();
331  if ( genParticleID_ == -1 ) { continue; }
332  else {
333  for ( unsigned int itrlink = 0; itrlink < (*theLHCTlink).size(); itrlink++ ) {
334  if ( (*theLHCTlink)[itrlink].afterHector() == genParticleID_ ) {
335  trkH->setGenParticleID( (*theLHCTlink)[itrlink].beforeHector() );
336  continue;
337  }
338  }
339  }
340  }
341 
342  theLHCTlink = 0;
343 
344 }
void setGenParticleID(int i)
TrackContainer * m_trksForThisEvent
const edm::LHCTransportLinkContainer * theLHCTlink
int genParticleID() const
void SimTrackManager::saveTrackAndItsBranch ( TrackWithHistory trkWHist)
private

this saves a track and all its parents looping over the non ordered vector

Definition at line 89 of file SimTrackManager.cc.

References m_trksForThisEvent, and dbtoconf::parent.

Referenced by cleanTracksWithHistory().

90 {
91  using namespace std;
92  TrackWithHistory * trkH = trkWHist;
93  if (trkH == 0)
94  {
95  edm::LogError("SimTrackManager") << " SimTrackManager::saveTrackAndItsBranch got 0 pointer ";
96  abort();
97  }
98  trkH->save();
99  unsigned int parent = trkH->parentID();
100  bool parentExists=false;
101 
102  TrackContainer::const_iterator tk_itr = std::lower_bound((*m_trksForThisEvent).begin(),(*m_trksForThisEvent).end(),
104 
105  TrackWithHistory * tempTk = *tk_itr;
106  // TrackWithHistory * tempTk = new TrackWithHistory(**tk_itr);
107  if (tk_itr!=m_trksForThisEvent->end() && (*tk_itr)->trackID()==parent) {
108  parentExists=true;
109  }
110 
111  if (parentExists) saveTrackAndItsBranch(tempTk);
112 
113  // delete tempTk;
114 
115 }
list parent
Definition: dbtoconf.py:74
TrackContainer * m_trksForThisEvent
void saveTrackAndItsBranch(TrackWithHistory *)
this saves a track and all its parents looping over the non ordered vector
void SimTrackManager::setCollapsePrimaryVertices ( bool  iSet)
inline

Definition at line 82 of file SimTrackManager.h.

References m_collapsePrimaryVertices.

Referenced by EventAction::EventAction().

82  {
84  }
bool m_collapsePrimaryVertices
void SimTrackManager::setLHCTransportLink ( const edm::LHCTransportLinkContainer thisLHCTlink)
inline

Definition at line 100 of file SimTrackManager.h.

References theLHCTlink.

100 { theLHCTlink = thisLHCTlink; }
const edm::LHCTransportLinkContainer * theLHCTlink
void SimTrackManager::storeTracks ( G4SimEvent simEvent)

Definition at line 117 of file SimTrackManager.cc.

References ancestorList, cleanTracksWithHistory(), idsave, m_trksForThisEvent, reallyStoreTracks(), resetGenID(), and swap().

Referenced by EventAction::EndOfEventAction().

118 {
120 
121  // fill the map with the final mother-daughter relationship
122  idsave.swap(ancestorList);
123  stable_sort(idsave.begin(),idsave.end());
124 
125  std::vector<std::pair<int,int> >().swap(ancestorList);
126 
127  // to get a backward compatible order
128  stable_sort(m_trksForThisEvent->begin(),m_trksForThisEvent->end(),trkIDLess());
129 
130  // to reset the GenParticle ID of a SimTrack to its pre-LHCTransport value
131  resetGenID();
132 
133  reallyStoreTracks(simEvent);
134 }
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
TrackContainer * m_trksForThisEvent
std::vector< std::pair< int, int > > idsave
void cleanTracksWithHistory()
void reallyStoreTracks(G4SimEvent *simEvent)
std::vector< std::pair< int, int > > ancestorList
const TrackContainer* SimTrackManager::trackContainer ( ) const
inline

Definition at line 55 of file SimTrackManager.h.

References m_trksForThisEvent.

Referenced by EventAction::trackContainer(), and CaloSD::update().

55  {
56  return m_trksForThisEvent;
57  }
TrackContainer * m_trksForThisEvent
bool SimTrackManager::trackExists ( unsigned int  i) const
inline

Definition at line 90 of file SimTrackManager.h.

References i, and m_trksForThisEvent.

Referenced by CaloSD::saveHit().

90  {
91  bool flag = false;
92  for (unsigned int itr=0; itr<(*m_trksForThisEvent).size(); ++itr) {
93  if ((*m_trksForThisEvent)[itr]->trackID() == i) {
94  flag = true; break;
95  }
96  }
97  return flag;
98  }
int i
Definition: DBlmapReader.cc:9
long int flag
Definition: mlp_lapack.h:47
TrackContainer * m_trksForThisEvent

Member Data Documentation

std::vector<std::pair<int, int> > SimTrackManager::ancestorList
private

Definition at line 126 of file SimTrackManager.h.

Referenced by addTrack(), fillMotherList(), reset(), and storeTracks().

std::vector< std::pair<int, int> > SimTrackManager::idsave
private
unsigned int SimTrackManager::lastHist
private

Definition at line 129 of file SimTrackManager.h.

Referenced by fillMotherList(), and reset().

unsigned int SimTrackManager::lastTrack
private

Definition at line 128 of file SimTrackManager.h.

Referenced by cleanTracksWithHistory(), and reset().

bool SimTrackManager::m_collapsePrimaryVertices
private

Definition at line 122 of file SimTrackManager.h.

Referenced by setCollapsePrimaryVertices().

int SimTrackManager::m_nVertices
private

Definition at line 121 of file SimTrackManager.h.

Referenced by cleanVertexMap(), and getOrCreateVertex().

bool SimTrackManager::m_SaveSimTracks
private

Definition at line 119 of file SimTrackManager.h.

TrackContainer* SimTrackManager::m_trksForThisEvent
private
MotherParticleToVertexMap SimTrackManager::m_vertexMap
private

Definition at line 120 of file SimTrackManager.h.

Referenced by cleanVertexMap(), and getOrCreateVertex().

std::map<uint32_t,std::pair<math::XYZVectorD,math::XYZTLorentzVectorD > > SimTrackManager::mapTkCaloStateInfo
private
const edm::LHCTransportLinkContainer* SimTrackManager::theLHCTlink
private

Definition at line 131 of file SimTrackManager.h.

Referenced by resetGenID(), and setLHCTransportLink().