/[PAMELA software]/PamVMC_update/include/pCutControl.h
ViewVC logotype

Contents of /PamVMC_update/include/pCutControl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Tue Oct 15 15:52:30 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
Error occurred while calculating annotation data.
PamVMC update

1 #ifndef PCUTCONTROL_H
2 #define PCUTCONTROL_H
3
4 #include <TObject.h>
5 #include <iostream>
6 #include <TVirtualMC.h>
7 #include <TGeoManager.h>
8 #include <TList.h>
9
10 class pCutControl : public TObject {
11
12 private:
13
14 Int_t fid; // medium id
15 Int_t fid_m ; //medium id in GeoManager
16
17 Double_t fCUTGAM, fBCUTE, fCUTELE, fDCUTE, fCUTNEU,
18 fCUTHAD, fCUTMUO, fDCUTM, fBCUTM, fPPCUTM, fPAIR,
19 fCOMP, fPHOT, fPFIS, fDRAY, fANNI, fBREM, fHADR,
20 fMUNU, fDCAY, fLOSS, fMULS;
21
22 public:
23
24 pCutControl():
25 fid(-1), // must be overwriten for specific media
26 fCUTGAM(0.001),
27 fBCUTE(0.001),
28 fCUTELE(0.001),
29 fDCUTE(10000.),
30 fCUTNEU(0.01),
31 fCUTHAD(0.01),
32 fCUTMUO(0.01),
33 fDCUTM(10000.),
34 fBCUTM(0.001),
35 fPPCUTM(0.01),
36 fPAIR(1.),
37 fCOMP(1.),
38 fPHOT(1.),
39 fPFIS(0.),
40 fDRAY(1.),
41 fANNI(1.),
42 fBREM(1.),
43 fHADR(1.),
44 fMUNU(1.),
45 fDCAY(1.),
46 fLOSS(1.),
47 fMULS(1.)
48 {
49 fid_m = FindMedia();
50 };
51
52 virtual ~pCutControl(){; };
53
54 pCutControl(Int_t id,
55 Double_t CUTGAM, Double_t BCUTE, Double_t CUTELE, Double_t DCUTE,
56 Double_t CUTNEU, Double_t CUTHAD, Double_t CUTMUO, Double_t DCUTM,
57 Double_t BCUTM, Double_t PPCUTM, Double_t PAIR, Double_t COMP,
58 Double_t PHOT, Double_t PFIS, Double_t DRAY, Double_t ANNI, Double_t BREM,
59 Double_t HADR, Double_t MUNU, Double_t DCAY, Double_t LOSS, Double_t MULS):
60 fid(id),
61 fCUTGAM(CUTGAM),
62 fBCUTE(BCUTE),
63 fCUTELE(CUTELE),
64 fDCUTE(DCUTE),
65 fCUTNEU(CUTNEU),
66 fCUTHAD(CUTHAD),
67 fCUTMUO(CUTMUO),
68 fDCUTM(DCUTM),
69 fBCUTM(BCUTM),
70 fPPCUTM(PPCUTM),
71 fPAIR(PAIR),
72 fCOMP(COMP),
73 fPHOT(PHOT),
74 fPFIS(PFIS),
75 fDRAY(DRAY),
76 fANNI(ANNI),
77 fBREM(BREM),
78 fHADR(HADR),
79 fMUNU(MUNU),
80 fDCAY(DCAY),
81 fLOSS(LOSS),
82 fMULS(MULS)
83 {
84 fid_m = FindMedia();
85 };
86
87 Int_t GetID(){ return fid; };
88 Double_t GetCUTGAM(){ return fCUTGAM; };
89 Double_t GetBCUTE(){ return fBCUTE; };
90 Double_t GetCUTELE(){ return fCUTELE; };
91 Double_t GetDCUTE(){ return fDCUTE; };
92 Double_t GetCUTNEU(){ return fCUTNEU; };
93 Double_t GetCUTHAD(){ return fCUTHAD; };
94 Double_t GetCUTMUO(){ return fCUTMUO; };
95 Double_t GetDCUTM(){ return fDCUTM; }
96 Double_t GetBCUTM(){ return fBCUTM; }
97 Double_t GetPPCUTM(){ return fPPCUTM; }
98 Double_t GetPAIR(){ return fPAIR; }
99 Double_t GetCOMP(){ return fCOMP; }
100 Double_t GetPHOT(){ return fPHOT; }
101 Double_t GetPFIS(){ return fPFIS; }
102 Double_t GetDRAY(){ return fDRAY; }
103 Double_t GetANNI(){ return fANNI; }
104 Double_t GetBREM(){ return fBREM; }
105 Double_t GetHADR(){ return fHADR; }
106 Double_t GetMUNU(){ return fMUNU; }
107 Double_t GetDCAY(){ return fDCAY; }
108 Double_t GetLOSS(){ return fLOSS; }
109 Double_t GetMULS(){ return fMULS; }
110
111
112 void SetID(Int_t id){ fid = id; };
113 void SetCUTGAM(Double_t CUTGAM){ fCUTGAM = CUTGAM; };
114 void SetBCUTE(Double_t BCUTE ){ fBCUTE = BCUTE; };
115 void SetCUTELE(Double_t CUTELE){ fCUTELE = CUTELE; };
116 void SetDCUTE(Double_t DCUTE){ fDCUTE = DCUTE; };
117 void SetCUTNEU(Double_t CUTNEU){ fCUTNEU = CUTNEU; };
118 void SetCUTHAD(Double_t CUTHAD){ fCUTHAD = CUTHAD; };
119 void SetCUTMUO(Double_t CUTMUO){ fCUTMUO = CUTMUO; };
120 void SetDCUTM(Double_t DCUTM){ fDCUTM = DCUTM; }
121 void SetBCUTM(Double_t BCUTM){ fBCUTM = BCUTM; }
122 void SetPPCUTM(Double_t PPCUTM){ fPPCUTM = PPCUTM; }
123 void SetPAIR(Double_t PAIR){ fPAIR = PAIR; }
124 void SetCOMP(Double_t COMP){ fCOMP = COMP; }
125 void SetPHOT(Double_t PHOT){ fPHOT = PHOT; }
126 void SetPFIS(Double_t PFIS){ fPFIS = PFIS; }
127 void SetDRAY(Double_t DRAY){ fDRAY = DRAY; }
128 void SetANNI(Double_t ANNI){ fANNI = ANNI; }
129 void SetBREM(Double_t BREM){ fBREM = BREM; }
130 void SetHADR(Double_t HADR){ fHADR = HADR; }
131 void SetMUNU(Double_t MUNU){ fMUNU = MUNU; }
132 void SetDCAY(Double_t DCAY){ fDCAY = DCAY; }
133 void SetLOSS(Double_t LOSS){ fLOSS = LOSS; }
134 void SetMULS(Double_t MULS){ fMULS = MULS; }
135
136 Int_t FindMedia(){
137 if(gGeoManager){
138 TList* ls = gGeoManager->GetListOfMedia();
139 for(Int_t i = 0; i<ls->GetEntries(); i++){
140 if( ((TGeoMedium*)ls->At(i))->GetId() == fid ) return i+1;
141 }
142 }
143 return 0;
144 }
145
146 void SetCuts(){
147
148
149 gMC->Gstpar(fid_m,"CUTGAM",fCUTGAM);
150 gMC->Gstpar(fid_m,"BCUTE",fBCUTE);
151 gMC->Gstpar(fid_m,"CUTELE",fCUTELE);
152 gMC->Gstpar(fid_m,"DCUTE",fDCUTE);
153 gMC->Gstpar(fid_m,"CUTNEU",fCUTNEU);
154 gMC->Gstpar(fid_m,"CUTHAD",fCUTHAD);
155 gMC->Gstpar(fid_m,"CUTMUO",fCUTMUO);
156 gMC->Gstpar(fid_m,"DCUTM",fDCUTM);
157 gMC->Gstpar(fid_m,"BCUTM",fBCUTM);
158 gMC->Gstpar(fid_m,"PPCUTM",fPPCUTM);
159 gMC->Gstpar(fid_m,"PAIR",fPAIR);
160 gMC->Gstpar(fid_m,"COMP",fCOMP);
161 gMC->Gstpar(fid_m,"PHOT",fPHOT);
162 gMC->Gstpar(fid_m,"PFIS",fPFIS);
163 gMC->Gstpar(fid_m,"DRAY",fDRAY);
164 gMC->Gstpar(fid_m,"ANNI",fANNI);
165 gMC->Gstpar(fid_m,"BREM",fBREM);
166 gMC->Gstpar(fid_m,"HADR",fHADR);
167 gMC->Gstpar(fid_m,"MUNU",fMUNU);
168 gMC->Gstpar(fid_m,"DCAY",fDCAY);
169 gMC->Gstpar(fid_m,"LOSS",fLOSS);
170 gMC->Gstpar(fid_m,"MULS",fMULS);
171 }
172
173 void Print(const Option_t* ="") const{
174 std::cout<<"ID: "<<fid_m<<std::endl;
175 std::cout<<"CUTGAM: "<<fCUTGAM<<std::endl;
176 std::cout<<"BCUTE: "<<fBCUTE<<std::endl;
177 std::cout<<"DCUTE: "<<fDCUTE<<std::endl;
178 std::cout<<"CUTNEU: "<<fCUTNEU<<std::endl;
179 std::cout<<"CUTHAD: "<<fCUTHAD<<std::endl;
180 std::cout<<"CUTMUO: "<<fCUTMUO<<std::endl;
181 std::cout<<"DCUTM: "<<fDCUTM<<std::endl;
182 std::cout<<"BCUTM: "<<fBCUTM<<std::endl;
183 std::cout<<"PPCUTM: "<<fPPCUTM<<std::endl;
184 std::cout<<"PAIR: "<<fPAIR<<std::endl;
185 std::cout<<"COMP: "<<fCOMP<<std::endl;
186 std::cout<<"PHOT: "<<fPHOT<<std::endl;
187 std::cout<<"PFIS: "<<fPFIS<<std::endl;
188 std::cout<<"DRAY: "<<fDRAY<<std::endl;
189 std::cout<<"ANNI: "<<fANNI<<std::endl;
190 std::cout<<"BREM: "<<fBREM<<std::endl;
191 std::cout<<"HADR: "<<fHADR<<std::endl;
192 std::cout<<"MUNU: "<<fMUNU<<std::endl;
193 std::cout<<"DCAY: "<<fDCAY<<std::endl;
194 std::cout<<"LOSS: "<<fLOSS<<std::endl;
195 std::cout<<"MULS: "<<fMULS<<std::endl;
196 }
197 ClassDef(pCutControl,1)
198
199 };
200
201
202
203 #endif //PCUTCONTROL

  ViewVC Help
Powered by ViewVC 1.1.23