class description - source file - inheritance tree

class Detector

Detector Detector(char* name, Vector& dimension, int maxdetectors = 0) Detector Detector(Detector&) virtual void ~Detector() virtual int AddDetector(Detector& det, Vector& r) TClass* Class() virtual double EnergyChange() const virtual double GetDepth() const virtual double GetHeight() const virtual char* GetName() const virtual double GetWidth() const virtual bool Inside(const Vector& v) virtual int Interact(Particle& p, Vector& r, double& t) virtual Vector Intersect(const Vector& p, Vector& r, int i) virtual TClass* IsA() const virtual Vector MomentumChange() const virtual Vector PositionChange() const virtual void Print(ostream& o) const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) virtual double TimeChange() const

Data Members

Vector fDimension Dimension of the detector char* fName Name of detector. Detector** fDetectorArray Array of Detectors in Cave. Vector** fPositionArray Array of Posiotions within Cave. int fDetectorNumber Number of Detecors in Cave. int fMaxDetectors Maximum number os detectors. public:
Vector fPosition Effect on momentum by detector double fEnergy Effect on energy by detector Vector fMomentum Effect on position by detector double fTime Effect on time by detector

See also

Cave, Hodoscope, Magnet

Class Description

 Class Detector

 Detector Base Class for mini-geant.

 This class Interacts with a Particle.

 The Detector object may in turn contain other Detector objects,
 therby creating a heacricy of Detectors and sub-Detector.

 One can obtain the effects of the Interaction between the Detector
 on the  ant the Particle, with the methods
 Vector Detector::MomentumChange(void)
 double Detector::EnergyChange(void)
 Vector Detector::PositionChange(void)
 double Detector::TimeChange(void)

 Developed as a part of the HEHI C++ programming course.

Detector(char *name, Vector& dimension, int maxdetectors)
 ABC constructor.

 First argument is the name of the detector, second is the max
 number of Detectors that will be placed inside this Detector.

AddDetector(Detector& det, Vector& pos)
 Adds a new Detector to the Cave. The second vector argument is
 the offset of the Detector, relative to the this Detector object.

Inside(const Vector& r)
 Test to see if vector points inside volume.

Intersect(const Vector& p, Vector& r, int i)
 Returns a vector to where the momentum vector (1. argument),
 orignating at a position (2. argument) intersects with the
 sub-Detector with some number (3. argument);

Interact(Particle& particle, Vector& r, double& t)
 Interact with Particle.

 The first argument is the Particle to interact with, the second
 is a position Vector, to where the Particle Intersect with the
 Detector, and the third is the time of intersection. All are
 references to objects, so the method may change the values.

 Notice, what this method really takes as arguments, are 2

 The method in the ABC Detector loops over the defined
 sub-Detectors, and executes the Interact method of these
 detectors. A derived class could call this method in it's
 Interact method, or chose to ignore it completly, as in the case
 of simple detectors.

Print(ostream& o) const
 Print method.

 Calls recursivly the sub-Detectors Print methods. I.e., sending
 this message at the top level, will print out the intire Cave!

Inline Functions

              char* GetName() const
             double GetHeight() const
             double GetWidth() const
             double GetDepth() const
             Vector MomentumChange() const
             double EnergyChange() const
             Vector PositionChange() const
             double TimeChange() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
           Detector Detector(Detector&)
               void ~Detector()

Author: cholm $
Last update: 1999/11/25 15:58:44 $

ROOT page - Home page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.