StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFtpcDisplay.hh
1 // $Id: StFtpcDisplay.hh,v 1.11 2003/09/16 15:27:02 jcs Exp $
2 // $Log: StFtpcDisplay.hh,v $
3 // Revision 1.11 2003/09/16 15:27:02 jcs
4 // removed inline as it would leave a few undefined reference
5 //
6 // Revision 1.10 2003/09/02 17:58:16 perev
7 // gcc 3.2 updates + WarnOff
8 //
9 // Revision 1.9 2003/01/16 18:04:32 oldi
10 // Bugs eliminated. Now it compiles on Solaris again.
11 // Split residuals for global and primary fit.
12 //
13 // Revision 1.8 2002/04/05 16:50:28 oldi
14 // Cleanup of MomentumFit (StFtpcMomentumFit is now part of StFtpcTrack).
15 // Each Track inherits from StHelix, now.
16 // Therefore it is possible to calculate, now:
17 // - residuals
18 // - vertex estimations obtained by back extrapolations of FTPC tracks
19 // Chi2 was fixed.
20 // Many additional minor (and major) changes.
21 //
22 // Revision 1.7 2001/07/13 18:01:03 oldi
23 // New function WriteData() added. It writes TPolyMarkers and TPolyLine3Ds to
24 // a file which can be used to display results (pictures) offline.
25 //
26 // Revision 1.6 2000/11/10 18:37:24 oldi
27 // It is now possible to display tracks which should be longer (so called 'short tracks').
28 //
29 // Revision 1.5 2000/07/28 09:45:42 hummler
30 // change "Stiostream.h" to <Stiostream.h> for correct path
31 //
32 // Revision 1.4 2000/07/18 21:22:16 oldi
33 // Changes due to be able to find laser tracks.
34 // Cleanup: - new functions in StFtpcConfMapper, StFtpcTrack, and StFtpcPoint
35 // to bundle often called functions
36 // - short functions inlined
37 // - formulas of StFormulary made static
38 // - avoid streaming of objects of unknown size
39 // (removes the bunch of CINT warnings during compile time)
40 // - two or three minor bugs cured
41 //
42 // Revision 1.3 2000/06/07 11:35:12 oldi
43 // Major update due to naming changes.
44 // New data members added.
45 // Added Delete() function.
46 //
47 // Revision 1.2 2000/05/12 12:59:14 oldi
48 // removed delete operator for mSegment in StFtpcConfMapper (mSegment was deleted twice),
49 // add two new constructors for StFtpcTracker to be able to refit already existing tracks,
50 // minor cosmetics
51 //
52 // Revision 1.1 2000/05/10 13:39:14 oldi
53 // Initial version of StFtpcTrackMaker
54 //
55 
57 // //
58 // StFtpcDiplsay class - displays tracks and clusters //
59 // //
61 
62 #ifndef STAR_StFtpcDisplay
63 #define STAR_StFtpcDisplay
64 
65 #include <Stiostream.h>
66 
67 #include "TObjArray.h"
68 #include "TObject.h"
69 #include "TCanvas.h"
70 #include "TNode.h"
71 #include "TPolyMarker3D.h"
72 #include "TPolyLine3D.h"
73 #include "TCanvas.h"
74 #include "TNode.h"
75 
76 #include "MIntArray.h"
77 
78 class StFtpcDisplay : public TObject {
79 
80 private:
81  TObjArray *mTrack; // found tracks
82  TObjArray *mHit; // found hits
83  TObjArray *mGeantTrack; // geant tracks
84  TObjArray *mGeantHit; // geanthits
85 
86  Int_t mNumRowSegment; // number of row segments
87  Int_t mNumPhiSegment; // number of phi segments
88  Int_t mNumEtaSegment; // number of eta segments
89  Int_t mBounds; // row * phi * eta segments
90 
91  TCanvas *mX_Y_Z; // canvas for both Ftpcs
92  TCanvas *mX_Y_Zplus; // canvas for positive Ftpc
93  TCanvas *mX_Y_Zminus; // canvas for negative Ftpc
94 
95  TNode *mNode0; // node for both Ftpcs
96  TNode *mNode1; // node for positive Ftpcs
97  TNode *mNode2; // node for negative Ftpcs
98 
99  TPolyLine3D *geant_line; // geant tracks
100  TPolyLine3D *found_line; // found tracks
101  TPolyLine3D *current_line; // pointer to track
102 
103  TPolyMarker3D *found_hit; // cluster on track in both Ftpcs
104  TPolyMarker3D *found_hit_plus; // cluster on track in positive Ftpcs
105  TPolyMarker3D *found_hit_minus; // cluster on track in negative Ftpcs
106  TPolyMarker3D *geant_hit; // cluster on track in both Ftpcs
107  TPolyMarker3D *geant_hit_plus; // cluster on track in positive Ftpcs
108  TPolyMarker3D *geant_hit_minus; // cluster on track in negative Ftpcs
109  TPolyMarker3D *unused_hit; // unused cluster in both Ftpcs
110  TPolyMarker3D *unused_hit_plus; // unused cluster in positive Ftpcs
111  TPolyMarker3D *unused_hit_minus; // unused cluster in negative Ftpcs
112  TPolyMarker3D *wrong_hit; // wrong cluster on track in both Ftpcs
113  TPolyMarker3D *wrong_hit_plus; // wrong cluster on track in positive Ftpcs
114  TPolyMarker3D *wrong_hit_minus; // wrong cluster on track in negative Ftpcs
115 
116  Float_t *found_value;
117  Float_t *found_value_plus;
118  Float_t *found_value_minus;
119  Float_t *geant_value;
120  Float_t *geant_value_plus;
121  Float_t *geant_value_minus;
122  Float_t *unused_value;
123  Float_t *unused_value_plus;
124  Float_t *unused_value_minus;
125  Float_t *wrong_value;
126  Float_t *wrong_value_plus;
127  Float_t *wrong_value_minus;
128 
129 public:
130  StFtpcDisplay(); // default constructor
131  StFtpcDisplay(TObjArray *hits, TObjArray *tracks); // usual constructor
132  StFtpcDisplay(TObjArray *hits, TObjArray *tracks, TObjArray *geanthits, TObjArray *geanttracks); // constructor for evaluator
133  virtual ~StFtpcDisplay(); // destructor
134 
135  //void Info(); // prints general information
136  void WriteData(Char_t *filename); // writes clusters and tracks to file
137  void TrackInfo(); // plots single tracks
138  void ShowClusters(); // displays clusters
139  void ShowTracks(Int_t trackanz = 0, Int_t trackarray[] = 0); // displays tracks
140  void ShowEvalTracks(MIntArray *splitArr = 0, MIntArray *uncleanArr = 0, MIntArray *clusterArr = 0); // displays evaluated tracks
141  void FillGeant(Bool_t electrons, Bool_t non_vtx, Bool_t good, Bool_t geant_hits,
142  Float_t eta_low, Float_t eta_up, Float_t pt_low, Float_t pt_up, Bool_t blue);// fills geant histograms
143  void FillFound(Bool_t good_found, Bool_t st, MIntArray *split, MIntArray *unclean, MIntArray *found_hits,
144  Float_t eta_low, Float_t eta_up, Float_t pt_low, Float_t pt_up); // fills found histograms
145  void DrawNodes(); // draw nodes
146  void DeleteAll(); // deletes objects of found and geant tracks
147  void DeleteFound(); // deletes objects of found tracks
148  void DeleteGeant(); // deletes objects of geant tracks
149  void OnOff(Bool_t on); // prints 'On' or 'Off'
150 
151  ClassDef(StFtpcDisplay, 1) // Ftpc display class
152 };
153 
154 
155 
156 #endif
StFtpcDisplay()
wrong found hit coordinates of negative Ftpc