/[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.5 - (hide annotations) (download)
Fri Jun 12 18:39:49 2009 UTC (15 years, 5 months ago) by pam-rm2
Branch: MAIN
CVS Tags: v1r0, HEAD
Changes since 1.1: +106 -2 lines
File MIME type: text/plain
- Introduced user-defined names of output files and random seeds number.
Users can do it use options of PamVMCApplication constructor:
PamVMCApplication(const char* name,  const char *title, const char*
filename="pamtest", Int_t seed=0).
The Random object that I use is TRandom3 object which has astronomical
large period (in case of default initialization 0). All random generators
in the code use this object by calling of gRandom singleton which keeps
it.

- Corrected TOF digitization routine. No problems with TDC hits due to
hadronic interactions anymore.

- Some small changes was done to compile code under Root 5.23. +
geant4_vmc v. 2.6 without any warnings

- Some classes of PamG4RunConfiguartion was changed for geant4_vmc v.
2.6.Some obsolete classes was deleted as soon as developers implemented
regions.

- Navigation was changed from "geomRootToGeant4" to "geomRoot", because on
VMC web page written that as soon as Geant4 has no option ONLY/MANY
translation of overlapped geometry to Geant4 through VGM could be wrong.
I'd like to stay with Root navigation:
http://root.cern.ch/root/vmc/Geant4VMC.html. This should be default
option.

- New Tracker digitization routine written by Sergio was implemented

- PamVMC again became compatible with geant4_vmc v.2.5 and ROOT 5.20.
 The problem was that ROOT developers introduced in TVirtualMC class a new
method SetMagField and new base class:TVirtualMagField from which
user-defined classes shoukd be derived

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 pam-rm2 1.5 cout << " pTrkID : padNo " << padNo <<endl;
42 nikolas 1.1 }
43    
44     };
45 pam-rm2 1.5 #endif //PAMVMCTrkID_H
46 nikolas 1.1
47    
48 pam-rm2 1.5
49    
50     #ifndef PAMVMCTPANID_H
51     #define PAMVMCTPANID_H
52     struct pTrkTPAN_ID: public pGeoID {
53     Int_t plNo;
54    
55     pTrkTPAN_ID(): plNo(-1) {};
56     pTrkTPAN_ID(Int_t offset): pGeoID(offset), plNo(-1){};
57     pTrkTPAN_ID & operator = (const pTrkTPAN_ID &pid) {
58     plNo=pid.plNo;
59     return *this;
60     }
61    
62     Bool_t FillVolID(){
63     Bool_t t=kFALSE;
64     if(gMC) {
65     Int_t TRPB;
66     gMC->CurrentVolOffID(2,TRPB);
67     TRPB==2 ? plNo=6 : gMC->CurrentVolOffID(3,plNo);
68     t= kTRUE;
69     }
70     return t;
71     }
72    
73     Int_t GetID() const { return (plNo-1); }
74    
75     void Print(const Option_t* ="") const {
76     cout << " pTrkTPAN_ID : plNo " << plNo <<endl;
77     }
78    
79     };
80     #endif //PAMVMCTPANID_H
81    
82     #ifndef PAMVMCTRCNID_H
83     #define PAMVMCTRCNID_H
84     struct pTrkTRCN_ID: public pGeoID {
85     Int_t plNo;
86     Int_t padNo;
87    
88     pTrkTRCN_ID(): plNo(-1), padNo(-1) {};
89     pTrkTRCN_ID(Int_t offset): pGeoID(offset), plNo(-1), padNo(-1) {};
90     pTrkTRCN_ID & operator = (const pTrkTRCN_ID &pid) {
91     plNo=pid.plNo;
92     padNo=pid.padNo;
93     return *this;
94     }
95    
96     Bool_t FillVolID(){
97     Bool_t t=kFALSE;
98     if(gMC) {
99     Int_t TRPB;
100     gMC->CurrentVolOffID(3,TRPB);
101     TRPB==2 ? plNo=6 : gMC->CurrentVolOffID(4,plNo);
102     gMC->CurrentVolOffID(1,padNo);
103     t= kTRUE;
104     }
105     return t;
106     }
107    
108     Int_t GetID() const { return (plNo-1)*4+padNo; } // 1- 2- 3- 4 first plane
109     //21-22-23-24 last plane
110    
111     void Print(const Option_t* ="") const {
112     cout << " pTrkTRCN_ID : plNo " << plNo <<endl;
113     cout << " pTrkTRCN_ID : padNo " << padNo <<endl;
114     }
115     };
116     #endif //PAMVMCTrkTRCN_ID_H
117    
118     #ifndef PAMVMCTRSLID_H
119     #define PAMVMCTRSLID_H
120     struct pTrkTRSL_ID: public pGeoID {
121     Int_t plNo;
122     Int_t padNo;
123    
124     pTrkTRSL_ID(): plNo(-1), padNo(-1) {};
125     pTrkTRSL_ID(Int_t offset): pGeoID(offset), plNo(-1), padNo(-1) {};
126     pTrkTRSL_ID & operator = (const pTrkTRSL_ID &pid) {
127     plNo=pid.plNo;
128     padNo=pid.padNo;
129     return *this;
130     }
131    
132     Bool_t FillVolID(){
133     Bool_t t=kFALSE;
134     if(gMC) {
135     Int_t TRPB;
136     gMC->CurrentVolOffID(2,TRPB);
137     TRPB==2 ? plNo=6 : gMC->CurrentVolOffID(3,plNo);
138     gMC->CurrentVolID(padNo);
139     t= kTRUE;
140     }
141     return t;
142     }
143    
144     Int_t GetID() const { return (plNo-1)*6+padNo; }
145    
146     void Print(const Option_t* ="") const {
147     cout << " pTrkTRSL_ID : plNo " << plNo <<endl;
148     cout << " pTrkTRSL_ID : padNo " << padNo <<endl;
149     }
150     };
151     #endif //PAMVMCTrkID_H

  ViewVC Help
Powered by ViewVC 1.1.23