UtilIstHEP Namespace Reference

Enumerations

enum  ENeugenIstHEP {
  kNInitial = 0, kNFinal = 1, kNIntermediate = 2, kNDecayed = 3,
  kNTarget = 11, kNDIS = 12, kNRes = 13, kNRescatter = 14
}
enum  EProdMethod {
  kMPrimary, kMMultipleScattering, kMEnergyLoss, kMMagneticFieldL,
  kMDecay, kMPair, kMCompton, kMPhotoelectric,
  kMBrem, kMDeltaRay, kMAnnihilation, kMHadronic,
  kMEvaporation, kMNuclearFission, kMNuclearAbsorption, kMPbarAnnihilation,
  kMNCapture, kMHElastic, kMHInhelastic, kMMuonNuclear,
  kMTOFlimit, kMPhotoFission, kMRayleigh, kMNull,
  kMStop, kMLightAbsorption, kMLightDetection, kMLightScattering,
  kMStepMax, kMCerenkov, kMFeedBackPhoton, kMLightReflection,
  kMLightRefraction, kMSynchrotron, kMTransportation, kMNoProcess,
  kMAnnihilationRest, kMAnnihilationFlight, kMNbarAnnihilation, kMHIElastic,
  kMHCElastic, kMPhotonInhelastic, kMElectronNuclear, kMPositronNuclear,
  kMScintillation, kUnknownProdMethod
}

Functions

const char * AsString (Int_t isthep)
const char * AsString (ENeugenIstHEP isthep)
Int_t GetNeugenIstHEP (const char *isthepname)
EProdMethod GetProdMethod (TMCProcess process)
TMCProcess GetTMCProcess (EProdMethod method)
const char * AsString (EProdMethod method)

Variables

const Int_t kProdMethodOffset = 400
const Int_t kNProdMethod = kUnknownProdMethod

Enumeration Type Documentation

Enumerator:
kNInitial 
kNFinal 
kNIntermediate 
kNDecayed 
kNTarget 
kNDIS 
kNRes 
kNRescatter 

Definition at line 19 of file UtilIstHEP.h.

00019                      {
00020     // Status codes are those defined by neugen in $NEUGEN3PATH/inc/fncodes.inc
00021     kNInitial=0,       // Initial (0)
00022     kNFinal=1,         // Final (1)
00023     kNIntermediate=2,  // Intermediate (2)
00024     kNDecayed=3,       // Decayed (3)
00025     kNTarget=11,       // Target (11) 
00026     kNDIS=12,          // DIS (12)
00027     kNRes=13,          // Res (13)
00028     kNRescatter=14     // Rescatter (14)
00029   };

Enumerator:
kMPrimary 
kMMultipleScattering 
kMEnergyLoss 
kMMagneticFieldL 
kMDecay 
kMPair 
kMCompton 
kMPhotoelectric 
kMBrem 
kMDeltaRay 
kMAnnihilation 
kMHadronic 
kMEvaporation 
kMNuclearFission 
kMNuclearAbsorption 
kMPbarAnnihilation 
kMNCapture 
kMHElastic 
kMHInhelastic 
kMMuonNuclear 
kMTOFlimit 
kMPhotoFission 
kMRayleigh 
kMNull 
kMStop 
kMLightAbsorption 
kMLightDetection 
kMLightScattering 
kMStepMax 
kMCerenkov 
kMFeedBackPhoton 
kMLightReflection 
kMLightRefraction 
kMSynchrotron 
kMTransportation 
kMNoProcess 
kMAnnihilationRest 
kMAnnihilationFlight 
kMNbarAnnihilation 
kMHIElastic 
kMHCElastic 
kMPhotonInhelastic 
kMElectronNuclear 
kMPositronNuclear 
kMScintillation 
kUnknownProdMethod 

Definition at line 35 of file UtilIstHEP.h.

00035                    {  
00036     // Note: The order of the production method codes should be preserved so 
00037     // that the status code stored with the stdhep particle retains 
00038     // meaning even for older versions of the code.  New production method
00039     // codes should be added to the end of the list and associated methods
00040     // (GetProdMethod,etc.) should be updated accordingly.
00041 
00042     kMPrimary,            // Primary interaction
00043 
00044     kMMultipleScattering, // multiple scattering
00045     kMEnergyLoss,         // continuous energy loss
00046     kMMagneticFieldL,     // bending in mag. field
00047     kMDecay,              // particle decay
00048     kMPair,               // photon pair production or
00049                           // muon direct pair production
00050     kMCompton,            // Compton scattering
00051     kMPhotoelectric,      // photoelectric effect
00052     kMBrem,               // bremsstrahlung
00053     kMDeltaRay,           // delta-ray production
00054     kMAnnihilation,       // positron annihilation
00055 
00056     kMHadronic,           // hadronic interaction
00057     kMEvaporation,        // nuclear evaporation
00058     kMNuclearFission,     // nuclear fission
00059     kMNuclearAbsorption,  // nuclear absorption
00060     kMPbarAnnihilation,   // antiproton annihilation
00061     kMNCapture,           // neutron capture
00062     kMHElastic,           // hadronic elastic scattering
00063     kMHInhelastic,        // hadronic inelastic scattering
00064 
00065     kMMuonNuclear,        // muon nuclear interaction
00066 
00067     kMTOFlimit,           // exceeded time of flight cut
00068     kMPhotoFission,       // nuclear photofission
00069 
00070     kMRayleigh,           // Rayleigh scattering
00071 
00072     kMNull,               // no mechanism is active, usually at the entrance
00073                           // of a new volume
00074     kMStop,               // particle has fallen below energy threshold
00075                           // and tracking stops
00076 
00077     kMLightAbsorption,    // Cerenkov photon absorption
00078     kMLightDetection,     // Optical photon detection (absorption + photoelectron production)
00079     kMLightScattering,    // Cerenkov photon reflection/refraction
00080     kMStepMax,            // step limited by STEMAX
00081 
00082     kMCerenkov,           // Cerenkov photon generation
00083     kMFeedBackPhoton,     // Feed back photon in RICH -- ALICE specific
00084     kMLightReflection,    // Cerenkov photon reflection
00085     kMLightRefraction,    // Cerenkov photon refraction
00086     kMSynchrotron,        // synchrotron radiation generation
00087 
00088     kMTransportation,     // Transportation
00089 
00090     kMNoProcess,          // unknown process
00091 
00092     // The set of corresponding TMCProcess codes for the following 
00093     // only appeared in ROOT beginning with v5.17/06
00094     kMAnnihilationRest,   // positron annihilation at rest
00095     kMAnnihilationFlight, // positron annihilation in flight
00096     kMNbarAnnihilation,   // antineutron annihilation
00097     kMHIElastic,          // hadronic elastic incoherent scattering
00098     kMHCElastic,          // hadronic elastic coherent scattering
00099     kMPhotonInhelastic,   // photon inelastic scattering
00100     kMElectronNuclear,    // electron nuclear interaction
00101     kMPositronNuclear,    // positron nuclear interaction
00102     kMScintillation,      // scintillation
00103 
00104     kUnknownProdMethod
00105   };


Function Documentation

const char * UtilIstHEP::AsString ( EProdMethod  method  ) 

Definition at line 307 of file UtilIstHEP.cxx.

References GetTMCProcess().

00307                                                        {
00308   // Purpose: Convert production method status code to a string
00309 
00310   TMCProcess processcode = GetTMCProcess(prodmethod);
00311   return TMCProcessName[processcode];
00312   
00313 }

const char * UtilIstHEP::AsString ( ENeugenIstHEP  isthep  ) 

Definition at line 28 of file UtilIstHEP.cxx.

References kNDecayed, kNDIS, kNFinal, kNInitial, kNIntermediate, kNRes, kNRescatter, kNTarget, Msg::kWarning, and MSG.

00028                                                            {
00029   //  Purpose:  Convert enumerated Neugen IstHEP code to a string.
00030   //  Return:  isthep string. If unknown, returns "Unknown".
00031 
00032   switch ( neugenisthep ) {
00033 
00034     case kNInitial:
00035       return "Initial";
00036     case kNFinal:
00037       return "Final";
00038     case kNIntermediate:
00039       return "Intermediate";
00040     case kNDecayed:
00041       return "Decayed";
00042     case kNTarget:
00043       return "Target";
00044     case kNDIS:
00045       return "DIS";
00046     case kNRes:
00047       return "Res";
00048     case kNRescatter:
00049       return "Rescatter";
00050     default:
00051       MSG("Util",Msg::kWarning) 
00052       << "UtilIstHEP::AsString called with unknown ENeugenIstHEP " 
00053       << (Int_t)neugenisthep << endl;
00054       return "Unknown";
00055 
00056   }//end of switch
00057 
00058 }

const char * UtilIstHEP::AsString ( Int_t  isthep  ) 

Definition at line 316 of file UtilIstHEP.cxx.

References kMDecay, kNProdMethod, and kProdMethodOffset.

Referenced by NtpMCStdHep::Print(), PTSimValidate::TestParticle(), and MCAppValidate::TestParticle().

00316                                              {
00317   //  Purpose:  Convert isthep status code to a string.
00318   //
00319   //  Argument: isthep code.
00320   //
00321   //  Return:  isthep string. If unknown, returns "Unknown".
00322   //
00323   //  Notes: If isthep <  200 => Neugen IstHEP code
00324   //         If isthep >= kProdMethodOffset 
00325   //         && isthep <  kProdMethodOffset + kNProdMethod  
00326   //                          => EProdMethod production method code
00327   //         If isthep == 999 => "Info" 
00328   //         If isthep == kProdMethodOffset + kMDecay + 1000
00329   //                      => "Decay Parent" 
00330   //         Otherwise return "Unknown"
00331 
00332 
00333   if ( isthep < 200 ) {
00334     ENeugenIstHEP neugenisthep = (ENeugenIstHEP)isthep;
00335     return AsString(neugenisthep);
00336   }
00337   else if ( isthep >= kProdMethodOffset 
00338          && isthep <  kProdMethodOffset + kNProdMethod ) {
00339     EProdMethod prodmethod = (EProdMethod)(isthep-kProdMethodOffset);
00340     return AsString(prodmethod);
00341   }
00342   else if ( isthep == 999 ) {
00343     return "Info";
00344   }
00345   else if ( isthep == (kProdMethodOffset + kMDecay + 1000) ) {
00346     return "Decay Parent";
00347   }
00348   else {
00349     //MSG("Util",Msg::kWarning) 
00350     //  << "UtilIstHEP::AsString called with unknown isthep code " 
00351     //  << isthep << endl;
00352     return "Unknown";
00353   }
00354 
00355 }

Int_t UtilIstHEP::GetNeugenIstHEP ( const char *  isthepname  ) 

Definition at line 280 of file UtilIstHEP.cxx.

References kNDecayed, kNDIS, kNFinal, kNInitial, kNIntermediate, kNRes, kNRescatter, and kNTarget.

00280                                                         {
00281   // Purpose: Convert text string isthepname to an enumerated code.
00282   // 
00283   // Argument: isthepname string
00284   //
00285   // Return: returns -1 if no match
00286   //
00287 
00288   TString tmpstr(isthepname);
00289   tmpstr.ToLower();
00290   if ( strcmp(tmpstr.Data(),"initial") == 0 ) return UtilIstHEP::kNInitial;
00291   else if ( strcmp(tmpstr.Data(),"final") == 0 ) return UtilIstHEP::kNFinal;
00292   else if ( strcmp(tmpstr.Data(),"intermediate") == 0 ) 
00293                                            return UtilIstHEP::kNIntermediate;
00294   else if ( strcmp(tmpstr.Data(),"decayed") == 0 ) 
00295                                            return UtilIstHEP::kNDecayed;
00296   else if ( strcmp(tmpstr.Data(),"target") == 0 ) return UtilIstHEP::kNTarget;
00297   else if ( strcmp(tmpstr.Data(),"dis") == 0 ) return UtilIstHEP::kNDIS;
00298   else if ( strcmp(tmpstr.Data(),"res") == 0 ) return UtilIstHEP::kNRes;
00299   else if ( strcmp(tmpstr.Data(),"rescatter") == 0 ) 
00300                                                return UtilIstHEP::kNRescatter;
00301 
00302   return -1;
00303 
00304 }

UtilIstHEP::EProdMethod UtilIstHEP::GetProdMethod ( TMCProcess  process  ) 

Definition at line 61 of file UtilIstHEP.cxx.

References Msg::kError, kMAnnihilation, kMAnnihilationFlight, kMAnnihilationRest, kMBrem, kMCerenkov, kMCompton, kMDecay, kMDeltaRay, kMElectronNuclear, kMEnergyLoss, kMEvaporation, kMFeedBackPhoton, kMHadronic, kMHCElastic, kMHElastic, kMHIElastic, kMHInhelastic, kMLightAbsorption, kMLightDetection, kMLightReflection, kMLightRefraction, kMLightScattering, kMMagneticFieldL, kMMultipleScattering, kMMuonNuclear, kMNbarAnnihilation, kMNCapture, kMNoProcess, kMNuclearAbsorption, kMNuclearFission, kMNull, kMPair, kMPbarAnnihilation, kMPhotoelectric, kMPhotoFission, kMPhotonInhelastic, kMPositronNuclear, kMPrimary, kMRayleigh, kMScintillation, kMStepMax, kMStop, kMSynchrotron, kMTOFlimit, kMTransportation, and MSG.

Referenced by PTSimStack::PushTrack().

00061                                                                   {
00062   // Purpose: Interpret a TMCProcess as an EProdMethod
00063 
00064   switch (process) {
00065 
00066   case kPPrimary:
00067     return kMPrimary;
00068   case kPMultipleScattering:
00069     return kMMultipleScattering;
00070   case kPEnergyLoss:         
00071     return kMEnergyLoss;
00072   case kPMagneticFieldL:
00073     return kMMagneticFieldL;
00074   case kPDecay:
00075     return kMDecay;
00076   case kPPair:
00077     return kMPair;
00078   case kPCompton:
00079     return kMCompton;
00080   case kPPhotoelectric:
00081     return kMPhotoelectric;
00082   case kPBrem:
00083     return kMBrem;
00084   case kPDeltaRay:
00085     return kMDeltaRay;
00086   case kPAnnihilation:
00087     return kMAnnihilation;
00088   case kPHadronic:
00089     return kMHadronic;
00090   case kPEvaporation:
00091     return kMEvaporation;
00092   case kPNuclearFission:
00093     return kMNuclearFission;
00094   case kPNuclearAbsorption:
00095     return kMNuclearAbsorption;
00096   case kPPbarAnnihilation:
00097     return kMPbarAnnihilation;  
00098   case kPNCapture:
00099     return kMNCapture;
00100   case kPHElastic:
00101     return kMHElastic;
00102   case kPHInhelastic:
00103     return kMHInhelastic;
00104   case kPMuonNuclear:
00105     return kMMuonNuclear;
00106   case kPTOFlimit:
00107     return kMTOFlimit;
00108   case kPPhotoFission:
00109     return kMPhotoFission;
00110   case kPRayleigh:
00111     return kMRayleigh;
00112   case kPNull:
00113     return kMNull;
00114   case kPStop:
00115     return kMStop;
00116   case kPLightAbsorption:
00117     return kMLightAbsorption;
00118   case kPLightDetection:
00119     return kMLightDetection;
00120   case kPLightScattering:
00121     return kMLightScattering;
00122   case kStepMax:
00123     return kMStepMax;
00124   case kPCerenkov:
00125     return kMCerenkov;
00126   case kPFeedBackPhoton:
00127     return kMFeedBackPhoton;
00128   case kPLightReflection:
00129     return kMLightReflection;
00130   case kPLightRefraction:
00131     return kMLightRefraction;
00132   case kPSynchrotron:
00133     return kMSynchrotron;
00134   case kPTransportation:
00135     return kMTransportation;
00136   case kPNoProcess:
00137     return kMNoProcess;
00138 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,17,06)
00139   // These only appeared in TMCProcess beginning with ROOT v5.17/06
00140   case kPAnnihilationRest:
00141     return kMAnnihilationRest;
00142   case kPAnnihilationFlight:
00143     return kMAnnihilationFlight;
00144   case kPNbarAnnihilation:
00145     return kMNbarAnnihilation;
00146   case kPHIElastic:
00147     return kMHIElastic;
00148   case kPHCElastic:
00149     return kMHCElastic;
00150   case kPPhotonInhelastic:
00151     return kMPhotonInhelastic;
00152   case kPElectronNuclear:
00153     return kMElectronNuclear;
00154   case kPPositronNuclear:
00155     return kMPositronNuclear;
00156   case kPScintillation:
00157     return kMScintillation;
00158 #endif
00159   default:
00160     MSG("Util",Msg::kError) << "UtilIstHEP::GetProdMethod for TMCProcess " 
00161                             << process << "/" << TMCProcessName[process] 
00162                             << " failed!\nUpdate UtilIstHEP to include " 
00163                             << "missing process. Abort." << endl;
00164     abort();
00165   }
00166     
00167 }

TMCProcess UtilIstHEP::GetTMCProcess ( EProdMethod  method  ) 

Definition at line 170 of file UtilIstHEP.cxx.

References Msg::kError, kMAnnihilation, kMAnnihilationFlight, kMAnnihilationRest, kMBrem, kMCerenkov, kMCompton, kMDecay, kMDeltaRay, kMElectronNuclear, kMEnergyLoss, kMEvaporation, kMFeedBackPhoton, kMHadronic, kMHCElastic, kMHElastic, kMHIElastic, kMHInhelastic, kMLightAbsorption, kMLightDetection, kMLightReflection, kMLightRefraction, kMLightScattering, kMMagneticFieldL, kMMultipleScattering, kMMuonNuclear, kMNbarAnnihilation, kMNCapture, kMNoProcess, kMNuclearAbsorption, kMNuclearFission, kMNull, kMPair, kMPbarAnnihilation, kMPhotoelectric, kMPhotoFission, kMPhotonInhelastic, kMPositronNuclear, kMPrimary, kMRayleigh, kMScintillation, kMStepMax, kMStop, kMSynchrotron, kMTOFlimit, kMTransportation, and MSG.

Referenced by AsString(), and PTSimModule::HandleCommand().

00170                                                            {
00171   // Purpose: Interpret a EProdMethod as a TMCProcess
00172 
00173   switch (prodmethod) {
00174 
00175   case kMPrimary:
00176     return kPPrimary;
00177   case kMMultipleScattering:
00178     return kPMultipleScattering;
00179   case kMEnergyLoss:         
00180     return kPEnergyLoss;
00181   case kMMagneticFieldL:
00182     return kPMagneticFieldL;
00183   case kMDecay:
00184     return kPDecay;
00185   case kMPair:
00186     return kPPair;
00187   case kMCompton:
00188     return kPCompton;
00189   case kMPhotoelectric:
00190     return kPPhotoelectric;
00191   case kMBrem:
00192     return kPBrem;
00193   case kMDeltaRay:
00194     return kPDeltaRay;
00195   case kMAnnihilation:
00196     return kPAnnihilation;
00197   case kMHadronic:
00198     return kPHadronic;
00199   case kMEvaporation:
00200     return kPEvaporation;
00201   case kMNuclearFission:
00202     return kPNuclearFission;
00203   case kMNuclearAbsorption:
00204     return kPNuclearAbsorption;
00205   case kMPbarAnnihilation:
00206     return kPPbarAnnihilation;  
00207   case kMNCapture:
00208     return kPNCapture;
00209   case kMHElastic:
00210     return kPHElastic;
00211   case kMHInhelastic:
00212     return kPHInhelastic;
00213   case kMMuonNuclear:
00214     return kPMuonNuclear;
00215   case kMTOFlimit:
00216     return kPTOFlimit;
00217   case kMPhotoFission:
00218     return kPPhotoFission;
00219   case kMRayleigh:
00220     return kPRayleigh;
00221   case kMNull:
00222     return kPNull;
00223   case kMStop:
00224     return kPStop;
00225   case kMLightAbsorption:
00226     return kPLightAbsorption;
00227   case kMLightDetection:
00228     return kPLightDetection;
00229   case kMLightScattering:
00230     return kPLightScattering;
00231   case kMStepMax:
00232     return kStepMax;
00233   case kMCerenkov:
00234     return kPCerenkov;
00235   case kMFeedBackPhoton:
00236     return kPFeedBackPhoton;
00237   case kMLightReflection:
00238     return kPLightReflection;
00239   case kMLightRefraction:
00240     return kPLightRefraction;
00241   case kMSynchrotron:
00242     return kPSynchrotron;
00243   case kMTransportation:
00244     return kPTransportation;
00245   case kMNoProcess:
00246     return kPNoProcess;
00247 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,17,06)
00248   // These only appeared in TMCProcess beginning with ROOT v5.17/06
00249   case kMAnnihilationRest:
00250     return kPAnnihilationRest;
00251   case kMAnnihilationFlight:
00252     return kPAnnihilationFlight;
00253   case kMNbarAnnihilation:
00254     return kPNbarAnnihilation;
00255   case kMHIElastic:
00256     return kPHIElastic;
00257   case kMHCElastic:
00258     return kPHCElastic;
00259   case kMPhotonInhelastic:
00260     return kPPhotonInhelastic;
00261   case kMElectronNuclear:
00262     return kPElectronNuclear;
00263   case kMPositronNuclear:
00264     return kPPositronNuclear;
00265   case kMScintillation:
00266     return kPScintillation;
00267 #endif
00268   default:
00269     MSG("Util",Msg::kError) << "UtilIstHEP::GetTMCProcess for EProdMethod " 
00270                             << prodmethod
00271                             << " failed!\nUpdate UtilIstHEP to include " 
00272                             << "missing production method. Abort." << endl;
00273     abort();
00274   }
00275     
00276 }


Variable Documentation

const Int_t UtilIstHEP::kNProdMethod = kUnknownProdMethod

Definition at line 107 of file UtilIstHEP.h.

Referenced by AsString(), and PTSimModule::HandleCommand().

const Int_t UtilIstHEP::kProdMethodOffset = 400

Definition at line 33 of file UtilIstHEP.h.

Referenced by AsString(), PTSimStack::FillStdHepArray(), and PTSimStack::PushTrack().


Generated on 14 Jun 2018 for loon by  doxygen 1.6.1