Print

Print


Commit in lcio/src/cpp/src/UTIL on MAIN
LCTOOLS.cc+761.56 -> 1.57
added printout of PID information for clusters

lcio/src/cpp/src/UTIL
LCTOOLS.cc 1.56 -> 1.57
diff -u -r1.56 -r1.57
--- LCTOOLS.cc	30 May 2008 13:28:23 -0000	1.56
+++ LCTOOLS.cc	3 Jun 2008 13:19:53 -0000	1.57
@@ -1191,6 +1191,82 @@
 	   << "-------|-----------|---------------------------------|----------|----------|----------|----------|---------"
 	   << endl ;
     }
+
+
+    // --- detailed PID info:
+    
+    cout <<  endl 
+	 << "  ------------ detailed PID info: --- " <<   endl  <<   endl 
+	 << "   algorithms : " 
+	 <<   endl ;
+    
+    
+    PIDHandler pidH( col )  ;
+    
+    const IntVec& ids =  pidH.getAlgorithmIDs() ;
+
+    for(unsigned i=0; i<ids.size() ; ++i){
+
+      cout << "   [id: " << ids[i] << "]   " 
+	   <<  pidH.getAlgorithmName( ids[i] ) 
+	   << " - params: " ;
+      
+      const StringVec& pNames = pidH.getParameterNames( ids[i] ) ;
+ 
+      for( StringVec::const_iterator it = pNames.begin() ; it != pNames.end() ; ++it ){
+
+	cout << " " << *it  ;
+      }
+      cout << endl ;
+    }
+    cout << endl ;
+
+    std::cout << endl
+	      << "   [cluster ] |  PDG   | likelihood |  type  |  algoId  | parameters : " << endl
+	      << "              |        |            |        |          |              "
+      	      << endl ;
+
+
+    for( int i=0 ; i< nPrint ; i++ ){
+      
+      Cluster* clu = 
+	dynamic_cast<Cluster*>( col->getElementAt( i ) ) ;
+      
+      printf("   [%8.8x] " , clu->id() ) ;
+      
+      
+      for(unsigned int l=0;l<clu->getParticleIDs().size();l++){
+	
+	if( l!=0)
+	  printf("              " ) ;
+
+	ParticleID* pid = clu->getParticleIDs()[l] ;
+	
+	printf("| %6d | %6.4e | %6.6d | %8d | [",  
+	       pid->getPDG() , 
+	       pid->getLikelihood()  ,
+	       pid->getType() ,
+	       pid->getAlgorithmType() 
+	       ) ;
+
+	const StringVec& pNames = pidH.getParameterNames(  pid->getAlgorithmType() ) ;
+	
+	for(unsigned j=0;j< pNames.size() ;++j){
+
+	  cout << " " <<  pNames[j]
+	       << " : " <<  pid->getParameters()[j] << "," ; 
+
+	}
+	cout << "]"<< endl ;
+	
+
+      }
+      cout << endl ;
+      
+    }
+    
+    
+    
       cout << endl 
 	   << "-------------------------------------------------------------------------------- " 
 	   << endl ;
CVSspam 0.2.8