Commit in lcsim/sandbox/RobKutschke/TRFTests/v1 on MAIN
RKTrackFitDiag.java+23-101.2 -> 1.3
Remove obsolete diagnostics.  Change some clouds to histograms.

lcsim/sandbox/RobKutschke/TRFTests/v1
RKTrackFitDiag.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- RKTrackFitDiag.java	7 Sep 2007 19:00:40 -0000	1.2
+++ RKTrackFitDiag.java	18 Sep 2007 16:34:10 -0000	1.3
@@ -22,9 +22,9 @@
  * Make some diagnostic histograms a fitted track.
  *
  *@author $Author: kutschke $
- *@version $Id: RKTrackFitDiag.java,v 1.2 2007/09/07 19:00:40 kutschke Exp $
+ *@version $Id: RKTrackFitDiag.java,v 1.3 2007/09/18 16:34:10 kutschke Exp $
  *
- * Date $Date: 2007/09/07 19:00:40 $
+ * Date $Date: 2007/09/18 16:34:10 $
  *
  */
 
@@ -32,6 +32,13 @@
 
     public RKTrackFitDiag( String tag, String type, int nbins, double[] limits ){
 	this.tag = tag;
+
+	// Directory into which histograms and clouds will go.
+	tagdir = "/" + tag;
+
+	String pwd = aida.tree().pwd();
+	aida.tree().mkdir(tagdir);
+	aida.tree().cd(tagdir);
 	
 	// Book histograms.
 	for ( int i=0; i<5; ++i ){
@@ -39,12 +46,12 @@
 	    sigma[i] = aida.histogram1D(tag + " Sigma " +i,     nbins, 0., limits[i] );
 	    pull[i]  = aida.histogram1D(tag + " Pull "  +i,      nbins, -5., 5.);
 	    ratio[i] = aida.histogram1D(tag + " E Ratio "  +i,   nbins, -10., 10.);
+	    start[i] = aida.histogram1D(tag + " log_10(V Start("  +i +"))", 60, -5., 5.);
 	    isAzimuth[i] = false;
 	}
 	cl        = aida.histogram1D( tag + " Confidence Level", nbins, 0, 1.);
-	clvcz     = aida.cloud2D( tag + " Confidence Level vs cz", -1);
 	czbadcl   = aida.histogram1D( tag + " Cz for bad CL", nbins, -1., 1.);
-	nDof      = aida.cloud1D( tag + " nDof");
+	nDof      = aida.histogram1D( tag + " nDof",100,0.,50.);
 	errorCode = aida.histogram1D( tag + " Error codes", 20, 0., 20.);
 	sType     = aida.histogram1D( tag + " Comparison Surface Type", 10, 0., 10.);
 	startType = aida.histogram1D( tag + " Start Type", 5, 0., 5.);
@@ -56,13 +63,19 @@
 	} else if ( type.compareToIgnoreCase("DCA") == 0 ){
 	    isAzimuth[2] = true;
 	}
+
+	aida.tree().cd(pwd);
     }
     
     public void fill( int fstat, HTrack ht, VTrack vt, int ndof, TrackError vstart, RKTrack rkt){
 
+	String pwd = aida.tree().pwd();
+	aida.tree().cd(tagdir);
+
 	if ( fstat != 0 ){
 	    errorCode.fill(5.5);
 	    System.out.println ("Fitter " + tag + " returned non-zero status code: " + fstat);
+	    aida.tree().cd(pwd);
 	    return;
 	}
 
@@ -112,13 +125,12 @@
 	    sigma[j].fill(sig);
 	    pull [j].fill(res/sig);
 	    ratio[j].fill(logr);
-	    
+	    start[j].fill(Math.log10(sigsqstart));
 	}
 
 	// Fill remaining histograms.
 	cl.fill(c);
 	nDof.fill(ndof);
-	clvcz.fill( cz, c );
 	if ( c < 0.005 ) {
 	    czbadcl.fill( cz );
 	    if ( czcut ){
@@ -137,23 +149,24 @@
 	}
 	sType.fill(stype+0.5);
     
-
+	aida.tree().cd(pwd);
     }
 
     private AIDA aida = AIDA.defaultInstance();
 
     // Copy of the idendifier; used for printout.
-    private String tag = null;
+    private String tag    = null;
+    private String tagdir = null;
 
     // Histograms for residuals, pulls, sigams, ndof, confidence level and error codes.
     private IHistogram1D[] resid     = new IHistogram1D[5];
     private IHistogram1D[] pull      = new IHistogram1D[5];
     private IHistogram1D[] sigma     = new IHistogram1D[5];
     private IHistogram1D[] ratio     = new IHistogram1D[5];
+    private IHistogram1D[] start     = new IHistogram1D[5];
     private IHistogram1D   cl        = null;
     private IHistogram1D   czbadcl   = null;
-    private ICloud2D       clvcz     = null;
-    private ICloud1D       nDof      = null;
+    private IHistogram1D   nDof      = null;
     private IHistogram1D   sType     = null;
     private IHistogram1D   startType = null;
 
CVSspam 0.2.8