Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MJVWaveformSegment.cc

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------//
00002 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu//
00003 //                                                                           //
00004 //                         MAJORANA Simulation                               //
00005 //                                                                           //
00006 //      This code implementation is the intellectual property of the         //
00007 //      MAJORANA Collaboration. It is based on Geant4, an intellectual       //
00008 //      property of the RD44 GEANT4 collaboration.                           //
00009 //                                                                           //
00010 //                        *********************                              //
00011 //                                                                           //
00012 //    Neither the authors of this software system, nor their employing       //
00013 //    institutes, nor the agencies providing financial support for this      //
00014 //    work  make  any representation or  warranty, express or implied,       //
00015 //    regarding this software system or assume any liability for its use.    //
00016 //    By copying, distributing or modifying the Program (or any work based   //
00017 //    on on the Program) you indicate your acceptance of this statement,     //
00018 //    and all its terms.                                                     //
00019 //                                                                           //
00020 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu//
00021 //---------------------------------------------------------------------------//
00022 //                                                          
00023 // $Id: MJVWaveformSegment.cc,v 1.2 2004/11/09 13:42:39 xliu Exp $ 
00024 //      
00025 // CLASS IMPLEMENTATION:  MJVWaveformSegment.cc
00026 //
00027 //---------------------------------------------------------------------------//
00033 // 
00034 //---------------------------------------------------------------------------//
00044 //---------------------------------------------------------------------------//
00045 //
00046 
00047 #include "waveform/MJWaveformChargePoint.hh"
00048 #include "io/MJLogger.hh"
00049 
00050 //---------------------------------------------------------------------------//
00051 
00052 #include "waveform/MJVWaveformSegment.hh"      //Present MJ Class Headers 
00053 
00054 //---------------------------------------------------------------------------//
00055 
00056 MJVWaveformSegment::MJVWaveformSegment():
00057   fNextSegment(0), fPreviousSegment(0)
00058 {;}
00059 
00060 //---------------------------------------------------------------------------//
00061 
00062 MJVWaveformSegment::MJVWaveformSegment(const MJVWaveformSegment & other)
00063 {;}
00064 
00065 //---------------------------------------------------------------------------//
00066 
00067 MJVWaveformSegment::~MJVWaveformSegment()
00068 {;}
00069 
00070 //---------------------------------------------------------------------------//
00071 
00072 void MJVWaveformSegment::CalculateResponseFunction()
00073 {;}
00074 
00075 //---------------------------------------------------------------------------//
00076 
00077 void MJVWaveformSegment::AddWaveformPoint(MJWaveformChargePoint *chgpt)
00078 {
00079   Hep3Vector vel, pos, Ew;
00080   HepDouble current = 0.0;
00081   MJWaveformChargePoint *chgptOriginal = chgpt;
00082 
00083   if(!chgpt) {
00084     MJLog(warning) << "MJVWaveformSegment::AddWaveformPoint: NULL pointer "
00085                    << " for linked list.\n";
00086   } else {
00087     while(chgpt) {
00088       chgpt->GetVelocity(&vel);
00089       chgpt->GetCurrentPosition(&pos);
00090       GetWeighingFieldVector(&pos, &Ew);
00091       current += -chgpt->GetCharge() * vel * Ew;
00092       chgpt = chgpt->GetNextActiveChargePoint();
00093     }
00094     AddCurrentPoint(current);
00095     IntegrateChargePoint(current * chgptOriginal->GetTimeStep());
00096   }
00097 }
00098 
00099 //---------------------------------------------------------------------------//
00100 
00101 void MJVWaveformSegment::Dump()
00102 {;}
00103 
00104 //---------------------------------------------------------------------------//
00105 //---------------------------------------------------------------------------//

Generated on Mon Nov 29 16:58:53 2004 for Majorana Simulation by  doxygen 1.3.9.1