Message: EndOfEventAction and Hit information Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question EndOfEventAction and Hit information 

Keywords: Hit s
Forum: Hits, Digitization and Pileup
Date: 29 Dec, 2003
From: Taylan Yetkin <>

Hi Everyone,

I'm filling a couple of histograms with total energy deposition inside 
calorimeter's one part by using the EndOfEventAction(). I defined my Hit and my 
Sensitive Detector classes for the relevant part of the detector. However I need 
to put a kind of cut for the particles which are hitting the sensitive 
detector: If the beta of the hitting particle is above from a certain value
fill 1st histogram, else fill 2nd histogram. To do this I need to reach particle's 
dynamical informations such as its total energy or its total momentum inside
 the EndOfEventAction(G4Event*) function. But I could'nt find a way
to reach that information just by using EndOfEventAction. If you have any idea 
could you please help me?

I tried one another thing: Inside my sensitive detector and hit classes definition I used 
another typedef for the desired beta cut


typedef G4THitsCollection<MyDetHit> MyDetHitsCollection;  // for all hits with no cuts

typedef G4THitsCollection<MyDetHit> MyDetBetaHitsCollection; //for hits whic satisfy the condition  beta > aValue condition


G4bool MyFiberBetaSD::ProcessHits(G4Step*,G4TouchableHistory*){
//By using the G4Step I reached the G4DynamicParticle and calculate the
// beta value for hits. 

if(pBeta > aValue){
        MyDetHit* aHit = new MyDetHit();
        if(theDet == Detector->GetDet()) aHit->AddEdep(edep,stepl);
        HCID[copyNo] = DetBetaHitsCollection->insert(aHit) - 1;
        if(theDet == Detector->GetDet())

And then by using MyEventAction class I tried to fill histogram with Edep
which is calculated as above. Well, It didn't work

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

 Add Message Add Message
to: "EndOfEventAction and Hit information"

 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 ]