Message: G4ChargedGeantino class not recognized?? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None G4ChargedGeantino class not recognized?? 

Forum: Particles
Date: 11 Jun, 2009
From: <jdswado@gatech.edu>

In my attempts to fix some problems with my application, I've created a somewhat worse one. When I try to "make" in Cygwin I get the following errors:

Compiling PhysicsList.cc ... PhysicsList.cc c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(51) error C2236: unexpected 'class' 'G4ChargedGeantion'. Did you forget a ';'? c:/c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(51) error C2143: syntax error: missing ';' before ':' c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(51) error C2059: syntax error : ':' c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(51) error C2059: syntax error : 'public' c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(52) error C2143: syntax error : missing ';' before '{' c:/Geant4/geant4_9_2/source/particles/bosons/include\G4ChargedGeantino.hh(52) erro C2447: '{' : missing function header (old-style formal list?) make: *** [c:/g4work/tmp/WIN32-VC/Application/PhysicsList.o] Error 2

Now, I'm quite certain I haven't touched the G4ChargedGeantino class definition file and ever double checked to make sure. I have however been trying to manipulate my physics list. Here is the current status of it:

------------------PhysicsList.hh----------------------------------

#ifndef PhysicsList_h
#define PhysicsList_h 1

#include "G4VUserPhysicsList.hh"
#include "globals.hh"
#include "G4TrackingManager.hh"
class G4Cerenkov; class G4Scintillation; class G4OpAbsorption; class G4OpRayleigh; class G4OpBoundaryProcess;

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

class PhysicsList: public G4VUserPhysicsList
{
  public:
    PhysicsList();
   ~PhysicsList();

  protected:
    // Construct particle and physics
    void ConstructParticle();
    void ConstructProcess();

    void SetCuts();

  protected:
    void ConstructBosons();
    void ConstructLeptons();

	void SetCutForGamma(G4double);
	void SetCutForOpticalPhoton(G4double);

  protected:
    void ConstructGeneral();
    void ConstructEM();
    void AddStepMax();
	void ConstructOp();
	void SetVerbose(G4int);
	void SetNbOfPhotonsCerenkov(G4int);

    private:
    G4Cerenkov*          theCerenkovProcess;
    G4Scintillation*     theScintillationProcess;
    G4OpAbsorption*      theAbsorptionProcess;
    G4OpRayleigh*        theRayleighScatteringProcess;
    G4OpBoundaryProcess* theBoundaryProcess;

	G4double cutForGamma;
	G4double cutForOpticalPhoton;
}
#endif

---------------------------PhysicsList.cc--------------------------------

#include "G4ios.hh"
#include <iomanip>
#include "globals.hh"
#include "PhysicsList.hh"

#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4VProcess.hh"
#include "G4VParticleChange.hh"

#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"

#include "G4Cerenkov.hh"
#include "G4Scintillation.hh"
#include "G4OpAbsorption.hh"
#include "G4OpRayleigh.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4LossTableManager.hh"
#include "G4EmSaturation.hh"

PhysicsList::PhysicsList():  G4VUserPhysicsList()
{
  theCerenkovProcess           = 0;
  theScintillationProcess      = 0;
  theAbsorptionProcess         = 0;
  theRayleighScatteringProcess = 0;
  theBoundaryProcess           = 0; 

  defaultCutValue = 1.0*cm;
   SetVerboseLevel(1);
}

PhysicsList::~PhysicsList() {}

void PhysicsList::ConstructParticle() {

  ConstructBosons();
  ConstructLeptons();
  //ConstructMesons();
  //ConstructBaryons();
}

void PhysicsList::ConstructBosons()
{
  // pseudo-particles
  //G4Geantino::GeantinoDefinition();
  //G4ChargedGeantino::ChargedGeantinoDefinition();

  // gamma
  G4Gamma::GammaDefinition();

  // optical photon
  G4OpticalPhoton::OpticalPhotonDefinition();
}

void PhysicsList::ConstructLeptons()
{
  G4Electron::ElectronDefinition();
  G4Positron::PositronDefinition();

  G4NeutrinoE::NeutrinoEDefinition();
  G4AntiNeutrinoE::AntiNeutrinoEDefinition();
}

void PhysicsList::ConstructProcess()
{
  AddTransportation();
  ConstructEM();
  ConstructGeneral();
  ConstructOp();
  AddStepMax();

}

#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4StepLimiter.hh"

#include "G4eMultipleScattering.hh" //#include "G4hMultipleScattering.hh"

#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

void PhysicsList::ConstructEM()
{
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();

    if (particleName == "gamma") {
      // gamma         
      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
      pmanager->AddDiscreteProcess(new G4ComptonScattering);
      pmanager->AddDiscreteProcess(new G4GammaConversion);

    } else if (particleName == "e-") {
      //electron
      pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
      pmanager->AddProcess(new G4eIonisation,         -1, 2, 2);
      pmanager->AddProcess(new G4eBremsstrahlung,     -1, 3, 3);      

    } else if (particleName == "e+") {
      //positron
      pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
      pmanager->AddProcess(new G4eIonisation,         -1, 2, 2);
      pmanager->AddProcess(new G4eBremsstrahlung,     -1, 3, 3);
      pmanager->AddProcess(new G4eplusAnnihilation,    0,-1, 4);

    }
  }
}

void PhysicsList::ConstructOp()
{
  theCerenkovProcess           = new G4Cerenkov("Cerenkov");
  theScintillationProcess = new G4Scintillation("Scintillation");
  theAbsorptionProcess     = new G4OpAbsorption();
  theRayleighScatteringProcess = new G4OpRayleigh();
  theBoundaryProcess  = new G4OpBoundaryProcess();

  theCerenkovProcess->SetMaxNumPhotonsPerStep(20);
  theCerenkovProcess->SetMaxBetaChangePerStep(10.0);
  theCerenkovProcess->SetTrackSecondariesFirst(true);

  theScintillationProcess->SetScintillationYieldFactor(1.);
  theScintillationProcess->SetTrackSecondariesFirst(true);

G4LossTableManager::Instance()->EmSaturation();
     G4OpticalSurfaceModel themodel = unified;
     theBoundaryProcess->SetModel(themodel);

     theParticleIterator->reset();
     while( (*theParticleIterator)() ){
     G4ParticleDefinition* particle = theParticleIterator->value();
     G4ProcessManager* pmanager = particle->GetProcessManager();
     G4String particleName = particle->GetParticleName();
     if (theCerenkovProcess->IsApplicable(*particle)) {
     pmanager->AddProcess(theCerenkovProcess);
     pmanager->SetProcessOrdering(theCerenkovProcess,idxPostStep);
    }
    if (theScintillationProcess->IsApplicable(*particle)) {
     pmanager->AddProcess(theScintillationProcess);
     pmanager->SetProcessOrderingToLast(theScintillationProcess, idxAtRest);
     pmanager->SetProcessOrderingToLast(theScintillationProcess, idxPostStep);
    }
    if (particleName == "opticalphoton") {
      G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
      pmanager->AddDiscreteProcess(theAbsorptionProcess);
      pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
      pmanager->AddDiscreteProcess(theBoundaryProcess);
    }
  }
}

void PhysicsList::SetVerbose(G4int verbose)
{
  theCerenkovProcess->SetVerboseLevel(verbose);
  theScintillationProcess->SetVerboseLevel(verbose);
  theAbsorptionProcess->SetVerboseLevel(verbose);
  theRayleighScatteringProcess->SetVerboseLevel(verbose);
  theBoundaryProcess->SetVerboseLevel(verbose);  
}
void PhysicsList::SetNbOfPhotonsCerenkov(G4int MaxNumber)
{  
  theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumber);
}

#include "G4Decay.hh" void PhysicsList::ConstructGeneral() {

  // Add Decay Process
  G4Decay* theDecayProcess = new G4Decay();
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) { 
      pmanager ->AddProcess(theDecayProcess);
      // set ordering for PostStepDoIt and AtRestDoIt
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }
}

void PhysicsList::AddStepMax() {

  G4StepLimiter* stepLimiter = new G4StepLimiter();

  theParticleIterator->reset();
  while ((*theParticleIterator)()){
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* pmanager = particle->GetProcessManager();

      if (particle->GetPDGCharge() != 0.0)
        {
	  pmanager ->AddDiscreteProcess(stepLimiter);
        }
  }
}

void PhysicsList::SetCuts() {

	SetCutValue(0.1*cm, "gamma");
	SetCutValue(0.1*cm, "opticalphoton");
	return;
}

-----------------------------------------------------------------------

I realize that's a lot to sift through but if anything is obviously wrong please let me know!

Thanks!

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Note: Note:   (jdswado@gatech.edu - 12 Jun, 2009)
 Add Message Add Message
to: "G4ChargedGeantino class not recognized??"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]