/[PAMELA software]/trieste/pamVMC/src/PamVMCDetectorHit.cxx
ViewVC logotype

Contents of /trieste/pamVMC/src/PamVMCDetectorHit.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Wed Mar 4 12:51:18 2009 UTC (15 years, 9 months ago) by pamelats
Branch: MAIN, pamVMC
CVS Tags: start, v0r00, HEAD
Changes since 1.1: +0 -0 lines
Test pamVMC

1 #include <iostream>
2
3 #include "PamVMCDetectorHit.h"
4 #include <TLorentzVector.h>
5
6 using std::cout;
7 using std::endl;
8
9 ClassImp(pHitData)
10 ClassImp(PamVMCDetectorHit)
11
12 pHitData & operator+=( pHitData &a, const pHitData & p) {
13 a.fPOS = p.fPOS;
14 a.fPDG = p.fPDG;
15 a.fPATH= p.fPATH;
16 a.fTOF= p.fTOF;
17 a.fPIN += p.fPIN;
18 a.fXOUT= p.fXOUT;
19 a.fYOUT= p.fYOUT;
20 a.fZOUT= p.fZOUT;
21 a.fEREL += p.fEREL;
22 a.fXIN = p.fXIN;
23 a.fYIN = p.fYIN;
24 a.fZIN = p.fZIN;
25 return a;
26 // return *this;
27 }
28
29 PamVMCDetectorHit::PamVMCDetectorHit()
30 : TObject(),
31 fnocall(0)
32
33 {
34 }
35
36 PamVMCDetectorHit::~PamVMCDetectorHit()
37 {
38 // Delete &fhitdata;
39 }
40
41 void PamVMCDetectorHit::Print(Option_t* /*option*/) const
42 {
43 // Prints hit info
44 cout <<"Actual Hit :"<<endl
45 <<" Energy deposit (keV): " << fhitdata.fEREL * 1.0e06 << endl
46 <<" Time of flight (us): " << fhitdata.fTOF*1.0e6 <<endl;
47 }
48
49 void PamVMCDetectorHit::Reset()
50 {
51 // Reset all accounted values.
52 fhitdata.Clean();
53 fnocall=0;
54
55 }
56
57 void PamVMCDetectorHit::operator += ( const PamVMCDetectorHit & p )
58 {
59 fhitdata+=p.fhitdata;
60 }
61
62 void PamVMCDetectorHit::operator = ( const PamVMCDetectorHit & p )
63 {
64 fhitdata=p.fhitdata;
65 }

  ViewVC Help
Powered by ViewVC 1.1.23