Commit in lcio/src on v01-07-vtx
aid/EVENT/ReconstructedParticle.aid+8-11.17 -> 1.17.2.1
         /Vertex.aid+2-21.2.2.1 -> 1.2.2.2
cpp/include/IMPL/ReconstructedParticleImpl.h+131.11 -> 1.11.2.1
                /VertexImpl.h+3-31.1.2.1 -> 1.1.2.2
cpp/src/EXAMPLE/testvtx.cc-1221.1.2.2 removed
cpp/src/IMPL/ReconstructedParticleImpl.cc+19-11.9 -> 1.9.6.1
            /VertexImpl.cc+5-31.1.2.1 -> 1.1.2.2
+50-132
1 removed + 6 modified, total 7 files


lcio/src/aid/EVENT
ReconstructedParticle.aid 1.17 -> 1.17.2.1
diff -u -r1.17 -r1.17.2.1
--- ReconstructedParticle.aid	3 Aug 2006 16:53:35 -0000	1.17
+++ ReconstructedParticle.aid	14 Aug 2006 16:10:00 -0000	1.17.2.1
@@ -11,7 +11,7 @@
 /** The LCIO reconstructedParticle.
  * 
  * @author gaede
- * @version $Id: ReconstructedParticle.aid,v 1.17 2006/08/03 16:53:35 gaede Exp $
+ * @version $Id: ReconstructedParticle.aid,v 1.17.2.1 2006/08/14 16:10:00 engels Exp $
  */
 
 public interface ReconstructedParticle extends LCObject {
@@ -136,6 +136,13 @@
 //      */
 //     public const FloatVec& getMCParticleWeights() const ;
 
+      /** The start vertex associated to this particle
+      */
+      public Vertex * getStartVertex() const ;
+
+      /** The vertex where the particle decays
+      */
+      public Vertex * getEndVertex() const ;
 
     // set methods
 

lcio/src/aid/EVENT
Vertex.aid 1.2.2.1 -> 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- Vertex.aid	11 Aug 2006 10:54:03 -0000	1.2.2.1
+++ Vertex.aid	14 Aug 2006 16:10:01 -0000	1.2.2.2
@@ -14,7 +14,7 @@
  *  <p>UNDER DEVELOPMENT!</p>
  *  
  * @author gaede, engels
- * @version $Id: Vertex.aid,v 1.2.2.1 2006/08/11 10:54:03 engels Exp $
+ * @version $Id: Vertex.aid,v 1.2.2.2 2006/08/14 16:10:01 engels Exp $
  */
 
 public interface Vertex extends LCObject {
@@ -56,6 +56,6 @@
 
     /** Returns Reconstructed Particle associated to the Vertex
      */
-    public const ReconstructedParticle * getAssociatedParticle() const;
+    public ReconstructedParticle * getAssociatedParticle() const;
 }
 

lcio/src/cpp/include/IMPL
ReconstructedParticleImpl.h 1.11 -> 1.11.2.1
diff -u -r1.11 -r1.11.2.1
--- ReconstructedParticleImpl.h	4 Aug 2006 16:52:46 -0000	1.11
+++ ReconstructedParticleImpl.h	14 Aug 2006 16:10:02 -0000	1.11.2.1
@@ -95,6 +95,14 @@
      */
     virtual const EVENT::TrackVec & getTracks() const ;
 
+    /** The start vertex associated to this particle
+    */
+    virtual EVENT::Vertex * getStartVertex() const ;
+
+    /** The vertex where the particle decays
+    */
+    virtual EVENT::Vertex * getEndVertex() const ;
+
 
     // setters
     void setType(int type) ;
@@ -115,6 +123,8 @@
     void addCluster( EVENT::Cluster* cluster) ;
     void addTrack( EVENT::Track* track) ;
 //     void addMCParticle( EVENT::MCParticle* mcParticle , float weight = 1.0 ) ;
+    void setStartVertex( EVENT::Vertex * sv ) ;
+    void setEndVertex( EVENT::Vertex * ev ) ;
 
   protected:
 
@@ -136,6 +146,9 @@
 //     EVENT::FloatVec _trackWeights ;
 //     EVENT::MCParticleVec _mcParticles ;
 //     EVENT::FloatVec _mcParticleWeights ;
+
+    EVENT::Vertex* _sv ;
+    EVENT::Vertex* _ev ;
     
 }; // class
 

lcio/src/cpp/include/IMPL
VertexImpl.h 1.1.2.1 -> 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- VertexImpl.h	11 Aug 2006 10:54:06 -0000	1.1.2.1
+++ VertexImpl.h	14 Aug 2006 16:10:02 -0000	1.1.2.2
@@ -61,7 +61,7 @@
 
     /** Returns Reconstructed Particle associated to the Vertex
      */
-    virtual const EVENT::ReconstructedParticle * getAssociatedParticle() const;
+    virtual EVENT::ReconstructedParticle * getAssociatedParticle() const;
 
     // setters
     void setPrimary(bool primary) ;
@@ -73,7 +73,7 @@
     void setCovMatrix( const EVENT::FloatVec & ) ;
     void setParameters( const float* par ) ;
     void setParameters( const EVENT::FloatVec& ) ;
-    void setAssociatedParticle( const EVENT::ReconstructedParticle * aP ) ;
+    void setAssociatedParticle( EVENT::ReconstructedParticle * aP ) ;
 
   protected:
     bool _primary ;
@@ -82,7 +82,7 @@
     float _probability ;
     EVENT::FloatVec _cov ;
     EVENT::FloatVec _par ;
-    const EVENT::ReconstructedParticle * _aParticle ;
+    EVENT::ReconstructedParticle* _aParticle ;
    
 }; // class
 

lcio/src/cpp/src/EXAMPLE
testvtx.cc removed after 1.1.2.2
diff -N testvtx.cc
--- testvtx.cc	11 Aug 2006 12:58:18 -0000	1.1.2.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,122 +0,0 @@
-#include "lcio.h"
-
-#include "IO/LCReader.h"
-#include "IMPL/LCTOOLS.h"
-#include "EVENT/LCRunHeader.h"
-#include "EVENT/LCCollection.h"
-#include "EVENT/ReconstructedParticle.h"
-#include "IMPL/ReconstructedParticleImpl.h"
-#include "IMPL/VertexImpl.h"
-
-static const char* FILEN = "recjob.slcio" ; // default file name 
-
-using namespace std ;
-using namespace lcio ;
-
-////////////////////////////////////////////////////////////////////////////////
-// This file is temporary and ONLY for the purpose of testing the Vertex Class!!
-////////////////////////////////////////////////////////////////////////////////
-
-int main(int argc, char** argv ){
-
-  LCReader* lcReader = LCFactory::getInstance()->createLCReader() ;
-  lcReader->open( FILEN ) ;
-
-  cout << " will open and read from file: " << FILEN << endl ;  
-
-  LCRunHeader *runHdr ;
-  
-  // use a try catch block here: if sth. went wrong with reading the run data we 
-  // still can try and read the event data - see below
-  try{
-    //read the first header
-    runHdr = lcReader->readNextRunHeader();
-    LCTOOLS::dumpRunHeader( runHdr ) ;
-/*
-    // loop over all run headers
-    while( ( runHdr = lcReader->readNextRunHeader() ) != 0 ){
-      
-      LCTOOLS::dumpRunHeader( runHdr ) ;
-//       cout << "  Run : " << runHdr->getRunNumber() 
-// 	   << " - "      << runHdr->getDetectorName() 
-// 	   << ":  "      << runHdr->getDescription()  << endl ;
-
-    }
-*/    
-  }catch(IOException& e){
-    cout << " io error when reading run data : " << e.what() << endl ;
-  }
-  cout << endl ;
-  
-  lcReader->close() ;
-  
-  
-  // now loop over the file again and dump event data
-
-  lcReader->open( FILEN ) ;
-
-  cout << " reopened " << FILEN << " for reading " << endl ; 
-  
-  LCEvent* evt ;
-  //int nEvents = 0 ;
-
-  //read an event
-  evt = lcReader->readNextEvent(LCIO::UPDATE);
-  LCTOOLS::dumpEvent( evt ) ;
-/*
-  //----------- the event loop -----------
-  while( (evt = lcReader->readNextEvent()) != 0 ) {
-    
-    //LCTOOLS::dumpEvent( evt ) ;
-    
-    nEvents ++ ;
-  } 
-  // -------- end of event loop -----------
-  
-  cout << endl <<  "  " <<  nEvents << " events read from file: " << FILEN << endl  ;
-*/
-
-
-  LCCollection* col = evt->getCollection("ReconstructedParticle") ;
-  cout << col->getTypeName();
-  
-  if( col->getTypeName() != LCIO::RECONSTRUCTEDPARTICLE ){
-    cout << " collection not of type " << LCIO::RECONSTRUCTEDPARTICLE << endl ;
-  }
-  else{
-
-#ifdef USE_CLHEP
-      ReconstructedParticle4V recP( col->getElementAt( 0 ) ) ;
-#else
-      ReconstructedParticle* recP =
-        dynamic_cast<ReconstructedParticle*>( col->getElementAt( 0 ) ) ;
-#endif
-  
-
-  VertexImpl * vtx=new VertexImpl;
-  
-  vtx->setPrimary(true);
-  vtx->setChi2(1.01);
-  vtx->setProbability(0.0032);
-  vtx->setPosition(0.3453,.45345354,2.345354);
-  vtx->setAssociatedParticle(recP);
-  
-  cout << endl<<endl;
-  cout << "Vertex Details:" << endl<<endl;
-  cout << "Primary:\t" << vtx->isPrimary() << endl;
-  cout << "Position:\tx:" << vtx->getPosition()[0] << "\ty: " << vtx->getPosition()[1] << "\tz: " << vtx->getPosition()[2] << endl;
-  cout << "Chi2:\t\t" << vtx->getChi2() << endl;
-  cout << "Probability:\t" << vtx->getProbability() << endl;
-  cout << "AParticle:\t" << vtx->getAssociatedParticle()->getType() << endl;
-  
-  delete vtx;
-
-  }
-  
-  lcReader->close() ;
-  delete lcReader ;
-
-  return 0 ;
-}
-
-  

lcio/src/cpp/src/IMPL
ReconstructedParticleImpl.cc 1.9 -> 1.9.6.1
diff -u -r1.9 -r1.9.6.1
--- ReconstructedParticleImpl.cc	27 May 2005 07:55:55 -0000	1.9
+++ ReconstructedParticleImpl.cc	14 Aug 2006 16:10:04 -0000	1.9.6.1
@@ -14,7 +14,9 @@
     _mass(0) ,
     _charge(0),
     _pidUsed(0),
-    _goodnessOfPID(0) 
+    _goodnessOfPID(0),
+    _sv(0),
+    _ev(0)
   {
     _cov.resize( NCOVARIANCE ) ;
     //     for(int i=0 ; i < NCOVARIANCE ; i++ ) { _cov.push_back( 0.0 ) ;  }
@@ -63,11 +65,27 @@
 //   const EVENT::MCParticleVec& ReconstructedParticleImpl::getMCParticles() const { return _mcParticles  ; }
 //   const EVENT::FloatVec & ReconstructedParticleImpl::getMCParticleWeights() const { return  _mcParticleWeights ; }
   
+  EVENT::Vertex * ReconstructedParticleImpl::getStartVertex() const { return _sv  ; }
+                                                                                                                                                             
+  //TODO: Choose this alternative method?!: return _particles[0]->getStartVertex()?!?
+  EVENT::Vertex * ReconstructedParticleImpl::getEndVertex() const { return _ev  ; }
+
+                                                                                                                                                          
+  void ReconstructedParticleImpl::setStartVertex( EVENT::Vertex *sv ){
+    checkAccess("ReconstructedParticleImpl::setStartVertex" );
+    _sv = sv;
+  }
+  
+  void ReconstructedParticleImpl::setEndVertex( EVENT::Vertex *ev ){
+    checkAccess("ReconstructedParticleImpl::setEndVertex" );
+    _ev = ev;
+  }
 
   void ReconstructedParticleImpl::setType(int type){
     checkAccess("ReconstructedParticleImpl::setType" );
     _type = type ;
   }
+
 //   void ReconstructedParticleImpl::setPrimary(bool primary){
 //     checkAccess("ReconstructedParticleImpl::setPrimary" );
 //     _primary = primary ;

lcio/src/cpp/src/IMPL
VertexImpl.cc 1.1.2.1 -> 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- VertexImpl.cc	11 Aug 2006 10:54:08 -0000	1.1.2.1
+++ VertexImpl.cc	14 Aug 2006 16:10:05 -0000	1.1.2.2
@@ -8,7 +8,9 @@
   VertexImpl::VertexImpl() :
     _primary(0),
     _chi2(0),
-    _probability(0)
+    _probability(0),
+    _par(0),
+    _aParticle(0)
   {
     _cov.resize( NCOVARIANCE ) ;
     //     for(int i=0 ; i < NCOVARIANCE ; i++ ) { _cov.push_back( 0.0 ) ;  }
@@ -32,7 +34,7 @@
   float VertexImpl::getChi2() const { return _chi2 ; }
   float VertexImpl::getProbability() const { return _probability ; }
   const EVENT::FloatVec & VertexImpl::getParameters() const { return _par ; }
-  const EVENT::ReconstructedParticle * VertexImpl::getAssociatedParticle() const { return _aParticle  ; }
+  EVENT::ReconstructedParticle * VertexImpl::getAssociatedParticle() const { return _aParticle  ; }
   
   bool VertexImpl::isPrimary() const { return _primary ;}
 
@@ -84,7 +86,7 @@
     //_par = par;
   }
 
-  void VertexImpl::setAssociatedParticle( const EVENT::ReconstructedParticle *aP ){
+  void VertexImpl::setAssociatedParticle( EVENT::ReconstructedParticle *aP ){
     checkAccess("VertexImpl::setAssociatedParticle" );
     _aParticle = aP;
   }
CVSspam 0.2.8