/*
$Log$
+Revision 1.3 2002/10/22 15:12:14 alibrary
+Introducing Riostream.h
+
Revision 1.2 2002/10/14 14:57:40 hristov
Merging the VirtualMC branch to the main development branch (HEAD)
#include "Fdblprc.h" //(DBLPRC) fluka common
#include "Fiounit.h" //(IOUNIT) fluka common
#include "Fepisor.h" //(EPISOR) fluka common
+#include "Fpart.h" //(PART) fluka common
#include "TVirtualMC.h"
// Fluka methods that may be needed.
# define flukam flukam_
# define fluka_openinp fluka_openinp_
# define fluka_closeinp fluka_closeinp_
+# define mcihad mcihad_
+# define mpdgha mpdgha_
#else
# define flukam FLUKAM
# define fluka_openinp FLUKA_OPENINP
# define fluka_closeinp FLUKA_CLOSEINP
+# define mcihad MCIHAD
+# define mpdgha MPDGHA
#endif
extern "C"
void type_of_call flukam(const int&);
void type_of_call fluka_openinp(const int&, DEFCHARA);
void type_of_call fluka_closeinp(const int&);
+ int type_of_call mcihad(const int&);
+ int type_of_call mpdgha(const int&);
}
//
Int_t TFluka::IdFromPDG(Int_t pdg) const
{
//
- // Return Geant3 code from PDG and pseudo ENDF code
- //
- for(Int_t i=0;i<fNPDGCodes;++i)
- if(pdg==fPDGCode[i])
- return i;
- return -99;
+ // Return Fluka code from PDG and pseudo ENDF code
+
+ // MCIHAD() goes from pdg to fluka internal.
+ Int_t intfluka = mcihad(pdg);
+ // KPTOIP array goes from internal to official
+ return GetFlukaKPTOIP(intfluka);
}
//_____________________________________________________________________________
Int_t TFluka::PDGFromId(Int_t id) const
{
//
- // Return PDG code and pseudo ENDF code from Geant3 code
- //
- if(id>0 && id<fNPDGCodes)
- return fPDGCode[id];
- else
- return -1;
-}
+ // Return PDG code and pseudo ENDF code from Fluka code
-//_____________________________________________________________________________
-void TFluka::DefineParticles()
-{
- // Load standard numbers for GEANT particles and PDG conversion
- fPDGCode[fNPDGCodes++]= -99; // 0 = Psudoparticle (Ray)
- fPDGCode[fNPDGCodes++]= 2212; // 1 = Proton
- fPDGCode[fNPDGCodes++]=-2212; // 2 = Anti Proton
- fPDGCode[fNPDGCodes++]= 11; // 3 = Electron
- fPDGCode[fNPDGCodes++]= -11; // 4 = Positron
- fPDGCode[fNPDGCodes++]= 12; // 5 = Electron Neutrino
- fPDGCode[fNPDGCodes++]= -12; // 6 = Electron Antineutrino
- fPDGCode[fNPDGCodes++]= 22; // 7 = Photon
- fPDGCode[fNPDGCodes++]= 2112; // 8 = Neutron
- fPDGCode[fNPDGCodes++]=-2112; // 9 = Anti Neutron
- fPDGCode[fNPDGCodes++]= -13; // 10 = Mu+
- fPDGCode[fNPDGCodes++]= 13; // 11 = Mu-
- fPDGCode[fNPDGCodes++]= 130; // 12 = Kaon 0 long
- fPDGCode[fNPDGCodes++]= 211; // 13 = Pi+
- fPDGCode[fNPDGCodes++]= -211; // 14 = Pi-
- fPDGCode[fNPDGCodes++]= 321; // 15 = Kaon+
- fPDGCode[fNPDGCodes++]= -321; // 16 = Kaon-
- fPDGCode[fNPDGCodes++]= 3122; // 17 = Lambda
- fPDGCode[fNPDGCodes++]=-3122; // 18 = Anti Lambda
- fPDGCode[fNPDGCodes++]= 310; // 19 = Kaon 0 short
- fPDGCode[fNPDGCodes++]= 3112; // 20 = Sigma -
- fPDGCode[fNPDGCodes++]= 3222; // 21 = Sigma +
- fPDGCode[fNPDGCodes++]= 3212; // 22 = Sigma 0
- fPDGCode[fNPDGCodes++]= 111; // 23 = Pi0
- fPDGCode[fNPDGCodes++]= 311; // 24 = Kaon 0
- fPDGCode[fNPDGCodes++]= -311; // 25 = Antikaon 0
- fPDGCode[fNPDGCodes++]= -99; // 26 = --Reserved
- fPDGCode[fNPDGCodes++]= 14; // 27 = Muon neutrino
- fPDGCode[fNPDGCodes++]= -14; // 28 = Muon antineutrino
- fPDGCode[fNPDGCodes++]= -99; // 29 = --Reserved
- fPDGCode[fNPDGCodes++]= -99; // 30 = --Reserved
- fPDGCode[fNPDGCodes++]=-3222; // 31 = Antisigma -
- fPDGCode[fNPDGCodes++]=-3212; // 32 = Antisigma 0
- fPDGCode[fNPDGCodes++]=-3112; // 33 = Antisigma +
- fPDGCode[fNPDGCodes++]= 3322; // 34 = Xi 0
- fPDGCode[fNPDGCodes++]=-3322; // 35 = AntiXi 0
- fPDGCode[fNPDGCodes++]= 3312; // 36 = Xi -
- fPDGCode[fNPDGCodes++]=-3312; // 37 = Xi +
- fPDGCode[fNPDGCodes++]= 3334; // 38 = Omega -
- fPDGCode[fNPDGCodes++]=-3334; // 39 = Antiomega
- fPDGCode[fNPDGCodes++]= -99; // 40 = --Reserved
- fPDGCode[fNPDGCodes++]= -15; // 41 = Tau+
- fPDGCode[fNPDGCodes++]= 15; // 42 = Tau-
- fPDGCode[fNPDGCodes++]= 16; // 43 = Tau neutrino
- fPDGCode[fNPDGCodes++]= -16; // 44 = Tau antineutrino
- fPDGCode[fNPDGCodes++]= 411; // 45 = D+
- fPDGCode[fNPDGCodes++]= -411; // 46 = D-
- fPDGCode[fNPDGCodes++]= 421; // 47 = D0
- fPDGCode[fNPDGCodes++]= -421; // 48 = AntiD 0
- fPDGCode[fNPDGCodes++]= 431; // 49 = D_s +
- fPDGCode[fNPDGCodes++]= -431; // 50 = D_s -
- fPDGCode[fNPDGCodes++]= 4122; // 51 = Lambda_c +
- fPDGCode[fNPDGCodes++]= 4232; // 52 = Xi_c +
- fPDGCode[fNPDGCodes++]= 4112; // 53 = Xi_c -
- fPDGCode[fNPDGCodes++]= 4322; // 54 = Xi'_c +
- fPDGCode[fNPDGCodes++]= 4312; // 55 = Xi'_c 0
- fPDGCode[fNPDGCodes++]= 4332; // 56 = Omega_c 0
- fPDGCode[fNPDGCodes++]=-4122; // 57 = Antilambda_c -
- fPDGCode[fNPDGCodes++]=-4232; // 58 = Antixsi_c -
- fPDGCode[fNPDGCodes++]=-4112; // 59 = Antixsi_c 0
- fPDGCode[fNPDGCodes++]=-4322; // 60 = AntiXi'_c -
- fPDGCode[fNPDGCodes++]=-4312; // 61 = AntiXi'_c 0
- fPDGCode[fNPDGCodes++]=-4332; // 62 = AntiOmega_c 0
- fPDGCode[fNPDGCodes++]= -99; // 63 = --Reserved
- fPDGCode[fNPDGCodes++]= -99; // 64 = --Reserved
+ //IPTOKP array goes from official to internal
+ Int_t intfluka = GetFlukaIPTOKP(id);
+ //MPKDHA() goes from internal to PDG
+ return mpdgha(intfluka);
+
}