Skip to content
Snippets Groups Projects
Commit a4548241 authored by Chad Lantz's avatar Chad Lantz
Browse files

Differentiated between vertex position and final position

parent d47ec17d
No related branches found
No related tags found
No related merge requests found
......@@ -58,21 +58,23 @@ public:
void Print();
public:
void setParticle (G4ParticleDefinition *part) { particle = part; }
void setPos (G4ThreeVector xyz) { pos = xyz; }
void setMomentum (G4ThreeVector mom) { momentum = mom; }
void setTrackID (G4int track) { trackID = track; }
void setModNb (G4int mod) { modNb = mod; }
void setRadNb (G4int rad) { radNb = rad; }
void setRodNb (G4int rod) { rodNb = rod; }
void setParticle (G4ParticleDefinition *part) { particle = part; }
void setPos (G4ThreeVector xyz) { pos = xyz; }
void setOrigin (G4ThreeVector xyz) { originPos = xyz; }
void setMomentum (G4ThreeVector mom) { momentum = mom; }
void setTrackID (G4int track) { trackID = track; }
void setModNb (G4int mod) { modNb = mod; }
void setRadNb (G4int rad) { radNb = rad; }
void setRodNb (G4int rod) { rodNb = rod; }
void setNCherenkovs (G4int n) { nCherenkovs = n; }
void setEdep (G4double de) { edep = de; }
void setEnergy (G4double e) { energy = e; }
void setCharge (G4double c) { charge = c; }
void setEdep (G4double de) { edep = de; }
void setEnergy (G4double e) { energy = e; }
void setCharge (G4double c) { charge = c; }
G4ParticleDefinition* getParticle (){ return particle; }
G4ThreeVector getPos (){ return pos; }
G4ThreeVector getOrigin (){ return originPos; }
G4ThreeVector getMomentum (){ return momentum; }
G4int getTrackID (){ return trackID; }
G4int getModNb (){ return modNb; }
......@@ -88,6 +90,7 @@ public:
private:
G4ParticleDefinition* particle;
G4ThreeVector pos;
G4ThreeVector originPos;
G4ThreeVector momentum;
G4int trackID;
G4int modNb;
......
......@@ -51,12 +51,17 @@ public:
G4bool ProcessHits ( G4Step*, G4TouchableHistory* );
void EndOfEvent ( G4HCofThisEvent* );
inline G4bool OpticalIsOn ( ){ return OPTICAL; }
inline void SetTopOfVolume ( G4double _top ){ m_topOfVolume = _top; }
inline G4double GetTopOfVolume ( ){ return m_topOfVolume; }
private:
int HCID;
G4double m_modCoreIndexRefraction;
FiberHitsCollection* fiberCollection;
G4int m_modNum;
G4bool OPTICAL;
G4double m_topOfVolume;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......
......@@ -55,9 +55,10 @@ FiberHit::FiberHit(const FiberHit& right)
trackID = right.trackID;
modNb = right.modNb;
radNb = right.radNb;
rodNb = right.rodNb;
rodNb = right.rodNb;
edep = right.edep;
pos = right.pos;
originPos = right.originPos;
particle = right.particle;
energy = right.energy;
momentum = right.momentum;
......@@ -71,9 +72,10 @@ const FiberHit& FiberHit::operator=(const FiberHit& right)
trackID = right.trackID;
modNb = right.modNb;
radNb = right.radNb;
rodNb = right.rodNb;
rodNb = right.rodNb;
edep = right.edep;
pos = right.pos;
originPos = right.originPos;
particle = right.particle;
energy = right.energy;
momentum = right.momentum;
......@@ -116,4 +118,3 @@ void FiberHit::Print()
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -116,7 +116,8 @@ G4bool FiberSD::ProcessHits(G4Step* aStep,G4TouchableHistory*){
newHit->setRadNb ( radNum );
newHit->setRodNb ( rodNum );
newHit->setEdep ( eDep );
newHit->setPos ( aStep->GetTrack()->GetVertexPosition() );
newHit->setOrigin ( aStep->GetTrack()->GetVertexPosition() );
newHit->setPos ( aStep->GetTrack()->GetPosition() );
newHit->setParticle ( particle );
newHit->setEnergy ( energy );
newHit->setMomentum ( momentum );
......@@ -124,9 +125,6 @@ G4bool FiberSD::ProcessHits(G4Step* aStep,G4TouchableHistory*){
fiberCollection->insert ( newHit );
// only want to record photons if optical flag is on
//if( OPTICAL && particle->GetPDGEncoding() == 0 ) fiberCollection->insert (newHit );
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment