musrIForwardHit Class Reference

#include <musrIForwardHit.hh>

List of all members.

Public Member Functions

 musrIForwardHit ()
 ~musrIForwardHit ()
 musrIForwardHit (const musrIForwardHit &)
const musrIForwardHitoperator= (const musrIForwardHit &)
G4int operator== (const musrIForwardHit &) const
void * operator new (size_t)
void operator delete (void *)
void Draw ()
void Print ()
void SetTrackID (G4int track)
void SetParticleName (G4String name)
void SetEdep (G4double de)
void SetPos (G4ThreeVector xyz)
void SetPol (G4ThreeVector ijk)
void SetGlobTime (G4double gt)
void SetLogVolName (G4String logivol)
void SetIFChamberNb (G4int IFchamb)
G4int GetTrackID ()
G4String GetParticleName ()
G4double GetEdep ()
G4ThreeVector GetPos ()
G4ThreeVector GetPol ()
G4String GetLogVolName ()
G4int GetIFChamberNb ()
G4double GetGlobalTime ()

Public Attributes

G4double point [4]
G4double B [6]
const G4Field * mfield


Detailed Description

Definition at line 16 of file musrIForwardHit.hh.


Constructor & Destructor Documentation

musrIForwardHit::musrIForwardHit  ) 
 

Definition at line 28 of file musrIForwardHit.cc.

00028 {}

musrIForwardHit::~musrIForwardHit  ) 
 

Definition at line 32 of file musrIForwardHit.cc.

00032 {}

musrIForwardHit::musrIForwardHit const musrIForwardHit  ) 
 

Definition at line 41 of file musrIForwardHit.cc.

References edep, globaltime, IFchamberNb, logicalvolume, particle_name, pol, pos, and trackID.

00042   : G4VHit()
00043 {
00044 
00045   trackID   = right.trackID;
00046   particle_name = right.particle_name;
00047   edep      = right.edep;
00048   pos       = right.pos;
00049   pol       = right.pol;
00050   logicalvolume = right.logicalvolume;
00051   IFchamberNb = right.IFchamberNb;
00052   globaltime  = right.globaltime;
00053 
00054 }


Member Function Documentation

void musrIForwardHit::Draw  ) 
 

Definition at line 82 of file musrIForwardHit.cc.

Referenced by musrIForwardSD::ProcessHits().

00083 {
00084   G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
00085   if(pVVisManager)
00086   {
00087     G4Circle circle(pos);
00088     circle.SetScreenSize(0.04);
00089     circle.SetFillStyle(G4Circle::filled);
00090     G4Colour colour(1.,0.,0.);
00091     G4VisAttributes attribs(colour);
00092     circle.SetVisAttributes(attribs);
00093     pVVisManager->Draw(circle);
00094   }
00095 }

G4double musrIForwardHit::GetEdep  )  [inline]
 

Definition at line 46 of file musrIForwardHit.hh.

00046 { return edep; };      

G4double musrIForwardHit::GetGlobalTime  )  [inline]
 

Definition at line 51 of file musrIForwardHit.hh.

00051 { return globaltime; }; 

G4int musrIForwardHit::GetIFChamberNb  )  [inline]
 

Definition at line 50 of file musrIForwardHit.hh.

00050 { return IFchamberNb; };

G4String musrIForwardHit::GetLogVolName  )  [inline]
 

Definition at line 49 of file musrIForwardHit.hh.

00049 { return logicalvolume; };

G4String musrIForwardHit::GetParticleName  )  [inline]
 

Definition at line 45 of file musrIForwardHit.hh.

00045 {return particle_name; };

G4ThreeVector musrIForwardHit::GetPol  )  [inline]
 

Definition at line 48 of file musrIForwardHit.hh.

00048 { return pol; };

G4ThreeVector musrIForwardHit::GetPos  )  [inline]
 

Definition at line 47 of file musrIForwardHit.hh.

00047 { return pos; };

G4int musrIForwardHit::GetTrackID  )  [inline]
 

Definition at line 44 of file musrIForwardHit.hh.

00044 { return trackID; };

void musrIForwardHit::operator delete void *   )  [inline]
 

Definition at line 93 of file musrIForwardHit.hh.

References musrIForwardHitAllocator.

00094 {
00095   musrIForwardHitAllocator.FreeSingle((musrIForwardHit*) aHit);
00096 }

void * musrIForwardHit::operator new size_t   )  [inline]
 

Definition at line 84 of file musrIForwardHit.hh.

References musrIForwardHitAllocator.

00085 {
00086   void *aHit;
00087   aHit = (void *) musrIForwardHitAllocator.MallocSingle();
00088   return aHit;
00089 }

const musrIForwardHit & musrIForwardHit::operator= const musrIForwardHit  ) 
 

Definition at line 58 of file musrIForwardHit.cc.

References edep, globaltime, IFchamberNb, logicalvolume, particle_name, pol, pos, and trackID.

00059 {
00060 
00061   trackID   = right.trackID;
00062   particle_name = right.particle_name;
00063   edep      = right.edep;
00064   pos       = right.pos;
00065   pol       = right.pol;
00066   logicalvolume=right.logicalvolume;
00067   IFchamberNb = right.IFchamberNb;
00068   globaltime = right.globaltime;
00069 
00070   return *this;
00071 }

G4int musrIForwardHit::operator== const musrIForwardHit  )  const
 

Definition at line 75 of file musrIForwardHit.cc.

00076 {
00077   return (this==&right) ? 1 : 0;
00078 }

void musrIForwardHit::Print  ) 
 

Definition at line 99 of file musrIForwardHit.cc.

References B, mfield, and point.

Referenced by musrIForwardSD::ProcessHits().

00100 {
00101 
00102   G4RunManager* fRunManager = G4RunManager::GetRunManager();
00103   G4int eventID = fRunManager->GetCurrentEvent()->GetEventID();
00104   G4int runID   = fRunManager->GetCurrentRun()->GetRunID();
00105   FMultihitSwitch=0;
00106 
00107 
00108 
00109         if (runID != runIDoldIF)
00110           {
00111             NIF=0;
00112             FMultihit = 0;
00113             eventIDoldIF = -1;
00114             IFchamberNbold = -1;
00115           }
00116 
00117     if (particle_name== "e+" and (eventIDoldIF != eventID or IFchamberNbold != IFchamberNb))
00118 
00119       {
00120 
00121 
00122 
00123          if (eventIDoldIF == eventID)
00124            {
00125              FMultihitSwitch=1;
00126              FMultihit++;
00127              //        G4cout << "Forward Multiple Hit!, No = "<< FMultihit<<G4endl;
00128            }
00129 
00130          NIF++;
00131          //      G4cout << "NIF is "<< NIF<<G4endl;
00132          //      G4cout << "(Forward) eventID is "<< eventID<<G4endl;
00133 
00134 
00135 
00136         G4FieldManager *fMgr=G4TransportationManager::GetTransportationManager()->GetFieldManager();
00137 
00138 
00139           point[0]=0.;
00140           point[1]=0.;
00141           point[2]=0.;
00142 
00143           B[2]=0.0;
00144               
00145 
00146       if(!fMgr->DoesFieldChangeEnergy())//then we have a magnetic field
00147         {
00148           mfield = fMgr->GetDetectorField();
00149           mfield->GetFieldValue(point,B);
00150           B[0]=B[0]*1000;
00151           B[1]=B[1]*1000;
00152           B[2]=B[2]*1000;
00153 }
00154 
00155       //      G4cout << "  Segment: " << IFchamberNb << G4endl;
00156       //      G4cout <<"Position " << pos.x()/cm<<" "<<pos.y()/cm <<" "<< pos.z()/cm <<G4endl;
00157 
00158       //         G4cout << "Field is "<< B[2]<<G4endl;
00159 
00160   ofstream posfile2;
00161   posfile2.open ("iforward.dat", ios::out | ios::app);
00162   posfile2 << fabs(B[2]) <<" "<< pos.x()/cm<<" "<<pos.y()/cm <<" "<< pos.z()/cm  
00163            << " "  << globaltime/s <<" "<< IFchamberNb 
00164            << " "<< FMultihitSwitch
00165            << G4endl;
00166   posfile2.close();
00167 
00168       }
00169 
00170   eventIDoldIF=eventID;
00171   runIDoldIF = runID;
00172   IFchamberNbold = IFchamberNb;  
00173 
00174 
00175 
00176 }

void musrIForwardHit::SetEdep G4double  de  )  [inline]
 

Definition at line 37 of file musrIForwardHit.hh.

Referenced by musrIForwardSD::ProcessHits().

00037 { edep = de; };

void musrIForwardHit::SetGlobTime G4double  gt  )  [inline]
 

Definition at line 40 of file musrIForwardHit.hh.

Referenced by musrIForwardSD::ProcessHits().

00040 { globaltime = gt;};

void musrIForwardHit::SetIFChamberNb G4int  IFchamb  )  [inline]
 

Definition at line 42 of file musrIForwardHit.hh.

Referenced by musrIForwardSD::ProcessHits().

00042 { IFchamberNb = IFchamb; };

void musrIForwardHit::SetLogVolName G4String  logivol  )  [inline]
 

Definition at line 41 of file musrIForwardHit.hh.

Referenced by musrIForwardSD::ProcessHits().

00041 {logicalvolume = logivol;};

void musrIForwardHit::SetParticleName G4String  name  )  [inline]
 

Definition at line 36 of file musrIForwardHit.hh.

Referenced by musrIForwardSD::ProcessHits().

00036 {particle_name = name; };

void musrIForwardHit::SetPol G4ThreeVector  ijk  )  [inline]
 

Definition at line 39 of file musrIForwardHit.hh.

Referenced by musrIForwardSD::ProcessHits().

00039 {pol = ijk;};

void musrIForwardHit::SetPos G4ThreeVector  xyz  )  [inline]
 

Definition at line 38 of file musrIForwardHit.hh.

Referenced by musrIForwardSD::ProcessHits().

00038 { pos = xyz; };

void musrIForwardHit::SetTrackID G4int  track  )  [inline]
 

Definition at line 35 of file musrIForwardHit.hh.

Referenced by musrIForwardSD::ProcessHits().

00035 { trackID = track; };


Member Data Documentation

G4double musrIForwardHit::B[6]
 

Definition at line 53 of file musrIForwardHit.hh.

Referenced by Print().

const G4Field* musrIForwardHit::mfield
 

Definition at line 54 of file musrIForwardHit.hh.

Referenced by Print().

G4double musrIForwardHit::point[4]
 

Definition at line 51 of file musrIForwardHit.hh.

Referenced by Print().


The documentation for this class was generated from the following files:
Generated on Mon Mar 27 12:19:54 2006 for MUSR by  doxygen 1.4.6