2 C.----------------------------------------------------------------------
4 C. PHOTOS: PHOton radiation in decays CHArge determination
6 C. Purpose: Calculate the charge of particle with code IDHEP. The
7 C. code of the particle is defined by the Particle Data
8 C. Group in Phys. Lett. B204 (1988) 1.
10 C. Input Parameter: IDHEP
12 C. Output Parameter: Funtion value = charge of particle with code
15 C. Author(s): E. Barberio and B. van Eijk Created at: 29/11/89
16 C. Last update: 02/01/90
18 C.----------------------------------------------------------------------
21 INTEGER IDHEP,IDABS,Q1,Q2,Q3
23 C-- Array 'CHARGE' contains the charge of the first 101 particles ac-
24 C-- cording to the PDG particle code... (0 is added for convenience)
27 &-0.3333333333D0, 0.6666666667D0, -0.3333333333D0, 0.6666666667D0,
28 &-0.3333333333D0, 0.6666666667D0, -0.3333333333D0, 0.6666666667D0,
29 & 2*0.D0, -1.D0, 0.D0, -1.D0, 0.D0, -1.D0, 0.D0, -1.D0, 6*0.D0,
30 & 1.D0, 12*0.D0, 1.D0, 63*0.D0/
32 IF (IDABS.LE.100) THEN
34 C-- Charge of quark, lepton, boson etc....
35 PHOCHA = CHARGE(IDABS)
38 C-- Check on particle build out of quarks, unpack its code...
45 IF(MOD(Q2,2).EQ.0) THEN
46 PHOCHA=CHARGE(Q2)-CHARGE(Q1)
48 PHOCHA=CHARGE(Q1)-CHARGE(Q2)
52 C-- ...diquarks or baryon.
53 PHOCHA=CHARGE(Q1)+CHARGE(Q2)+CHARGE(Q3)
57 C-- Find the sign of the charge...
58 IF (IDHEP.LT.0.D0) PHOCHA=-PHOCHA
59 IF (PHOCHA**2.lt.1d-6) PHOCHA=0.D0