Units of the distance in the star-generator simulation

TT:
This is try to check the distance units for the simulation. We run through the full geant simulation for 4 cases shown below. We use the d0 decay length as a probe. ( which is ~124um). Decay length was calculated by the distance between MC event vertex and MC d0 daughter origin vertex.
 

case A: Hijing + embedded D0, d0 was decay with geant kinematic, next follow with full simulation + RC

case B: Hijing + filter to select D0, d0 was decay in hijing and pass the daughters to Geant, next follow with full simulation + RC

case C: PYTHIA8 + filter to select D0, d0 was decay in pythia and pass daughters to geant. next follow with full simulation + RC

case D: PYTHIA8 (hacked code, change the daughter vertex and make it to divided to 10). + filter to select D0,
d0 was decay in pythia, next follow with full simulation + RC

case E: Hijing (hacked code, change the daughter vertex and make it to divided to 10). + filter to select D0,
d0 was decay in hijing, next follow with full simulation + RC

======================================

decayL was fitted with function TF1("f1","[0]*exp(-x/[1])+[2]");

 for case A: Hijing+ embedded d0. everything is fine. ctau ~ 0.0124cm. which is ~124um.

 for case B: Hijing + filter D0. ctau ~ 0.137cm. which is not correct.  The magnitude is changed.

for case C: PYTHIA8 + filter D0. ctau ~0.123cm. the magnitude is also changed with one order.

for case D: PYTHIA8 (hacked distance/10)+ filter D0. ctau ~0.012cm. which give reasonable result.

for case E:  Hijing (hacked distance/10)+ filter D0. ctau ~0.0133cm (0.0137 if use same fit range/10 as case B ). which give reasonable result. Not sure why it's not precisely ~0.0124.
Any suggestion? (this is due to the hijing setup, could contamination with b decay's, see next B.2 plots)

case B.2:  Hijing+ filter D0 (hijing setup only contain charm production, not bottom). ctau ~0.124cm. which give precise result ~0.0124cm * 10. 


===================================
note: For the X-axis units in the previous four plots, they should be in cm, since we use the same analysis method and just read the MC track information. (i believe they should be in cm).

Within the pythia, i am sure the distance units is mm,  but not sure does this unit properly transfer to the simulation dimensions. This may not a big deal for the primary particles, but is crucial for the v0 studies.
$STAR/StRoot/StarGenerator/BASE/StarGenerator.h