Message: Broken Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Broken  

Forum: Event and Track Management
Date: 18 Aug, 2014
From: Jaime Gomez <Jaime Gomez>

Hi all,

 I am trying to make plots of particles that are incident on the face of my detector and later will compare it to the read out energy.

 My detector is located at 60mm (z direction) in the code.

-----------------------------------CODE----------------------------------------

const G4VTouchable* touchable = aStep->GetPostStepPoint()->GetTouchable(); G4VPhysicalVolume* volume = touchable->GetVolume();

  G4String name = volume->GetName();
  G4String det1 = "RPD1";
  G4String det2 = "RPD2";
  G4String det3 = "RPD3";
  G4String det4 = "RPD4";
  G4String det5 = "RPD5";
  G4String det6 = "RPD6";
  G4String det7 = "RPD7";
  G4String det8 = "RPD8";
  G4String det9 = "RPD9";
  G4String det10 = "RPD10";
  G4String det11 = "RPD11";
  G4String det12 = "RPD12";
  G4String det13 = "RPD13";
  G4String det14 = "RPD14";
  G4String det15 = "RPD15";
  G4String det16 = "RPD16";

  G4Material* PreMaterial = aStep->GetPreStepPoint()->GetMaterial();
  G4Material* PostMaterial = aStep->GetPostStepPoint()->GetMaterial();

G4ThreeVector PreHitPos = aStep->GetPreStepPoint()->GetPosition(); G4ThreeVector ThisHitPos = aStep->GetPostStepPoint()->GetPosition();

  if(ThisHitPos.z()<60.5 && PreHitPos.z()>58)
     {
      if(PreMaterial!=PostMaterial) G4cout<<PreMaterial->GetName()<<" "<<PostMaterial->GetName()<<G4endl; //check to see it goes from Air to quartz

          if( name==det1 || name==det2 || name==det3 || name==det4 ||
              name==det5 || name==det6 || name==det7 || name==det8 ||
              name==det9 || name==det10 || name==det11 || 
              name==det12|| name==det13 || name==det14 || name==det15 ||   
              name==det16)                                    
             {  
               ....I Fill histos here
             }//end of detector hit filter
      }//end of z-hit filter

_____________________________________________________________________

It just seems that the 2nd, and 3rd if statements when used together cause a crash and I was wondering if anyone could help me figure out why.

thanks for any advice you can give J

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2014/08/18/11.16-1005-SteppingAction.cc

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

1 None: Re: Broken   (Marc Verderi - 19 Aug, 2014)
(_ None: Re: Broken   (Marc Verderi - 19 Aug, 2014)
 Add Message Add Message
to: "Broken "

 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 ]