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] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/advanced/ChargeExchangeMC/src/CexmcChargeExchangeReconstructorMessenger.cc (Version 11.3.0) and /examples/advanced/ChargeExchangeMC/src/CexmcChargeExchangeReconstructorMessenger.cc (Version 5.2.p1)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 /*                                                
 27  * ===========================================    
 28  *                                                
 29  *       Filename:  CexmcChargeExchangeReconst    
 30  *                                                
 31  *    Description:  charge exchange reconstruc    
 32  *                                                
 33  *        Version:  1.0                           
 34  *        Created:  14.12.2009 17:53:33           
 35  *       Revision:  none                          
 36  *       Compiler:  gcc                           
 37  *                                                
 38  *         Author:  Alexey Radkov (),             
 39  *        Company:  PNPI                          
 40  *                                                
 41  * ===========================================    
 42  */                                               
 43                                                   
 44 #include <G4UIcmdWithABool.hh>                    
 45 #include <G4UIcmdWithAString.hh>                  
 46 #include <G4UIcmdWithADoubleAndUnit.hh>           
 47 #include "CexmcChargeExchangeReconstructorMess    
 48 #include "CexmcChargeExchangeReconstructor.hh"    
 49 #include "CexmcMessenger.hh"                      
 50                                                   
 51                                                   
 52 CexmcChargeExchangeReconstructorMessenger::       
 53         CexmcChargeExchangeReconstructorMessen    
 54                         CexmcChargeExchangeRec    
 55             reconstructor( reconstructor_ ), u    
 56             useMassCut( NULL ), mCutOPCenter(     
 57             mCutOPWidth( NULL ), mCutNOPWidth(    
 58             useAbsorbedEnergyCut( NULL ), aeCu    
 59             aeCutCRCenter( NULL ), aeCutCLWidt    
 60             aeCutAngle( NULL ), setExpectedMom    
 61             setExpectedMomentumAmpDiff( NULL )    
 62 {                                                 
 63     useTableMass = new G4UIcmdWithABool(          
 64         ( CexmcMessenger::reconstructorDirName    
 65         this );                                   
 66     useTableMass->SetGuidance( "\n    If true     
 67         "table mass of output\n    particle wh    
 68         "energy,\n    otherwise reconstructed     
 69     useTableMass->SetParameterName( "UseTableM    
 70     useTableMass->SetDefaultValue( true );        
 71     useTableMass->AvailableForStates( G4State_    
 72                                                   
 73     useMassCut = new G4UIcmdWithABool(            
 74         ( CexmcMessenger::reconstructorDirName    
 75     useMassCut->SetGuidance( "\n    Use ellipt    
 76                              "particle\n    an    
 77     useMassCut->SetParameterName( "UseMassCut"    
 78     useMassCut->SetDefaultValue( true );          
 79     useMassCut->AvailableForStates( G4State_Pr    
 80                                                   
 81     mCutOPCenter = new G4UIcmdWithADoubleAndUn    
 82         ( CexmcMessenger::reconstructorDirName    
 83         this );                                   
 84     mCutOPCenter->SetGuidance( "\n    Center o    
 85                                "mass coordinat    
 86     mCutOPCenter->SetParameterName( "MCutOPCen    
 87     mCutOPCenter->SetDefaultValue( reconstruct    
 88                                    outputParti    
 89     mCutOPCenter->SetUnitCandidates( "eV keV M    
 90     mCutOPCenter->SetDefaultUnit( "MeV" );        
 91     mCutOPCenter->AvailableForStates( G4State_    
 92                                                   
 93     mCutNOPCenter = new G4UIcmdWithADoubleAndU    
 94         ( CexmcMessenger::reconstructorDirName    
 95         this );                                   
 96     mCutNOPCenter->SetGuidance( "\n    Center     
 97                                 "particle mass    
 98     mCutNOPCenter->SetParameterName( "MCutNOPC    
 99     mCutNOPCenter->SetDefaultValue( reconstruc    
100                                     nucleusOut    
101     mCutNOPCenter->SetUnitCandidates( "eV keV     
102     mCutNOPCenter->SetDefaultUnit( "MeV" );       
103     mCutNOPCenter->AvailableForStates( G4State    
104                                                   
105     mCutOPWidth = new G4UIcmdWithADoubleAndUni    
106         ( CexmcMessenger::reconstructorDirName    
107         this );                                   
108     mCutOPWidth->SetGuidance( "\n    Width of     
109                                "mass coordinat    
110     mCutOPWidth->SetParameterName( "MCutOPWidt    
111     mCutOPWidth->SetDefaultValue( reconstructo    
112                                   outputPartic    
113     mCutOPWidth->SetUnitCandidates( "eV keV Me    
114     mCutOPWidth->SetDefaultUnit( "MeV" );         
115     mCutOPWidth->AvailableForStates( G4State_P    
116                                                   
117     mCutNOPWidth = new G4UIcmdWithADoubleAndUn    
118         ( CexmcMessenger::reconstructorDirName    
119         this );                                   
120     mCutNOPWidth->SetGuidance( "\n    Width of    
121                                "particle mass\    
122     mCutNOPWidth->SetParameterName( "MCutNOPWi    
123     mCutNOPWidth->SetDefaultValue( reconstruct    
124                                    nucleusOutp    
125     mCutNOPWidth->SetUnitCandidates( "eV keV M    
126     mCutNOPWidth->SetDefaultUnit( "MeV" );        
127     mCutNOPWidth->AvailableForStates( G4State_    
128                                                   
129     mCutAngle = new G4UIcmdWithADoubleAndUnit(    
130         ( CexmcMessenger::reconstructorDirName    
131         this );                                   
132     mCutAngle->SetGuidance( "\n    Angle of th    
133     mCutAngle->SetParameterName( "MCutAngle",     
134     mCutAngle->SetDefaultValue( 0 );              
135     mCutAngle->SetUnitCandidates( "deg rad" );    
136     mCutAngle->SetDefaultUnit( "deg" );           
137     mCutAngle->AvailableForStates( G4State_Pre    
138                                                   
139     useAbsorbedEnergyCut = new G4UIcmdWithABoo    
140         ( CexmcMessenger::reconstructorDirName    
141             c_str(), this );                      
142     useAbsorbedEnergyCut->SetGuidance( "\n        
143                                        "energi    
144     useAbsorbedEnergyCut->SetParameterName( "U    
145     useAbsorbedEnergyCut->SetDefaultValue( tru    
146     useAbsorbedEnergyCut->AvailableForStates(     
147                                                   
148     aeCutCLCenter = new G4UIcmdWithADoubleAndU    
149         ( CexmcMessenger::reconstructorDirName    
150         this );                                   
151     aeCutCLCenter->SetGuidance( "\n    Center     
152                                 "calorimeter\n    
153     aeCutCLCenter->SetParameterName( "AECutCLC    
154     aeCutCLCenter->SetDefaultValue( 0 );          
155     aeCutCLCenter->SetUnitCandidates( "eV keV     
156     aeCutCLCenter->SetDefaultUnit( "MeV" );       
157     aeCutCLCenter->AvailableForStates( G4State    
158                                                   
159     aeCutCRCenter = new G4UIcmdWithADoubleAndU    
160         ( CexmcMessenger::reconstructorDirName    
161         this );                                   
162     aeCutCRCenter->SetGuidance( "\n    Center     
163                                 "calorimeter\n    
164     aeCutCRCenter->SetParameterName( "AECutCRC    
165     aeCutCRCenter->SetDefaultValue( 0 );          
166     aeCutCRCenter->SetUnitCandidates( "eV keV     
167     aeCutCRCenter->SetDefaultUnit( "MeV" );       
168     aeCutCRCenter->AvailableForStates( G4State    
169                                                   
170     aeCutCLWidth = new G4UIcmdWithADoubleAndUn    
171         ( CexmcMessenger::reconstructorDirName    
172         this );                                   
173     aeCutCLWidth->SetGuidance( "\n    Width of    
174                                "\n    absorbed    
175     aeCutCLWidth->SetParameterName( "AECutCLWi    
176     aeCutCLWidth->SetDefaultValue( 0 );           
177     aeCutCLWidth->SetUnitCandidates( "eV keV M    
178     aeCutCLWidth->SetDefaultUnit( "MeV" );        
179     aeCutCLWidth->AvailableForStates( G4State_    
180                                                   
181     aeCutCRWidth = new G4UIcmdWithADoubleAndUn    
182         ( CexmcMessenger::reconstructorDirName    
183         this );                                   
184     aeCutCRWidth->SetGuidance( "\n    Width of    
185                                "\n    absorbed    
186     aeCutCRWidth->SetParameterName( "AECutCRWi    
187     aeCutCRWidth->SetDefaultValue( 0 );           
188     aeCutCRWidth->SetUnitCandidates( "eV keV M    
189     aeCutCRWidth->SetDefaultUnit( "MeV" );        
190     aeCutCRWidth->AvailableForStates( G4State_    
191                                                   
192     aeCutAngle = new G4UIcmdWithADoubleAndUnit    
193         ( CexmcMessenger::reconstructorDirName    
194         this );                                   
195     aeCutAngle->SetGuidance( "\n    Angle of t    
196     aeCutAngle->SetParameterName( "AECutAngle"    
197     aeCutAngle->SetDefaultValue( 0 );             
198     aeCutAngle->SetUnitCandidates( "deg rad" )    
199     aeCutAngle->SetDefaultUnit( "deg" );          
200     aeCutAngle->AvailableForStates( G4State_Pr    
201                                                   
202     setExpectedMomentumAmp = new G4UIcmdWithAD    
203         ( CexmcMessenger::reconstructorDirName    
204         this );                                   
205     setExpectedMomentumAmp->SetGuidance( "\n      
206         "expected in the target;\n    this val    
207         "momentum\n    of the beam as far as p    
208         "    to the place where it starts. Thi    
209         "    in reconstruction procedure");       
210     setExpectedMomentumAmp->SetParameterName(     
211     setExpectedMomentumAmp->SetRange( "RecMome    
212     setExpectedMomentumAmp->SetUnitCandidates(    
213     setExpectedMomentumAmp->SetDefaultUnit( "M    
214     setExpectedMomentumAmp->AvailableForStates    
215                                                   
216     setExpectedMomentumAmpDiff = new G4UIcmdWi    
217         ( CexmcMessenger::reconstructorDirName    
218         this );                                   
219     setExpectedMomentumAmpDiff->SetGuidance( "    
220         "between momenta of the beam\n    on i    
221         "parameter can\n    be used to automat    
222         "    previous parameter 'momentumAmp'"    
223     setExpectedMomentumAmpDiff->SetParameterNa    
224     setExpectedMomentumAmpDiff->SetDefaultValu    
225     setExpectedMomentumAmpDiff->SetUnitCandida    
226     setExpectedMomentumAmpDiff->SetDefaultUnit    
227     setExpectedMomentumAmpDiff->AvailableForSt    
228                                                   
229                                                   
230     setEDCollectionAlgorithm = new G4UIcmdWith    
231         ( CexmcMessenger::reconstructorDirName    
232         this );                                   
233     setEDCollectionAlgorithm->SetGuidance(        
234         "\n    Choose crystals to be selected     
235         "    all - all,\n"                        
236         "    adjacent - crystal with maximum e    
237         "               adjacent crystals" );     
238     setEDCollectionAlgorithm->SetParameterName    
239     setEDCollectionAlgorithm->SetCandidates( "    
240     setEDCollectionAlgorithm->SetDefaultValue(    
241     setEDCollectionAlgorithm->AvailableForStat    
242                                                   
243 }                                                 
244                                                   
245                                                   
246 CexmcChargeExchangeReconstructorMessenger::       
247                                     ~CexmcChar    
248 {                                                 
249     delete useTableMass;                          
250     delete useMassCut;                            
251     delete mCutOPCenter;                          
252     delete mCutNOPCenter;                         
253     delete mCutOPWidth;                           
254     delete mCutNOPWidth;                          
255     delete mCutAngle;                             
256     delete useAbsorbedEnergyCut;                  
257     delete aeCutCLCenter;                         
258     delete aeCutCRCenter;                         
259     delete aeCutCLWidth;                          
260     delete aeCutCRWidth;                          
261     delete aeCutAngle;                            
262     delete setExpectedMomentumAmp;                
263     delete setExpectedMomentumAmpDiff;            
264     delete setEDCollectionAlgorithm;              
265 }                                                 
266                                                   
267                                                   
268 void  CexmcChargeExchangeReconstructorMessenge    
269                                         G4UIco    
270 {                                                 
271     do                                            
272     {                                             
273         if ( cmd == useTableMass )                
274         {                                         
275             reconstructor->UseTableMass(          
276                         G4UIcmdWithABool::GetN    
277             break;                                
278         }                                         
279         if ( cmd == useMassCut )                  
280         {                                         
281             reconstructor->UseMassCut(            
282                         G4UIcmdWithABool::GetN    
283             break;                                
284         }                                         
285         if ( cmd == mCutOPCenter )                
286         {                                         
287             reconstructor->SetMassCutOPCenter(    
288                         G4UIcmdWithADoubleAndU    
289             break;                                
290         }                                         
291         if ( cmd == mCutNOPCenter )               
292         {                                         
293             reconstructor->SetMassCutNOPCenter    
294                         G4UIcmdWithADoubleAndU    
295             break;                                
296         }                                         
297         if ( cmd == mCutOPWidth )                 
298         {                                         
299             reconstructor->SetMassCutOPWidth(     
300                         G4UIcmdWithADoubleAndU    
301             break;                                
302         }                                         
303         if ( cmd == mCutNOPWidth )                
304         {                                         
305             reconstructor->SetMassCutNOPWidth(    
306                         G4UIcmdWithADoubleAndU    
307             break;                                
308         }                                         
309         if ( cmd == mCutAngle )                   
310         {                                         
311             reconstructor->SetMassCutEllipseAn    
312                         G4UIcmdWithADoubleAndU    
313             break;                                
314         }                                         
315         if ( cmd == useAbsorbedEnergyCut )        
316         {                                         
317             reconstructor->UseAbsorbedEnergyCu    
318                         G4UIcmdWithABool::GetN    
319             break;                                
320         }                                         
321         if ( cmd == aeCutCLCenter )               
322         {                                         
323             reconstructor->SetAbsorbedEnergyCu    
324                         G4UIcmdWithADoubleAndU    
325             break;                                
326         }                                         
327         if ( cmd == aeCutCRCenter )               
328         {                                         
329             reconstructor->SetAbsorbedEnergyCu    
330                         G4UIcmdWithADoubleAndU    
331             break;                                
332         }                                         
333         if ( cmd == aeCutCLWidth )                
334         {                                         
335             reconstructor->SetAbsorbedEnergyCu    
336                         G4UIcmdWithADoubleAndU    
337             break;                                
338         }                                         
339         if ( cmd == aeCutCRWidth )                
340         {                                         
341             reconstructor->SetAbsorbedEnergyCu    
342                         G4UIcmdWithADoubleAndU    
343             break;                                
344         }                                         
345         if ( cmd == aeCutAngle )                  
346         {                                         
347             reconstructor->SetAbsorbedEnergyCu    
348                         G4UIcmdWithADoubleAndU    
349             break;                                
350         }                                         
351         if ( cmd == setExpectedMomentumAmp )      
352         {                                         
353             reconstructor->SetExpectedMomentum    
354                         G4UIcmdWithADoubleAndU    
355             break;                                
356         }                                         
357         if ( cmd == setExpectedMomentumAmpDiff    
358         {                                         
359             reconstructor->SetExpectedMomentum    
360                         G4UIcmdWithADoubleAndU    
361             break;                                
362         }                                         
363         if ( cmd == setEDCollectionAlgorithm )    
364         {                                         
365             CexmcEDCollectionAlgoritm             
366                         edCollectionAlgorithm(    
367             do                                    
368             {                                     
369                 if ( value == "adjacent" )        
370                 {                                 
371                     edCollectionAlgorithm = Ce    
372                     break;                        
373                 }                                 
374             } while ( false );                    
375             reconstructor->SetEDCollectionAlgo    
376             break;                                
377         }                                         
378     } while ( false );                            
379 }                                                 
380                                                   
381