4 modified files
lcdd/include
diff -u -r1.15 -r1.16
--- ReadoutUtil.hh 18 Dec 2006 22:49:02 -0000 1.15
+++ ReadoutUtil.hh 6 Oct 2007 00:40:59 -0000 1.16
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/ReadoutUtil.hh,v 1.15 2006/12/18 22:49:02 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/ReadoutUtil.hh,v 1.16 2007/10/06 00:40:59 jeremy Exp $
#ifndef LCDD_READOUTUTIL_HH
#define LCDD_READOUTUTIL_HH 1
@@ -73,6 +73,8 @@
static std::vector<G4VPhysicalVolume*> getPhysVolList( G4Step* aStep );
+ static bool isGeantino(G4Step* aStep);
+
public:
static const double PI;
lcdd/src
diff -u -r1.33 -r1.34
--- G4CalorimeterSD.cc 5 Oct 2007 23:17:28 -0000 1.33
+++ G4CalorimeterSD.cc 6 Oct 2007 00:40:59 -0000 1.34
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/G4CalorimeterSD.cc,v 1.33 2007/10/05 23:17:28 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/G4CalorimeterSD.cc,v 1.34 2007/10/06 00:40:59 jeremy Exp $
#include "G4CalorimeterSD.hh"
// lcdd
@@ -88,7 +88,7 @@
G4double theEdep = edep();
// This needs to be a <= comparison for cutting on 0.
- if ( theEdep <= getEcut() && aStep->GetTrack()->GetDefinition() != G4Geantino::Definition() ) {
+ if ( theEdep <= getEcut() && !ReadoutUtil::isGeantino(aStep) ) {
#ifdef G4VERBOSE
if ( getVerbose() > 2 ) {
std::cout << "G4CalorimeterSD::ProcessHits - cut on edep " << theEdep << std::endl;
lcdd/src
diff -u -r1.33 -r1.34
--- G4TrackerSD.cc 5 Oct 2007 23:17:28 -0000 1.33
+++ G4TrackerSD.cc 6 Oct 2007 00:40:59 -0000 1.34
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/G4TrackerSD.cc,v 1.33 2007/10/05 23:17:28 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/G4TrackerSD.cc,v 1.34 2007/10/06 00:40:59 jeremy Exp $
// LCDD
#include "IdManager.hh"
@@ -51,7 +51,7 @@
G4double e = edep();
// check edep < cut
- if ( e <= getEcut() && aStep->GetTrack()->GetDefinition() != G4Geantino::Definition() ) {
+ if ( e <= getEcut() && !ReadoutUtil::isGeantino(aStep) ) {
return false;
}
lcdd/src
diff -u -r1.10 -r1.11
--- ReadoutUtil.cc 10 Mar 2006 07:40:35 -0000 1.10
+++ ReadoutUtil.cc 6 Oct 2007 00:40:59 -0000 1.11
@@ -1,8 +1,13 @@
-// $Header: /cvs/lcd/lcdd/src/ReadoutUtil.cc,v 1.10 2006/03/10 07:40:35 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/ReadoutUtil.cc,v 1.11 2007/10/06 00:40:59 jeremy Exp $
#include "ReadoutUtil.hh"
#include <cmath>
+// geant4
+#include "G4ParticleDefinition.hh"
+#include "G4Geantino.hh"
+#include "G4ChargedGeantino.hh"
+
const double ReadoutUtil::PI = acos(-1);
G4ThreeVector ReadoutUtil::computeThreeVectorMean(const G4ThreeVector& vec1,
@@ -172,3 +177,12 @@
return vnum;
}
+
+bool ReadoutUtil::isGeantino(G4Step* aStep)
+{
+ G4ParticleDefinition* def = aStep->GetTrack()->GetDefinition();
+ if ( def == G4Geantino::Definition() || def == G4ChargedGeantino::Definition() )
+ return true;
+ else
+ return false;
+}
CVSspam 0.2.8