static Int_t idPCPQ = -1;
if (strstr(fTitle.Data(),"noCPV") == 0)
- idPCPQ = gMC->VolId("PCPQ");
+ idPCPQ = TVirtualMC::GetMC()->VolId("PCPQ");
- if( gMC->CurrentVolID(copy) == idPCPQ &&
- (gMC->IsTrackEntering() ) &&
- gMC->TrackCharge() != 0) {
+ if( TVirtualMC::GetMC()->CurrentVolID(copy) == idPCPQ &&
+ (TVirtualMC::GetMC()->IsTrackEntering() ) &&
+ TVirtualMC::GetMC()->TrackCharge() != 0) {
- gMC -> TrackPosition(pos);
+ TVirtualMC::GetMC() -> TrackPosition(pos);
Float_t xyzm[3], xyzd[3] ;
Int_t i;
for (i=0; i<3; i++) xyzm[i] = pos[i];
- gMC -> Gmtod (xyzm, xyzd, 1); // transform coordinate from master to daughter system
+ TVirtualMC::GetMC() -> Gmtod (xyzm, xyzd, 1); // transform coordinate from master to daughter system
Float_t xyd[3]={0,0,0} ; //local position of the entering
// Current momentum of the hit's track in the local ref. system
TLorentzVector pmom ; //momentum of the particle initiated hit
- gMC -> TrackMomentum(pmom);
+ TVirtualMC::GetMC() -> TrackMomentum(pmom);
Float_t pm[3], pd[3];
for (i=0; i<3; i++)
pm[i] = pmom[i];
- gMC -> Gmtod (pm, pd, 2); // transform 3-momentum from master to daughter system
+ TVirtualMC::GetMC() -> Gmtod (pm, pd, 2); // transform 3-momentum from master to daughter system
pmom[0] = pd[0];
pmom[1] =-pd[1];
pmom[2] =-pd[2];
// Digitize the current CPV hit:
// 1. find pad response and
- gMC->CurrentVolOffID(3,moduleNumber);
+ TVirtualMC::GetMC()->CurrentVolOffID(3,moduleNumber);
moduleNumber--;
// TClonesArray *cpvDigits = new TClonesArray("AliPHOSCPVDigit",0); // array of digits for current hit
// add current digit to the temporary hit list
- xyzte[3] = gMC->TrackTime() ;
+ xyzte[3] = TVirtualMC::GetMC()->TrackTime() ;
xyzte[4] = cpvDigit->GetQpad() ; // amplitude in a pad
Int_t primary = gAlice->GetMCApp()->GetPrimary( gAlice->GetMCApp()->GetCurrentTrackNumber() );
}
- static Int_t idPXTL = gMC->VolId("PXTL");
- if(gMC->CurrentVolID(copy) == idPXTL ) { // We are inside a PBWO crystal
+ static Int_t idPXTL = TVirtualMC::GetMC()->VolId("PXTL");
+ if(TVirtualMC::GetMC()->CurrentVolID(copy) == idPXTL ) { // We are inside a PBWO crystal
- gMC->TrackPosition(pos) ;
+ TVirtualMC::GetMC()->TrackPosition(pos) ;
xyzte[0] = pos[0] ;
xyzte[1] = pos[1] ;
xyzte[2] = pos[2] ;
- Float_t lostenergy = gMC->Edep();
+ Float_t lostenergy = TVirtualMC::GetMC()->Edep();
//Put in the TreeK particle entering PHOS and all its parents
- if ( gMC->IsTrackEntering() ){
+ if ( TVirtualMC::GetMC()->IsTrackEntering() ){
Float_t xyzd[3] ;
- gMC -> Gmtod (xyzte, xyzd, 1); // transform coordinate from master to daughter system
+ TVirtualMC::GetMC() -> Gmtod (xyzte, xyzd, 1); // transform coordinate from master to daughter system
if (xyzd[1] < -GetGeometry()->GetCrystalSize(1)/2.+0.1){ //Entered close to forward surface
Int_t parent = gAlice->GetMCApp()->GetCurrentTrackNumber() ;
TParticle * part = gAlice->GetMCApp()->Particle(parent) ;
vert[0]=part->Vx() ;
vert[1]=part->Vy() ;
vert[2]=part->Vz() ;
- gMC -> Gmtod (vert, vertd, 1); // transform coordinate from master to daughter system
+ TVirtualMC::GetMC() -> Gmtod (vert, vertd, 1); // transform coordinate from master to daughter system
if(vertd[1]<-GetGeometry()->GetCrystalSize(1)/2.-0.1){ //Particle is created in foront of PHOS
//0.1 to get rid of numerical errors
part->SetBit(kKeepBit);
}
}
if ( lostenergy != 0 ) { // Track is inside the crystal and deposits some energy
- xyzte[3] = gMC->TrackTime() ;
+ xyzte[3] = TVirtualMC::GetMC()->TrackTime() ;
- gMC->CurrentVolOffID(10, moduleNumber) ; // get the PHOS module number ;
+ TVirtualMC::GetMC()->CurrentVolOffID(10, moduleNumber) ; // get the PHOS module number ;
Int_t strip ;
- gMC->CurrentVolOffID(3, strip);
+ TVirtualMC::GetMC()->CurrentVolOffID(3, strip);
Int_t cell ;
- gMC->CurrentVolOffID(2, cell);
+ TVirtualMC::GetMC()->CurrentVolOffID(2, cell);
//Old formula for row is wrong. For example, I have strip 56 (28 for 2 x 8), row must be 1.
//But row == 1 + 56 - 56 % 56 == 57 (row == 1 + 28 - 28 % 28 == 29)