Message: Re: The confused of Cherenkov photons Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: The confused of Cherenkov photons 

Forum: Particles
Re: None The confused of Cherenkov photons (yanxin0221)
Re: Feedback Re: The confused of Cherenkov photons (Gumplinger Peter)
Date: 12 Sep, 2013
From: yanxin0221 <yanxin0221>

Hi PeterC
   The index of refraction my Tank , World and tubeDetector materials are 2.417, 1, 1.And I have provided G4OpticalSurface .Thanks a lot for your suggestion.
 Here is my DetectorConstruction.cc:

#include "EADetectorConstruction.hh"

#include "G4Material.hh"
#include "G4Element.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4LogicalSkinSurface.hh"
#include "G4OpticalSurface.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "G4SystemOfUnits.hh"
#include "G4Tubs.hh"

#include "G4Orb.hh"
#include "G4PVReplica.hh"
#include "G4SolidStore.hh"
#include "G4NistManager.hh"
#include "globals.hh"

#include "G4VisAttributes.hh"
#include "G4Colour.hh"

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

EADetectorConstruction::EADetectorConstruction()
 :  expHall_log(0), diamondTank_log(0),
    expHall_phys(0) ,diamondTank_phys(0)
{
   for(int j=0;j<70;j++)
     { tubedetectorl[j] =0;
       tubedetectorp[j] =0;
      }
}

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

EADetectorConstruction::~EADetectorConstruction(){;}

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

G4VPhysicalVolume* EADetectorConstruction::Construct() {

// ------------- Materials -------------

  G4double a, z, density;
  G4int nelements;
  G4double expHall_x = 200.0*mm;
  G4double expHall_y = 200.0*mm;
  G4double expHall_z = 200.0*mm;
  G4double tank_x  =  150.0*mm;
  G4double tank_y  =  150.0*mm;
  G4double tank_z  =  150.0*mm;
// Air
// 
  G4Element* N = new G4Element("Nitrogen", "N", z=7 , a=14.01*g/mole);
  G4Element* O = new G4Element("Oxygen"  , "O", z=8 , a=16.00*g/mole);

  G4Material* Air = new G4Material("Air", density=1.29*mg/cm3, nelements=2);
  Air->AddElement(N, 70.*perCent);
  Air->AddElement(O, 30.*perCent);

// Diamond
//
   G4Material* diamond = 
  new G4Material("diamond", z=6., a= 12*g/mole, density= 3.52*g/cm3);

// ------------ Generate & Add Material Properties Table ------------
//
  const G4int nEntries = 32;

  G4double PhotonEnergy[nEntries] =
            { 2.034*eV, 2.068*eV, 2.103*eV, 2.139*eV,
              2.177*eV, 2.216*eV, 2.256*eV, 2.298*eV,
              2.341*eV, 2.386*eV, 2.433*eV, 2.481*eV,
              2.532*eV, 2.585*eV, 2.640*eV, 2.697*eV,
              2.757*eV, 2.820*eV, 2.885*eV, 2.954*eV,
              3.026*eV, 3.102*eV, 3.181*eV, 3.265*eV,
              3.353*eV, 3.446*eV, 3.545*eV, 3.649*eV,
              3.760*eV, 3.877*eV, 4.002*eV, 4.136*eV };
//
//Diamond
//              
  G4double RefractiveIndex1[nEntries] =
            { 2.417, 2.417,  2.417, 2.417,  2.417,
              2.417,  2.417, 2.417,  2.417, 2.417,
              2.417, 2.417, 2.417,   2.417, 2.417,
              2.417, 2.417, 2.417, 2.417, 2.417,
              2.417, 2.417,  2.417, 2.417,  2.417,
              2.417, 2.417,  2.417, 2.417,  2.417,
              2.417,   2.417};

  G4double Absorption1[nEntries] =
           {200*m,  200*m,  200*m,  200*m, 200*m, 200*m,
           200*m, 200*m, 200*m, 200*m, 200*m, 200*m,
           200*m, 200*m, 200*m, 200*m, 200*m, 200*m,
           200*m, 200*m, 200*m, 200*m, 200*m, 200*m,
           200*m, 200*m, 200*m, 200*m, 200*m, 200*m,
           200*m, 200*m };

  G4double ScintilFast[nEntries] =
            { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00 };
  G4double ScintilSlow[nEntries] =
            { 0.01, 1.00, 2.00, 3.00, 4.00, 5.00, 6.00,
              7.00, 8.00, 9.00, 8.00, 7.00, 6.00, 4.00,
              3.00, 2.00, 1.00, 0.01, 1.00, 2.00, 3.00,
              4.00, 5.00, 6.00, 7.00, 8.00, 9.00, 8.00,
              7.00, 6.00, 5.00, 4.00 };

  G4MaterialPropertiesTable* myMPT1 = new G4MaterialPropertiesTable();

  myMPT1->AddProperty("RINDEX",       PhotonEnergy, RefractiveIndex1,nEntries)
        ->SetSpline(true);
  myMPT1->AddProperty("ABSLENGTH",    PhotonEnergy, Absorption1,     nEntries)
        ->SetSpline(true);
  myMPT1->AddProperty("FASTCOMPONENT",PhotonEnergy, ScintilFast,     nEntries)
        ->SetSpline(true);
  myMPT1->AddProperty("SLOWCOMPONENT",PhotonEnergy, ScintilSlow,     nEntries)
        ->SetSpline(true);

  myMPT1->AddConstProperty("SCINTILLATIONYIELD",50./MeV);
  myMPT1->AddConstProperty("RESOLUTIONSCALE",1.0);
  myMPT1->AddConstProperty("FASTTIMECONSTANT", 1.*ns);
  myMPT1->AddConstProperty("SLOWTIMECONSTANT",10.*ns);
  myMPT1->AddConstProperty("YIELDRATIO",0.8);

  diamond->SetMaterialPropertiesTable(myMPT1);
//
// Air
//
  G4double RefractiveIndex2[nEntries] =
            { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00 };

  G4MaterialPropertiesTable* myMPT2 = new G4MaterialPropertiesTable();
  myMPT2->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex2, nEntries);

  Air->SetMaterialPropertiesTable(myMPT2);

// // ------------- Volumes --------------

// The experimental Hall
//
  G4Box* expHall_box = new G4Box("World",expHall_x,expHall_y,expHall_z);
expHall_log = new G4LogicalVolume(expHall_box,Air,"World",0,0,0);

expHall_phys = new G4PVPlacement(0,G4ThreeVector(),expHall_log,"World",0,false,0);

// The diamond Tank
//        
  G4Box* diamondTank_box = new G4Box("Tank",tank_x,tank_y,tank_z);

diamondTank_log = new G4LogicalVolume(diamondTank_box,diamond,"Tank",0,0,0);

  diamondTank_phys = new G4PVPlacement(0,G4ThreeVector(),diamondTank_log,"Tank",
                        expHall_log,false,0);

// tubedetector // G4double x; G4double y; G4int i; //G4double k; //G4double n; for(int j=0;j<70;j++) {

 i=j+1;
 x=tan(j*3.1415926/180)*50;
 y=tan(i*3.1415926/180)*50;

//G4cout << "x="<<x<<"\t" <<"y="<< y <<"\t"<<G4endl;
G4Tubs* tracker_tube = new G4Tubs("tracker_tube",x*mm,
                                   y*mm,50*nm,
                                    0.*deg,360.*deg);

tubedetectorl[j] = new G4LogicalVolume(tracker_tube,Air,"tubedetectorl",0,0,0);
tubedetectorp[j] = new G4PVPlacement(0,
            G4ThreeVector(0,0,50*mm),
             tubedetectorl[j],"tubeDetector",diamondTank_log,false,0);

 G4VisAttributes*  tubedetectorlVisAtt
    = new  G4VisAttributes(G4Colour(1.0,1.0,1.0));

 tubedetectorl[j] ->SetVisAttributes(tubedetectorlVisAtt);

  G4VisAttributes* expHall_logVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
  expHall_log ->SetVisAttributes(expHall_logVisAtt); 
  G4VisAttributes* diamondTank_logVisAtt= new G4VisAttributes(G4Colour(1.0,0.0,1.0));
  diamondTank_log ->SetVisAttributes(diamondTank_logVisAtt); 
 // ------------- Surfaces --------------
//
// diamond Tank
//
  G4OpticalSurface* OpdiamondSurface = new G4OpticalSurface("diamondSurface");
  OpdiamondSurface->SetType(dielectric_dielectric);
  OpdiamondSurface->SetFinish(polished);
  OpdiamondSurface->SetModel(unified);

  new G4LogicalBorderSurface("diamondSurface",
                                 diamondTank_phys,expHall_phys,OpdiamondSurface);

// Air Bubble
//
  G4OpticalSurface* OpAirSurface = new G4OpticalSurface("AirSurface");
  OpAirSurface->SetType(dielectric_dielectric);
  OpAirSurface->SetFinish(polished);
  OpAirSurface->SetModel(glisur);

  G4LogicalSkinSurface* AirSurface = 
          new G4LogicalSkinSurface("AirSurface", tubedetectorl[j], OpAirSurface);

  G4OpticalSurface* opticalSurface = dynamic_cast <G4OpticalSurface*>
        (AirSurface->GetSurface(tubedetectorl[j])->GetSurfaceProperty());

  if (opticalSurface) opticalSurface->DumpInfo();
 //
// Generate & Add Material Properties Table attached to the optical surfaces
//
  const G4int num = 2;
  G4double Ephoton[num] = {2.034*eV, 4.136*eV};

  //OpticaldiamondSurface 
  G4double RefractiveIndex[num] = {2.417, 2.417};
  G4double SpecularLobe[num]    = {0.3, 0.3};
  G4double SpecularSpike[num]   = {0.2, 0.2};
  G4double Backscatter[num]     = {0.2, 0.2};

  G4MaterialPropertiesTable* myST1 = new G4MaterialPropertiesTable();

  myST1->AddProperty("RINDEX",                Ephoton, RefractiveIndex, num);
  myST1->AddProperty("SPECULARLOBECONSTANT",  Ephoton, SpecularLobe,    num);
  myST1->AddProperty("SPECULARSPIKECONSTANT", Ephoton, SpecularSpike,   num);
  myST1->AddProperty("BACKSCATTERCONSTANT",   Ephoton, Backscatter,     num);

  OpdiamondSurface->SetMaterialPropertiesTable(myST1);

  //OpticalAirSurface
  G4double Reflectivity[num] = {0.3, 0.5};
  G4double Efficiency[num]   = {0.8, 1.0};

  G4MaterialPropertiesTable *myST2 = new G4MaterialPropertiesTable();

  myST2->AddProperty("REFLECTIVITY", Ephoton, Reflectivity, num);
  myST2->AddProperty("EFFICIENCY",   Ephoton, Efficiency,   num);
  OpAirSurface->SetMaterialPropertiesTable(myST2);
};
//always return the physical World
  return expHall_phys;
}

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

1 Disagree: Re: The confused of Cherenkov photons   (Gumplinger Peter - 13 Sep, 2013)
(_ Question: Re: The confused of Cherenkov photons   (yanxin0221 - 16 Sep, 2013)
(_ Feedback: Re: The confused of Cherenkov photons   (Gumplinger Peter - 16 Sep, 2013)
 Add Message Add Message
to: "Re: The confused of Cherenkov photons"

 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 ]