6 modified files
lcio/doc
diff -u -r1.57 -r1.58
--- lcio.xml 10 Nov 2005 14:04:55 -0000 1.57
+++ lcio.xml 7 Mar 2006 17:42:17 -0000 1.58
@@ -98,6 +98,7 @@
<data type="pntr" name="MCParticle"></data>
<if condition="(flags&(1<<30)) != 0">
<data type="float[3]" name="momentum"></data>
+ <data type="float" name="pathLength"></data>
</if>
<if condition="1000*major+minor>1000">
<data type="ptag" name="this"></data>
lcio/src/aid/EVENT
diff -u -r1.7 -r1.8
--- SimTrackerHit.aid 19 Sep 2005 15:40:26 -0000 1.7
+++ SimTrackerHit.aid 7 Mar 2006 17:42:18 -0000 1.8
@@ -3,7 +3,7 @@
/** A generic simulated tracker hit.
*
* @author gaede
- * @version $Id: SimTrackerHit.aid,v 1.7 2005/09/19 15:40:26 gaede Exp $
+ * @version $Id: SimTrackerHit.aid,v 1.8 2006/03/07 17:42:18 gaede Exp $
*/
public interface SimTrackerHit extends LCObject {
@@ -36,4 +36,9 @@
*/
public const float3V getMomentum() const ;
+
+ /** The path length of the particle in the sensitive material that resulted in this hit.
+ * This is only stored together with momentum, i.e. if LCIO::THBIT_MOMENTUM is set.
+ */
+ public float getPathLength() const ;
}
lcio/src/cpp/include/IMPL
diff -u -r1.10 -r1.11
--- SimTrackerHitImpl.h 19 Sep 2005 15:40:26 -0000 1.10
+++ SimTrackerHitImpl.h 7 Mar 2006 17:42:18 -0000 1.11
@@ -59,6 +59,10 @@
*/
virtual const float* getMomentum() const ;
+ /** The path length of the particle in the sensitive material that resulted in this hit.
+ * This is only stored together with momentum, i.e. if LCIO::THBIT_MOMENTUM is set.
+ */
+ virtual float getPathLength() const ;
// ---------- setters ------------------------
/** Sets the cell id.
@@ -89,6 +93,10 @@
*/
void setMomentum( float px, float py, float pz ) ;
+ /* Set the path length.
+ */
+ void setPathLength(float pathLength);
+
protected:
int _cellID ;
double _pos[3] ;
@@ -96,6 +104,7 @@
float _time ;
EVENT::MCParticle* _particle ;
float _p[3] ;
+ float _pathLength ;
}; // class
} // namespace IMPL
lcio/src/cpp/src/EXAMPLE
diff -u -r1.6 -r1.7
--- dumpevent.cc 21 Oct 2005 13:53:20 -0000 1.6
+++ dumpevent.cc 7 Mar 2006 17:42:18 -0000 1.7
@@ -17,9 +17,9 @@
char* FILEN ;
- int runNumber ;
- int evtNumber ;
- int nthEvent ;
+ int runNumber=0 ;
+ int evtNumber=0 ;
+ int nthEvent=1 ;
// read file name from command line (only argument)
if( argc < 3 ) {
lcio/src/cpp/src/IMPL
diff -u -r1.10 -r1.11
--- SimTrackerHitImpl.cc 19 Sep 2005 15:40:27 -0000 1.10
+++ SimTrackerHitImpl.cc 7 Mar 2006 17:42:19 -0000 1.11
@@ -2,6 +2,7 @@
using namespace EVENT ;
+
namespace IMPL {
SimTrackerHitImpl::SimTrackerHitImpl() :
@@ -30,6 +31,7 @@
EVENT::MCParticle * SimTrackerHitImpl::getMCParticle() const { return _particle ; }
+ float SimTrackerHitImpl::getPathLength() const { return _pathLength ; }
const float* SimTrackerHitImpl::getMomentum() const { return _p ; }
@@ -73,6 +75,11 @@
_p[2] = pz ;
}
+
+ void SimTrackerHitImpl::setPathLength(float pathLength){
+ checkAccess("SimTrackerHitImpl::setPathLength") ;
+ _pathLength = pathLength ;
+ }
lcio/src/cpp/src/SIO
diff -u -r1.9 -r1.10
--- SIOSimTrackHitHandler.cc 19 Sep 2005 15:40:27 -0000 1.9
+++ SIOSimTrackHitHandler.cc 7 Mar 2006 17:42:19 -0000 1.10
@@ -37,6 +37,7 @@
if( LCFlagImpl(_flag).bitSet( LCIO::THBIT_MOMENTUM ) ){
SIO_DATA( stream , hit->_p , 3 ) ;
+ SIO_DATA( stream , &(hit->_pathLength) , 1 ) ;
}
// read the pointer tag in case we want to point to hits
@@ -74,6 +75,7 @@
if( LCFlagImpl(_flag).bitSet( LCIO::THBIT_MOMENTUM ) ){
float* p = const_cast<float*> ( hit->getMomentum() ) ;
SIO_DATA( stream , p , 3 ) ;
+ LCSIO_WRITE( stream , hit->getPathLength() ) ;
}
// write a ptag in order to be able to point to tracker hits - from v1.1
CVSspam 0.2.8