/[PAMELA software]/trieste/pamVMC/cal/include/PamVMCCaloSD.h
ViewVC logotype

Contents of /trieste/pamVMC/cal/include/PamVMCCaloSD.h

Parent Directory Parent Directory | Revision Log Revision Log


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

1 #ifndef PAMVMCCALOSD_H
2 #define PAMVMCCALOSD_H
3 #include <iostream>
4
5 #include "PamVMCDetectorSD.h"
6
7 #define NOCALHIT 4224
8
9 using std::cout;
10 using std::endl;
11
12 class PamVMCCaloSD: public PamVMCDetectorSD{
13
14
15 public:
16 PamVMCCaloSD(): PamVMCDetectorSD("PamVMCDetectorHit","CAST",NOCALHIT){
17
18 }
19
20
21 virtual void FillHit(fin f,TVirtualMC *g){
22
23 switch(f) {
24 case ENTERING:
25 CleanHit();
26 FillVolID();
27 InitHit();
28
29 default:
30 UpdateHit(g);
31 break;
32 }
33
34 switch(f){
35 case EXITING:
36
37 // Save hit if energy release is greater than zero
38 if(fhit->GetEREL()){
39 if(fdetID->FillVolID()){
40
41 SaveHit(fdetID->GetID( ));
42
43 } else {
44 cout << "Calorimeter FillVolID false" <<endl;
45 }
46 }
47 break;
48 default:
49 break;
50 }
51 }
52
53 Int_t GetPlaneID(){
54 return ((int)fhit->GetPOS()/192);
55 }
56
57 Int_t GetViewID(){
58 return ((int)fhit->GetPOS()/96%2==0?0:1);
59 }
60 Int_t GetStripID(){
61 return (fhit->GetPOS()%96);
62 }
63
64
65
66 ClassDef(PamVMCCaloSD,1)
67
68 };
69
70 #endif // PAMVMCCALOSD_H

  ViewVC Help
Powered by ViewVC 1.1.23