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