fLightYieldAttenuation = 0. ;
fRecalibrationFactor = 0. ;
fElectronsPerGeV = 0. ;
- fAPDGain = 0. ;
+ fAPDGain = 0. ;
+ fLightFactor = 0. ;
+ fAPDFactor = 0. ;
}
// The APD Gain is 300
fLightYieldMean = 47000;
fIntrinsicPINEfficiency = 0.02655 ; //APD= 0.1875/0.1271 * 0.018 (PIN)
- fLightYieldAttenuation = 0.0045 ;
- fRecalibrationFactor = 13.418/ fLightYieldMean ;
- fElectronsPerGeV = 2.77e+8 ;
- fAPDGain= 300. ;
+ fLightYieldAttenuation = 0.0045 ;
+ fRecalibrationFactor = 13.418/ fLightYieldMean ;
+ fElectronsPerGeV = 2.77e+8 ;
+ fAPDGain = 300. ;
+ fLightFactor = fLightYieldMean * fIntrinsicPINEfficiency ;
+ fAPDFactor = (fRecalibrationFactor/100.) * fAPDGain ;
+
Int_t nb = GetGeometry()->GetNModules() ;
Float_t xyd[3]={0,0,0} ; //local posiiton of the entering
xyd[0] = xyzd[0];
- xyd[1] =-xyzd[2];
- xyd[2] =-xyzd[1];
+ xyd[1] =-xyzd[1];
+ xyd[2] =-xyzd[2];
// Current momentum of the hit's track in the local ref. system
TLorentzVector pmom ; //momentum of the particle initiated hit
gMC -> Gmtod (pm, pd, 2); // transform 3-momentum from master to daughter system
pmom[0] = pd[0];
- pmom[1] =-pd[2];
- pmom[2] =-pd[1];
+ pmom[1] =-pd[1];
+ pmom[2] =-pd[2];
// Digitize the current CPV hit:
qsum += cpvDigit->GetQpad();
}
}
- delete cpvDigits;
+ if (cpvDigits) {
+ cpvDigits->Delete();
+ delete cpvDigits;
+ cpvDigits=0;
+ }
}
gMC->CurrentVolOffID(10, moduleNumber) ; // get the PHOS module number ;
- // fill the relevant QA Checkables
- fQATotEner->Update( xyze[4] ) ; // total energy in PHOS
- (static_cast<AliPHOSQAFloatCheckable*>((*fQATotEnerB)[moduleNumber-1]))->Update( xyze[4] ) ; // energy in this block
-
Int_t strip ;
gMC->CurrentVolOffID(3, strip);
Int_t cell ;
//Calculates the light yield, the number of photns produced in the
//crystal
- Float_t lightYield = gRandom->Poisson(fLightYieldMean * lostenergy *
- fIntrinsicPINEfficiency *
+ Float_t lightYield = gRandom->Poisson(fLightFactor * lostenergy *
exp(-fLightYieldAttenuation *
(local[1]+GetGeometry()->GetCrystalSize(1)/2.0 ))
) ;
//Calculates de energy deposited in the crystal
- xyze[4] = (fRecalibrationFactor/100.) * fAPDGain * lightYield ;
+ xyze[4] = fAPDFactor * lightYield ;
// add current hit to the hit list
AddHit(fIshunt, primary,tracknumber, absid, xyze);
-
+ // fill the relevant QA Checkables
+ fQATotEner->Update( xyze[4] ) ; // total energy in PHOS
+ (static_cast<AliPHOSQAFloatCheckable*>((*fQATotEnerB)[moduleNumber-1]))->Update( xyze[4] ) ; // energy in this block
+
} // there is deposited energy
} // we are inside a PHOS Xtal