13 modified files
lcio/doc
diff -u -r1.70 -r1.71
--- lcio.xml 12 May 2010 14:50:00 -0000 1.70
+++ lcio.xml 1 Jun 2010 10:19:36 -0000 1.71
@@ -243,7 +243,9 @@
</if>
<data type="double[3]" name="position"></data>
<data type="float[6]" name="covariance">Covariance Matrix of position (x,y,z)</data>
- <data type="float" name="dedx"></data>
+ <if condition="1000*major+minor<1013">
+ <data type="float" name="dedx"></data>
+ </if>
<data type="float" name="time"></data>
<if condition="1000*major+minor>1011">
<data type="int" name="quality">quality flag word</data>
lcio/src/aid/EVENT
diff -u -r1.13 -r1.14
--- TrackerHit.aid 30 Apr 2010 15:28:24 -0000 1.13
+++ TrackerHit.aid 1 Jun 2010 10:19:36 -0000 1.14
@@ -11,7 +11,7 @@
/** A generic tracker hit to be used by pattern recognition.
*
* @author gaede
- * @version $Id: TrackerHit.aid,v 1.13 2010/04/30 15:28:24 engels Exp $
+ * @version $Id: TrackerHit.aid,v 1.14 2010/06/01 10:19:36 engels Exp $
*/
public interface TrackerHit extends LCObject {
@@ -34,6 +34,8 @@
public const FloatVec& getCovMatrix() const ;
/** The dE/dx of the hit in [GeV].
+ *
+ * DEPRECATED. Please use getCharge() instead.
*/
public float getdEdx() const ;
@@ -70,7 +72,6 @@
// public void setPosition( double3V pos) ;
// public void setCovMatrix( const FloatVec& cov) ;
-// public void setdEdx( float dEdx ) ;
// public void setTime( float time ) ;
// public void setTPCHit( TPCHit* hit ) ;
lcio/src/cpp/include/CPPFORT
diff -u -r1.8 -r1.9
--- lctrh.h 30 Apr 2010 15:28:24 -0000 1.8
+++ lctrh.h 1 Jun 2010 10:19:36 -0000 1.9
@@ -1,7 +1,7 @@
/**Header file for the f77-wrapper functions of the Track Class.
*
* @author H. Vogt
- * @version $Id: lctrh.h,v 1.8 2010/04/30 15:28:24 engels Exp $
+ * @version $Id: lctrh.h,v 1.9 2010/06/01 10:19:36 engels Exp $
*/
#include "cfortran.h"
#include "cpointer.h"
@@ -27,7 +27,7 @@
int lctrhsetposition( PTRTYPE trh, double* pos ) ;
int lctrhsetcovmatrix( PTRTYPE trh, float* cvmtx ) ;
-int lctrhsetdedx( PTRTYPE trh, float dedx ) ;
+//int lctrhsetdedx( PTRTYPE trh, float dedx ) ;
int lctrhsettime( PTRTYPE trh, float time ) ;
int lctrhsettype( PTRTYPE trh, int type ) ;
int lctrhsetcharge( PTRTYPE trh, float charge ) ;
@@ -56,7 +56,7 @@
FCALLSCFUN2(INT, lctrhsetposition, LCTRHSETPOSITION, lctrhsetposition, CFORTRANPNTR, DOUBLEV)
FCALLSCFUN2(INT, lctrhsetcovmatrix, LCTRHSETCOVMATRIX, lctrhsetcovmatrix, CFORTRANPNTR, FLOATV)
-FCALLSCFUN2(INT, lctrhsetdedx, LCTRHSETDEDX, lctrhsetdedx, CFORTRANPNTR, FLOAT)
+//FCALLSCFUN2(INT, lctrhsetdedx, LCTRHSETDEDX, lctrhsetdedx, CFORTRANPNTR, FLOAT)
FCALLSCFUN2(INT, lctrhsettime, LCTRHSETTIME, lctrhsettime, CFORTRANPNTR, FLOAT)
FCALLSCFUN2(INT, lctrhsettype, LCTRHSETTYPE, lctrhsettype, CFORTRANPNTR, INT )
FCALLSCFUN2(INT, lctrhsetcharge, LCTRHSETCHARGE, lctrhsetcharge, CFORTRANPNTR, FLOAT)
lcio/src/cpp/include/IMPL
diff -u -r1.12 -r1.13
--- TrackerHitImpl.h 30 Apr 2010 15:28:24 -0000 1.12
+++ TrackerHitImpl.h 1 Jun 2010 10:19:37 -0000 1.13
@@ -15,7 +15,7 @@
/** Implementation of the generic tracker hit.
*
* @author gaede
- * @version $Id: TrackerHitImpl.h,v 1.12 2010/04/30 15:28:24 engels Exp $
+ * @version $Id: TrackerHitImpl.h,v 1.13 2010/06/01 10:19:37 engels Exp $
*/
class TrackerHitImpl : public EVENT::TrackerHit , public AccessChecked {
@@ -39,6 +39,9 @@
virtual const EVENT::FloatVec & getCovMatrix() const ;
/** The dE/dx of the hit in [GeV/mm].
+ *
+ * DEPRECATED. use getCharge() instead.
+ *
*/
virtual float getdEdx() const ;
@@ -86,7 +89,7 @@
void setPosition( double pos[3]) ;
void setCovMatrix( const EVENT::FloatVec& cov );
void setCovMatrix( float cov[TRKHITNCOVMATRIX] );
- void setdEdx( float dedx ) ;
+ //void setdEdx( float dedx ) ;
void setTime( float t ) ;
void setCharge( float charge ) ;
void setChargeError( float error ) ;
@@ -99,7 +102,7 @@
int _type ;
double _pos[3] ;
EVENT::FloatVec _cov ;
- float _dEdx ;
+ //float _dEdx ;
float _time ;
float _charge ;
float _chargeError ;
lcio/src/cpp/src/CPPFORT
diff -u -r1.7 -r1.8
--- lctrh.cc 30 Apr 2010 15:28:24 -0000 1.7
+++ lctrh.cc 1 Jun 2010 10:19:37 -0000 1.8
@@ -41,7 +41,8 @@
float lctrhgetdedx( PTRTYPE trhit ) {
TrackerHitImpl* trh = f2c_pointer<TrackerHitImpl,LCObject>( trhit ) ;
- return trh->getdEdx() ;
+ //return trh->getdEdx() ;
+ return trh->getCharge() ;
}
float lctrhgettime( PTRTYPE trhit ) {
@@ -96,11 +97,11 @@
return LCIO::SUCCESS ;
}
-int lctrhsetdedx( PTRTYPE trhit, float dedx) {
- TrackerHitImpl* trh = f2c_pointer<TrackerHitImpl,LCObject>( trhit ) ;
- trh->setdEdx( dedx ) ;
- return LCIO::SUCCESS ;
-}
+//int lctrhsetdedx( PTRTYPE trhit, float dedx) {
+// TrackerHitImpl* trh = f2c_pointer<TrackerHitImpl,LCObject>( trhit ) ;
+// trh->setdEdx( dedx ) ;
+// return LCIO::SUCCESS ;
+//}
int lctrhsettime( PTRTYPE trhit, float time) {
TrackerHitImpl* trh = f2c_pointer<TrackerHitImpl,LCObject>( trhit ) ;
lcio/src/cpp/src/IMPL
diff -u -r1.11 -r1.12
--- TrackerHitImpl.cc 30 Apr 2010 15:28:24 -0000 1.11
+++ TrackerHitImpl.cc 1 Jun 2010 10:19:37 -0000 1.12
@@ -7,7 +7,7 @@
TrackerHitImpl::TrackerHitImpl() :
_type(0),
- _dEdx(0),
+ //_dEdx(0),
_time(0),
_charge(0),
_chargeError(0),
@@ -31,7 +31,10 @@
return _cov ;
}
- float TrackerHitImpl::getdEdx() const { return _dEdx ; }
+ float TrackerHitImpl::getdEdx() const {
+ //return _dEdx ;
+ return getCharge();
+ }
float TrackerHitImpl::getTime() const { return _time ; }
@@ -72,10 +75,10 @@
_pos[2] = pos[2] ;
}
- void TrackerHitImpl::setdEdx( float dedx ) {
- checkAccess("TrackerHitImpl::setdEdx") ;
- _dEdx = dedx ;
- }
+ //void TrackerHitImpl::setdEdx( float dedx ) {
+ // checkAccess("TrackerHitImpl::setdEdx") ;
+ // _dEdx = dedx ;
+ //}
void TrackerHitImpl::setTime( float t ) {
checkAccess("TrackerHitImpl::setTime") ;
lcio/src/cpp/src/SIO
diff -u -r1.11 -r1.12
--- SIOTrackerHitHandler.cc 30 Apr 2010 15:28:24 -0000 1.11
+++ SIOTrackerHitHandler.cc 1 Jun 2010 10:19:37 -0000 1.12
@@ -35,7 +35,12 @@
SIO_DATA( stream , cov , TRKHITNCOVMATRIX ) ;
hit->setCovMatrix( cov ) ;
- SIO_DATA( stream , &(hit->_dEdx) , 1 ) ;
+ //SIO_DATA( stream , &(hit->_dEdx) , 1 ) ;
+ if( _vers < SIO_VERSION_ENCODE( 1, 13 ) ){
+ // JE: if reading older files store dEdx as charge
+ SIO_DATA( stream , &(hit->_charge) , 1 ) ;
+ }
+
SIO_DATA( stream , &(hit->_time) , 1 ) ;
if( _vers > SIO_VERSION_ENCODE( 1, 12 ) ){
@@ -85,7 +90,7 @@
LCSIO_WRITE( stream, cov[i] ) ;
}
- LCSIO_WRITE( stream, hit->getdEdx() ) ;
+ //LCSIO_WRITE( stream, hit->getdEdx() ) ;
LCSIO_WRITE( stream, hit->getTime() ) ;
LCSIO_WRITE( stream, hit->getCharge() ) ;
LCSIO_WRITE( stream, hit->getChargeError() ) ;
lcio/src/cpp/src/UTIL
diff -u -r1.65 -r1.66
--- LCTOOLS.cc 26 May 2010 08:36:40 -0000 1.65
+++ LCTOOLS.cc 1 Jun 2010 10:19:37 -0000 1.66
@@ -430,7 +430,7 @@
int nPrint = nHits > MAX_HITS ? MAX_HITS : nHits ;
std::cout << endl
- << " [ id ] | position (x,y,z) | dEdx | time |type | charge | charge_err"
+ << " [ id ] | position (x,y,z) | time |type | charge | charge_err"
<< endl
<< endl ;
@@ -443,12 +443,13 @@
// if( hit->getRawDataHit() != 0 )
// rawHitId = hit->getRawDataHit()->id() ;
- printf(" [%8.8x] | (%5.3e,%5.3e,%5.3e) | %5.3e | %5.3e | [%d] | %4.3e | %4.3e \n"
+ //printf(" [%8.8x] | (%5.3e,%5.3e,%5.3e) | %5.3e | %5.3e | [%d] | %4.3e | %4.3e \n"
+ printf(" [%8.8x] | (%5.3e,%5.3e,%5.3e) | %5.3e | [%d] | %4.3e | %4.3e \n"
, hit->id()
, hit->getPosition()[0]
, hit->getPosition()[1]
, hit->getPosition()[2]
- , hit->getdEdx()
+ //, hit->getdEdx()
, hit->getTime()
, hit->getType()
, hit->getCharge()
lcio/src/f77
diff -u -r1.41 -r1.42
--- lciof77api.inc 30 Apr 2010 15:28:25 -0000 1.41
+++ lciof77api.inc 1 Jun 2010 10:19:37 -0000 1.42
@@ -12,7 +12,7 @@
* H. Vogt
* 05/06/2004 (reconstruction part added)
*
-* $Id: lciof77api.inc,v 1.41 2010/04/30 15:28:25 engels Exp $
+* $Id: lciof77api.inc,v 1.42 2010/06/01 10:19:37 engels Exp $
***************************************************
#include "lciof77pointer.inc"
@@ -235,7 +235,7 @@
integer lctrhgettype, lctrhgetquality
real lctrhgetdedx, lctrhgettime
real lctrhgetcharge, lctrhgetchargeerr
- integer lctrhsetposition, lctrhsetcovmatrix, lctrhsetdedx
+ integer lctrhsetposition, lctrhsetcovmatrix
integer lctrhsettime, lctrhsettype, lctrhsetquality
integer lctrhsetcharge, lctrhsetchargeerr
integer lctrhaddrawhit
lcio/src/f77
diff -u -r1.23 -r1.24
--- recjob.F 21 Sep 2006 06:10:48 -0000 1.23
+++ recjob.F 1 Jun 2010 10:19:37 -0000 1.24
@@ -204,7 +204,8 @@
do i = 1, ntpchits
trhitp = lctrhcreate ()
tpchit = lccolgetelementat ( tpchitcol, i)
- status = lctrhsetdedx ( trhitp, lctphgcharge ( tpchit ) )
+ccc status = lctrhsetdedx ( trhitp, lctphgcharge ( tpchit ) )
+ status = lctrhsetcharge ( trhitp, lctphgcharge ( tpchit ) )
status = lctrhsettime ( trhitp, lctphgettime ( tpchit ) )
cellid = lctphgetcellid ( tpchit )
dpos(1) = iand ( cellid, 'ff'x )
lcio/src/java/hep/lcio/implementation/event
diff -u -r1.10 -r1.11
--- ITrackerHit.java 30 Apr 2010 15:28:25 -0000 1.10
+++ ITrackerHit.java 1 Jun 2010 10:19:37 -0000 1.11
@@ -7,13 +7,14 @@
/**
* @author Tony Johnson
- * @version $Id: ITrackerHit.java,v 1.10 2010/04/30 15:28:25 engels Exp $
+ * @version $Id: ITrackerHit.java,v 1.11 2010/06/01 10:19:37 engels Exp $
*/
public class ITrackerHit extends ILCObject implements TrackerHit
{
protected double[] position = new double[3];
protected float[] covMatrix = new float[6];
- protected float dEdx;
+ // deprecated
+ //protected float dEdx;
protected float time;
protected float charge;
protected float chargeError;
@@ -47,13 +48,15 @@
public float getdEdx()
{
- return dEdx;
- }
- public void setdEdx(float dEdx)
- {
- checkAccess();
- this.dEdx = dEdx;
+ //return dEdx;
+ return getCharge();
}
+ // deprecated
+ //public void setdEdx(float dEdx)
+ //{
+ // checkAccess();
+ // this.dEdx = dEdx;
+ //}
public float getTime()
{
lcio/src/java/hep/lcio/implementation/sio
diff -u -r1.14 -r1.15
--- SIOTrackerHit.java 4 May 2010 15:19:50 -0000 1.14
+++ SIOTrackerHit.java 1 Jun 2010 10:19:37 -0000 1.15
@@ -16,7 +16,7 @@
/**
*
* @author Tony Johnson
- * @version $Id: SIOTrackerHit.java,v 1.14 2010/05/04 15:19:50 engels Exp $
+ * @version $Id: SIOTrackerHit.java,v 1.15 2010/06/01 10:19:37 engels Exp $
*/
class SIOTrackerHit extends ITrackerHit
{
@@ -29,7 +29,11 @@
position[i] = in.readDouble();
for (int i = 0; i < 6; i++)
covMatrix[i] = in.readFloat();
- dEdx = in.readFloat();
+ //dEdx = in.readFloat();
+ if( SIOVersion.encode(major,minor) < SIOVersion.encode(1,13)){
+ // if reading older files store dEdx as charge
+ charge = in.readFloat();
+ }
time = in.readFloat();
charge = 0 ;
@@ -89,7 +93,7 @@
float[] matrix = hit.getCovMatrix();
for (int i = 0; i < 6; i++)
out.writeFloat(matrix[i]);
- out.writeFloat(hit.getdEdx());
+ //out.writeFloat(hit.getdEdx());
out.writeFloat(hit.getTime());
out.writeFloat(hit.getCharge());
out.writeFloat(hit.getChargeError());
@@ -113,7 +117,7 @@
out.writeDouble(position[i]);
for (int i = 0; i < 6; i++)
out.writeFloat(covMatrix[i]);
- out.writeFloat(dEdx);
+ //out.writeFloat(dEdx);
out.writeFloat(time);
out.writeFloat(charge);
out.writeFloat(chargeError);
lcio/src/latex/manual
diff -u -r1.21 -r1.22
--- f77summary.tex 30 Apr 2010 15:28:25 -0000 1.21
+++ f77summary.tex 1 Jun 2010 10:19:37 -0000 1.22
@@ -250,7 +250,6 @@
delete -> status = lctrhdelete( ptrhit )
setPosition -> status = lctrhsetposition( ptrhit, dposv )
setCovMatrix -> status = lctrhsetcovmatrix( ptrhit, covmxv )
-setdEdx -> status = lctrhsetdedx( ptrhit, dedx )
setTime -> status = lctrhsettime( ptrhit, time )
setType -> status = lctrhsettype( ptrhit, itype )
setCharge -> status = lctrhsetcharge( ptrhit , charge )
CVSspam 0.2.8