Import Geant4 8.1.0 source tree
This commit is contained in:
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTJpeg.hh,v 1.5 2001/07/11 10:09:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RTJpeg.hh,v 1.6 2006/06/29 21:23:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTJpegCoder.hh,v 1.5 2001/07/11 10:09:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RTJpegCoder.hh,v 1.6 2006/06/29 21:23:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTJpegCoderTables.hh,v 1.5 2001/07/11 10:09:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RTJpegCoderTables.hh,v 1.6 2006/06/29 21:23:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
|
||||
// class description:
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTJpegMaker.hh,v 1.5 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RTJpegMaker.hh,v 1.6 2006/06/29 21:23:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTMessenger.hh,v 1.5 2003/09/18 11:13:24 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RTMessenger.hh,v 1.7 2006/06/29 21:23:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -44,20 +47,25 @@ class G4UIcmdWith3VectorAndUnit;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithAString;
|
||||
class G4RayTracer;
|
||||
class G4TheRayTracer;
|
||||
class G4RTSteppingAction;
|
||||
|
||||
class G4RTMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
G4RTMessenger(G4RayTracer* p1,G4RTSteppingAction* p2);
|
||||
static G4RTMessenger* GetInstance
|
||||
(G4TheRayTracer* p1,G4RTSteppingAction* p2); // Singleton constructor.
|
||||
virtual ~G4RTMessenger();
|
||||
|
||||
virtual G4String GetCurrentValue(G4UIcommand * command);
|
||||
virtual void SetNewValue(G4UIcommand * command,G4String newValue);
|
||||
|
||||
private:
|
||||
G4RayTracer* theTracer;
|
||||
G4RTMessenger(G4TheRayTracer* p1,G4RTSteppingAction* p2);
|
||||
static G4RTMessenger* fpInstance;
|
||||
G4TheRayTracer* theDefaultTracer; // The first tracer to
|
||||
// instantiate this messenger.
|
||||
G4TheRayTracer* theTracer; // The current tracer.
|
||||
G4RTSteppingAction* theSteppingAction;
|
||||
|
||||
G4UIdirectory* rayDirectory;
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTOutBitStream.hh,v 1.6 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RTOutBitStream.hh,v 1.7 2006/06/29 21:23:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTSimpleScanner.hh,v 1.2 2005/07/17 13:59:24 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RTSimpleScanner.hh,v 1.3 2006/06/29 21:23:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTSteppingAction.hh,v 1.4 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RTSteppingAction.hh,v 1.5 2006/06/29 21:23:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTTrackingAction.hh,v 1.5 2003/05/30 13:01:20 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RTTrackingAction.hh,v 1.6 2006/06/29 21:23:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RTXScanner.hh,v 1.2 2005/07/20 20:39:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RTXScanner.hh,v 1.4 2006/06/29 21:23:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -39,7 +42,10 @@
|
||||
|
||||
#include "G4VRTScanner.hh"
|
||||
|
||||
class G4RayTracer;
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
class G4ViewParameters;
|
||||
|
||||
class G4RTXScanner: public G4VRTScanner {
|
||||
|
||||
@@ -67,13 +73,19 @@ public: // with description
|
||||
// last valid coordinate.
|
||||
|
||||
virtual void Draw
|
||||
(unsigned char red, unsigned char green, unsigned char blue,
|
||||
G4RayTracer*);
|
||||
(unsigned char red, unsigned char green, unsigned char blue);
|
||||
// Draw coloured square at current position.
|
||||
|
||||
G4bool GetXWindow(const G4String& name, G4ViewParameters&);
|
||||
|
||||
protected:
|
||||
G4String theGSName, theGSNickname;
|
||||
G4int theNRow, theNColumn, theStep, theIRow, theIColumn;
|
||||
// X Window variables...
|
||||
Display* display;
|
||||
Window win;
|
||||
GC gc;
|
||||
XStandardColormap *scmap;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayShooter.hh,v 1.3 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
// class description:
|
||||
//
|
||||
// the object of this class shoots a ray (actually geantino) primary particle
|
||||
// associated with a G4Event object. This slass must be used exclusively by
|
||||
// G4RayTracer.
|
||||
//
|
||||
|
||||
#ifndef G4RayShooter_h
|
||||
#define G4RayShooter_h 1
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4PrimaryVertex.hh"
|
||||
#include "G4ParticleMomentum.hh"
|
||||
|
||||
class G4Event;
|
||||
|
||||
class G4RayShooter
|
||||
{
|
||||
public:
|
||||
G4RayShooter();
|
||||
public:
|
||||
virtual ~G4RayShooter();
|
||||
|
||||
public: // with description
|
||||
void Shoot(G4Event* evt,G4ThreeVector vtx,G4ThreeVector direc);
|
||||
// This method generates a primary vertex and a primary particle at the
|
||||
// given vertex point and with the given direction. This method is invoked
|
||||
// by G4RayTracer.
|
||||
|
||||
private:
|
||||
void SetInitialValues();
|
||||
|
||||
G4ParticleDefinition* particle_definition;
|
||||
G4ParticleMomentum particle_momentum_direction;
|
||||
G4double particle_energy;
|
||||
G4ThreeVector particle_position;
|
||||
G4double particle_time;
|
||||
G4ThreeVector particle_polarization;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracer.hh,v 1.9 2003/09/18 11:14:03 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RayTracer.hh,v 1.11 2006/06/29 21:23:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -33,159 +36,19 @@
|
||||
// class description:
|
||||
//
|
||||
// G4RayTracer
|
||||
// This is a graphics driver of Geant4 which generates a figure file by
|
||||
// ray tracing technique. The format of output figure file can be selected
|
||||
// by assigning a pointer of G4VFigureFileMaker concrete class object.
|
||||
// The main entry of ray tracing is Trace() method, which is available
|
||||
// only at Idle state. G4RayTracer shoots rays and controls its own event
|
||||
// loop. It generates G4Event objects used for its own purpose. When ray
|
||||
// tracing is working, all sensitive detectors are inactivated and all
|
||||
// user action classes are swapped out. Still, verbosities set to Geant4
|
||||
// manager classes are concerned. Thus, it is recommended to set verbosities
|
||||
// to minimum (usually zero).
|
||||
// G4RayTracer can visualise absolutely all kinds of geometrical shapes
|
||||
// which G4Navigator can deal with. Instead, it can NOT visualise hits
|
||||
// nor trajectories generated by usual simulation.
|
||||
// To make G4RayTracer library, G4VIS_BUILD_RAYTRACER_DRIVER environment
|
||||
// variable must be set before compiling visualization category. To use
|
||||
// G4RayTracer with your program, G4VIS_USE_RAYTRACER environment variable
|
||||
// must be set before compiling your program and your VisManager concrete
|
||||
// implementation must contain
|
||||
// RegisterGraphicsSystem (new G4RayTracer);
|
||||
//
|
||||
// This is a factory for G4RayTracerSceneHandler and G4RayTracerViewer
|
||||
// objects. The viewer uses the original G4RayTracer, which has now
|
||||
// been renamed G4TheRayTracer.
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
class G4Event;
|
||||
class G4EventManager;
|
||||
class G4UserEventAction;
|
||||
class G4UserStackingAction;
|
||||
class G4UserTrackingAction;
|
||||
class G4UserSteppingAction;
|
||||
class G4RTTrackingAction;
|
||||
class G4RTSteppingAction;
|
||||
class G4RTMessenger;
|
||||
class G4RayShooter;
|
||||
class G4VFigureFileMaker;
|
||||
class G4RayTrajectoryPoint;
|
||||
class G4VisAttributes;
|
||||
class G4VRTScanner;
|
||||
|
||||
|
||||
class G4RayTracer : public G4VGraphicsSystem
|
||||
{
|
||||
public: // with description
|
||||
G4RayTracer(G4VFigureFileMaker* figMaker = 0,
|
||||
G4VRTScanner* scanner = 0);
|
||||
// Constructor. The argument is the pointer to G4VFigureFileMaker
|
||||
// concrete class object. If it is not set and
|
||||
// SetFigureFileMaker() method is not invoked before Trace()
|
||||
// command is invoked, then G4RTJpegMaker will be used and JPEG
|
||||
// file will be generated. The second argument is a scanner that
|
||||
// produces a sequence of window coordinates. If it is not set
|
||||
// here or if SetScanner is not invoked before Trace(), a default
|
||||
// G4RTSimpleScanner will be used.
|
||||
|
||||
public:
|
||||
G4RayTracer();
|
||||
~G4RayTracer();
|
||||
|
||||
public: // with description
|
||||
void Trace(G4String fileName);
|
||||
// The main entry point which triggers ray tracing. "fileName" is output
|
||||
// file name, and it must contain extention (e.g. myFigure.jpg). This
|
||||
// method is available only if Geant4 is at Idle state.
|
||||
|
||||
public:
|
||||
virtual G4VSceneHandler* CreateSceneHandler (const G4String& );
|
||||
virtual G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& );
|
||||
|
||||
protected:
|
||||
G4bool CreateBitMap();
|
||||
// Event loop
|
||||
void CreateFigureFile(G4String fileName);
|
||||
// Create figure file after an event loop
|
||||
G4bool GenerateColour(G4Event* anEvent, G4int iCoord);
|
||||
// Calcurate RGB for one trajectory stored at location iCoord
|
||||
void StoreUserActions();
|
||||
void RestoreUserActions();
|
||||
// Store and restore user action classes if defined
|
||||
|
||||
G4Colour GetSurfaceColour(G4RayTrajectoryPoint* point);
|
||||
G4Colour GetMixedColour(G4Colour surfCol,G4Colour transCol,G4double weight=0.5);
|
||||
G4Colour Attenuate(G4RayTrajectoryPoint* point, G4Colour sourceCol);
|
||||
G4bool ValidColour(const G4VisAttributes* visAtt);
|
||||
|
||||
public: // with description
|
||||
inline void SetFigureFileMaker(G4VFigureFileMaker* figMaker)
|
||||
// Set a concrete class of G4VFigureFileMaker for assigning the format of
|
||||
// output figure file.
|
||||
{ theFigMaker = figMaker; }
|
||||
inline void SetScanner(G4VRTScanner* scanner)
|
||||
// Set a concrete class of G4VRTScanner for producing a sequence
|
||||
// of window coordinates.
|
||||
{ theScanner = scanner; }
|
||||
|
||||
protected:
|
||||
G4RayShooter * theRayShooter;
|
||||
G4VFigureFileMaker * theFigMaker;
|
||||
G4RTMessenger * theMessenger;
|
||||
G4VRTScanner * theScanner;
|
||||
|
||||
G4EventManager * theEventManager;
|
||||
|
||||
G4UserEventAction * theUserEventAction;
|
||||
G4UserStackingAction * theUserStackingAction;
|
||||
G4UserTrackingAction * theUserTrackingAction;
|
||||
G4UserSteppingAction * theUserSteppingAction;
|
||||
|
||||
G4UserEventAction * theRayTracerEventAction;
|
||||
G4UserStackingAction * theRayTracerStackingAction;
|
||||
G4RTTrackingAction * theRayTracerTrackingAction;
|
||||
G4RTSteppingAction * theRayTracerSteppingAction;
|
||||
|
||||
unsigned char* colorR;
|
||||
unsigned char* colorG;
|
||||
unsigned char* colorB;
|
||||
|
||||
G4int nColumn;
|
||||
G4int nRow;
|
||||
|
||||
G4ThreeVector eyePosition;
|
||||
G4ThreeVector targetPosition;
|
||||
G4ThreeVector eyeDirection;
|
||||
G4ThreeVector lightDirection;
|
||||
G4double headAngle;
|
||||
G4double viewSpan; // Angle per 100 pixels
|
||||
G4double attenuationLength;
|
||||
|
||||
G4bool distortionOn;
|
||||
|
||||
G4Colour backgroundColour;
|
||||
|
||||
public:
|
||||
inline void SetNColumn(G4int val) { nColumn = val; }
|
||||
inline G4int GetNColumn() const { return nColumn; }
|
||||
inline void SetNRow(G4int val) { nRow = val; }
|
||||
inline G4int GetNRow() const { return nRow; }
|
||||
inline void SetEyePosition(const G4ThreeVector& val) { eyePosition = val; }
|
||||
inline G4ThreeVector GetEyePosition() const { return eyePosition; }
|
||||
inline void SetTargetPosition(const G4ThreeVector& val) { targetPosition = val; }
|
||||
inline G4ThreeVector GetTargetPosition() const { return targetPosition; }
|
||||
inline void SetLightDirection(const G4ThreeVector& val) { lightDirection = val.unit(); }
|
||||
inline G4ThreeVector GetLightDirection() const { return lightDirection; }
|
||||
inline void SetHeadAngle(G4double val) { headAngle = val; }
|
||||
inline G4double GetHeadAngle() const { return headAngle; }
|
||||
inline void SetViewSpan(G4double val) { viewSpan = val; }
|
||||
inline G4double GetViewSpan() const { return viewSpan; }
|
||||
inline void SetAttenuationLength(G4double val) { attenuationLength = val; }
|
||||
inline G4double GetAttenuationLength() const { return attenuationLength; }
|
||||
inline void SetDistortion(G4bool val) { distortionOn = val; }
|
||||
inline G4bool GetDistortion() const { return distortionOn; }
|
||||
inline void SetBackgroundColour(G4Colour val) { backgroundColour = val; }
|
||||
inline G4Colour GetBackgroundColour() const { return backgroundColour; }
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& );
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracerFeatures.hh,v 1.3 2001/07/11 10:09:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RayTracerFeatures.hh,v 1.4 2006/06/29 21:23:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracerSceneHandler.hh,v 1.8 2005/06/02 17:43:46 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RayTracerSceneHandler.hh,v 1.11 2006/06/29 21:23:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// John Allison 17th March 2000
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracerViewer.hh,v 1.5 2005/07/17 13:59:24 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RayTracerViewer.hh,v 1.7 2006/06/29 21:23:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// John Allison 17th March 2000
|
||||
|
||||
@@ -31,15 +34,21 @@
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
|
||||
class G4TheRayTracer;
|
||||
|
||||
class G4RayTracerViewer: public G4VViewer {
|
||||
public:
|
||||
G4RayTracerViewer(G4VSceneHandler&,const G4String& name);
|
||||
G4RayTracerViewer(G4VSceneHandler&,
|
||||
const G4String& name,
|
||||
G4TheRayTracer* = 0);
|
||||
virtual ~G4RayTracerViewer();
|
||||
void SetView();
|
||||
void ClearView();
|
||||
void DrawView();
|
||||
G4TheRayTracer* GetTracer() {return theTracer;}
|
||||
protected:
|
||||
G4int fFileCount;
|
||||
G4TheRayTracer* theTracer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracerX.hh,v 1.2 2005/07/20 20:39:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RayTracerX.hh,v 1.4 2006/06/29 21:23:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 11th September 2003
|
||||
@@ -35,28 +38,19 @@
|
||||
// class description:
|
||||
//
|
||||
// G4RayTracerX
|
||||
// X window version of RayTracer (also produces jpeg file - see class
|
||||
// description for G4RayTracer).
|
||||
// X window version of RayTracer - opens X window for viewing as well
|
||||
// as producing jpeg file just like G4RayTracer.
|
||||
|
||||
#include "G4RayTracer.hh"
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
class G4RayTracerX : public G4RayTracer
|
||||
class G4RayTracerX : public G4VGraphicsSystem
|
||||
{
|
||||
public:
|
||||
G4RayTracerX();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& );
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& );
|
||||
|
||||
// X Window variables...
|
||||
Display* display;
|
||||
Window win;
|
||||
GC gc;
|
||||
XStandardColormap *scmap;
|
||||
public: // with description
|
||||
G4RayTracerX();
|
||||
~G4RayTracerX();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& );
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTracerXViewer.hh,v 1.2 2005/07/20 20:39:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RayTracerXViewer.hh,v 1.3 2006/06/29 21:23:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// John Allison 17th March 2000
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTrajectory.hh,v 1.14 2004/06/11 14:30:49 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RayTrajectory.hh,v 1.15 2006/06/29 21:23:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTrajectoryPoint.hh,v 1.8 2004/06/11 14:30:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4RayTrajectoryPoint.hh,v 1.9 2006/06/29 21:23:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TheRayTracer.hh,v 1.3 2006/06/29 21:23:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4TheRayTracer_H
|
||||
#define G4TheRayTracer_H 1
|
||||
|
||||
// class description:
|
||||
//
|
||||
// G4TheRayTracer
|
||||
// This is a graphics driver of Geant4 which generates a figure file by
|
||||
// ray tracing technique. The format of output figure file can be selected
|
||||
// by assigning a pointer of G4VFigureFileMaker concrete class object.
|
||||
// The main entry of ray tracing is Trace() method, which is available
|
||||
// only at Idle state. G4TheRayTracer shoots rays and controls its own event
|
||||
// loop. It generates G4Event objects used for its own purpose. When ray
|
||||
// tracing is working, all sensitive detectors are inactivated and all
|
||||
// user action classes are swapped out. Still, verbosities set to Geant4
|
||||
// manager classes are concerned. Thus, it is recommended to set verbosities
|
||||
// to minimum (usually zero).
|
||||
// G4TheRayTracer can visualise absolutely all kinds of geometrical shapes
|
||||
// which G4Navigator can deal with. Instead, it can NOT visualise hits
|
||||
// nor trajectories generated by usual simulation.
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
class G4Event;
|
||||
class G4EventManager;
|
||||
class G4UserEventAction;
|
||||
class G4UserStackingAction;
|
||||
class G4UserTrackingAction;
|
||||
class G4UserSteppingAction;
|
||||
class G4RTTrackingAction;
|
||||
class G4RTSteppingAction;
|
||||
class G4RTMessenger;
|
||||
class G4RayShooter;
|
||||
class G4VFigureFileMaker;
|
||||
class G4RayTrajectoryPoint;
|
||||
class G4VisAttributes;
|
||||
class G4VRTScanner;
|
||||
|
||||
|
||||
class G4TheRayTracer
|
||||
{
|
||||
public: // with description
|
||||
G4TheRayTracer(G4VFigureFileMaker* figMaker = 0,
|
||||
G4VRTScanner* scanner = 0);
|
||||
// Constructor. The argument is the pointer to G4VFigureFileMaker
|
||||
// concrete class object. If it is not set and
|
||||
// SetFigureFileMaker() method is not invoked before Trace()
|
||||
// command is invoked, then G4RTJpegMaker will be used and JPEG
|
||||
// file will be generated. The second argument is a scanner that
|
||||
// produces a sequence of window coordinates. If it is not set
|
||||
// here or if SetScanner is not invoked before Trace(), a default
|
||||
// G4RTSimpleScanner will be used.
|
||||
|
||||
public:
|
||||
~G4TheRayTracer();
|
||||
|
||||
public: // with description
|
||||
void Trace(G4String fileName);
|
||||
// The main entry point which triggers ray tracing. "fileName" is output
|
||||
// file name, and it must contain extention (e.g. myFigure.jpg). This
|
||||
// method is available only if Geant4 is at Idle state.
|
||||
|
||||
protected:
|
||||
G4bool CreateBitMap();
|
||||
// Event loop
|
||||
void CreateFigureFile(G4String fileName);
|
||||
// Create figure file after an event loop
|
||||
G4bool GenerateColour(G4Event* anEvent);
|
||||
// Calcurate RGB for one trajectory
|
||||
void StoreUserActions();
|
||||
void RestoreUserActions();
|
||||
// Store and restore user action classes if defined
|
||||
|
||||
G4Colour GetSurfaceColour(G4RayTrajectoryPoint* point);
|
||||
G4Colour GetMixedColour(G4Colour surfCol,G4Colour transCol,G4double weight=0.5);
|
||||
G4Colour Attenuate(G4RayTrajectoryPoint* point, G4Colour sourceCol);
|
||||
G4bool ValidColour(const G4VisAttributes* visAtt);
|
||||
|
||||
public: // with description
|
||||
inline void SetFigureFileMaker(G4VFigureFileMaker* figMaker)
|
||||
// Set a concrete class of G4VFigureFileMaker for assigning the format of
|
||||
// output figure file.
|
||||
{ theFigMaker = figMaker; }
|
||||
inline G4VFigureFileMaker* GetFigureFileMaker() {return theFigMaker;}
|
||||
inline void SetScanner(G4VRTScanner* scanner)
|
||||
// Set a concrete class of G4VRTScanner for producing a sequence
|
||||
// of window coordinates.
|
||||
{ theScanner = scanner; }
|
||||
inline G4VRTScanner* GetScanner() {return theScanner;}
|
||||
|
||||
protected:
|
||||
G4RayShooter * theRayShooter;
|
||||
G4VFigureFileMaker * theFigMaker;
|
||||
G4RTMessenger * theMessenger;
|
||||
G4VRTScanner * theScanner;
|
||||
|
||||
G4EventManager * theEventManager;
|
||||
|
||||
G4UserEventAction * theUserEventAction;
|
||||
G4UserStackingAction * theUserStackingAction;
|
||||
G4UserTrackingAction * theUserTrackingAction;
|
||||
G4UserSteppingAction * theUserSteppingAction;
|
||||
|
||||
G4UserEventAction * theRayTracerEventAction;
|
||||
G4UserStackingAction * theRayTracerStackingAction;
|
||||
G4RTTrackingAction * theRayTracerTrackingAction;
|
||||
G4RTSteppingAction * theRayTracerSteppingAction;
|
||||
|
||||
unsigned char* colorR;
|
||||
unsigned char* colorG;
|
||||
unsigned char* colorB;
|
||||
|
||||
G4int nColumn;
|
||||
G4int nRow;
|
||||
|
||||
G4ThreeVector eyePosition;
|
||||
G4ThreeVector targetPosition;
|
||||
G4ThreeVector eyeDirection;
|
||||
G4ThreeVector lightDirection;
|
||||
G4double headAngle;
|
||||
G4double viewSpan; // Angle per 100 pixels
|
||||
G4double attenuationLength;
|
||||
|
||||
G4bool distortionOn;
|
||||
G4bool antialiasingOn;
|
||||
|
||||
G4Colour rayColour;
|
||||
G4Colour backgroundColour;
|
||||
|
||||
public:
|
||||
inline void SetNColumn(G4int val) { nColumn = val; }
|
||||
inline G4int GetNColumn() const { return nColumn; }
|
||||
inline void SetNRow(G4int val) { nRow = val; }
|
||||
inline G4int GetNRow() const { return nRow; }
|
||||
inline void SetEyePosition(const G4ThreeVector& val) { eyePosition = val; }
|
||||
inline G4ThreeVector GetEyePosition() const { return eyePosition; }
|
||||
inline void SetTargetPosition(const G4ThreeVector& val) { targetPosition = val; }
|
||||
inline G4ThreeVector GetTargetPosition() const { return targetPosition; }
|
||||
inline void SetLightDirection(const G4ThreeVector& val) { lightDirection = val.unit(); }
|
||||
inline G4ThreeVector GetLightDirection() const { return lightDirection; }
|
||||
inline void SetHeadAngle(G4double val) { headAngle = val; }
|
||||
inline G4double GetHeadAngle() const { return headAngle; }
|
||||
inline void SetViewSpan(G4double val) { viewSpan = val; }
|
||||
inline G4double GetViewSpan() const { return viewSpan; }
|
||||
inline void SetAttenuationLength(G4double val) { attenuationLength = val; }
|
||||
inline G4double GetAttenuationLength() const { return attenuationLength; }
|
||||
inline void SetDistortion(G4bool val) { distortionOn = val; }
|
||||
inline G4bool GetDistortion() const { return distortionOn; }
|
||||
inline void SetBackgroundColour(G4Colour val) { backgroundColour = val; }
|
||||
inline G4Colour GetBackgroundColour() const { return backgroundColour; }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VFigureFileMaker.hh,v 1.4 2001/07/11 10:09:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VFigureFileMaker.hh,v 1.5 2006/06/29 21:23:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VRTScanner.hh,v 1.3 2005/11/28 20:07:44 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VRTScanner.hh,v 1.5 2006/06/29 21:23:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -36,8 +39,6 @@
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4RayTracer;
|
||||
|
||||
class G4VRTScanner {
|
||||
|
||||
public: // with description
|
||||
@@ -59,10 +60,13 @@ public: // with description
|
||||
// last valid coordinate.
|
||||
|
||||
virtual void Draw
|
||||
(unsigned char, unsigned char, unsigned char,
|
||||
G4RayTracer*) {}
|
||||
(unsigned char red, unsigned char green, unsigned char blue);
|
||||
// Draw coloured square at current position.
|
||||
|
||||
};
|
||||
|
||||
inline void G4VRTScanner::Draw
|
||||
(unsigned char, unsigned char, unsigned char)
|
||||
{}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user