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
2 changes: 0 additions & 2 deletions u4/Local_DsG4Scintillation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
#include "G4Electron.hh"
#include "globals.hh"


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

Expand Down Expand Up @@ -782,7 +781,6 @@ Local_DsG4Scintillation::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep
return change ;
}


// BuildThePhysicsTable for the scintillation process
// --------------------------------------------------
//
Expand Down
170 changes: 0 additions & 170 deletions u4/Local_G4Cerenkov_modified.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@

#include "Local_G4Cerenkov_modified.hh"

#ifdef INSTRUMENTED
#include "OpticksDebug.hh"
#include "OpticksRandom.hh"
#endif

#include "SLOG.hh"
#include "U4.hh"

Expand All @@ -105,9 +100,6 @@ Local_G4Cerenkov_modified::Local_G4Cerenkov_modified(const G4String& processName
fMaxBetaChange(0.0),
fMaxPhotons(0),
fStackingFlag(true),
#ifdef INSTRUMENTED
override_fNumPhotons(0),
#endif
fNumPhotons(0)
{
SetProcessSubType(fCerenkov);
Expand Down Expand Up @@ -236,13 +228,6 @@ G4VParticleChange* Local_G4Cerenkov_modified::PostStepDoIt(const G4Track& aTrack

fNumPhotons = (G4int) G4Poisson(MeanNumberOfPhotons);

#ifdef INSTRUMENTED
if( override_fNumPhotons > 0 )
{
fNumPhotons = override_fNumPhotons ;
}
#endif


// calculate the fNumPhotons1 and fNumPhotons2 {

Expand Down Expand Up @@ -310,19 +295,6 @@ G4VParticleChange* Local_G4Cerenkov_modified::PostStepDoIt(const G4Track& aTrack
fNumPhotons2 = MeanNumberOfPhotons2;


#ifdef INSTRUMENTED
par->append( BetaInverse, "BetaInverse" );
par->append( beta , "beta" );
par->append( Pmin , "Pmin" );
par->append( Pmax , "Pmax" );

par->append( nMax , "nMax" );
par->append( maxCos , "maxCos" );
par->append( maxSin2 , "maxSin2" );
par->append( fNumPhotons, "fNumPhotons" );
#endif



if (MeanNumberOfPhotons1 <= 0.0 or MeanNumberOfPhotons2<=0.0) {

Expand Down Expand Up @@ -393,36 +365,9 @@ G4VParticleChange* Local_G4Cerenkov_modified::PostStepDoIt(const G4Track& aTrack
G4double sin2Theta(0.);
#endif

#ifdef INSTRUMENTED
unsigned head_count = 0 ;
unsigned tail_count = 0 ;
unsigned continue_count = 0 ;
unsigned condition_count = 0 ;
int seqidx = -1 ;
if(rnd)
{
rnd->setSequenceIndex(i);
seqidx = rnd->getSequenceIndex();

if(i < 10) std::cout
<< " i " << std::setw(6) << i
<< " seqidx " << std::setw(7) << seqidx
<< " Pmin/eV " << std::fixed << std::setw(10) << std::setprecision(5) << Pmin/eV
<< " Pmax/eV " << std::fixed << std::setw(10) << std::setprecision(5) << Pmax/eV
<< " dp/eV " << std::fixed << std::setw(10) << std::setprecision(5) << dp/eV
<< " maxSin2 " << std::fixed << std::setw(10) << std::setprecision(5) << maxSin2
<< std::endl
;

}
#endif

// sample an energy

do {
#ifdef INSTRUMENTED
head_count += 1 ;
#endif
rand0 = G4UniformRand();
sampledEnergy = Pmin + rand0 * dp;
sampledRI = Rindex->Value(sampledEnergy);
Expand All @@ -432,17 +377,10 @@ G4VParticleChange* Local_G4Cerenkov_modified::PostStepDoIt(const G4Track& aTrack
#else
// check if n(E) > 1/beta
if (sampledRI < BetaInverse) {
#ifdef INSTRUMENTED
continue_count += 1 ;
#endif
continue;
}

#endif

#ifdef INSTRUMENTED
tail_count += 1 ;
#endif


cosTheta = BetaInverse / sampledRI;
Expand All @@ -465,46 +403,7 @@ G4VParticleChange* Local_G4Cerenkov_modified::PostStepDoIt(const G4Track& aTrack
#endif

// Loop checking, 07-Aug-2015, Vladimir Ivanchenko
#ifdef INSTRUMENTED

if( i < 10 ) std::cout
<< " tc " << std::setw(6) << tail_count
<< " u0 " << std::fixed << std::setw(10) << std::setprecision(5) << rand0
<< " eV " << std::fixed << std::setw(10) << std::setprecision(5) << sampledEnergy/eV
<< " ri " << std::fixed << std::setw(10) << std::setprecision(5) << sampledRI
<< " ct " << std::fixed << std::setw(10) << std::setprecision(5) << cosTheta
<< " s2 " << std::fixed << std::setw(10) << std::setprecision(5) << sin2Theta
<< " rand1*maxSin2 " << std::fixed << std::setw(10) << std::setprecision(5) << rand1*maxSin2
<< " rand1*maxSin2 - sin2Theta " << std::fixed << std::setw(10) << std::setprecision(5) << rand1*maxSin2 - sin2Theta
<< " loop " << ( rand1*maxSin2 > sin2Theta ? "Y" : "N" )
<< std::endl
;


} while ( looping_condition(condition_count) && rand1*maxSin2 > sin2Theta );
#else
} while (rand1*maxSin2 > sin2Theta);
#endif

#ifdef INSTRUMENTED
G4double sampledEnergy_eV = sampledEnergy/eV ;
G4double sampledWavelength_nm = h_Planck*c_light/sampledEnergy/nm ;

gen->append( sampledEnergy_eV , "sampledEnergy" );
gen->append( sampledWavelength_nm , "sampledWavelength" );
gen->append( sampledRI , "sampledRI" );
gen->append( cosTheta , "cosTheta" );

gen->append( sin2Theta , "sin2Theta" );
gen->append( head_count , tail_count, "head_tail" );
gen->append( continue_count , condition_count, "continue_condition" );
gen->append( BetaInverse , "BetaInverse" );

if(rnd)
{
rnd->setSequenceIndex(-1);
}
#endif



Expand Down Expand Up @@ -606,17 +505,6 @@ G4VParticleChange* Local_G4Cerenkov_modified::PostStepDoIt(const G4Track& aTrack
}


#ifdef INSTRUMENTED
bool Local_G4Cerenkov_modified::looping_condition(unsigned& count)
{
count += 1 ;
return true ;
}


#endif


// BuildThePhysicsTable for the Cerenkov process
// ---------------------------------------------
//
Expand Down Expand Up @@ -848,17 +736,6 @@ G4double

const G4double Rfact = 369.81/(eV * cm);

#ifdef X_INSTRUMENTED
std::cout
<< "Local_G4Cerenkov_modified::GetAverageNumberOfPhotons"
<< " Rfact " << std::fixed << std::setw(10) << std::setprecision(5) << Rfact
<< " eV " << std::fixed << std::setw(10) << std::setprecision(7) << eV
<< " cm " << std::fixed << std::setw(10) << std::setprecision(5) << cm
<< " charge " << std::fixed << std::setw(10) << std::setprecision(5) << charge
<< std::endl
;
#endif

if(beta <= 0.0)return 0.0;

G4double BetaInverse = 1./beta;
Expand Down Expand Up @@ -1109,40 +986,6 @@ G4double
G4double NumPhotons = Rfact * charge/eplus * charge/eplus *
(dp1 - ge1 * BetaInverse*BetaInverse);


#ifdef X_INSTRUMENTED
std::cout
<< "Local_G4Cerenkov_modified::GetAverageNumberOfPhotons"
<< " BetaInverse " << std::fixed << std::setw(10) << std::setprecision(5) << BetaInverse
<< " maxRI " << std::fixed << std::setw(10) << std::setprecision(5) << maxRI
<< " minRI " << std::fixed << std::setw(10) << std::setprecision(5) << minRI
<< " cross_num " << cross_num
<< " dp1 " << std::fixed << std::setw(10) << std::setprecision(5) << dp1
<< " dp1/eV " << std::fixed << std::setw(10) << std::setprecision(5) << dp1/eV
<< " ge1 " << std::fixed << std::setw(10) << std::setprecision(5) << ge1
<< " NumPhotons " << std::fixed << std::setw(10) << std::setprecision(5) << NumPhotons
<< std::endl
;

for(int i=0 ; i < cross_num ; i++)
{

G4bool isOutRange;
G4double cai0 = CerenkovAngleIntegrals->GetValue(the_energies_threshold[2*i+0], isOutRange);
G4double cai1 = CerenkovAngleIntegrals->GetValue(the_energies_threshold[2*i+1], isOutRange);

std::cout
<< "Local_G4Cerenkov_modified::GetAverageNumberOfPhotons"
<< " the_energies_threshold[2*i+0]/eV " << std::fixed << std::setw(10) << std::setprecision(5) << the_energies_threshold[2*i+0]/eV
<< " the_energies_threshold[2*i+1]/eV " << std::fixed << std::setw(10) << std::setprecision(5) << the_energies_threshold[2*i+1]/eV
<< " cai0 " << std::fixed << std::setw(20) << std::setprecision(10) << cai0
<< " cai1 " << std::fixed << std::setw(20) << std::setprecision(10) << cai1
<< std::endl
;
}
#endif


return NumPhotons;
}

Expand Down Expand Up @@ -1258,19 +1101,6 @@ G4double Local_G4Cerenkov_modified::GetAverageNumberOfPhotons_s2(const G4double
const G4double Rfact = 369.81/(eV * cm);
G4double NumPhotons = Rfact * charge/eplus * charge/eplus * s2integral ;

#ifdef X_INSTRUMENTED
std::cout
<< "Local_G4Cerenkov_modified::GetAverageNumberOfPhotons_s2"
<< " Rfact " << std::fixed << std::setw(10) << std::setprecision(5) << Rfact
<< " eV " << std::fixed << std::setw(10) << std::setprecision(7) << eV
<< " cm " << std::fixed << std::setw(10) << std::setprecision(5) << cm
<< " mm " << std::fixed << std::setw(10) << std::setprecision(5) << mm
<< " charge " << std::fixed << std::setw(10) << std::setprecision(5) << charge
<< " s2integral " << std::fixed << std::setw(10) << std::setprecision(5) << s2integral
<< " NumPhotons " << std::fixed << std::setw(10) << std::setprecision(5) << NumPhotons
<< std::endl
;
#endif
return NumPhotons ;
}

Expand Down
23 changes: 0 additions & 23 deletions u4/Local_G4Cerenkov_modified.hh
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,10 @@
// Class Definition
/////////////////////

#ifdef INSTRUMENTED
template <typename T> struct OpticksDebug ;
struct OpticksRandom ;
#endif


class Local_G4Cerenkov_modified : public G4VProcess
{
public:

#ifdef INSTRUMENTED
template <typename T> friend struct Local_G4Cerenkov_modifiedTest ;
bool looping_condition(unsigned& count);
OpticksDebug<double>* gen ;
OpticksDebug<double>* par ;
OpticksRandom* rnd ;
#endif


////////////////////////////////
// Constructors and Destructor
////////////////////////////////
Expand Down Expand Up @@ -252,12 +237,6 @@ private:

G4bool fStackingFlag;

#ifdef INSTRUMENTED
public:
G4int override_fNumPhotons ;
private:
#endif

G4int fNumPhotons;
G4int fNumPhotons1; // mean
G4int fNumPhotons2; // mean
Expand Down Expand Up @@ -325,5 +304,3 @@ G4PhysicsTable* Local_G4Cerenkov_modified::GetPhysicsTable() const
}

#endif /* Local_G4Cerenkov_modified_h */


Loading
Loading