/[PAMELA software]/PamVMC_update/cal/include/PamVMCCaloID.h
ViewVC logotype

Contents of /PamVMC_update/cal/include/PamVMCCaloID.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Tue Oct 15 15:51:14 2013 UTC (11 years, 1 month ago) by formato
Branch: MAIN, rel
CVS Tags: reltag, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
PamVMC update

1 #ifndef PAMVMCCALOID_H
2 #define PAMVMCCALOID_H
3 #include <iostream>
4 #include "TVirtualMC.h"
5 #include "pGeoID.h"
6
7 #define CALSD "CAST"
8 #define CALOF 3
9
10 using std::cout;
11 using std::endl;
12
13 struct pCalID: public pGeoID {
14 Int_t casiNo;
15 Int_t caplNo;
16 Int_t castNo;
17
18 pCalID(): casiNo(-1), caplNo(-1), castNo(-1) {};
19 pCalID(Int_t offset): pGeoID(offset), casiNo(-1), caplNo(-1), castNo(-1) {};
20 pCalID & operator = (const pCalID &pid) {
21 casiNo=pid.casiNo;
22 caplNo=pid.caplNo;
23 castNo=pid.castNo;
24 return *this;
25 }
26
27 Bool_t FillVolID(){
28 Bool_t t=kFALSE;
29 if(gMC) {
30 gMC->CurrentVolID(castNo);
31 gMC->CurrentVolOffID(1,casiNo);
32 gMC->CurrentVolOffID(2,caplNo);
33 t= kTRUE;
34 }
35 return t;
36 }
37
38 Int_t GetID() const {
39 Int_t fact;
40 switch(casiNo){
41 case 1:
42 case 2:
43 case 3:
44 fact=0;
45 break;
46 case 4:
47 case 5:
48 case 6:
49 fact=32;
50 break;
51 case 7:
52 case 8:
53 case 9:
54 fact=64;
55 break;
56 default:
57 fact=0;
58 break;
59 }
60 // cout<<"Strip Hit pl,st:"<<caplNo-1<<" "<<castNo<<endl;
61 return (caplNo-1)*96+fact+castNo;
62 }
63
64 void Print(const Option_t* ="") const {
65 cout << " pCalID : castNo " << castNo
66 << ", casiNo " << casiNo << ", caplNo " << caplNo
67 << ", actual POS " << GetID() << endl;
68 }
69
70 };
71
72
73 #endif // PAMVMCCALOID_H

  ViewVC Help
Powered by ViewVC 1.1.23