RecoText Class Reference

#include <RecoText.h>

List of all members.

Public Member Functions

 RecoText (GuiTextView *gtv)
virtual ~RecoText ()
void Clear ()
void AddLine (const char *line)
void AddText (const char *text)
void Update (Mint *mint)
void AddPlexSEIdAltLItemText (const PlexSEIdAltLItem &inItem)
void AddStripIdText (const PlexStripEndId &inStrip)
void AddPixelSpotIdText (const PlexPixelSpotId &inStrip)
GuiTextViewGetTextView ()

Private Member Functions

 RecoText (const RecoText &rhs)
RecoTextoperator= (const RecoText &rhs)

Private Attributes

GuiTextViewfText


Detailed Description

Id
RecoText.h,v 1.3 2003/08/22 16:47:11 musser Exp

Definition at line 27 of file RecoText.h.


Constructor & Destructor Documentation

RecoText::RecoText ( GuiTextView gtv  ) 

Definition at line 25 of file RecoText.cxx.

00026     : fText(gtv)
00027 {
00028 }

RecoText::~RecoText (  )  [virtual]

Definition at line 30 of file RecoText.cxx.

References fText.

00031 {
00032     delete fText;
00033 }

RecoText::RecoText ( const RecoText rhs  )  [private]


Member Function Documentation

void RecoText::AddLine ( const char *  line  ) 

Definition at line 41 of file RecoText.cxx.

References fText.

00042 {
00043     if (!line) return;
00044     fText->AddLine(line);
00045 }

void RecoText::AddPixelSpotIdText ( const PlexPixelSpotId inStrip  ) 

void RecoText::AddPlexSEIdAltLItemText ( const PlexSEIdAltLItem inItem  ) 

void RecoText::AddStripIdText ( const PlexStripEndId inStrip  ) 

void RecoText::AddText ( const char *  text  ) 

Definition at line 47 of file RecoText.cxx.

References fText.

00048 {
00049     if (!text) return;
00050 
00051     // Break up text into lines.
00052     const char* linestart = text;
00053     const char* ptr = text;
00054     while ((*ptr) != '\0') {
00055         if (*ptr == '\n') {
00056             int length = ptr-linestart;
00057             char* line = new char[length+1];
00058             strncpy(line,linestart,length-1); // Omit the return char.
00059             fText->AddLine(line);
00060         }
00061         ++ptr;
00062     }
00063 }

void RecoText::Clear (  ) 

Definition at line 36 of file RecoText.cxx.

References fText.

Referenced by Update().

00037 {
00038     fText->Clear();
00039 }

GuiTextView* RecoText::GetTextView (  ) 

RecoText& RecoText::operator= ( const RecoText rhs  )  [private]

void RecoText::Update ( Mint mint  ) 

Definition at line 66 of file RecoText.cxx.

References Clear(), Form(), fText, CandFitTrackHandle::GetChi2(), CandHandle::GetDaughterIterator(), CandFitTrackHandle::GetEMCharge(), CandFitTrackHandle::GetMomentumCurve(), CandHandle::GetNDaughters(), CandFitTrackHandle::GetNDOF(), CandFitTrackHandle::GetNIterate(), CandFitTrackHandle::GetNSwimFail(), CandTrackSRHandle::GetNTimeFitDigit(), CandTrackHandle::GetNTimeFitDigit(), CandFitTrackHandle::GetPass(), Mint::GetShowers(), CandTrackSRHandle::GetTimeFitChi2(), CandTrackHandle::GetTimeFitChi2(), Mint::GetTracks(), CandFitTrackHandle::GetVtxQPError(), CalStripType::kMIP, CalStripType::kNone, CalStripType::kPE, CalStripType::kSigMapped, PlaneView::kU, PlaneView::kV, Munits::ns, and nTracks.

Referenced by EVD::Recotext(), and EVD::Update().

00067 {
00068  
00069   Clear();
00070 
00071   fText->AddLine("Reconstruction Summary"); 
00072   fText->AddLine(""); 
00073 
00074   int nTracks=0;
00075   int nShowers=0;
00076                  
00077   const CandTrackListHandle* tracklisthandle = mint->GetTracks();
00078  
00079   if (tracklisthandle) 
00080     {
00081       TIter trackItr(tracklisthandle->GetDaughterIterator());
00082       nTracks=tracklisthandle->GetNDaughters();
00083  
00084       fText->AddLine("Track Reconstruction"); 
00085       fText->AddLine("");
00086       if(nTracks==0) fText->AddLine("No Reconstructed Tracks");
00087       int nt=1;
00088 
00089       while (CandTrackHandle *track = dynamic_cast<CandTrackHandle*>
00090              (trackItr())) 
00091         {
00092           CandTrackSRHandle *tracksr = 0;
00093           CandFitTrackHandle *fittrack = 0;
00094           CandFitTrackSRHandle *fittracksr = 0;
00095           if (track->InheritsFrom("CandTrackSRHandle")) {
00096             tracksr = dynamic_cast<CandTrackSRHandle*>(track);
00097           }
00098           if (track->InheritsFrom("CandFitTrackHandle")) {
00099             fittrack = dynamic_cast<CandFitTrackHandle*>(track);
00100           }
00101           if (track->InheritsFrom("CandFitTrackSRHandle")) {
00102             fittracksr = dynamic_cast<CandFitTrackSRHandle*>(track);
00103           }
00104 
00105           fText->AddLine(Form("Track %d of %d",nt,nTracks));
00106           fText->AddLine(Form("# Digits: %d",track->GetNDigit()));
00107           fText->AddLine(Form("# Strips: %d",track->GetNStrip()));
00108           fText->AddLine(Form("Track Length: %f",track->GetdS()));
00109           fText->AddLine(Form("Range: %f",track->GetRange()));
00110           fText->AddLine(Form("Momentum: %f",track->GetMomentum()));
00111           if (fittrack) {
00112             double q = fittrack->GetEMCharge();
00113             double c = fittrack->GetMomentumCurve();
00114             if (c != 0.0) 
00115               fText->AddLine(Form("Fit Q/P: %f",q/c));
00116             else
00117               fText->AddLine("Fit Q/P: Inf");
00118             fText->AddLine(Form("Fit Chi2: %f",fittrack->GetChi2()));
00119             fText->AddLine(Form("Pass: %d",fittrack->GetPass()));
00120           }
00121           if (fittracksr) {
00122             fText->AddLine(Form("Error in Q/P: %f",fittracksr->GetVtxQPError()));
00123             fText->AddLine(Form("Degrees of Freedome: %d",fittracksr->GetNDOF()));
00124             fText->AddLine(Form("# Iterations: %d",fittracksr->GetNIterate()));
00125             fText->AddLine(Form("# Swimmer Failures %d",fittracksr->GetNSwimFail()));
00126           }
00127 
00128           fText->AddLine(Form("Beginning Plane: %d",track->GetBegPlane()));
00129           fText->AddLine(Form("Beginning U Plane: %d",
00130                               track->GetBegPlane(PlaneView::kU)));
00131           fText->AddLine(Form("Beginning V Plane: %d",
00132                               track->GetBegPlane(PlaneView::kV)));
00133           fText->AddLine(Form("Ending Plane: %d",track->GetEndPlane()));
00134           fText->AddLine(Form("Ending U Plane: %d",
00135                               track->GetEndPlane(PlaneView::kU)));
00136           fText->AddLine(Form("Ending V Plane: %d",
00137                             track->GetEndPlane(PlaneView::kV)));
00138           fText->AddLine(Form("Total Raw ADC: %f",
00139                               track->GetCharge(CalStripType::kNone)));
00140           fText->AddLine(Form("Corrected ADC: %f", 
00141                               track->GetCharge(CalStripType::kSigMapped)));
00142           fText->AddLine(Form("Total PEs: %f",
00143                               track->GetCharge(CalStripType::kPE)));
00144           fText->AddLine(Form("Vertex U Position: %f",track->GetVtxU()));
00145           fText->AddLine(Form("Vertex V Position: %f",track->GetVtxV()));
00146           fText->AddLine(Form("Vertex X Position: %f",
00147                               .70710678*(track->GetVtxU()-track->GetVtxV())));
00148           fText->AddLine(Form("Vertex Y Position: %f",
00149                               .70710678*(track->GetVtxU()+track->GetVtxV())));
00150           fText->AddLine(Form("Vertex Z Position: %f",track->GetVtxZ()));
00151           fText->AddLine(Form("Vertex Plane: %d",track->GetVtxPlane()));
00152           fText->AddLine(Form("Vertex U dir Cosine: %f", track->GetDirCosU()));
00153           fText->AddLine(Form("Vertex V dir Cosine: %f",track->GetDirCosV()));
00154           fText->AddLine(Form("Vertex X dir Cosine: %f",
00155                               .70710678*(track->GetDirCosU()-track->GetDirCosV())));
00156           fText->AddLine(Form("Vertex Y dir Cosine: %f",
00157                               .70710678*(track->GetDirCosU()+track->GetDirCosV())));
00158           fText->AddLine(Form("Vertex Z dir Cosine: %f",track->GetDirCosZ()));
00159           if (fittracksr) {
00160             fText->AddLine(Form("# Time Fit Digits: %d",
00161                                 fittracksr->GetNTimeFitDigit()));
00162             fText->AddLine(Form("Time Fit Chi2: %f",
00163                                 fittracksr->GetTimeFitChi2()));
00164           }
00165           else if (tracksr) {
00166             fText->AddLine(Form("# Time Fit Digits: %d",
00167                                 tracksr->GetNTimeFitDigit()));
00168             fText->AddLine(Form("Time Fit Chi2: %f",
00169                                 tracksr->GetTimeFitChi2()));
00170           }
00171           fText->AddLine(Form("Time Slope: %f",
00172                               fabs(track->GetTimeSlope())*3.e8));
00173           
00174           nt++;
00175           fText->AddLine("");
00176         }
00177     }
00178   const CandShowerListHandle* showerlisthandle = mint->GetShowers();
00179   if (showerlisthandle) {
00180     int ns=1;
00181     TIter showerItr(showerlisthandle->GetDaughterIterator());
00182     nShowers=showerlisthandle->GetNDaughters();
00183     
00184     fText->AddLine("Shower Reconstruction"); 
00185     fText->AddLine(""); 
00186     if(nShowers==0) fText->AddLine("No Reconstructed Showers");
00187     while (CandShowerHandle *shower = dynamic_cast<CandShowerHandle*>
00188              (showerItr())) 
00189       {
00190         fText->AddLine(Form("Shower: %d of %d",ns,nShowers));
00191         fText->AddLine(Form("# Planes: %d",shower->GetNPlane()));
00192         fText->AddLine(Form("# U Planes %d",shower->GetNPlane(PlaneView::kU)));
00193         fText->AddLine(Form("# V Planes: %d",shower->GetNPlane(PlaneView::kV)));
00194         fText->AddLine(Form("Begin Plane: %d", shower->GetBegPlane()));
00195         fText->AddLine(Form("Begin U Plane: %d",
00196                             shower->GetBegPlane(PlaneView::kU)));
00197         fText->AddLine(Form("Begin V Plane: %d",
00198                             shower->GetBegPlane(PlaneView::kV)));
00199         fText->AddLine(Form("End Plane: %d",shower->GetEndPlane()));
00200         fText->AddLine(Form("End U Plane: %d",
00201                             shower->GetEndPlane(PlaneView::kU)));
00202         fText->AddLine(Form("End U Plane: %d",
00203                             shower->GetEndPlane(PlaneView::kV)));
00204         fText->AddLine(Form("Vertex U Position: %f",shower->GetVtxU()));
00205         fText->AddLine(Form("Vertex V Position: %f",shower->GetVtxV()));
00206         fText->AddLine(Form("Vertex X Position: %f",
00207                             .70710678*(shower->GetVtxU()-shower->GetVtxV())));
00208         fText->AddLine(Form("Vertex Y Position: %f",
00209                             .70710678*(shower->GetVtxU()+shower->GetVtxV())));
00210         fText->AddLine(Form("Vertex Z Position: %f",shower->GetVtxZ()));
00211         fText->AddLine(Form("Vertex Plane: %d",shower->GetVtxPlane()));
00212         
00213         fText->AddLine(Form("Raw Shower Sum: %f",
00214                             shower->GetCharge(CalStripType::kNone)));
00215           fText->AddLine(Form("Total PEs: %f",
00216                               shower->GetCharge(CalStripType::kPE)));   
00217         fText->AddLine(Form("Shower Sum (MIPs): %f",
00218                             shower->GetCharge(CalStripType::kMIP)));
00219         fText->AddLine(Form("Shower Energy (GeV): %f",
00220                             shower->GetEnergy()));
00221         ns++;
00222         fText->AddLine("");
00223       }
00224   }
00225 
00226 }


Member Data Documentation

GuiTextView* RecoText::fText [private]

Definition at line 51 of file RecoText.h.

Referenced by AddLine(), AddText(), Clear(), Update(), and ~RecoText().


The documentation for this class was generated from the following files:
Generated on Wed Sep 10 22:52:03 2014 for loon by  doxygen 1.4.7