// Standard Creator.
fHits= new TClonesArray("AliEMCALHit",1000);
- gAlice->GetMCApp()->AddHitList(fHits);
+ // gAlice->GetMCApp()->AddHitList(fHits); // 20-dec-04 - advice of Andreas
fNhits = 0;
fIshunt = 2; // All hits are associated with particles entering the calorimeter
+ fTimeCut = 30e-09;
}
//______________________________________________________________________
new((*fHits)[fNhits]) AliEMCALHit(*newHit);
fNhits++;
} // end if
-
+
delete newHit;
}
//______________________________________________________________________
AliEMCALGeometry * geom = GetGeometry() ;
- if(gMC->CurrentVolID(copy) == gMC->VolId("XPHI") ) { // We are in a Scintillator Layer
+ static Int_t idXPHI = gMC->VolId("XPHI");
+ if(gMC->CurrentVolID(copy) == idXPHI ) { // We are in a Scintillator Layer
Float_t depositedEnergy ;
- if( (depositedEnergy = gMC->Edep()) > 0.){// Track is inside a scintillator and deposits some energy
+ if( ((depositedEnergy = gMC->Edep()) > 0.) && (gMC->TrackTime() < fTimeCut)){// Track is inside a scintillator and deposits some energy
if (fCurPrimary==-1)
fCurPrimary=gAlice->GetMCApp()->GetPrimary(tracknumber);
if (gMC->TrackCharge()!=0) { // Check
Float_t BirkC1_mod = 0;
if (fBirkC0==1){ // Apply correction for higher charge states
- if (abs(gMC->TrackCharge())>=2)
+ if (TMath::Abs(gMC->TrackCharge())>=2)
BirkC1_mod=fBirkC1*7.2/12.6;
else
BirkC1_mod=fBirkC1;