StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtAssociationReader.cxx
1 #define DIFF_CUT_OFF 1.
2 
3 #include "StHbtMaker/Reader/StHbtAssociationReader.h"
4 #include "StHbtMaker/Infrastructure/StHbtTrackCollection.hh"
5 #include "StHbtMaker/Infrastructure/StHbtV0Collection.hh"
6 #include "StEventUtilities/StuRefMult.hh"
7 
8 #include "StHbtMaker/Infrastructure/StHbtEvent.hh"
9 #include "StHbtMaker/Base/StHbtEventCut.h"
10 #include "StHbtMaker/Base/StHbtTrackCut.h"
11 #include "StHbtMaker/Base/StHbtV0Cut.h"
12 #include "StHbtMaker/Base/StHbtKinkCut.h"
13 
14 #include "StChain.h"
15 #include "TOrdCollection.h"
16 
17 #include "StEventTypes.h"
18 #include "StParticleTypes.hh"
19 #include "SystemOfUnits.h" // has "tesla" in it
20 #include "StTpcDedxPidAlgorithm.h"
21 #include <math.h>
22 // #include "StGlobalTrack.h"
23 // #include "StTrackNode.h"
24 // #include "StContainers.h"
25 // #include "StPrimaryVertex.h"
26 // #include "StVertex.h"
27 // #include "StMeasuredPoint.h"
28 // #include "StDedxPidTraits.h"
29 // #include "StTrackPidTraits.h"
30 // #include "StTrackGeometry.h"
31 // #include "StTrackDetectorInfo.h"
32 
33 
34 
35 #include "StAssociationMaker/StAssociationMaker.h"
36 
37 #include "StStrangeMuDstMaker/StStrangeEvMuDst.hh"
38 #include "StStrangeMuDstMaker/StV0MuDst.hh"
39 
40 #include "StMcEventTypes.hh"
41 #include "StMcEvent.hh"
42 #include "PhysicalConstants.h"
43 #include "SystemOfUnits.h"
44 #include "StThreeVector.hh"
45 #include "StThreeVectorF.hh"
46 #include "StThreeVectorD.hh"
47 
48 #include "StChain.h"
49 #include "St_DataSet.h"
50 #include "St_DataSetIter.h"
51 
52 #include "g2t_event.h"
53 #include "g2t_ftp_hit.h"
54 #include "g2t_svt_hit.h"
55 #include "g2t_tpc_hit.h"
56 #include "g2t_track.h"
57 #include "g2t_vertex.h"
58 
59 #include "tables/St_g2t_event_Table.h"
60 #include "tables/St_g2t_ftp_hit_Table.h"
61 #include "tables/St_g2t_svt_hit_Table.h"
62 #include "tables/St_g2t_tpc_hit_Table.h"
63 #include "tables/St_g2t_track_Table.h"
64 #include "tables/St_g2t_vertex_Table.h"
65 
66 // #include "StMcEvent.hh"
67 // #include "StMcTrack.hh"
68 // #include "StMcTpcHit.hh"
69 // #include "StMcFtpcHit.hh"
70 // #include "StMcSvtHit.hh"
71 // #include "StMcVertex.hh"
72 
73 #include "StAssociationMaker/StTrackPairInfo.hh"
74 #include "StParticleDefinition.hh"
75 #include "StPhysicalHelix.hh"
76 
77 
78 #ifndef ST_NO_NAMESPACES
79  using namespace units;
80 #endif
81 
82 struct vertexFlag {
83  StMcVertex* vtx;
84  int primaryFlag; };
85 
86 //__________________
87 StHbtAssociationReader::StHbtAssociationReader() : mPerfectPID(true) {
88  mDiffCurrent = new StHbt1DHisto("Diff_current", " (p_real - p_mc ) / p_real ",100,-1.,1.);
89  mDiff = new StHbt1DHisto("Diff", " (p_real - p_mc ) / p_real ",100,-1.,1.);
90  mDiffMean = new StHbt1DHisto("Diff_mean", " mean of (p_real - p_mc ) / p_real ",100,-1.,1.);
91  mDiffRMS = new StHbt1DHisto("Diff_sigma", " sigma of (p_real - p_mc ) / p_real ",100,0.,1.);
92  eventNumber=0;
93  mEventCut=0;
94  mTrackCut=0;
95  mReaderStatus = 0; // "good"
96  mV0=0;
97 }
98 //__________________
99 StHbtAssociationReader::~StHbtAssociationReader(){
100  cout << " StHbtAssociationReader::~StHbtAssociationReader() " << endl;
101  if (mEventCut) delete mEventCut;
102  if (mTrackCut) delete mTrackCut;
103 }
104 //__________________
105 StHbtString StHbtAssociationReader::Report(){
106  StHbtString temp = "\n This is the StHbtAssociationReader\n";
107  temp += "---> EventCuts in Reader: ";
108  if (mEventCut) {
109  temp += mEventCut->Report();
110  }
111  else {
112  temp += "NONE";
113  }
114  temp += "\n---> TrackCuts in Reader: ";
115  if (mTrackCut) {
116  temp += mTrackCut->Report();
117  }
118  else {
119  temp += "NONE";
120  }
121  temp += "\n";
122  return temp;
123 }
124 //__________________
125 StHbtEvent* StHbtAssociationReader::ReturnHbtEvent(){
126  cout << " **************************************************************************************" << endl;
127  cout << " StHbtAssociationReader::ReturnHbtEvent() : Seconds elapsed since last call : " << difftime( time(0), timeStamp ) << endl;
128  cout << " **************************************************************************************" << endl;
129  timeStamp = time(0);
130  // ********************************
131  // get pointer to eventMaker, event
132  // ********************************
133 
134  // the following lines commented out as per S&C request September 2005 - malisa
135  // StEvent* rEvent = 0;
136  // StEventMaker* tempMaker = (StEventMaker*) mTheEventMaker;
137  // rEvent = tempMaker->event();
138  // and they are replaced by the one following line
139  StEvent* rEvent = (StEvent*) StMaker::GetChain()->GetDataSet("StEvent");
140  // end changes malisa sept2005
141  if (!rEvent){
142  cout << "StHbtAssociationReader - No StEvent!!! " << endl;
143  return 0;
144  }
145  cout << " StEvent " << endl;
146  // **************************************
147  // get pointer to mcEventMaker, Event *
148  // **************************************
149  StMcEvent* mEvent = 0;
150 
151 
152  // malisa sept2005 - similar change as above
153  // StMcEventMaker* mTempMaker = (StMcEventMaker*) mTheMcEventMaker;
154  // mEvent = mTempMaker->currentMcEvent();
155  // 28sep2005 - mike lisa replaces the two lines above with the
156  // following one as per http://www.star.bnl.gov/HyperNews-star/protected/get/starsoft/
157  mEvent = (StMcEvent*) StMaker::GetChain()->GetDataSet("StMcEvent");
158 
159 
160  if (!mEvent){
161  cout << "StHbtAssociationReader - No StMcEvent!!! " << endl;
162  return 0;
163  }
164  cout << " McEvent " << endl;
165  // ****************************************
166  // get pointer to associationMaker, mcEvent
167  // ****************************************
168  StAssociationMaker* assoc = 0;
169  assoc = (StAssociationMaker*) mTheAssociationMaker;
170  //assoc = (StAssociationMaker*) gStChain->Maker("Associations");
171  if (!assoc){
172  cout << "StHbtAssociationReader - No StAssociationMaker!!! " << endl;
173  cout << "StHbtAssociationReader - assoc " << assoc <<endl;
174  return 0;
175  }
176  rcTpcHitMapType* theHitMap = 0;
177  theHitMap = assoc->rcTpcHitMap();
178  if (!theHitMap){
179  cout << "StHbtAssociationReader - No tpcHitMap!!! " << endl;
180  cout << "StHbtAssociationReader - theHitMap " << theHitMap <<endl;
181  return 0;
182  }
183  rcTrackMapType* theTrackMap = 0;
184  theTrackMap = assoc->rcTrackMap();
185  if (!theTrackMap){
186  cout << "StHbtAssociationReader - No trackMap!!! " << endl;
187  cout << "StHbtAssociationReader - theTrackMap " << theTrackMap <<endl;
188  return 0;
189  }
190  rcV0MapType* theV0Map = 0;
191  theV0Map = assoc->rcV0Map();
192  if (!theV0Map){
193  cout << "StHbtAssociationReader - No v0Map!!! " << endl;
194  cout << "StHbtAssociationReader - theV0Map " << theV0Map <<endl;
195  return 0;
196  }
197 
198  if ( !(rEvent->primaryVertex()) || // no pointer to prim vertex
199  (mEvent->primaryVertex()->position().x() == mEvent->primaryVertex()->position().y() &&
200  mEvent->primaryVertex()->position().y() == mEvent->primaryVertex()->position().z() ) ||// x==y==z --> mark for bad events from embedding
201  ::isnan(rEvent->primaryVertex()->position().x()) // vertex position not a number
202  ) {
203  cout << "StHbtAssociationReader - bad vertex !!! " << endl;
204  return 0;
205  }
206 
207 
208  // o.k. we got a StEvent and a McEvent --> create hbtEvent
209 
210  // ******************
211  // Event properties
212  // ******************
213  // ******************************
214  // cross check event <--> mcEvent
215  // ******************************
216  cout << " **********************" << endl;
217  cout << " StHbtAssociationReader" << endl;
218  cout << " **********************" << endl;
219  unsigned long mRunNumber = mEvent->runNumber();
220  unsigned long rRunNumber = rEvent->runId();
221  cout << " DST run: #" << rRunNumber << endl;
222  cout << " MC run: #" << mRunNumber << endl;
223  unsigned long rEventNumber = 0;
224  unsigned long mEventNumber = mEvent->eventNumber();
225  cout << " DST event: #" << rEventNumber << endl;
226  cout << " MC event: #" << mEventNumber << endl;
227  int rMult = rEvent->trackNodes().size();
228  int mMult = mEvent->tracks().size();
229  cout << " DST mult: #" << rMult << endl;
230  cout << " MC mult: #" << mMult << endl;
231  if ( !rEvent->primaryVertex() ) return 0;
232  if ( !mEvent->primaryVertex() ) return 0;
233  StHbtThreeVector rVertexPosition = rEvent->primaryVertex()->position();
234  StHbtThreeVector mVertexPosition = mEvent->primaryVertex()->position();
235  cout << " DST primary Vertex #" << rVertexPosition << endl;
236  cout << " MC primary Vertex #" << mVertexPosition << endl;
237 
238  cout << "StHbtAssociationReader::ReturnHbtEvent - We have " << rMult << " tracks to store - we skip tracks with nhits==0" << endl;
239 
240  double pathlength;
242  StHbtThreeVector mp;
243 
244  mDiffCurrent->Reset();
245 
246  float diff=0;
247 
248  StHbtEvent* hbtEvent = new StHbtEvent;
249 
250  hbtEvent->SetEventNumber(rEventNumber);
251  hbtEvent->SetUncorrectedNumberOfPositivePrimaries(uncorrectedNumberOfPositivePrimaries(*rEvent));
252  hbtEvent->SetUncorrectedNumberOfNegativePrimaries(uncorrectedNumberOfNegativePrimaries(*rEvent));
253  hbtEvent->SetCtbMult(0);
254  hbtEvent->SetZdcAdcEast(0);
255  hbtEvent->SetZdcAdcWest(0);
256  hbtEvent->SetNumberOfTpcHits(0);
257  hbtEvent->SetNumberOfTracks(rMult);
258  hbtEvent->SetReactionPlane(0.);
259  hbtEvent->SetReactionPlaneSubEventDifference(0.);
260  hbtEvent->SetPrimVertPos(rVertexPosition);
261 
262  // By now, all event-wise information has been extracted and stored in hbtEvent
263  // see if it passes any front-loaded event cut
264 // if (mEventCut){
265 // if (!(mEventCut->Pass(hbtEvent))){ // event failed! - return null pointer (but leave Reader status flag as "good")
266 // delete hbtEvent;
267 // return 0;
268 // }
269 // }
270 
271  StTpcDedxPidAlgorithm* PidAlgorithm = new StTpcDedxPidAlgorithm();
272 
273  if (!PidAlgorithm) cout << " StStandardHbtEventReader::ReturnHbtEvent() - Whoa!! No PidAlgorithm!! " << endl;
274 
275  // the following just point to particle definitions in StEvent
276  StElectron* Electron = StElectron::instance();
277  StPionPlus* Pion = StPionPlus::instance();
278  StKaonPlus* Kaon = StKaonPlus::instance();
279  StProton* Proton = StProton::instance();
280 
281  {for (rcTrackMapIter tIter=theTrackMap->begin(); tIter!=theTrackMap->end(); ++tIter){
282  // cout << "Doing track number " << ++icount << endl;
283  const StGlobalTrack* rTrack = (*tIter).first;
284  // do I really got a track
285  if (!rTrack) {
286  continue;
287  }
288  // check number points in tpc
289  int nhits = rTrack->detectorInfo()->numberOfPoints(kTpcId);
290  //cout << "nhits\t" << nhits << endl;
291  if (nhits==0) {
292  //cout << "No hits -- skipping track (because it crashes otherwise)" << endl;
293  continue;
294  }
295 
296  // *********************************
297  // checking for associated mc tracks
298  // *********************************
299  int numberOfassociatedTracks = theTrackMap->count(rTrack);
300  if (numberOfassociatedTracks !=1) {
301  // cout << " number of associated mc tracks : " << theTrackMap->count(rTrack) << endl;
302  // cout << " skip this track" << endl;
303  continue;
304  }
305 
306  // while getting the bestGuess, the pidAlgorithm (StTpcDedxPidAlgorithm) is set up.
307  // pointers to track and pidTraits are set
308  StParticleDefinition* BestGuess = (StParticleDefinition*)rTrack->pidTraits(*PidAlgorithm);
309  // if (BestGuess) cout << "best guess for particle is " << BestGuess->name() << endl; //2dec9
310  if (!BestGuess){
311  continue;
312  }
313 
314  // **********************
315  // get associated mctrack
316  // **********************
317  const StMcTrack* mTrack = (*tIter).second->partnerMcTrack();
318 
319  // check Pdg Id of the StMcTrack and its mc-mother and mc-daughters
320  int pdgCode = 0;
321  int motherPdgCode = 0;
322  int daughterPdgCode =0;
323  int motherTrackId =0;
324  if (CheckPdgIdLists()) {
325  int check=0;
326  if (!mTrack->particleDefinition()) {
327  cout << " track has no particle definiton " << endl;
328  continue;
329  }
330  pdgCode = mTrack->particleDefinition()->pdgEncoding();
331  // this was just stupid... mal 14nov01 motherPdgCode = mTrack->parent(); // 0 if no start vertex
332  // if (motherPdgCode) {
333  if (mTrack->parent()) {
334  motherPdgCode = mTrack->parent()->pdgId();
335  motherTrackId = mTrack->parent()->key();
336  }
337  if (motherPdgCode) cout << " motherPdgCode :" << motherPdgCode << endl;
338  else cout << " mother has no pdgId "<< endl;
339  if ( mTrack->stopVertex() == 0 ) {
340  check += CheckPdgIdList(pdgCode,motherPdgCode,0);
341  }
342  else {
343  for (unsigned int iDaughter=0; iDaughter < mTrack->stopVertex()->daughters().size()-1; iDaughter++) {
344  daughterPdgCode = mTrack->stopVertex()->daughters()[iDaughter]->pdgId();
345  check += CheckPdgIdList(pdgCode,motherPdgCode,daughterPdgCode);
346  }
347  }
348  if ( !(check) ) {
349  continue; // particle failed, continue with next track
350  }
351  }
352 
353 
354  int geantId = mTrack->geantId();
355 
356 
357  //cout << " partnerMcTrack geant Id : " << mTrack->geantId() << endl;
358  //cout << " partnerMcTrack particleDefinition : " << *(mTrack->particleDefinition()) << endl;
359 
360  // ****************************************
361  // check momenta of real track and mc track
362  // ****************************************
363  pathlength = rTrack->geometry()->helix().pathLength( rVertexPosition );
364  //cout << "pathlength\t" << pathlength << endl;
365  p = rTrack->geometry()->momentum();
366  mp = mTrack->momentum();
367  //cout << "p: " << p << endl;
368  //cout << "mp: " << mp << endl;
369  diff = (p.mag()-mp.mag()) / p.mag();
370 
371  if ( fabs(diff) > DIFF_CUT_OFF ) {
372  // cout << "StHbtAssociationReader::ReturnEvent() : momenta diff " << 100 * diff << " % -- track skipped -- " << endl;
373  continue;
374  }
375 
376  mDiff->Fill(diff,1.);
377  mDiffCurrent->Fill(diff,1.);
378 
379  // cout << "Getting readty to instantiate new StHbtTrack " << endl;
380  // o.k., god track found, fill it
381  StHbtTrack* hbtTrack = new StHbtTrack;
382 
383  //cout << "StHbtTrack instantiated " << endl;
384 
385  hbtTrack->SetTrackId((int)(rTrack->key()+motherTrackId*::pow(2,16)));
386 
387  hbtTrack->SetNHits(nhits);
388 
389  if (mPerfectPID) {
390  switch (geantId) {
391  case 2: // intentional fall-through
392  case 3: // gid=2,3 is electron
393  hbtTrack->SetNSigmaElectron(0.);
394  hbtTrack->SetNSigmaPion(-999);
395  hbtTrack->SetNSigmaKaon(-999.);
396  hbtTrack->SetNSigmaProton(-999.);
397  break;
398  case 8: // intentional fall-through
399  case 9: // gid=8,9 is pion
400  hbtTrack->SetNSigmaElectron(999.);
401  hbtTrack->SetNSigmaPion(0.);
402  hbtTrack->SetNSigmaKaon(-999.);
403  hbtTrack->SetNSigmaProton(-999.);
404  break;
405  case 11: // intentional fall-through
406  case 12: // gid=11,12 is kaon
407  hbtTrack->SetNSigmaElectron(999.);
408  hbtTrack->SetNSigmaPion(999.0);
409  hbtTrack->SetNSigmaKaon(0.);
410  hbtTrack->SetNSigmaProton(-999.);
411  break;
412  case 14: // intentional fall-through
413  case 15: // gid=14,15 is proton
414  hbtTrack->SetNSigmaElectron(999.);
415  hbtTrack->SetNSigmaPion(999.);
416  hbtTrack->SetNSigmaKaon(999.);
417  hbtTrack->SetNSigmaProton(0.);
418  break;
419  default:
420  hbtTrack->SetNSigmaElectron(999.);
421  hbtTrack->SetNSigmaPion(999.);
422  hbtTrack->SetNSigmaKaon(999.);
423  hbtTrack->SetNSigmaProton(999.);
424  break;
425  }
426  }
427  else {
428  hbtTrack->SetNSigmaElectron(PidAlgorithm->numberOfSigma(Electron));
429  hbtTrack->SetNSigmaPion(PidAlgorithm->numberOfSigma(Pion));
430  hbtTrack->SetNSigmaKaon(PidAlgorithm->numberOfSigma(Kaon));
431  hbtTrack->SetNSigmaProton(PidAlgorithm->numberOfSigma(Proton));
432  }
433 
434 
435  //cout << "dEdx\t" << PidAlgorithm->traits()->mean() << endl;
436  hbtTrack->SetdEdx(PidAlgorithm->traits()->mean());
437 
438  double pathlength = rTrack->geometry()->helix().pathLength(rVertexPosition);
439  //cout << "pathlength\t" << pathlength << endl;
440  StHbtThreeVector p = rTrack->geometry()->momentum();
441  //cout << "p: " << p << endl;
442  hbtTrack->SetP(p);
443 
444  StHbtThreeVector DCAxyz = rTrack->geometry()->helix().at(pathlength)-rVertexPosition;
445  //cout << "DCA\t\t" << DCAxyz << " " << DCAxyz.perp() << endl;
446  hbtTrack->SetDCAxy( DCAxyz.perp() );
447  hbtTrack->SetDCAz( DCAxyz.z() );
448 
449  hbtTrack->SetChiSquaredXY( rTrack->fitTraits().chi2(0) );
450  hbtTrack->SetChiSquaredZ( rTrack->fitTraits().chi2(1) );
451 
452  StPhysicalHelixD helix = rTrack->geometry()->helix();
453  hbtTrack->SetHelix( helix );
454 
455  float pt = ::sqrt(p[0]*p[0]+p[1]*p[1]);
456  //cout << "pt\t\t\t" << pt << endl;
457  //hbtTrack->SetPt(pt);
458 
459  hbtTrack->SetPt(pt);
460 
461  int charge = ( rTrack->geometry()->charge() );
462  //cout << "charge\t\t\t\t" << charge << endl;
463  hbtTrack->SetCharge(charge);
464 
465  hbtTrack->SetTopologyMap( 0, rTrack->topologyMap().data(0) );
466  hbtTrack->SetTopologyMap( 1, rTrack->topologyMap().data(1) );
467 
468  //cout << "pushing..." <<endl;
469  // By now, all track-wise information has been extracted and stored in hbtTrack
470  // see if it passes any front-loaded event cut
471  if (mTrackCut){
472  if (!(mTrackCut->Pass(hbtTrack))){ // track failed - delete it and skip the push_back
473  delete hbtTrack;
474  continue;
475  }
476  }
477 
478  hbtEvent->TrackCollection()->push_back(hbtTrack);
479  }}
480 
481 
482  hbtEvent->SetNumberOfGoodTracks(hbtEvent->TrackCollection()->size());
483 
484  cout << " StHbtAssociationReader::ReturnEvent() : mean of momenta diff (accepted tracks)= " << mDiffCurrent->GetMean() << endl;
485  cout << " StHbtAssociationReader::ReturnEvent() : rms of momenta diff (accepted tracks)= " << mDiffCurrent->GetRMS() << endl;
486  mDiffMean->Fill(mDiffCurrent->GetMean(),1.);
487  mDiffRMS->Fill(mDiffCurrent->GetRMS(),1.);
488  cout << " StHbtAssociationReader::ReturnEvent() : DiffCurrent (p_real - p_mc ) / p_real " << mDiffCurrent << endl;
489  cout << " StHbtAssociationReader::ReturnEvent() : Diff (p_real - p_mc ) / p_real " << mDiff << endl;
490  cout << " StHbtAssociationReader::ReturnEvent() : DiffMean mean of (p_real - p_mc ) / p_real " << mDiffMean << endl;
491  cout << " StHbtAssociationReader::ReturnEvent() : DiffSigma sigma of (p_real - p_mc ) / p_real " << mDiffRMS << endl;
492 
493 
494  //the fastes way to fill the StHbtV0 is to create the StStrangeEvMuDst with the StV0MuDst and the copy into StHbtV0
495  StStrangeEvMuDst strangeEvMuDst(*rEvent);
496  // loop over all the StV0Vertices
497  {for (rcV0MapIter tIter=theV0Map->begin(); tIter!=theV0Map->end(); ++tIter){
498  StV0Vertex* rV0Vertex = (StV0Vertex*) (*tIter).first; // got the V0 from reconstruction
499  StV0MuDst v0MuDst(rV0Vertex,&strangeEvMuDst); // create the StV0MuDst
500  cout << " StHbtAssociationEventReader::ReturnHbtEvent() " << theV0Map->count(rV0Vertex) << " associated V0s " << endl;
501  // loop over associated tracks // maybe later you want to check particle ids
502  pair<rcV0MapIter, rcV0MapIter> boundsV0 = theV0Map->equal_range(rV0Vertex);
503  for (rcV0MapIter v0Iter = boundsV0.first; v0Iter!= boundsV0.second; v0Iter++){ // loop over all associated V0s
504  }
505  StHbtV0* hbtV0 = new StHbtV0(v0MuDst); // copy into StHbtV0;
506  if (mV0Cut){ // check whether vo passes cuts
507  if (!(mV0Cut->Pass(hbtV0))) { // track failed - delete it and skip the push_back
508  delete hbtV0;
509  continue;
510  }
511  }
512  hbtEvent->V0Collection()->push_back(hbtV0); // good V0 fill in collection
513  }}
514 
515  cout << " StHbtAssociationReader::ReturnHbtEvent() - " << hbtEvent->V0Collection()->size();
516  cout << " V0s pushed in collection " << endl;
517 
518  eventNumber++;
519  return hbtEvent;
520 }
521 
522 ClassImp(StHbtAssociationReader)
523 
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Definition: StMcTrack.hh:144
pair< double, double > pathLength(double r) const
path length at given r (cylindrical r)
Definition: StHelix.cc:351
rcTpcHitMapType * rcTpcHitMap()
Diff btw global r and phi coords of FTPC hits.
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...
Definition: StMcEvent.hh:169