// Get sensitive volumes id (scintillator pads)
- static Int_t idADA = TVirtualMC::GetMC()->VolId( "ADApad" );
- static Int_t idADC = TVirtualMC::GetMC()->VolId( "ADCpad" );
+ static Int_t idADA = gMC->VolId( "ADApad" );
+ static Int_t idADC = gMC->VolId( "ADCpad" );
// We keep only charged tracks :
- // if ( !TVirtualMC::GetMC()->TrackCharge() || !TVirtualMC::GetMC()->IsTrackAlive() ) return;
+ // if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return;
// We keep charged and non-charged tracks :
- if ( !TVirtualMC::GetMC()->IsTrackAlive() ) return;
+ if ( !gMC->IsTrackAlive() ) return;
Int_t copy;
- Int_t current_volid = TVirtualMC::GetMC()->CurrentVolID( copy );
+ Int_t current_volid = gMC->CurrentVolID( copy );
// check is the track is in a sensitive volume
if( current_volid != idADA && current_volid != idADC ) {
// First read the position, otherwise weird reults! //ecv
Double_t s[3];
Float_t x[3];
- TVirtualMC::GetMC()->TrackPosition( s[0], s[1], s[2] );
+ gMC->TrackPosition( s[0], s[1], s[2] );
for ( Int_t j=0; j<3; j++ ) x[j] = s[j];
// Set detectro type: ADA or ADC
// Get sector copy (1,2,3,4) ( 1 level up from pad )
Int_t sect;
- TVirtualMC::GetMC()->CurrentVolOffID( 1, sect );
+ gMC->CurrentVolOffID( 1, sect );
// Get Detector copy (1,2) ( 2 levels up from pad )
Int_t detc;
- TVirtualMC::GetMC()->CurrentVolOffID( 2, detc );
+ gMC->CurrentVolOffID( 2, detc );
// Sector number
// ADA1 = 10-14
photoCathodeEfficiency = fADAPhotoCathodeEfficiency;
}
- Float_t destep_ad = TVirtualMC::GetMC()->Edep();
- Float_t step_ad = TVirtualMC::GetMC()->TrackStep();
+ Float_t destep_ad = gMC->Edep();
+ Float_t step_ad = gMC->TrackStep();
Int_t nPhotonsInStep_ad = Int_t( destep_ad / (lightYield_ad * 1e-9) );
nPhotonsInStep_ad = gRandom->Poisson( nPhotonsInStep_ad );
eloss_ad += destep_ad;
tlength_ad += step_ad;
- if ( TVirtualMC::GetMC()->IsTrackEntering() ) {
+ if ( gMC->IsTrackEntering() ) {
nPhotons_ad = nPhotonsInStep_ad;
Double_t p[4];
- TVirtualMC::GetMC()->TrackMomentum( p[0], p[1], p[2], p[3] );
+ gMC->TrackMomentum( p[0], p[1], p[2], p[3] );
Float_t pt = TMath::Sqrt( p[0]*p[0] + p[1]*p[1] + p[2]*p[2] );
TParticle *par = gAlice->GetMCApp()->Particle(gAlice->GetMCApp()->GetCurrentTrackNumber());
Int_t imo = par->GetFirstMother();
hits_ad[5] = p[0]; // Px
hits_ad[6] = p[1]; // Py
hits_ad[7] = p[2]; // Pz
- hits_ad[8] = 1.0e09*TVirtualMC::GetMC()->TrackTime(); // in ns!
+ hits_ad[8] = 1.0e09*gMC->TrackTime(); // in ns!
tlength_ad = 0.0;
eloss_ad = 0.0;
nPhotons_ad += nPhotonsInStep_ad;
- if( TVirtualMC::GetMC()->IsTrackExiting() || TVirtualMC::GetMC()->IsTrackStop() || TVirtualMC::GetMC()->IsTrackDisappeared() ) {
+ if( gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared() ) {
// Set integer values
vol_ad[3] = nPhotons_ad;
}
// Do we need track reference ????
- // if( TVirtualMC::GetMC()->IsTrackEntering() || TVirtualMC::GetMC()->IsTrackExiting() ) {
+ // if( gMC->IsTrackEntering() || gMC->IsTrackExiting() ) {
// AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), 49);
// }
}
new(lhits[fNhits++]) AliADhit(fIshunt,track,vol,hits);
}
//_________________________________________________________
-void AliADv1::AddDigits(Int_t* track, Int_t module, Float_t time)
-{
- TClonesArray &ldigits = *fDigits;
- new(ldigits[fNdigits++]) AliADdigit(track,module,time);
-}
-//_________________________________________________________
void AliADv1::MakeBranch(Option_t *option)
{