Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:43

0001     
0002 C*********************************************************************  
0003     
0004       FUNCTION LUCHGE(KF)   
0005     
0006 C...Purpose: to give three times the charge for a particle/parton.  
0007       COMMON/LUDAT2/KCHG(500,3),PMAS(500,4),PARF(2000),VCKM(4,4)    
0008       SAVE /LUDAT2/ 
0009     
0010 C...Initial values. Simple case of direct readout.  
0011       LUCHGE=0  
0012       KFA=IABS(KF)  
0013       KC=LUCOMP(KFA)    
0014       IF(KC.EQ.0) THEN  
0015       ELSEIF(KFA.LE.100.OR.KC.LE.80.OR.KC.GT.100) THEN  
0016         LUCHGE=KCHG(KC,1)   
0017     
0018 C...Construction from quark content for heavy meson, diquark, baryon.   
0019       ELSEIF(MOD(KFA/1000,10).EQ.0) THEN    
0020         LUCHGE=(KCHG(MOD(KFA/100,10),1)-KCHG(MOD(KFA/10,10),1))*    
0021      &  (-1)**MOD(KFA/100,10)   
0022       ELSEIF(MOD(KFA/10,10).EQ.0) THEN  
0023         LUCHGE=KCHG(MOD(KFA/1000,10),1)+KCHG(MOD(KFA/100,10),1) 
0024       ELSE  
0025         LUCHGE=KCHG(MOD(KFA/1000,10),1)+KCHG(MOD(KFA/100,10),1)+    
0026      &  KCHG(MOD(KFA/10,10),1)  
0027       ENDIF 
0028     
0029 C...Add on correct sign.    
0030       LUCHGE=LUCHGE*ISIGN(1,KF) 
0031     
0032       RETURN    
0033       END