]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TMEVSIM/TMevSimConverter.cxx
- Compute parameter covariances including absorber dispersion effects
[u/mrichter/AliRoot.git] / TMEVSIM / TMevSimConverter.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 #include "TMevSimConverter.h"
19
20 ClassImp(TMevSimConverter)
21
22
23 ///////////////////////////////////////////////////////////////////////////////////
24
25 Int_t TMevSimConverter::PDGFromId(Int_t id)  {
26
27   //
28   // Return PDG code and pseudo ENDF code from Geant3 code
29   //
30   if (id>0 && id<fNPDGCodes) return fPDGCode[id];
31   else return -1;
32 }
33
34 ///////////////////////////////////////////////////////////////////////////////////
35
36 Int_t TMevSimConverter::IdFromPDG(Int_t pdg) {
37
38
39   for (Int_t i=0; i<fNPDGCodes; i++) {
40     if (fPDGCode[i] == pdg) return i;
41   }
42   return -1;
43
44 }
45
46 ///////////////////////////////////////////////////////////////////////////////////
47
48 void TMevSimConverter::DefineParticles()  {
49
50   //
51   // Load standard numbers for GEANT particles and PDG conversion
52   fNPDGCodes = 0;
53
54   fPDGCode[fNPDGCodes++]=-99;   //  0 = unused location
55   fPDGCode[fNPDGCodes++]=22;    //  1 = photon
56   fPDGCode[fNPDGCodes++]=-11;   //  2 = positron
57   fPDGCode[fNPDGCodes++]=11;    //  3 = electron
58   fPDGCode[fNPDGCodes++]=12;    //  4 = neutrino e
59   fPDGCode[fNPDGCodes++]=-13;   //  5 = muon +
60   fPDGCode[fNPDGCodes++]=13;    //  6 = muon -
61   fPDGCode[fNPDGCodes++]=111;   //  7 = pi0
62   fPDGCode[fNPDGCodes++]=211;   //  8 = pi+
63   fPDGCode[fNPDGCodes++]=-211;  //  9 = pi-
64   fPDGCode[fNPDGCodes++]=130;   // 10 = Kaon Long
65   fPDGCode[fNPDGCodes++]=321;   // 11 = Kaon +
66   fPDGCode[fNPDGCodes++]=-321;  // 12 = Kaon -
67   fPDGCode[fNPDGCodes++]=2112;  // 13 = Neutron
68   fPDGCode[fNPDGCodes++]=2212;  // 14 = Proton
69   fPDGCode[fNPDGCodes++]=-2212; // 15 = Anti Proton
70   fPDGCode[fNPDGCodes++]=310;   // 16 = Kaon Short
71   fPDGCode[fNPDGCodes++]=221;   // 17 = Eta
72   fPDGCode[fNPDGCodes++]=3122;  // 18 = Lambda
73   fPDGCode[fNPDGCodes++]=3222;  // 19 = Sigma +
74   fPDGCode[fNPDGCodes++]=3212;  // 20 = Sigma 0
75   fPDGCode[fNPDGCodes++]=3112;  // 21 = Sigma -
76   fPDGCode[fNPDGCodes++]=3322;  // 22 = Xi0
77   fPDGCode[fNPDGCodes++]=3312;  // 23 = Xi-
78   fPDGCode[fNPDGCodes++]=3334;  // 24 = Omega-
79   fPDGCode[fNPDGCodes++]=-2112; // 25 = Anti Proton
80   fPDGCode[fNPDGCodes++]=-3122; // 26 = Anti Proton
81   fPDGCode[fNPDGCodes++]=-3222; // 27 = Anti Sigma -
82   fPDGCode[fNPDGCodes++]=-3212; // 28 = Anti Sigma 0
83   fPDGCode[fNPDGCodes++]=-3112; // 29 = Anti Sigma 0
84   fPDGCode[fNPDGCodes++]=-3322; // 30 = Anti Xi 0
85   fPDGCode[fNPDGCodes++]=-3312; // 31 = Anti Xi +
86   fPDGCode[fNPDGCodes++]=-3334; // 32 = Anti Omega +
87 }
88