StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StGlobalTrack.cxx
1 /***************************************************************************
2  *
3  * $Id: StGlobalTrack.cxx,v 2.13 2013/07/23 11:21:49 jeromel Exp $
4  *
5  * Author: Thomas Ullrich, Sep 1999
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StGlobalTrack.cxx,v $
13  * Revision 2.13 2013/07/23 11:21:49 jeromel
14  * Undo past week changes
15  *
16  * Revision 2.11 2013/04/10 19:15:52 jeromel
17  * Step back from StEvent changes - previous change recoverable [Thomas OK-ed]
18  *
19  * Revision 2.9 2013/01/15 23:21:05 fisyak
20  * improve printouts
21  *
22  * Revision 2.8 2012/06/11 14:40:34 fisyak
23  * Adjust format
24  *
25  * Revision 2.7 2012/05/07 14:42:57 fisyak
26  * Add handilings for Track to Fast Detectors Matching
27  *
28  * Revision 2.6 2009/11/23 16:34:06 fisyak
29  * Cleanup, remove dependence on dst tables, clean up software monitors
30  *
31  * Revision 2.5 2007/03/20 20:56:19 perev
32  * LeakFix StDcaGeometry was not deleted at all
33  *
34  * Revision 2.4 2006/05/24 17:28:19 ullrich
35  * Added track-at-DCA geometry.
36  *
37  * Revision 2.3 2004/07/15 16:36:24 ullrich
38  * Removed all clone() declerations and definitions. Use StObject::clone() only.
39  *
40  * Revision 2.2 2001/03/24 03:34:47 perev
41  * clone() -> clone() const
42  *
43  * Revision 2.1 1999/10/28 22:25:36 ullrich
44  * Adapted new StArray version. First version to compile on Linux and Sun.
45  *
46  * Revision 2.0 1999/10/12 18:42:10 ullrich
47  * Completely Revised for New Version
48  *
49  **************************************************************************/
50 #include "StGlobalTrack.h"
51 #include "StVertex.h"
52 #include "StDcaGeometry.h"
53 
54 ClassImp(StGlobalTrack)
55 
56 static const char rcsid[] = "$Id: StGlobalTrack.cxx,v 2.13 2013/07/23 11:21:49 jeromel Exp $";
58 {
59  mDcaGeometry=0;
60  if (track.mDcaGeometry) mDcaGeometry = new StDcaGeometry(*(track.mDcaGeometry));
61 }
62 
63 StGlobalTrack& StGlobalTrack::operator=(const StGlobalTrack& track)
64 {
65  if (this != &track) {
66  delete mDcaGeometry; mDcaGeometry=0;
67  static_cast<StTrack&>(*this) = track;
68  if (track.mDcaGeometry) mDcaGeometry = new StDcaGeometry(*(track.mDcaGeometry));
69  }
70  return *this;
71 }
72 //________________________________________________________________________________
73 ostream& operator<<(ostream& os, const StGlobalTrack& track) {
74  os << *((StTrack *) &track);
75  const StDcaGeometry* dca = track.dcaGeometry();
76  if (dca) os << " " << *dca;
77  os << Form(" NF %2d chi2 %8.3g", track.fitTraits().numberOfFitPoints(),track.fitTraits().chi2(0));
78 #if 0
79  if (track.idTruth())
80  os << Form(" IdT: %4i Q: %4i", track.idTruth(), track.qaTruth());
81 #endif
82  return os;
83 }
84 //________________________________________________________________________________