Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions u4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ set(SOURCES
U4Cerenkov_Debug.cc
U4Hit_Debug.cc

ShimG4OpAbsorption.cc
ShimG4OpRayleigh.cc
Local_G4Cerenkov_modified.cc
Local_DsG4Scintillation.cc

Expand Down Expand Up @@ -88,9 +86,6 @@ set(HEADERS
U4Cerenkov_Debug.hh
U4Hit_Debug.hh

ShimG4OpAbsorption.hh
ShimG4OpRayleigh.hh

Local_G4Cerenkov_modified.hh
Local_DsG4Scintillation.hh
U4Physics.hh
Expand Down
108 changes: 0 additions & 108 deletions u4/Local_DsG4Scintillation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,6 @@
#include "G4Electron.hh"
#include "globals.hh"

#ifdef WITH_G4OPTICKS
#include "G4Opticks.hh"
#include "CGenstep.hh"
#include "CTrack.hh"
#include "CPhotonInfo.hh"
#include "SLOG.hh"
#endif



#ifdef WITH_G4OPTICKS
//const plog::Severity Local_DsG4Scintillation::LEVEL = SLOG::EnvLevel("Local_DsG4Scintillation", "DEBUG") ;
const plog::Severity Local_DsG4Scintillation::LEVEL = error ;
#endif


#include "U4Stack.h"
#include "SEvt.hh"

Expand Down Expand Up @@ -582,28 +566,6 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep

}

//-------------------------------------------------//

#ifdef WITH_G4OPTICKS

CPho ancestor = CPhotonInfo::Get(&aTrack);
int ancestor_id = ancestor.get_id() ;


/**
ancestor_id:-1
normal case, meaning that aTrack was not a photon
so the generation loop will yield "primary" photons
with id : gs.offset + i

ancestor_id>-1
aTrack is a photon that may be about to reemit (Num=0 or 1)
ancestor_id is the absolute id of the primary parent photon,
this id is retained thru any subsequent remission secondary generations
**/

#endif

#ifdef STANDALONE
U4::GenPhotonAncestor(&aTrack);
#endif
Expand Down Expand Up @@ -639,18 +601,6 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep

G4int NumPhoton = NumVec[scnt] ;


#ifdef WITH_G4OPTICKS
if(flagReemission) assert( NumPhoton == 0 || NumPhoton == 1); // expecting only 0 or 1 remission photons
bool is_opticks_genstep = NumPhoton > 0 && !flagReemission ;

CGenstep gs ;
if(is_opticks_genstep && (m_opticksMode & 1))
{
gs = G4Opticks::Get()->collectGenstep_Local_DsG4Scintillation_r4695( &aTrack, &aStep, NumPhoton, scnt, ScintillationTime);
}
#endif

#ifdef STANDALONE
if(flagReemission) assert( NumPhoton == 0 || NumPhoton == 1); // expecting only 0 or 1 remission photons
bool is_opticks_genstep = NumPhoton > 0 && !flagReemission ;
Expand All @@ -665,9 +615,6 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep
{

for(G4int i = 0 ; i < NumPhoton ; i++) {
#ifdef WITH_G4OPTICKS
G4Opticks::Get()->setAlignIndex( ancestor_id > -1 ? ancestor_id : gs.offset + i ); // aka photon_id
#endif
#ifdef STANDALONE
U4::GenPhotonBegin(i);
#endif
Expand Down Expand Up @@ -845,11 +792,6 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep
if ( verboseLevel > 0 ) {
G4cout << " aSecondaryTrack->SetWeight( " << weight<< " ) ; aSecondaryTrack->GetWeight() = " << aSecondaryTrack->GetWeight() << G4endl;}

#ifdef WITH_G4OPTICKS
aSecondaryTrack->SetUserInformation(CPhotonInfo::MakeScintillation(gs, i, ancestor ));
G4Opticks::Get()->setAlignIndex(-1);
#endif

#ifdef STANDALONE
U4::GenPhotonEnd(i, aSecondaryTrack);
#endif
Expand All @@ -875,56 +817,6 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep
return change ;
}



#ifdef WITH_G4OPTICKS
G4MaterialPropertyVector* Local_DsG4Scintillation::getMaterialProperty(const char* name, G4int materialIndex)
{
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4int numOfMaterials = G4Material::GetNumberOfMaterials();
assert( materialIndex < numOfMaterials );

G4Material* aMaterial = (*theMaterialTable)[materialIndex];
G4MaterialPropertiesTable* aMaterialPropertiesTable = aMaterial->GetMaterialPropertiesTable();
G4MaterialPropertyVector* prop = aMaterialPropertiesTable ? aMaterialPropertiesTable->GetProperty(name) : nullptr ;
return prop ;
}

G4PhysicsOrderedFreeVector* Local_DsG4Scintillation::getScintillationIntegral(G4int scnt, G4int materialIndex) const
{
G4PhysicsOrderedFreeVector* ScintillationIntegral = NULL;

if ( scnt == 0 ){
ScintillationIntegral =
(G4PhysicsOrderedFreeVector*)((*theFastIntegralTable)(materialIndex));
}
else{
ScintillationIntegral =
(G4PhysicsOrderedFreeVector*)((*theSlowIntegralTable)(materialIndex));
}

return ScintillationIntegral ;
}


G4double Local_DsG4Scintillation::getSampledEnergy(G4int scnt, G4int materialIndex) const
{
G4PhysicsOrderedFreeVector* ScintillationIntegral = getScintillationIntegral(scnt, materialIndex);
G4double CIIvalue = G4UniformRand()*ScintillationIntegral->GetMaxValue();
G4double sampledEnergy = ScintillationIntegral->GetEnergy(CIIvalue);
return sampledEnergy ;
}

G4double Local_DsG4Scintillation::getSampledWavelength(G4int scnt, G4int materialIndex) const
{
G4double sampledEnergy = getSampledEnergy(scnt, materialIndex );
G4double wavelength = h_Planck*c_light/sampledEnergy ;
G4double wavelength_nm = wavelength/nm ;
return wavelength_nm ;
}
#endif


// BuildThePhysicsTable for the scintillation process
// --------------------------------------------------
//
Expand Down
16 changes: 0 additions & 16 deletions u4/Local_DsG4Scintillation.hh
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@
#define Local_DsG4Scintillation_h 1


#ifdef WITH_G4OPTICKS
#include "plog/Severity.h"
#endif

#include "globals.hh"
#include "templates.hh"
#include "Randomize.hh"
Expand Down Expand Up @@ -111,11 +107,6 @@ class G4UIdirectory;
class Local_DsG4Scintillation : public G4VRestDiscreteProcess, public G4UImessenger
{ //too lazy to create another UImessenger class

private:
#ifdef WITH_G4OPTICKS
static const plog::Severity LEVEL ;
#endif

public:
static const bool FLOAT ;
static const int PIDX ;
Expand Down Expand Up @@ -194,13 +185,6 @@ public: // With description
void SetUseFastMu300nsTrick(const G4bool fastMu300nsTrick);
G4bool GetUseFastMu300nsTrick() const;

#ifdef WITH_G4OPTICKS
G4MaterialPropertyVector* getMaterialProperty(const char* name, G4int materialIndex) ;
G4PhysicsOrderedFreeVector* getScintillationIntegral(G4int scnt, G4int materialIndex) const;
G4double getSampledEnergy(G4int scnt, G4int materialIndex) const ;
G4double getSampledWavelength(G4int scnt, G4int materialIndex) const ;
#endif

void SetScintillationExcitationRatio(const G4double excitationratio);
// Called to set the scintillation exciation ratio, needed when
// the scintillation level excitation is different for different
Expand Down
Loading
Loading