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.) && (gMC->TrackTime() < fTimeCut)){// Track is inside a scintillator and deposits some energy
// Yuri Kharlov, 28 September 2000
- if( gMC->CurrentVolID(copy) == gMC->VolId("PCPQ") &&
+ static Int_t idPCPQ = gMC->VolId("PCPQ");
+ if( gMC->CurrentVolID(copy) == idPCPQ &&
entered &&
gMC->TrackCharge() != 0) {
Int_t moduleNumber ;
- if( gMC->CurrentVolID(copy) == gMC->VolId("PCPQ") &&
+ static Int_t idPCPQ = gMC->VolId("PCPQ");
+ if( gMC->CurrentVolID(copy) == idPCPQ &&
(gMC->IsTrackEntering() ) &&
gMC->TrackCharge() != 0) {
}
-
- if(gMC->CurrentVolID(copy) == gMC->VolId("PXTL") ) { // We are inside a PBWO crystal
+ static Int_t idPXTL = gMC->VolId("PXTL");
+ if(gMC->CurrentVolID(copy) == idPXTL ) { // We are inside a PBWO crystal
gMC->TrackPosition(pos) ;
xyzte[0] = pos[0] ;
// Add impact to EMC
- if( gMC->CurrentVolID(copy) == gMC->VolId("PXTL") &&
+ static Int_t idPXTL = gMC->VolId("PXTL");
+ if( gMC->CurrentVolID(copy) == idPXTL &&
gMC->IsTrackEntering() ) {
gMC->TrackMomentum(pmom);
gMC->TrackPosition(pos) ;
// Add impact to CPV
- if( gMC->CurrentVolID(copy) == gMC->VolId("PCPQ") &&
+ static Int_t idPCPQ = gMC->VolId("PCPQ");
+ if( gMC->CurrentVolID(copy) == idPCPQ &&
gMC->IsTrackEntering() ) {
gMC->TrackMomentum(pmom);
gMC->TrackPosition(pos) ;
Info("X4 glo","(x,y,z)=(%+8.3f,%+8.3f,%+8.3f) (r,theta,phi)=(%8.3f,%8.3f,%8.3f)",
glo[0],glo[1],glo[2],x4.Rho(),x4.Theta()*TMath::RadToDeg(),x4.Phi()*TMath::RadToDeg());
Info("X4 loc","(x,y,z)=(%+8.3f,%+8.3f,%8.3f) by gMC->Gmtod()",loc[0],loc[1],loc[2]);
- if(gMC->VolId("GAP ")==gMC->CurrentVolID(copy0)){
+ static Int_t idGAP = gMC->VolId("GAP ");
+ if(idGAP==gMC->CurrentVolID(copy0)){
Int_t iChamber;
gMC->CurrentVolOffID(2,iChamber);
TVector2 x2=C(iChamber)->Mrs2Pc(x4);
Int_t copy;
static Int_t iCurrentChamber;
+ static Int_t idRRAD = gMC->VolId("RRAD");
+ static Int_t idRRWI = gMC->VolId("RRWI");
+ static Int_t idRICH = gMC->VolId("RICH");
+ static Int_t idRPC = gMC->VolId("RPC ");
+ static Int_t idRGAP = gMC->VolId("RGAP");
//history of Cerenkovs
if(gMC->TrackPid()==kCerenkov){
- if( gMC->IsNewTrack() && gMC->CurrentVolID(copy)==gMC->VolId("RRAD")) fCounters(0)++;// 0- Ckovs produced in radiator
- if(!gMC->IsTrackAlive() && gMC->CurrentVolID(copy)==gMC->VolId("RRAD")) fCounters(1)++;// 1- Ckovs absorbed in radiator
- if(!gMC->IsTrackAlive() && gMC->CurrentVolID(copy)==gMC->VolId("RRWI")) fCounters(2)++;// 2- Ckovs absorbed in radiator window
- if(!gMC->IsTrackAlive() && gMC->CurrentVolID(copy)==gMC->VolId("RICH")) fCounters(4)++;// 4- Ckovs absorbed in CH4
+ if( gMC->IsNewTrack() && gMC->CurrentVolID(copy)==idRRAD) fCounters(0)++;// 0- Ckovs produced in radiator
+ if(!gMC->IsTrackAlive() && gMC->CurrentVolID(copy)==idRRAD) fCounters(1)++;// 1- Ckovs absorbed in radiator
+ if(!gMC->IsTrackAlive() && gMC->CurrentVolID(copy)==idRRWI) fCounters(2)++;// 2- Ckovs absorbed in radiator window
+ if(!gMC->IsTrackAlive() && gMC->CurrentVolID(copy)==idRICH) fCounters(4)++;// 4- Ckovs absorbed in CH4
}
//Treat photons
static TLorentzVector cerX4;
- if((gMC->TrackPid()==kCerenkov||gMC->TrackPid()==kFeedback)&&gMC->CurrentVolID(copy)==gMC->VolId("RPC ")){//photon in PC
+ if((gMC->TrackPid()==kCerenkov||gMC->TrackPid()==kFeedback)&&gMC->CurrentVolID(copy)==idRPC){//photon in PC
if(gMC->Edep()>0){//photon in PC +DE
if(IsLostByFresnel()){
if(gMC->TrackPid()==kCerenkov) fCounters(7)++;// 7- Ckovs reflected from CsI
//Treat charged particles
static Float_t eloss;
static TLorentzVector mipInX4,mipOutX4;
- if(gMC->TrackCharge() && gMC->CurrentVolID(copy)==gMC->VolId("RGAP")){//MIP in GAP
+ if(gMC->TrackCharge() && gMC->CurrentVolID(copy)==idRGAP){//MIP in GAP
gMC->CurrentVolOffID(1,iCurrentChamber);//RICH-RGAP
if(gMC->IsTrackEntering()||gMC->IsNewTrack()) {//MIP in GAP entering or newly created
eloss=0;
vol[2] = gMC->CurrentVolID(copy);
vol[3] = copy;
-
- if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R1") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L1") )
+ static Int_t idV0R1 = gMC->VolId("V0R1");
+ static Int_t idV0L1 = gMC->VolId("V0L1");
+ static Int_t idV0R2 = gMC->VolId("V0R2");
+ static Int_t idV0L2 = gMC->VolId("V0L2");
+ static Int_t idV0R3 = gMC->VolId("V0R3");
+ static Int_t idV0L3 = gMC->VolId("V0L3");
+ static Int_t idV0R4 = gMC->VolId("V0R4");
+ static Int_t idV0L4 = gMC->VolId("V0L4");
+ static Int_t idV0R5 = gMC->VolId("V0R5");
+ static Int_t idV0L5 = gMC->VolId("V0L5");
+ static Int_t idV0R6 = gMC->VolId("V0R6");
+ static Int_t idV0L6 = gMC->VolId("V0L6");
+
+ if ( gMC->CurrentVolID(copy) == idV0R1 ||
+ gMC->CurrentVolID(copy) == idV0L1 )
ringNumber = 1.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R2") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L2") )
+ else if ( gMC->CurrentVolID(copy) == idV0R2 ||
+ gMC->CurrentVolID(copy) == idV0L2 )
ringNumber = 2.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R3") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L3") )
+ else if ( gMC->CurrentVolID(copy) == idV0R3 ||
+ gMC->CurrentVolID(copy) == idV0L3 )
ringNumber = 3.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R4") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L4") )
+ else if ( gMC->CurrentVolID(copy) == idV0R4 ||
+ gMC->CurrentVolID(copy) == idV0L4 )
ringNumber = 4.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R5") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L5") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L6") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0R6") )
+ else if ( gMC->CurrentVolID(copy) == idV0R5 ||
+ gMC->CurrentVolID(copy) == idV0L5 ||
+ gMC->CurrentVolID(copy) == idV0R6 ||
+ gMC->CurrentVolID(copy) == idV0L6 )
ringNumber = 5.0;
else
ringNumber = 0.0;
if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return;
+ static Int_t idV0R1 = gMC->VolId("V0R1");
+ static Int_t idV0L1 = gMC->VolId("V0L1");
+ static Int_t idV0R2 = gMC->VolId("V0R2");
+ static Int_t idV0L2 = gMC->VolId("V0L2");
+ static Int_t idV0R3 = gMC->VolId("V0R3");
+ static Int_t idV0L3 = gMC->VolId("V0L3");
+
vol[0] = gMC->CurrentVolOffID(1, vol[1]);
vol[2] = gMC->CurrentVolID(copy);
vol[3] = copy;
- if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R1") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L1") )
+ if ( gMC->CurrentVolID(copy) == idV0R1 ||
+ gMC->CurrentVolID(copy) == idV0L1 )
ringNumber = 1.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R2") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L2") )
+ else if ( gMC->CurrentVolID(copy) == idV0R2 ||
+ gMC->CurrentVolID(copy) == idV0L2 )
ringNumber = 2.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R3") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L3") )
+ else if ( gMC->CurrentVolID(copy) == idV0R3 ||
+ gMC->CurrentVolID(copy) == idV0L3 )
ringNumber = 3.0;
else
ringNumber = 0.0;
vol[2] = gMC->CurrentVolID(copy);
vol[3] = copy;
- if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R1") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L1") )
+ static Int_t idV0R1 = gMC->VolId("V0R1");
+ static Int_t idV0L1 = gMC->VolId("V0L1");
+ static Int_t idV0R2 = gMC->VolId("V0R2");
+ static Int_t idV0L2 = gMC->VolId("V0L2");
+ static Int_t idV0R3 = gMC->VolId("V0R3");
+ static Int_t idV0L3 = gMC->VolId("V0L3");
+ static Int_t idV0R4 = gMC->VolId("V0R4");
+ static Int_t idV0L4 = gMC->VolId("V0L4");
+
+ if ( gMC->CurrentVolID(copy) == idV0R1 ||
+ gMC->CurrentVolID(copy) == idV0L1 )
ringNumber = 1.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R2") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L2") )
+ else if ( gMC->CurrentVolID(copy) == idV0R2 ||
+ gMC->CurrentVolID(copy) == idV0L2 )
ringNumber = 2.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R3") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L3") )
+ else if ( gMC->CurrentVolID(copy) == idV0R3 ||
+ gMC->CurrentVolID(copy) == idV0L3 )
ringNumber = 3.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R4") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L4") )
+ else if ( gMC->CurrentVolID(copy) == idV0R4 ||
+ gMC->CurrentVolID(copy) == idV0L4 )
ringNumber = 4.0;
else
ringNumber = 0.0;
vol[2] = gMC->CurrentVolID(copy);
vol[3] = copy;
- if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R1") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L1") )
+ static Int_t idV0R1 = gMC->VolId("V0R1");
+ static Int_t idV0L1 = gMC->VolId("V0L1");
+ static Int_t idV0R2 = gMC->VolId("V0R2");
+ static Int_t idV0L2 = gMC->VolId("V0L2");
+ static Int_t idV0R3 = gMC->VolId("V0R3");
+ static Int_t idV0L3 = gMC->VolId("V0L3");
+ static Int_t idV0R4 = gMC->VolId("V0R4");
+ static Int_t idV0L4 = gMC->VolId("V0L4");
+ static Int_t idV0R5 = gMC->VolId("V0R5");
+ static Int_t idV0R6 = gMC->VolId("V0R6");
+
+ if ( gMC->CurrentVolID(copy) == idV0R1 ||
+ gMC->CurrentVolID(copy) == idV0L1 )
ringNumber = 1.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R2") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L2") )
+ else if ( gMC->CurrentVolID(copy) == idV0R2 ||
+ gMC->CurrentVolID(copy) == idV0L2 )
ringNumber = 2.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R3") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0R4") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L3") )
+ else if ( gMC->CurrentVolID(copy) == idV0R3 ||
+ gMC->CurrentVolID(copy) == idV0R4 ||
+ gMC->CurrentVolID(copy) == idV0L3 )
ringNumber = 3.0;
- else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R5") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0R6") ||
- gMC->CurrentVolID(copy) == gMC->VolId("V0L4") )
+ else if ( gMC->CurrentVolID(copy) == idV0R5 ||
+ gMC->CurrentVolID(copy) == idV0R6 ||
+ gMC->CurrentVolID(copy) == idV0L4 )
ringNumber = 4.0;
else
ringNumber = 0.0;