musrIBackwardHit Class Reference

#include <musrIBackwardHit.hh>

List of all members.

Public Member Functions

 musrIBackwardHit ()
 ~musrIBackwardHit ()
 musrIBackwardHit (const musrIBackwardHit &)
const musrIBackwardHitoperator= (const musrIBackwardHit &)
G4int operator== (const musrIBackwardHit &) 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 SetIBChamberNb (G4int IBchamb)
G4int GetTrackID ()
G4String GetParticleName ()
G4double GetEdep ()
G4ThreeVector GetPos ()
G4ThreeVector GetPol ()
G4String GetLogVolName ()
G4int GetIBChamberNb ()
G4double GetGlobalTime ()

Public Attributes

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


Detailed Description

Definition at line 16 of file musrIBackwardHit.hh.


Constructor & Destructor Documentation

musrIBackwardHit::musrIBackwardHit  ) 
 

Definition at line 28 of file musrIBackwardHit.cc.

00028 {}

musrIBackwardHit::~musrIBackwardHit  ) 
 

Definition at line 32 of file musrIBackwardHit.cc.

00032 {}

musrIBackwardHit::musrIBackwardHit const musrIBackwardHit  ) 
 

Definition at line 41 of file musrIBackwardHit.cc.

References edep, globaltime, IBchamberNb, 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   IBchamberNb = right.IBchamberNb;
00052   globaltime  = right.globaltime;
00053 
00054 }


Member Function Documentation

void musrIBackwardHit::Draw  ) 
 

Definition at line 82 of file musrIBackwardHit.cc.

Referenced by musrIBackwardSD::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 musrIBackwardHit::GetEdep  )  [inline]
 

Definition at line 46 of file musrIBackwardHit.hh.

00046 { return edep; };      

G4double musrIBackwardHit::GetGlobalTime  )  [inline]
 

Definition at line 51 of file musrIBackwardHit.hh.

00051 { return globaltime; }; 

G4int musrIBackwardHit::GetIBChamberNb  )  [inline]
 

Definition at line 50 of file musrIBackwardHit.hh.

00050 { return IBchamberNb; };

G4String musrIBackwardHit::GetLogVolName  )  [inline]
 

Definition at line 49 of file musrIBackwardHit.hh.

00049 { return logicalvolume; };

G4String musrIBackwardHit::GetParticleName  )  [inline]
 

Definition at line 45 of file musrIBackwardHit.hh.

00045 {return particle_name; };

G4ThreeVector musrIBackwardHit::GetPol  )  [inline]
 

Definition at line 48 of file musrIBackwardHit.hh.

00048 { return pol; };

G4ThreeVector musrIBackwardHit::GetPos  )  [inline]
 

Definition at line 47 of file musrIBackwardHit.hh.

00047 { return pos; };

G4int musrIBackwardHit::GetTrackID  )  [inline]
 

Definition at line 44 of file musrIBackwardHit.hh.

00044 { return trackID; };

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

Definition at line 92 of file musrIBackwardHit.hh.

References musrIBackwardHitAllocator.

00093 {
00094   musrIBackwardHitAllocator.FreeSingle((musrIBackwardHit*) aHit);
00095 }

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

Definition at line 83 of file musrIBackwardHit.hh.

References musrIBackwardHitAllocator.

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

const musrIBackwardHit & musrIBackwardHit::operator= const musrIBackwardHit  ) 
 

Definition at line 58 of file musrIBackwardHit.cc.

References edep, globaltime, IBchamberNb, 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   IBchamberNb = right.IBchamberNb;
00068   globaltime = right.globaltime;
00069 
00070   return *this;
00071 }

G4int musrIBackwardHit::operator== const musrIBackwardHit  )  const
 

Definition at line 75 of file musrIBackwardHit.cc.

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

void musrIBackwardHit::Print  ) 
 

Definition at line 99 of file musrIBackwardHit.cc.

References B, mfield, and point.

Referenced by musrIBackwardSD::ProcessHits().

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

void musrIBackwardHit::SetEdep G4double  de  )  [inline]
 

Definition at line 37 of file musrIBackwardHit.hh.

Referenced by musrIBackwardSD::ProcessHits().

00037 { edep = de; };

void musrIBackwardHit::SetGlobTime G4double  gt  )  [inline]
 

Definition at line 40 of file musrIBackwardHit.hh.

Referenced by musrIBackwardSD::ProcessHits().

00040 { globaltime = gt;};

void musrIBackwardHit::SetIBChamberNb G4int  IBchamb  )  [inline]
 

Definition at line 42 of file musrIBackwardHit.hh.

Referenced by musrIBackwardSD::ProcessHits().

00042 { IBchamberNb = IBchamb; };

void musrIBackwardHit::SetLogVolName G4String  logivol  )  [inline]
 

Definition at line 41 of file musrIBackwardHit.hh.

Referenced by musrIBackwardSD::ProcessHits().

00041 {logicalvolume = logivol;};

void musrIBackwardHit::SetParticleName G4String  name  )  [inline]
 

Definition at line 36 of file musrIBackwardHit.hh.

Referenced by musrIBackwardSD::ProcessHits().

00036 {particle_name = name; };

void musrIBackwardHit::SetPol G4ThreeVector  ijk  )  [inline]
 

Definition at line 39 of file musrIBackwardHit.hh.

Referenced by musrIBackwardSD::ProcessHits().

00039 {pol = ijk;};

void musrIBackwardHit::SetPos G4ThreeVector  xyz  )  [inline]
 

Definition at line 38 of file musrIBackwardHit.hh.

Referenced by musrIBackwardSD::ProcessHits().

00038 { pos = xyz; };

void musrIBackwardHit::SetTrackID G4int  track  )  [inline]
 

Definition at line 35 of file musrIBackwardHit.hh.

Referenced by musrIBackwardSD::ProcessHits().

00035 { trackID = track; };


Member Data Documentation

G4double musrIBackwardHit::B[6]
 

Definition at line 53 of file musrIBackwardHit.hh.

Referenced by Print().

const G4Field* musrIBackwardHit::mfield
 

Definition at line 54 of file musrIBackwardHit.hh.

Referenced by Print().

G4double musrIBackwardHit::point[4]
 

Definition at line 51 of file musrIBackwardHit.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