Message: Access to DetectorConstruction in hits file: a C++ problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Access to DetectorConstruction in hits file: a C++ problem 

Forum: Run Management
Date: 06 Apr, 2008
From: David Oxley <David Oxley>

Dear all,

Apologies, this is really a C++ problem, and I am not sure which forum to post it in.

I am writing a simulation involving germanium rotating every N events.

I have implemented a method of DetectorConstruction.cc which rotates the detectors. This, I call in the main.cc then reconstruct the geometry using the following lines

runManager->DefineWorldVolume(ExN01detector->Construct());
		       runManager->GeometryHasBeenModified();

		       runManager->Initialize();

Now in my data read out I want to include the rotation angle.

But I can't find a reasonable way to get at that information.

ideally something like .. hit->GetPosition()->GetTouchable()->GetDetectorConstruction()->GetAngle()

but i run into problems because the hit class can't see the detectorConstruction. The way I understand the only one that sees both is the main. But if i declare in the main Hit* hit =new Hit(); hit->GetAngle();

Then surely that will not be the same hit as is used for processing.

Any ideas or help with this problem are greatly appreciated.

Thanks to all

Dave

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

1 None: Re: Access to DetectorConstruction in hits file: a C++ problem   (jeremym@slac.stanford.edu - 07 Apr, 2008)
 Add Message Add Message
to: "Access to DetectorConstruction in hits file: a C++ problem"

 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 ]