/[PAMELA software]/PamVMC/trk/include/PamVMCTrkID.h
ViewVC logotype

Annotation of /PamVMC/trk/include/PamVMCTrkID.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Wed Feb 18 17:41:08 2009 UTC (15 years, 9 months ago) by nikolas
Branch: MAIN
File MIME type: text/plain
Cleaning up before a release

1 nikolas 1.1 #ifndef PAMVMCTRKID_H
2     #define PAMVMCTRKID_H
3     #include <iostream>
4     #include "TVirtualMC.h"
5     #include "pGeoID.h"
6    
7     #define TRKOF 2
8    
9     using std::cout;
10     using std::endl;
11    
12     struct pTrkID: public pGeoID {
13     Int_t plNo;
14     Int_t padNo;
15    
16    
17     pTrkID(): plNo(-1), padNo(-1) {};
18     pTrkID(Int_t offset): pGeoID(offset), plNo(-1), padNo(-1) {};
19     pTrkID & operator = (const pTrkID &pid) {
20     plNo=pid.plNo;
21     padNo=pid.padNo;
22     return *this;
23     }
24    
25     Bool_t FillVolID(){
26     Bool_t t=kFALSE;
27     if(gMC) {
28     Int_t TRPB;
29     gMC->CurrentVolOffID(3,TRPB);
30     TRPB==2 ? plNo=6 : gMC->CurrentVolOffID(4,plNo);
31     gMC->CurrentVolOffID(1,padNo);
32     t= kTRUE;
33     }
34     return t;
35     }
36    
37     Int_t GetID() const { return (plNo-1)*6+padNo; }
38    
39     void Print(const Option_t* ="") const {
40     cout << " pTrkID : plNo " << plNo <<endl;
41     cout << " pTrkID : padNo " << plNo <<endl;
42     }
43    
44     };
45    
46    
47     #endif // PAMVMCTrkID_H

  ViewVC Help
Powered by ViewVC 1.1.23