- Timestamp:
- Apr 15, 2013, 6:57:42 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
esaf_lal/trunk/esaf/packages/simulation/generators/showers/src/ShowerTrack.cc
r16 r73 171 171 } 172 172 173 #ifdef __APPLE__ 174 //G.Barrand : on Mac the below global variables induces a crash at startup of 175 // Simu. Then we create the objects "when needed" in the 176 // ShowerTrack::Get methods. Sight, using global variables, 177 // as long as the singleton pattern, is NEVER a good idea. 178 TF2* ShowerTrack::fEnergyAgeDistributionDefault = 0; 179 TF2* ShowerTrack::fEnergyAgeDistributionHillas = 0; 180 TF2* ShowerTrack::fEnergyAgeDistributionGiller = 0; 181 TF2* ShowerTrack::fEnergyAgeDistributionNerling = 0; 182 TF2* ShowerTrack::fEnergyAgeDistributionMelot = 0; 183 TF2* ShowerTrack::fLateralDistributionDefalt = 0; 184 TF2* ShowerTrack::fLateralDistribution1 = 0; 185 TF2* ShowerTrack::fLateralDistribution2 = 0; 186 TF2* ShowerTrack::fLateralDistribution3 = 0; 187 TF2* ShowerTrack::fAngularDistribution1 = 0; 188 #else 173 189 // Set of static distributions. Note! Default does not mean that this is the best rather it is 174 190 // a convinient choice for the debugging study … … 185 201 186 202 TF2* ShowerTrack::fAngularDistribution1 = new TF2("baltru",ShowerTrackBaltru,0.,Pi(),.5,1000.); 203 #endif 187 204 188 205 //______________________________________________________________________________ … … 207 224 // Return Pointer to the energy distribution of electrons in the shower 208 225 // 226 227 #ifdef __APPLE__ 228 //G.Barrand : 229 if(!fEnergyAgeDistributionDefault) 230 fEnergyAgeDistributionDefault = new TF2("EneAgeDefault",ShowerTrackGiller,0.1,1000,m,2); 231 if(!fEnergyAgeDistributionHillas) 232 fEnergyAgeDistributionHillas = new TF2("hillas",ShowerTrackHillas,0.1,1000,0,2); 233 if(!fEnergyAgeDistributionGiller) 234 fEnergyAgeDistributionGiller = new TF2("giller",ShowerTrackGiller,0.1,1000,0,2); 235 if(!fEnergyAgeDistributionNerling) 236 fEnergyAgeDistributionNerling = new TF2("nerling",ShowerTrackNerling,0.1,1000,0,2); 237 if(!fEnergyAgeDistributionMelot) 238 fEnergyAgeDistributionMelot = new TF2("melot",ShowerTrackMelot,0.1,1000,0,2); 239 #endif 240 209 241 if( name == "hillas" ) 210 242 return fEnergyAgeDistributionHillas; … … 223 255 // Return Pointer to the lateral distribution of electrons in the shower 224 256 // 257 #ifdef __APPLE__ 258 //G.Barrand : 259 if(!fLateralDistributionDefalt) 260 fLateralDistributionDefalt = new TF2("LateralDistributionDefalt",ShowerTrackNKG1,0.001,50,0,2); 261 if(!fLateralDistribution1) 262 fLateralDistribution1 = new TF2("NKG1",ShowerTrackNKG1,0.001,50,0,2); 263 if(!fLateralDistribution2) 264 fLateralDistribution2 = new TF2("NKG",ShowerTrackNKG2,0.001,5000,0,2,1); 265 if(!fLateralDistribution3) 266 fLateralDistribution3 = new TF2("NKGhadron",ShowerTrackNKGhadron,0.001,5000,0,2,1); 267 #endif 268 225 269 if( name == "NKG1" ) 226 270 return fLateralDistribution1; … … 239 283 // Return Pointer to the angular distribution of electrons in the shower 240 284 // 285 #ifdef __APPLE__ 286 //G.Barrand : 287 if(!fAngularDistribution1) 288 fAngularDistribution1 = new TF2("baltru",ShowerTrackBaltru,0.,Pi(),.5,1000.); 289 #endif 290 241 291 if( name == "baltru" ) 242 292 return fAngularDistribution1;
Note: See TracChangeset
for help on using the changeset viewer.