Message: Re: Secondary electrons Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Ok Re: Secondary electrons 

Forum: Physics List
Re: None Secondary electrons (Davinder Siwal)
Re: None Re: Secondary electrons (John Allison)
Re: None Re: Secondary electrons (Davinder Siwal)
Re: None Re: Secondary electrons (John Allison)
Date: 13 May, 2010
From: Davinder Siwal <Davinder Siwal>

Hiii John

Thanks for your reply

Ok so i can calculate the no. of electron hole pairs as it is clear from my last reply that i am getting the energy deposited by gamma which is clear in my following code by i have no idea to calculate the pulse shape and how to define electrodes and give field to the detector beacuse till now i have defined a Ge crystal in cylindrical shape can u please give me some hint or some test code from which i can learn

void PlanarAnalysisManager::BeginOfEvent(const G4Event *evt)
{
  G4int eventNb = evt->GetEventID();
  G4cout<<"\n------------> Begin of Event:"<<eventNb<< G4endl;
  G4SDManager *SDman = G4SDManager::GetSDMpointer();
  PlanarCollectionID = SDman->GetCollectionID("planarCollection");
  G4cout<<PlanarCollectionID<<G4endl;

}

void PlanarAnalysisManager::EndOfEvent(const G4Event* aEvent)
{
   G4HCofThisEvent *HCE = aEvent->GetHCofThisEvent();
   PlanarHitsCollection* PHC = 0;

   static G4int a=0;
   // static G4int b=0; 
   //static G4double TEdep = 0;
   //static G4double TE = 0;
  if(HCE)
   PHC =(PlanarHitsCollection*)(HCE->GetHC(PlanarCollectionID));

  G4int n_hit = PHC->entries();

  G4cout<<"Total no. of hits by this event = "<<n_hit<<G4endl; 

   for(int i=0;i<n_hit;i++)
    {
      PlanarHit *hit = (*PHC)[i];
	TEdep+= hit->GetEdep();
        Time+= hit->GetTime();

    }

   TE = 1000*TEdep;
   adc->Fill(TE);  
   hit->Fill(n_hit);
  G4int eventNb = aEvent->GetEventID();
  // TE = 1000*TEdep;
  //hpge->fill(TE);  

  if(n_hit!=0)
    a++;

  //if(TEdep==0.7) 
  //  b++; 

 G4cout<<"Total energy deposited by this event = "<<G4BestUnit(TEdep,"Energy")
  	<<G4endl;

 //G4cout<<"No. of full energy events = "<<b<<G4endl;
     G4cout<<"Total events impinges = "<<a<<G4endl;
      G4cout<<"\n----------------->End of event: "<< eventNb <<G4endl;

      TEdep = 0;
      TE = 0;
      Time = 0;

}

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

1 None: Re: Secondary electrons   (John Allison - 14 May, 2010)
(_ Ok: Re: Secondary electrons   (Davinder Siwal - 15 May, 2010)
 Add Message Add Message
to: "Re: Secondary electrons"

 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 ]