1 |
nikolas |
1.1 |
#ifndef PAMVMCNDSD_H |
2 |
|
|
#define PAMVMCNDSD_H |
3 |
|
|
#include <iostream> |
4 |
|
|
|
5 |
|
|
#include "PamVMCDetectorSD.h" |
6 |
|
|
|
7 |
|
|
using std::cout; |
8 |
|
|
using std::endl; |
9 |
|
|
|
10 |
|
|
class PamVMCNDSD: public PamVMCDetectorSD{ |
11 |
|
|
|
12 |
|
|
|
13 |
|
|
public: |
14 |
|
|
PamVMCNDSD():PamVMCDetectorSD("pHitData","NDTI",1000) |
15 |
|
|
{ |
16 |
|
|
|
17 |
|
|
}; |
18 |
|
|
|
19 |
|
|
|
20 |
|
|
/* virtual void FillHit(fin f,TVirtualMC *g){ |
21 |
|
|
|
22 |
|
|
|
23 |
|
|
switch(f) { |
24 |
|
|
case ENTERING: |
25 |
|
|
|
26 |
|
|
CleanHit(); |
27 |
|
|
FillVolID(); |
28 |
|
|
InitHit(); |
29 |
|
|
|
30 |
|
|
default: |
31 |
|
|
UpdateHit(g); |
32 |
|
|
|
33 |
|
|
cout<<"NEW HIT ENTERING OR INSIDE "<<fnohit<<" PDG="<<fhit.GetPDG()<<" E="<<fhit.GetEREL()<<endl; |
34 |
|
|
break; |
35 |
|
|
} |
36 |
|
|
|
37 |
|
|
switch(f){ |
38 |
|
|
case EXITING: |
39 |
|
|
//// // Save hit if energy release is greater than zero |
40 |
|
|
if(fhit.GetEREL()){ |
41 |
|
|
if(fdetID->FillVolID()){ |
42 |
|
|
/// //cout<<"saving"<<fdetID->GetID()<<endl; |
43 |
|
|
cout<<"NEW HIT EXITING "<<fnohit<<" PDG="<<fhit.GetPDG()<<" E="<<fhit.GetEREL()<<endl; |
44 |
|
|
SaveHit("ND"); |
45 |
|
|
} else { |
46 |
|
|
cout << "ND FillVolID false" <<endl; |
47 |
|
|
} |
48 |
|
|
} |
49 |
|
|
break; |
50 |
|
|
default: |
51 |
|
|
break; |
52 |
|
|
} |
53 |
|
|
} |
54 |
|
|
*/ |
55 |
|
|
ClassDef(PamVMCNDSD,1) |
56 |
|
|
|
57 |
|
|
}; |
58 |
|
|
|
59 |
|
|
#endif // PAMVMCNDSD_H |