Message: another attempt to add cerenkov process to other physics lists... Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None another attempt to add cerenkov process to other physics lists... 

Forum: Physics List
Date: 12 Apr, 2004
From: sedat ayan <ahmet-ayan@uiowa.edu>

hi all, the question that I have is somewhat similar to the one posted earlier in this list: I have been trying to add the cerenkov process to my physics list.

I am using a similar approach used in Exercise3 in March2004 Geant4 tutorial. I have 
EM, Muon , Ion, hadronic Physics etc lists all registered in A01PhysicsList.cc.
I created CerenkovPhysics.cc and CerenkovPhysics.hh in which I define cerenkov process as :
---------------------------------------------------------------
void A01CerenkovPhysics::ConstructProcess()
{
  G4OpBoundaryProcess* theBoundaryProcess = new G4OpBoundaryProcess();
  G4Cerenkov*   theCerenkovProcess = new G4Cerenkov("Cerenkov");

  G4int MaxNumPhotons = 300;
  theCerenkovProcess->SetTrackSecondariesFirst(true);
  theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumPhotons);
  G4OpticalSurfaceModel themodel = unified;
  theBoundaryProcess->SetModel(themodel);

  // G4ProcessManager * pManager = 0;
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    G4String particleName = particle->GetParticleName();
    if (theCerenkovProcess->IsApplicable(*particle)) {
      pmanager->AddContinuousProcess(theCerenkovProcess);
    }
    if (particleName == "opticalphoton") {
      G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
      pmanager->AddDiscreteProcess(theBoundaryProcess);
    }
  }
------------------------------------------

and in PhysicsList.cc, I register this as 
// Cerenkov Physics
  RegisterPhysics(  new A01CerenkovPhysics("CERENKOV"));

However in the compilation phase, I get an error like:

----------------------------------------------------------- Compiling A01PhysicsList.cc ... src/A01PhysicsList.cc: In constructor `A01PhysicsList::A01PhysicsList()': src/A01PhysicsList.cc:81: parse error before `(' token

gmake: *** [/home/ayan/geant4/geant4.6.0.p01/tmp/Linux-g++/Exercise3/A01PhysicsList.o] Error 1
-------------------------------------------------

I do not think there is any syntax etc error in the code. Can anyone help me resolve this problem? Thanks much in advance, cheers sedat. ******** univ. of iowa dept. of physics

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

1 None: Re: another attempt to add cerenkov process to other physics lists...   (Dmitry Onoprienko - 12 Apr, 2004)
1 None: Re: another attempt to add cerenkov process to other physics lists...   (sedat ayan - 12 Apr, 2004)
2 None: Re: another attempt to add cerenkov process to other physics lists...   (michel maire - 12 Apr, 2004)
 Add Message Add Message
to: "another attempt to add cerenkov process to other physics lists..."

 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 ]