00001 // Test planar detector 00002 // R. Henning, 4-27-2004 00003 // 00004 00005 #include <iostream.h> 00006 00007 #include <CLHEP/Vector/ThreeVector.h> 00008 00009 #include "TFile.h" 00010 #include "TTree.h" 00011 00012 #include "waveform/MJVWaveformCrystal.hh" 00013 #include "waveform/MJWaveformChargePoint.hh" 00014 #include "waveform/MJWaveformPlanarDetector.hh" 00015 00016 //const HepDouble statcoulomb = coulomb / 3e9; 00017 //const HepDouble statvolt = 300.0 * volt; 00018 //const HepDouble statampere = ampere / 3e9; 00019 00020 void testW() 00021 { 00022 cout << "Starting program ...\n"; 00023 cout << "Allocating MJWaveformPlanarDetector. \n"; 00024 MJWaveformPlanarDetector *det = new MJWaveformPlanarDetector(); 00025 00026 cout << "Constructing...\n"; 00027 det->Construct(); 00028 for(HepInt i = 1; i < 10; i++) { 00029 cout << "Processing Event # " << i << "\n"; 00030 det->BeginOfEventAction(); 00031 det->EndOfEventAction(); 00032 } 00033 cout << "End of Run Action.\n"; 00034 det->EndOfRunAction(); 00035 00036 delete det; 00037 cout << "If you get here ... then you are done!\n\n"; 00038 }