8484#include " G4Electron.hh"
8585#include " globals.hh"
8686
87- #ifdef WITH_G4OPTICKS
88- #include " G4Opticks.hh"
89- #include " CGenstep.hh"
90- #include " CTrack.hh"
91- #include " CPhotonInfo.hh"
92- #include " SLOG.hh"
93- #endif
94-
95-
96-
97- #ifdef WITH_G4OPTICKS
98- // const plog::Severity Local_DsG4Scintillation::LEVEL = SLOG::EnvLevel("Local_DsG4Scintillation", "DEBUG") ;
99- const plog::Severity Local_DsG4Scintillation::LEVEL = error ;
100- #endif
101-
10287
10388#include " U4Stack.h"
10489#include " SEvt.hh"
@@ -582,35 +567,10 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep
582567
583568 }
584569
585- // -------------------------------------------------//
586-
587- #ifdef WITH_G4OPTICKS
588-
589- CPho ancestor = CPhotonInfo::Get (&aTrack);
590- int ancestor_id = ancestor.get_id () ;
591-
592-
593- /* *
594- ancestor_id:-1
595- normal case, meaning that aTrack was not a photon
596- so the generation loop will yield "primary" photons
597- with id : gs.offset + i
598-
599- ancestor_id>-1
600- aTrack is a photon that may be about to reemit (Num=0 or 1)
601- ancestor_id is the absolute id of the primary parent photon,
602- this id is retained thru any subsequent remission secondary generations
603- **/
604-
605- #endif
606-
607570#ifdef STANDALONE
608571 U4::GenPhotonAncestor (&aTrack);
609572#endif
610573
611-
612- // -------------------------------------------------//
613-
614574 for (G4int scnt = 0 ; scnt < nscnt ; scnt++){
615575
616576 G4double ScintillationTime = 0 .*ns;
@@ -639,18 +599,6 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep
639599
640600 G4int NumPhoton = NumVec[scnt] ;
641601
642-
643- #ifdef WITH_G4OPTICKS
644- if (flagReemission) assert ( NumPhoton == 0 || NumPhoton == 1 ); // expecting only 0 or 1 remission photons
645- bool is_opticks_genstep = NumPhoton > 0 && !flagReemission ;
646-
647- CGenstep gs ;
648- if (is_opticks_genstep && (m_opticksMode & 1 ))
649- {
650- gs = G4Opticks::Get ()->collectGenstep_Local_DsG4Scintillation_r4695 ( &aTrack, &aStep, NumPhoton, scnt, ScintillationTime);
651- }
652- #endif
653-
654602#ifdef STANDALONE
655603 if (flagReemission) assert ( NumPhoton == 0 || NumPhoton == 1 ); // expecting only 0 or 1 remission photons
656604 bool is_opticks_genstep = NumPhoton > 0 && !flagReemission ;
@@ -665,9 +613,7 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep
665613 {
666614
667615 for (G4int i = 0 ; i < NumPhoton ; i++) {
668- #ifdef WITH_G4OPTICKS
669- G4Opticks::Get ()->setAlignIndex ( ancestor_id > -1 ? ancestor_id : gs.offset + i ); // aka photon_id
670- #endif
616+
671617#ifdef STANDALONE
672618 U4::GenPhotonBegin (i);
673619#endif
@@ -845,11 +791,6 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep
845791 if ( verboseLevel > 0 ) {
846792 G4cout << " aSecondaryTrack->SetWeight( " << weight<< " ) ; aSecondaryTrack->GetWeight() = " << aSecondaryTrack->GetWeight () << G4endl;}
847793
848- #ifdef WITH_G4OPTICKS
849- aSecondaryTrack->SetUserInformation (CPhotonInfo::MakeScintillation (gs, i, ancestor ));
850- G4Opticks::Get ()->setAlignIndex (-1 );
851- #endif
852-
853794#ifdef STANDALONE
854795 U4::GenPhotonEnd (i, aSecondaryTrack);
855796#endif
@@ -876,55 +817,6 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep
876817}
877818
878819
879-
880- #ifdef WITH_G4OPTICKS
881- G4MaterialPropertyVector* Local_DsG4Scintillation::getMaterialProperty (const char * name, G4int materialIndex)
882- {
883- const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable ();
884- G4int numOfMaterials = G4Material::GetNumberOfMaterials ();
885- assert ( materialIndex < numOfMaterials );
886-
887- G4Material* aMaterial = (*theMaterialTable)[materialIndex];
888- G4MaterialPropertiesTable* aMaterialPropertiesTable = aMaterial->GetMaterialPropertiesTable ();
889- G4MaterialPropertyVector* prop = aMaterialPropertiesTable ? aMaterialPropertiesTable->GetProperty (name) : nullptr ;
890- return prop ;
891- }
892-
893- G4PhysicsOrderedFreeVector* Local_DsG4Scintillation::getScintillationIntegral (G4int scnt, G4int materialIndex) const
894- {
895- G4PhysicsOrderedFreeVector* ScintillationIntegral = NULL ;
896-
897- if ( scnt == 0 ){
898- ScintillationIntegral =
899- (G4PhysicsOrderedFreeVector*)((*theFastIntegralTable)(materialIndex));
900- }
901- else {
902- ScintillationIntegral =
903- (G4PhysicsOrderedFreeVector*)((*theSlowIntegralTable)(materialIndex));
904- }
905-
906- return ScintillationIntegral ;
907- }
908-
909-
910- G4double Local_DsG4Scintillation::getSampledEnergy (G4int scnt, G4int materialIndex) const
911- {
912- G4PhysicsOrderedFreeVector* ScintillationIntegral = getScintillationIntegral (scnt, materialIndex);
913- G4double CIIvalue = G4UniformRand ()*ScintillationIntegral->GetMaxValue ();
914- G4double sampledEnergy = ScintillationIntegral->GetEnergy (CIIvalue);
915- return sampledEnergy ;
916- }
917-
918- G4double Local_DsG4Scintillation::getSampledWavelength (G4int scnt, G4int materialIndex) const
919- {
920- G4double sampledEnergy = getSampledEnergy (scnt, materialIndex );
921- G4double wavelength = h_Planck*c_light/sampledEnergy ;
922- G4double wavelength_nm = wavelength/nm ;
923- return wavelength_nm ;
924- }
925- #endif
926-
927-
928820// BuildThePhysicsTable for the scintillation process
929821// --------------------------------------------------
930822//
0 commit comments