C.Schwarz, GSI, 13.03.07 DIRC photon propagation software Set of routines to play with photon propagation C++, STL, root (nothing else) Doxygen documentation examples available included in pandaroot easy to include in pandaroot Surfaces, volumes, materials can be connected accessible by a “manager” abstract base classes
18
Embed
C.Schwarz, GSI, 13.03.07 DIRC photon propagation software Set of routines to play with photon propagation C++, STL, root (nothing else) Doxygen documentation.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
C.Schwarz, GSI, 13.03.07
DIRC photon propagation software
Set of routines to play with photon propagation
C++, STL, root (nothing else) Doxygen documentation examples available included in pandaroot easy to include in pandaroot
Surfaces, volumes, materials
can be connected accessible by a “manager” abstract base classes
// Define from points 6 surfaces of the bar. The points have to be given in // the sequence going around the surface, clock- or counterclock-wise. // There are 2 additional surfaces, a mirror and a screen.
// How to produce surfaces by shift and rotate operation is for sake of clearness // not shown here, but in one of the other examples.
// Declare flat surfaces with arbitrary number of points.
// Build a optical system consisting out of several volumes, // mirrors and screens. // This layer has the advantage, that a device consisting out // of many equal subsystems // like a bar box, easily can be reproduced.
// couple surface 1 of device 1 with surface 2 of device 2 // dev1 dev2 surf1 surf2 opt_system.coupleDevice("bar","screen","pback","screen_front"); opt_system.coupleDevice("bar","mirror","pfront","mirror_front");
7C.Schwarz, GSI, 13.03.07
managing // The manager must be created as pointer. It is created as singleton, that is only // one manager can exist per application.
DrcOptDevManager* manager = new DrcOptDevManager(); manager->addDeviceSystem(opt_system);
fstream geo; geo.open("Geo.C",std::ios::out); geo<<"{"<<endl; geo<<" TCanvas *c1 = new TCanvas(\"c1\"); "<<endl; geo<<" TView *view = new TView(1);"<<endl; geo<<" view->SetRange(-50,-50,-50,50,50,50);"<<endl; geo<<" Int_t i;"<<endl; geo<<" view->SetView(0,90,90,i);"<<endl; // the following command sets a flag within the manager and all photons from // now on will be traced and can be plotted by calling within root // .x Geo.C // .x Screen.C // manager->print(geo);
8C.Schwarz, GSI, 13.03.07
photon generation - propagation// create a list of photons in bar
// couple systems side at side for (int i=1; i<nsegs; i++) {
manager.coupleDevice("segment","segment","pleft","pright",i,(i-1)); } // connect last with first. manager.coupleDevice("segment","segment","pleft","pright",0,nsegs-1);
10C.Schwarz, GSI, 13.03.07
photons
class DrcPhoton{ private: //! Wavelength in nm. double m_lambda; //! Actual position of photon. TVector3 m_position; //! Old position of photon. TVector3 m_positionOld; //! Normalized direction of photon. TVector3 m_direction; //! The fate of the photon. Drc::PhotonFate m_fate; //! Number of suffered reflections. int m_reflections; //! Verbosity level 0-5. int m_verbosity; //! Pointer to device where photon is. DrcOptDev* m_dev; //! Time of flight. double m_time;
enum PhotonFate { //! Photon is still propagating PhotFlying, //! Photon has hit measuring device. PhotMeasured, //! Photon got lost outside. PhotLost, //! Photon got lost inside. PhotAbsorbed };
11C.Schwarz, GSI, 13.03.07
Particle in disk Total photons: 844 measured: 521 absorbed: 4 lost: 319