No Cerenkov light seen

I am following a lecture from a professor of mine just as the official documentation in order to build a simple Cerenkov process.

I get no error message but I do not see the Cerenkov light when my particles pass through the aerogel I have defined, any clue about what could be happening?

My detector construction follows as:

#include "construction.hh"



G4VPhysicalVolume *MyDetectorConstruction::Construct()
    G4NistManager *nist = G4NistManager::Instance();
    G4Material *SiO2 = new G4Material("SiO2", 2.201*g/cm3, 2);
    SiO2->AddElement(nist->FindOrBuildElement("Si"), 1);
    SiO2->AddElement(nist->FindOrBuildElement("O"), 2);
    G4Material *H2O = new G4Material("H2O", 1.000*g/cm3, 2);
    H2O->AddElement(nist->FindOrBuildElement("H"), 2);
    H2O->AddElement(nist->FindOrBuildElement("O"), 1);
    G4Element *C = nist->FindOrBuildElement("C");
    G4Material *Aerogel = new G4Material("Aerogel", 0.200*g/cm3, 3);
    Aerogel->AddMaterial(SiO2, 62.5*perCent);
    Aerogel->AddMaterial(H2O, 37.4*perCent);
    Aerogel->AddElement(C, 0.1*perCent);
    G4double energy[2] = {1.239841939*eV/0.2, 1.239841939*eV/0.9};
    G4double rindexAerogel[2] = {1.1, 1.1};
    G4double rindexWorld[2] = {1.0, 1.0};
    G4MaterialPropertiesTable *mptAerogel = new G4MaterialPropertiesTable();
    mptAerogel->AddProperty("RINDEX", energy, rindexAerogel, 2);
    G4Material *worldMat = nist->FindOrBuildMaterial("G4_AIR");
    G4MaterialPropertiesTable *mptWorld = new G4MaterialPropertiesTable();
    mptWorld->AddProperty("RINDEX", energy, rindexWorld, 2);
    G4Box *solidWorld = new G4Box("solidWorld", 0.5*m, 0.5*m, 0.5*m);
    G4LogicalVolume *logicWorld = new G4LogicalVolume(solidWorld, worldMat, "logicWorld");
    G4VPhysicalVolume *physWorld = new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), logicWorld, "physWorld", 0, false, 0, true);
    G4Box *solidRadiator = new G4Box("solidRadiator", 0.4*m, 0.4*m, 0.01*m);
    G4LogicalVolume *logicRadiator = new G4LogicalVolume(solidRadiator, Aerogel, "logicalRadiator");
    new G4PVPlacement(0, G4ThreeVector(0., 0., 0.25*m), logicRadiator, "physRadiator", logicWorld, false, 0, true);
    return physWorld;

My physicsList is

#include "physics.hh"

	RegisterPhysics (new G4EmStandardPhysics());
    RegisterPhysics (new G4OpticalPhysics());


and my generator follows as

#include "generator.hh"

	fParticleGun = new G4ParticleGun(1);

	delete fParticleGun;

void MyPrimaryGenerator::GeneratePrimaries(G4Event *anEvent)
	G4ParticleTable *particleTable = G4ParticleTable::GetParticleTable();
	G4String particleName="proton";
	G4ParticleDefinition *particle = particleTable->FindParticle("proton");
	G4ThreeVector pos(0., 0., 0.);
	G4ThreeVector mom(0., 0., 1.);

Thanks in advance!

I have exactly the same files. Actually the experts might be more comfortable if they have the whole application. So here is the GitHub link.

By the way, I found out that it actually works if the custom AddProperty line is changed with:

->AddProperty("RINDEX", "Water");

So, when using pre-defined properties there are no errors, attempts to create custom properties results in erros.

Edit: I must say that this only happens in v11.0

1 Like

Try it with the energy array monotonically increasing.

1 Like

It worked! Thanks.
Can I also ask how to find this information on the documentation? Because there might be more changes like this that I’m not aware of. I couldn’t see this one on Release Notes.

A material property vector with decreasing energy isn’t expected to work, in any version. There’s no change in optical or material in v11 that would affect this. Maybe changes in the underlying G4PhysicsFreeVector result in this change of behaviour.

I don’t know if this is documented. However, all the examples and code snippets in the documentation show the energies in increasing order.

I’ll update the documentation and look into giving an error message if the energies are not increasing.

1 Like

Thank you very much !! :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.