From 2942f542d4b5bec82bbddfadd400306661f8dc8d Mon Sep 17 00:00:00 2001 From: hristov Date: Sat, 3 May 2014 19:19:54 +0200 Subject: [PATCH] Changes to compile with Root6 on macosx64 --- ACORDE/AliACORDEv0.cxx | 234 ++--- ACORDE/AliACORDEv1.cxx | 34 +- AD/AliADv1.cxx | 30 +- ANALYSIS/AliAODv0KineCuts.cxx | 4 +- ANALYSIS/AliESDv0KineCuts.cxx | 4 +- BCM/AliBCM.cxx | 18 +- EMCAL/AliEMCAL.cxx | 74 +- EMCAL/AliEMCALTracker.cxx | 2 +- EMCAL/AliEMCALTriggerRawDigitMaker.cxx | 32 +- EMCAL/AliEMCALWsuCosmicRaySetUp.cxx | 38 +- EMCAL/AliEMCALv0.cxx | 128 +-- EMCAL/AliEMCALv1.cxx | 24 +- EMCAL/AliEMCALv2.cxx | 68 +- EVGEN/AliGenCorrHF.cxx | 2 +- EVGEN/AliGenEMCocktail.cxx | 2 +- EVGEN/AliGenHIJINGpara.cxx | 4 +- EVGEN/AliGenMUONCocktailpp.cxx | 6 +- EVGEN/AliGenParam.cxx | 2 +- EVGEN/AliGenReaderCwn.cxx | 2 +- EVGEN/AliGenTunedOnPbPb.cxx | 2 +- FIT/AliFITv0.cxx | 46 +- FIT/AliFITv1.cxx | 48 +- FMD/AliFMD.cxx | 46 +- HLT/BASE/AliHLTComponent.cxx | 2 +- HLT/CALO/AliHLTCaloClusterizerComponent.cxx | 2 +- HMPID/AliHMPIDv1.cxx | 242 ++--- HMPID/AliHMPIDv2.cxx | 242 ++--- HMPID/AliHMPIDv3.cxx | 236 ++--- ITS/AliITS.cxx | 2 +- ITS/AliITSMultReconstructor.cxx | 2 +- ITS/AliITSV0Finder.cxx | 4 +- ITS/AliITSgeomMatrix.cxx | 36 +- ITS/AliITSsimulationFastPoints.cxx | 2 +- ITS/AliITStrackerMI.cxx | 6 +- ITS/AliITSv11.cxx | 50 +- ITS/UPGRADE/AliITSU.cxx | 2 +- ITS/UPGRADE/AliITSUv0.cxx | 38 +- ITS/UPGRADE/AliITSUv1.cxx | 42 +- ITS/UPGRADE/v0/AliITSupgrade.cxx | 76 +- MFT/AliMFT.cxx | 42 +- MFT/AliMuonForwardTrackFinder.cxx | 98 +- MONITOR/CMakebinmonitorGDC.pkg | 6 - MUON/AliMUON.h | 4 +- MUON/AliMUONGain.cxx | 2 +- MUON/AliMUONGeometryBuilder.cxx | 6 +- MUON/AliMUONGeometryModule.cxx | 4 +- MUON/AliMUONLocalStruct.cxx | 4 +- MUON/AliMUONLocalTrigger.cxx | 4 +- MUON/AliMUONSlatGeometryBuilder.cxx | 738 +++++++-------- MUON/AliMUONSt1GeometryBuilder.cxx | 104 +-- MUON/AliMUONSt1GeometryBuilderV2.cxx | 286 +++--- MUON/AliMUONSt2GeometryBuilder.cxx | 20 +- MUON/AliMUONSt2GeometryBuilderV2.cxx | 286 +++--- MUON/AliMUONTrackHitPattern.cxx | 8 +- MUON/AliMUONTriggerGeometryBuilder.cxx | 46 +- MUON/AliMUONTriggerQAChecker.cxx | 12 +- MUON/AliMUONTriggerQADataMakerRec.cxx | 10 +- MUON/AliMUONVGeometryBuilder.cxx | 6 +- MUON/AliMUONv1.cxx | 60 +- PHOS/AliPHOSDebug.cxx | 32 +- PHOS/AliPHOSv0.cxx | 200 ++-- PHOS/AliPHOSv1.cxx | 42 +- PHOS/AliPHOSvFast.cxx | 16 +- PHOS/AliPHOSvImpacts.cxx | 32 +- PMD/AliPMDv0.cxx | 158 ++-- PMD/AliPMDv1.cxx | 450 ++++----- PMD/AliPMDv2008.cxx | 342 +++---- PWG/FLOW/Tasks/AliAnalysisTaskVnV0.cxx | 40 +- ...iAnalysisTaskMuonCollisionMultiplicity.cxx | 14 +- PWG/muon/AliMuonsHFHeader.cxx | 6 +- .../AliAnalysisTaskLongRangeCorrelations.cxx | 4 +- .../DPhi/AliAnalysisTaskMinijet.cxx | 2 +- .../DPhi/AliLeadingV0Correlation.cxx | 6 +- .../DPhi/PhiEffMC/AliAnalysisTaskPhiEffMc.cxx | 8 +- .../AliAnalysisTaskPidPidCorrelations.cxx | 4 +- PWGCF/Correlations/JCORRAN/AliJBaseTrack.h | 2 +- PWGCF/Correlations/JCORRAN/AliJCORRANTask.cxx | 30 +- PWGCF/Correlations/JCORRAN/AliJCORRANTask.h | 4 +- PWGCF/Correlations/JCORRAN/AliJConst.h | 4 +- PWGCF/Correlations/JCORRAN/AliJPhoton.cxx | 12 +- PWGCF/Correlations/JCORRAN/AliJPhoton.h | 2 +- PWGCF/Correlations/JCORRAN/AliJRunHeader.cxx | 8 +- .../AliEbyEHigherMomentsEffContTask.cxx | 12 +- .../Fluctuations/AliEbyEHigherMomentsTask.cxx | 6 +- .../AliEbyEHigherMomentsTaskPID.cxx | 6 +- .../Fluctuations/AliHigherMomentsToyModel.cxx | 12 +- .../AliAnalysisNetParticleDistribution.cxx | 2 +- .../AliAnalysisNetParticleHelper.cxx | 2 +- .../AliAnalysisTaskProtonLambda.cxx | 2 +- .../AliAnalysisTaskEMCALMesonGGSDM.cxx | 3 + .../AliAnalysisTaskEMCALMesonGGSDMpPb.cxx | 3 +- .../EMCALTasks/AliAnalysisTaskSDMGammaMC.cxx | 2 + .../PHOS_embedding/AliPHOSEmbedding.cxx | 2 +- .../correlationHF/AliAnalysisTaskSEHFCJqa.cxx | 4 +- .../correlationHF/AliAnalysisTaskSEmcCorr.cxx | 12 +- PWGHF/hfe/AliAnalysisTaskFlowTPCEMCalEP.cxx | 6 +- PWGHF/hfe/AliHFENonPhotonicElectron.cxx | 12 +- PWGHF/hfe/AliHFEV0cuts.cxx | 8 +- PWGHF/vertexingHF/AliAnalysisTaskSEDplus.cxx | 4 +- PWGHF/vertexingHF/AliAnalysisVertexingHF.cxx | 2 +- PWGJE/AliAnalysisTaskJetCore.cxx | 4 +- PWGJE/AliAnalysisTaskJetSpectrum2.cxx | 2 +- PWGJE/AliFragmentationFunctionCorrections.cxx | 4 +- .../UserTasks/AliAnalysisTaskHJetEmbed.cxx | 10 +- .../AliAnalysisTaskFlavourJetCorrelations.cxx | 12 +- ...AliAnalysisTaskIDFragmentationFunction.cxx | 28 +- PWGJE/UserTasks/AliAnalysisTaskPID.cxx | 12 +- .../ChargedHadrons/dNdPt/AlidNdPtAnalysis.cxx | 32 +- .../dNdPt/AlidNdPtAnalysisPbPb.cxx | 18 +- .../dNdPt/AlidNdPtAnalysisPbPbAOD.cxx | 2 +- .../dNdPt/AlidNdPtAnalysispPb.cxx | 34 +- .../dNdPt/AlidNdPtCorrection.cxx | 28 +- .../dNdPt/AlidNdPtCutAnalysis.cxx | 8 +- .../dNdPt/AlidNdPtCutAnalysisPbPb.cxx | 8 +- .../dNdPt/AlidNdPtEfficiency.cxx | 4 +- .../deuteronpA/AliAnalysisDeuteronpA.cxx | 10 +- .../AliAnalysisCombinedHadronSpectra.cxx | 16 +- .../PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx | 16 +- .../AliAnalysisTaskLambdaOverK0sJets.cxx | 2 +- .../AliAnalysisTaskV0ChCorrelations.cxx | 4 +- .../Hypernuclei/AliAnalysisTaskAntiHe4.cxx | 2 +- .../AliAnalysisTaskHdibaryonLPpi.cxx | 2 +- .../LambdaK0PbPb/AliAnalysisTaskCTauPbPb.cxx | 2 +- .../AliAnalysisTaskCTauPbPbaod.cxx | 2 +- PWGPP/EVCHAR/AliAnalysisTaskSPDdNdEta.cxx | 2 +- PWGPP/EVCHAR/AliTrackletAlg.cxx | 2 +- .../AliAnalysisTrackingUncertainties.cxx | 20 +- PWGPP/ITS/AliAnalysisTaskITSTrackingCheck.cxx | 2 +- .../dep/AliAnalysisTaskMuonTrackingEff.cxx | 8 +- PWGPP/TPC/AliAnalysisNoiseTPC.cxx | 2 +- PWGPP/TPC/AliESDRecV0Info.cxx | 4 +- PWGPP/TPC/AliGenV0Info.cxx | 4 +- PWGPP/TPC/AliPerformanceEff.cxx | 8 +- PWGPP/TPC/AliPerformanceMatch.cxx | 6 +- PWGPP/TPC/AliPerformanceTPC.cxx | 8 +- PWGPP/TPC/AliRecInfoMaker.cxx | 2 +- PWGPP/pid/AliAnalysisTaskK0sBayes.cxx | 8 +- PWGPP/pid/AliAnalysisTaskLambdaBayes.cxx | 6 +- PWGPP/pid/AliAnalysisTaskPhiBayes.cxx | 8 +- .../xsAndTwoProng/AliAnalysisTaskCDMeson.cxx | 2 +- .../xsAndTwoProng/AliCDMesonBase.cxx | 6 +- STEER/STEER/AliLego.cxx | 30 +- STEER/STEER/AliMC.cxx | 114 +-- STEER/STEER/AliModule.cxx | 10 +- STEER/STEER/AliRun.cxx | 2 +- STEER/STEER/AliSimulation.cxx | 12 +- STEER/STEERBase/AliTrackReference.cxx | 24 +- STRUCT/AliBODY.cxx | 6 +- STRUCT/AliDIPOv2.cxx | 238 ++--- STRUCT/AliFRAMEv2.cxx | 388 ++++---- STRUCT/AliHALL.cxx | 60 +- STRUCT/AliHALLv3.cxx | 8 +- STRUCT/AliPIPEv0.cxx | 140 +-- STRUCT/AliPIPEv1.cxx | 66 +- T0/AliT0v0.cxx | 178 ++-- T0/AliT0v1.cxx | 168 ++-- T0/AliT0v2.cxx | 94 +- TOF/AliTOF.cxx | 6 +- TOF/AliTOFAnalysisTaskCalibPass0.cxx | 4 +- TOF/AliTOFGeometry.cxx | 20 +- TOF/AliTOFTrigger.cxx | 2 +- TOF/AliTOFtrackerMI.cxx | 2 +- TOF/AliTOFtrackerV1.cxx | 2 +- TOF/AliTOFv6T0.cxx | 818 ++++++++-------- TPC/Base/AliTPCCalibCE.cxx | 2 +- TPC/Base/AliTPCCalibRaw.cxx | 8 +- TPC/Base/AliTPCCorrection.cxx | 34 +- TPC/Base/AliTPCTransform.cxx | 4 +- TPC/Calib/AliTPCcalibAlign.cxx | 4 +- TPC/Calib/AliTPCcalibCalib.cxx | 2 +- TPC/Calib/AliTPCcalibCosmic.cxx | 8 +- TPC/Calib/AliTPCcalibGainMult.cxx | 16 +- TPC/Calib/AliTPCcalibLaser.cxx | 6 +- TPC/Calib/AliTPCcalibTime.cxx | 10 +- TPC/Calib/AliTPCcalibTimeGain.cxx | 12 +- TPC/Calib/AliTPCcalibV0.cxx | 4 +- TPC/Rec/AliTPCClusterParam.cxx | 2 +- TPC/Rec/AliTPCclusterer.cxx | 4 +- TPC/Rec/AliTPCclustererKr.cxx | 4 +- TPC/Rec/AliTPCtracker.cxx | 6 +- TPC/Sim/AliTPCLaser.cxx | 18 +- TPC/Sim/AliTPCv2.cxx | 76 +- TPC/Sim/AliTPCv4.cxx | 48 +- TPC/Upgrade/AliToyMCDrawer.cxx | 10 +- TPC/Upgrade/AliToyMCEventGenerator.cxx | 8 +- TPC/Upgrade/AliToyMCReconstruction.cxx | 2 +- TRD/AliTRDCalibChamberStatus.cxx | 14 +- TRD/AliTRDdEdxCalibHistArray.cxx | 2 +- TRD/AliTRDgeometry.cxx | 880 +++++++++--------- TRD/AliTRDsimTR.cxx | 8 +- TRD/AliTRDv1.cxx | 34 +- VZERO/AliVZEROv7.cxx | 326 +++---- ZDC/AliZDCv3.cxx | 726 +++++++-------- ZDC/AliZDCv4.cxx | 724 +++++++------- 194 files changed, 5426 insertions(+), 5426 deletions(-) diff --git a/ACORDE/AliACORDEv0.cxx b/ACORDE/AliACORDEv0.cxx index d434fbe5b99..54642522566 100644 --- a/ACORDE/AliACORDEv0.cxx +++ b/ACORDE/AliACORDEv0.cxx @@ -98,8 +98,8 @@ void AliACORDEv0::CreateCavern() //pbox[0] = 12073; pbox[1] = AliACORDEConstants::Instance()->Depth(); pbox[2] = pbox[0]; - gMC->Gsvolu("ACORDE", "BOX", idtmed[1114], pbox, 3); - gMC->Gspos("ACORDE", 1, "ALIC", 0, 0, 0, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("ACORDE", "BOX", idtmed[1114], pbox, 3); + TVirtualMC::GetMC()->Gspos("ACORDE", 1, "ALIC", 0, 0, 0, 0, "ONLY"); CreateShafts(); CreateMolasse(); } @@ -127,7 +127,7 @@ void AliACORDEv0::CreateShafts() ptube[0] = 0; // inner radius ptube[1] = 1250; // outer radius ptube[2] = 5150/2; // Half lenght in Z - gMC->Gsvolu("CSF1", "TUBE", idtmed[1114], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("CSF1", "TUBE", idtmed[1114], ptube, 3); Float_t ptubs[5]; // The open section of the PX24 @@ -136,90 +136,90 @@ void AliACORDEv0::CreateShafts() ptubs[2] = 1300; // Half length ptubs[3] = 180 + kRaddeg*TMath::ASin(1070/ptubs[0]); // starting angle ptubs[4] = 180 - kRaddeg*TMath::ASin(1070/ptubs[0]); - gMC->Gsvolu("CSF2", "TUBS", idtmed[1116], ptubs, 5); - gMC->Gspos("CSF2", 1, "CSF1", 0, 0, -ptube[2] + ptubs[2], 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CSF2", "TUBS", idtmed[1116], ptubs, 5); + TVirtualMC::GetMC()->Gspos("CSF2", 1, "CSF1", 0, 0, -ptube[2] + ptubs[2], 0, "MANY"); // The other part of the shaft. ptube[0] = ptubs[0]; // Inner radius ptube[1] = ptubs[1]; // Outer radius ptube[2] = 5150/2 - ptubs[2]; // Half lenght - gMC->Gsvolu("CSF3", "TUBE", idtmed[1116], ptube, 3); - gMC->Gspos("CSF3", 1, "CSF1", 0, 0, 5150/2 - ptube[2], 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CSF3", "TUBE", idtmed[1116], ptube, 3); + TVirtualMC::GetMC()->Gspos("CSF3", 1, "CSF1", 0, 0, 5150/2 - ptube[2], 0, "MANY"); Float_t pbox[3]; // Concrete walls along the shaft (next to the elevator.) pbox[0] = 480/2; // Half length in X pbox[1] = 120/2; // Half length in Y pbox[2] = 5150/2; // Half length in Z - gMC->Gsvolu("CSW1", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW1", 1, "CSF1", 820+pbox[0], 150+pbox[1], 0, 0, "MANY"); - gMC->Gspos("CSW1", 2, "CSF1", 820+pbox[0], -300-pbox[1], 0, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CSW1", "BOX", idtmed[1116], pbox, 3); + TVirtualMC::GetMC()->Gspos("CSW1", 1, "CSF1", 820+pbox[0], 150+pbox[1], 0, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("CSW1", 2, "CSF1", 820+pbox[0], -300-pbox[1], 0, 0, "MANY"); // pbox[0] = 120/2; // Half length in X pbox[1] = 750/2; // Half length in Y pbox[2] = 5150/2; // Half length in Z - gMC->Gsvolu("CSW2", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW2", 1, "CSF1", 820-60, 150+pbox[1], 0, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CSW2", "BOX", idtmed[1116], pbox, 3); + TVirtualMC::GetMC()->Gspos("CSW2", 1, "CSF1", 820-60, 150+pbox[1], 0, 0, "MANY"); // pbox[0] = 120/2; // Half length in X pbox[1] = 600/2; // Half lenght in Y pbox[2] = 5150/2; // Half length in Z - gMC->Gsvolu("CSW3", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW3", 1, "CSF1", 820-60, -300-pbox[1], 0, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CSW3", "BOX", idtmed[1116], pbox, 3); + TVirtualMC::GetMC()->Gspos("CSW3", 1, "CSF1", 820-60, -300-pbox[1], 0, 0, "MANY"); // Material below the counting rooms. pbox[0] = 400/2; pbox[1] = 2300/2; pbox[2] = 300/2; - gMC->Gsvolu("CSW4", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW4",1,"CSF1",2300/2-pbox[0],0,3000-5150/2-pbox[2], 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CSW4", "BOX", idtmed[1116], pbox, 3); + TVirtualMC::GetMC()->Gspos("CSW4",1,"CSF1",2300/2-pbox[0],0,3000-5150/2-pbox[2], 0, "MANY"); // Shielding plug. pbox[0] = 1400/2; pbox[1] = 2300/2; pbox[2] = 170/2; - gMC->Gsvolu("CSW5", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW5", 1, "CSF1", 0, 0, 3000-5150/2-130, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CSW5", "BOX", idtmed[1116], pbox, 3); + TVirtualMC::GetMC()->Gspos("CSW5", 1, "CSF1", 0, 0, 3000-5150/2-130, 0, "MANY"); // The end of the support for the shielding plug. pbox[0] = 170/2; pbox[1] = 2300/2; pbox[2] = 300/2; - gMC->Gsvolu("CSW6", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW6",1,"CSF1",-1400/2-pbox[0],0,3000-5150/2-pbox[2],0,"MANY"); + TVirtualMC::GetMC()->Gsvolu("CSW6", "BOX", idtmed[1116], pbox, 3); + TVirtualMC::GetMC()->Gspos("CSW6",1,"CSF1",-1400/2-pbox[0],0,3000-5150/2-pbox[2],0,"MANY"); // ... pbox[0] = 100/2; pbox[1] = 2300/2; pbox[2] = 450/2; - gMC->Gsvolu("CSW7", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW7",1,"CSF1",-1400/2-170-pbox[0],0,3000-5150/2+pbox[2],0,"MANY"); + TVirtualMC::GetMC()->Gsvolu("CSW7", "BOX", idtmed[1116], pbox, 3); + TVirtualMC::GetMC()->Gspos("CSW7",1,"CSF1",-1400/2-170-pbox[0],0,3000-5150/2+pbox[2],0,"MANY"); // Material close to the pipe. pbox[0] = 300/2; pbox[1] = 2300/2; pbox[2] = 170/2; - gMC->Gsvolu("CSW8", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW8",1,"CSF1",-2300/2+pbox[0],0,2500-5150/2,0,"MANY"); + TVirtualMC::GetMC()->Gsvolu("CSW8", "BOX", idtmed[1116], pbox, 3); + TVirtualMC::GetMC()->Gspos("CSW8",1,"CSF1",-2300/2+pbox[0],0,2500-5150/2,0,"MANY"); // Now put the shaft into the mother volume. - gMC->Gspos("CSF1", 1, "ACORDE", 0, AliACORDEConstants::Instance()->Depth() - 5150/2, 2300, idrotm[2001], "MANY"); + TVirtualMC::GetMC()->Gspos("CSF1", 1, "ACORDE", 0, AliACORDEConstants::Instance()->Depth() - 5150/2, 2300, idrotm[2001], "MANY"); // PM25 Access Shaft ptube[0] = 910/2; ptube[1] = ptube[0] + 100; ptube[2] = (5150 - 1166)/2; - gMC->Gsvolu("CSF4", "TUBE", idtmed[1116], ptube, 3); - gMC->Gspos("CSF4", 1, "ACORDE", 2100, AliACORDEConstants::Instance()->Depth()-ptube[2], 0, idrotm[2001], "MANY"); + TVirtualMC::GetMC()->Gsvolu("CSF4", "TUBE", idtmed[1116], ptube, 3); + TVirtualMC::GetMC()->Gspos("CSF4", 1, "ACORDE", 2100, AliACORDEConstants::Instance()->Depth()-ptube[2], 0, idrotm[2001], "MANY"); // PGC2 Access Shaft ptube[0] = 1100/2; ptube[1] = ptube[0] + 100; ptube[2] = (5150 - 690)/2; - gMC->Gsvolu("CSF5", "TUBE", idtmed[1116], ptube, 3); - gMC->Gspos("CSF5", 1, "ACORDE", -375, AliACORDEConstants::Instance()->Depth()-ptube[2], -1900 - 2987.7, idrotm[2001], "MANY"); + TVirtualMC::GetMC()->Gsvolu("CSF5", "TUBE", idtmed[1116], ptube, 3); + TVirtualMC::GetMC()->Gspos("CSF5", 1, "ACORDE", -375, AliACORDEConstants::Instance()->Depth()-ptube[2], -1900 - 2987.7, idrotm[2001], "MANY"); } @@ -255,7 +255,7 @@ void AliACORDEv0::CreateMolasse() pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad); pbox[1] = AliACORDEConstants::Instance()->Depth()/2; pbox[2] = pbox[0]; - gMC->Gsvolu("CMO1", "BOX", idtmed[1114], pbox, 3); + TVirtualMC::GetMC()->Gsvolu("CMO1", "BOX", idtmed[1114], pbox, 3); // Now put the molasse exactly above the hall. OK // Above the ceiling @@ -265,8 +265,8 @@ void AliACORDEv0::CreateMolasse() ptubs[2] = 1900/2 + px24radius; ptubs[3] = 0; ptubs[4] = 180; - gMC->Gsvolu("CMO2", "TUBS", idtmed[1123], ptubs, 5); - gMC->Gspos("CMO2", 1, "CMO1", 0, 500-AliACORDEConstants::Instance()->Depth()/2, ptubs[2]-1900, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CMO2", "TUBS", idtmed[1123], ptubs, 5); + TVirtualMC::GetMC()->Gspos("CMO2", 1, "CMO1", 0, 500-AliACORDEConstants::Instance()->Depth()/2, ptubs[2]-1900, 0, "MANY"); // Molasse around the RB24/26 Wall. OK ptubs[0] = 220 + 1600; @@ -274,34 +274,34 @@ void AliACORDEv0::CreateMolasse() ptubs[2] = 2987.7/2 - 1100/4 - concreteWidth/2; ptubs[3] = 0; ptubs[4] = 180; - gMC->Gsvolu("CMO3", "TUBS", idtmed[1123], ptubs, 5); - gMC->Gspos("CMO3", 1, "CMO1", 70, 40-AliACORDEConstants::Instance()->Depth()/2, -1900 - ptubs[2], 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CMO3", "TUBS", idtmed[1123], ptubs, 5); + TVirtualMC::GetMC()->Gspos("CMO3", 1, "CMO1", 70, 40-AliACORDEConstants::Instance()->Depth()/2, -1900 - ptubs[2], 0, "MANY"); // A big block above the RB24/26 wall. OK pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad); pbox[1] = (AliACORDEConstants::Instance()->Depth() - 220 - 1600)/2; pbox[2] = 2987.7/2 - 1100/4 - concreteWidth/2; - gMC->Gsvolu("CMO4", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CMO4", 1, "CMO1", 0, AliACORDEConstants::Instance()->Depth()/2 - pbox[1], -1900 - pbox[2], 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CMO4", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CMO4", 1, "CMO1", 0, AliACORDEConstants::Instance()->Depth()/2 - pbox[1], -1900 - pbox[2], 0, "MANY"); // Small blocks below the volume CMO4 on both sides of the wall RB24/26. OK pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - ptubs[0])/2; pbox[1] = AliACORDEConstants::Instance()->Depth()/2 - pbox[1]; - gMC->Gsvolu("CM17", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CM17", 1, "CMO1", AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - pbox[0], -AliACORDEConstants::Instance()->Depth()/2 + pbox[1], -1900 - pbox[2], 0, "MANY"); - gMC->Gspos("CM17", 2, "CMO1", -AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad)+ pbox[0], -AliACORDEConstants::Instance()->Depth()/2 + pbox[1], -1900 - pbox[2], 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CM17", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CM17", 1, "CMO1", AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - pbox[0], -AliACORDEConstants::Instance()->Depth()/2 + pbox[1], -1900 - pbox[2], 0, "MANY"); + TVirtualMC::GetMC()->Gspos("CM17", 2, "CMO1", -AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad)+ pbox[0], -AliACORDEConstants::Instance()->Depth()/2 + pbox[1], -1900 - pbox[2], 0, "MANY"); // And a big block of molasse above the hall up to the surface. OK pbox[0] = pm25X - pm25radius; pbox[1] = (AliACORDEConstants::Instance()->Depth()-500-1170)/2; pbox[2] = (1900 + 1150)/2; - gMC->Gsvolu("CMO5", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CMO5", 1, "CMO1", 0,AliACORDEConstants::Instance()->Depth()/2-pbox[1], pbox[2]-1900, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CMO5", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CMO5", 1, "CMO1", 0,AliACORDEConstants::Instance()->Depth()/2-pbox[1], pbox[2]-1900, 0, "MANY"); // Small blocks of molasse betwen the blocks CMO2, CMO5 and PM25. Ok pbox[0] = (pm25X - pm25radius - 1170)/2; pbox[1] = 1000; - gMC->Gsvolu("CM16", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CM16", 1, "CMO1", 1170 + pbox[0], -AliACORDEConstants::Instance()->Depth()/2+pbox[1], pbox[2] - 1900, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CM16", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CM16", 1, "CMO1", 1170 + pbox[0], -AliACORDEConstants::Instance()->Depth()/2+pbox[1], pbox[2] - 1900, 0, "MANY"); // Molasse around the shafts. AliMatrix(idrotm[2003], 0, 0, 90, 0, 90, 90); @@ -311,80 +311,80 @@ ptubs[0])/2; ptubs[2] = (2300 - (5150 - AliACORDEConstants::Instance()->Depth()))/2; ptubs[3] = 180 + kRaddeg*TMath::ASin(1070/ptubs[0]); ptubs[4] = 180 - kRaddeg*TMath::ASin(1070/ptubs[0]); - gMC->Gsvolu("CMO6", "TUBS", idtmed[1123], ptubs, 5); - gMC->Gspos("CMO6", 1, "CMO1", px24X, ptubs[2] - AliACORDEConstants::Instance()->Depth()/2, px24Z, idrotm[2003], "MANY"); + TVirtualMC::GetMC()->Gsvolu("CMO6", "TUBS", idtmed[1123], ptubs, 5); + TVirtualMC::GetMC()->Gspos("CMO6", 1, "CMO1", px24X, ptubs[2] - AliACORDEConstants::Instance()->Depth()/2, px24Z, idrotm[2003], "MANY"); // Around the PX24, the closed section. OK Float_t ptube[3]; ptube[0] = px24radius + concreteWidth; ptube[1] = ptube[0] + 1000; ptube[2] = (5150 - 2300)/2; - gMC->Gsvolu("CMO7", "TUBE", idtmed[1123], ptube, 3); - gMC->Gspos("CMO7", 1, "CMO1", px24X, AliACORDEConstants::Instance()->Depth()/2 - ptube[2], px24Z, idrotm[2003], "MANY"); + TVirtualMC::GetMC()->Gsvolu("CMO7", "TUBE", idtmed[1123], ptube, 3); + TVirtualMC::GetMC()->Gspos("CMO7", 1, "CMO1", px24X, AliACORDEConstants::Instance()->Depth()/2 - ptube[2], px24Z, idrotm[2003], "MANY"); // Around PM25. OK ptube[0] = pm25radius + concreteWidth; ptube[1] = ptube[0] + 400; ptube[2] = AliACORDEConstants::Instance()->Depth()/2; - gMC->Gsvolu("CMO8", "TUBE", idtmed[1123], ptube, 3); - gMC->Gspos("CMO8", 1, "CMO1", pm25X, 0, pm25Z, idrotm[2003], "MANY"); + TVirtualMC::GetMC()->Gsvolu("CMO8", "TUBE", idtmed[1123], ptube, 3); + TVirtualMC::GetMC()->Gspos("CMO8", 1, "CMO1", pm25X, 0, pm25Z, idrotm[2003], "MANY"); // On both sides of the PM25 along the HALL. pbox[0] = (2100 + pm25radius - 1170)/2; pbox[1] = AliACORDEConstants::Instance()->Depth()/2; pbox[2] = (3*px24radius - pm25radius)/2; - gMC->Gsvolu("CM18", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CM18", 1, "CMO1", 2100, 0, pbox[2] + pm25radius, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CM18", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CM18", 1, "CMO1", 2100, 0, pbox[2] + pm25radius, 0, "MANY"); pbox[2] = (1900 - pm25radius)/2; - gMC->Gsvolu("CM19", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CM19", 1, "CMO1", 2100, 0, -pbox[2] - pm25radius, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CM19", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CM19", 1, "CMO1", 2100, 0, -pbox[2] - pm25radius, 0, "MANY"); // Around the PGC2. OK ptube[0] = pgc2radius + concreteWidth; ptube[1] = 2987.7 - 740; ptube[2] = AliACORDEConstants::Instance()->Depth()/2; - gMC->Gsvolu("CMO9", "TUBE", idtmed[1123], ptube, 3); - gMC->Gspos("CMO9", 1, "CMO1", pgc2X, 0, pgc2Z, idrotm[2003], "MANY"); + TVirtualMC::GetMC()->Gsvolu("CMO9", "TUBE", idtmed[1123], ptube, 3); + TVirtualMC::GetMC()->Gspos("CMO9", 1, "CMO1", pgc2X, 0, pgc2Z, idrotm[2003], "MANY"); // On both sides of the PGC2.OK pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - 1100 - 375)/2; pbox[1] = AliACORDEConstants::Instance()->Depth()/2; pbox[2] = pgc2radius + concreteWidth; - gMC->Gsvolu("CM10", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CM10", 1, "CMO1", AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - pbox[0], 0, pgc2Z, 0, "MANY"); - gMC->Gspos("CM10", 2, "CMO1", -AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) + pbox[0], 0, pgc2Z, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CM10", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CM10", 1, "CMO1", AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - pbox[0], 0, pgc2Z, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("CM10", 2, "CMO1", -AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) + pbox[0], 0, pgc2Z, 0, "MANY"); // big block of molasse behind the PX24. OK pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad); pbox[1] = AliACORDEConstants::Instance()->Depth()/2; pbox[2] = (pbox[0] - (2300 + 1150 + 100))/2; - gMC->Gsvolu("CM12", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CM12", 1, "CMO1", px24X, 0, px24Z + px24radius + concreteWidth + pbox[2], 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CM12", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CM12", 1, "CMO1", px24X, 0, px24Z + px24radius + concreteWidth + pbox[2], 0, "MANY"); // big block of molasse in the opposite side of the PM25. OK pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - 1150)/2; pbox[1] = AliACORDEConstants::Instance()->Depth()/2; pbox[2] = (1900 + 2300 + 1150)/2; - gMC->Gsvolu("CM13", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CM13", 1, "CMO1", -1150 - pbox[0], 0, pbox[2] - 1900, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CM13", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CM13", 1, "CMO1", -1150 - pbox[0], 0, pbox[2] - 1900, 0, "MANY"); // big block of molasse behind the PM25. OK pbox[0] = (AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad) - (2100 + 910/2 + 100))/2; pbox[1] = AliACORDEConstants::Instance()->Depth()/2; pbox[2] = (1900 + 2300 + 1150)/2; - gMC->Gsvolu("CM14", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CM14", 1, "CMO1", pm25X + pm25radius + concreteWidth + pbox[0], 0, pbox[2] - 1900, 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CM14", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CM14", 1, "CMO1", pm25X + pm25radius + concreteWidth + pbox[0], 0, pbox[2] - 1900, 0, "MANY"); // big block of molasse behind the PGC2. OK pbox[0] = AliACORDEConstants::Instance()->Depth()*TMath::Tan(67.5*kDegrad); pbox[1] = AliACORDEConstants::Instance()->Depth()/2; pbox[2] = (pbox[0] - (2987.7 + 1900 + 1100/2 + 100))/2; - gMC->Gsvolu("CM15", "BOX", idtmed[1123], pbox, 3); - gMC->Gspos("CM15", 1, "CMO1", 0, 0, -pbox[0] + pbox[2], 0, "MANY"); + TVirtualMC::GetMC()->Gsvolu("CM15", "BOX", idtmed[1123], pbox, 3); + TVirtualMC::GetMC()->Gspos("CM15", 1, "CMO1", 0, 0, -pbox[0] + pbox[2], 0, "MANY"); - gMC->Gspos("CMO1",1,"ACORDE",0,AliACORDEConstants::Instance()->Depth()/2,0,0,"MANY"); + TVirtualMC::GetMC()->Gspos("CMO1",1,"ACORDE",0,AliACORDEConstants::Instance()->Depth()/2,0,0,"MANY"); } @@ -427,21 +427,21 @@ void AliACORDEv0::CreateAcorde() box[0] = constants->ModuleLength()/2; box[1] = constants->ModuleHeight()/2; box[2] = constants->ModuleWidth()/2; - gMC->Gsvolu("ACORDE1", "BOX", idtmed[1114], box, 3); + TVirtualMC::GetMC()->Gsvolu("ACORDE1", "BOX", idtmed[1114], box, 3); // The scintillators box[0] = constants->PlasticLength()/2; box[1] = constants->PlasticHeight()/2; box[2] = constants->PlasticWidth()/2; - gMC->Gsvolu("ACORDE2", "BOX", idtmed[1112], box, 3); + TVirtualMC::GetMC()->Gsvolu("ACORDE2", "BOX", idtmed[1112], box, 3); // it is important to keep this order for easy assignment of // a volume to a physical module: placed_at = box[1]+constants->ProfileThickness() - constants->ModuleHeight()/2+small; - gMC->Gspos("ACORDE2", 1, "ACORDE1", 0, placed_at, 0, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE2", 1, "ACORDE1", 0, placed_at, 0, 0, "MANY"); placed_at = placed_at + 2.0*box[1]+small; - gMC->Gspos("ACORDE2", 2, "ACORDE1", 0, placed_at, 0, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE2", 2, "ACORDE1", 0, placed_at, 0, 0, "MANY"); // The metallic frame: long walls of box @@ -453,57 +453,57 @@ void AliACORDEv0::CreateAcorde() box[0] = constants->ModuleLength()/2; box[1] = constants->ModuleHeight()/2; box[2] = constants->ProfileThickness()/2.0; - gMC->Gsvolu("ACORDE3", "BOX", idtmed[1108], box, 3); + TVirtualMC::GetMC()->Gsvolu("ACORDE3", "BOX", idtmed[1108], box, 3); // front wall placed_at = constants->ModuleWidth()/2-constants->ProfileThickness()/2.0; - gMC->Gspos("ACORDE3", 1, "ACORDE1", 0, 0, placed_at, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE3", 1, "ACORDE1", 0, 0, placed_at, 0, "MANY"); // back wall - gMC->Gspos("ACORDE3", 2, "ACORDE1", 0, 0, -placed_at , 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE3", 2, "ACORDE1", 0, 0, -placed_at , 0, "MANY"); // The metallic frame: end caps box[0] = constants->ProfileThickness()/2.0; box[1] = constants->ModuleHeight()/2; box[2] = constants->ModuleWidth()/2; - gMC->Gsvolu("ACORDE4", "BOX", idtmed[1108], box, 3); + TVirtualMC::GetMC()->Gsvolu("ACORDE4", "BOX", idtmed[1108], box, 3); // right cap placed_at = constants->ModuleLength()/2-constants->ProfileThickness()/2.0; - gMC->Gspos("ACORDE4", 1, "ACORDE1", placed_at, 0, 0, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE4", 1, "ACORDE1", placed_at, 0, 0, 0, "MANY"); // left cap - gMC->Gspos("ACORDE4", 2, "ACORDE1", -placed_at, 0, 0, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE4", 2, "ACORDE1", -placed_at, 0, 0, 0, "MANY"); // The metallic frame: the profile, long stripes box[0] = constants->ModuleLength()/2.0; box[1] = constants->ProfileThickness()/2; box[2] = constants->ProfileWidth()/2; - gMC->Gsvolu("ACORDE5", "BOX", idtmed[1108], box, 3); + TVirtualMC::GetMC()->Gsvolu("ACORDE5", "BOX", idtmed[1108], box, 3); // upper front placed_at = constants->ModuleHeight()/2-box[1]; placed_at2 = constants->ModuleWidth()/2- constants->ProfileThickness()-box[2]; - gMC->Gspos("ACORDE5", 1, "ACORDE1",0,placed_at,placed_at2, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE5", 1, "ACORDE1",0,placed_at,placed_at2, 0, "MANY"); // upper back - gMC->Gspos("ACORDE5", 2, "ACORDE1",0,placed_at,-placed_at2, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE5", 2, "ACORDE1",0,placed_at,-placed_at2, 0, "MANY"); // lower front - gMC->Gspos("ACORDE5", 3, "ACORDE1",0,-placed_at,placed_at2, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE5", 3, "ACORDE1",0,-placed_at,placed_at2, 0, "MANY"); // lower back - gMC->Gspos("ACORDE5", 4, "ACORDE1",0,-placed_at,-placed_at2, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE5", 4, "ACORDE1",0,-placed_at,-placed_at2, 0, "MANY"); // The metallic frame: the profile, long stripes box[0] = constants->ProfileWidth()/2.0; box[1] = constants->ProfileThickness()/2; box[2] = constants->ModuleWidth()/2-constants->ProfileWidth(); - gMC->Gsvolu("ACORDE6", "BOX", idtmed[1108], box, 3); + TVirtualMC::GetMC()->Gsvolu("ACORDE6", "BOX", idtmed[1108], box, 3); // upper right placed_at = constants->ModuleHeight()/2-box[1]; placed_at2 = constants->ModuleLength()/2- constants->ProfileThickness()-box[0]; - gMC->Gspos("ACORDE6", 1, "ACORDE1",placed_at2,placed_at,0, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE6", 1, "ACORDE1",placed_at2,placed_at,0, 0, "MANY"); // upper left - gMC->Gspos("ACORDE6", 2, "ACORDE1",-placed_at2,placed_at,0, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE6", 2, "ACORDE1",-placed_at2,placed_at,0, 0, "MANY"); // lower right - gMC->Gspos("ACORDE6", 3, "ACORDE1",placed_at2,-placed_at,0, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE6", 3, "ACORDE1",placed_at2,-placed_at,0, 0, "MANY"); // lower left - gMC->Gspos("ACORDE6", 4, "ACORDE1",-placed_at2,-placed_at,0, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("ACORDE6", 4, "ACORDE1",-placed_at2,-placed_at,0, 0, "MANY"); // End of MODULE definition @@ -530,78 +530,78 @@ void AliACORDEv0::CreateAcorde() // first column, except first and last modules for (Int_t copy = 2; copy < 10; copy++) - gMC->Gspos("ACORDE1",copy,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",copy,"ALIC", constants->OldModulePositionX(copy-1), constants->OldModulePositionY(copy-1), constants->OldModulePositionZ(copy-1), idrotm[232], "MANY"); // second column for (Int_t copy = 11; copy < 21; copy++) - gMC->Gspos("ACORDE1",copy,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",copy,"ALIC", constants->OldModulePositionX(copy-1), constants->OldModulePositionY(copy-1), constants->OldModulePositionZ(copy-1), idrotm[232], "MANY"); // third and fourth columns for (Int_t copy = 21; copy < 41; copy++) - gMC->Gspos("ACORDE1",copy,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",copy,"ALIC", constants->OldModulePositionX(copy-1), constants->OldModulePositionY(copy-1), constants->OldModulePositionZ(copy-1), 0, "MANY"); // fifth column for (Int_t copy = 41; copy < 51; copy++) - gMC->Gspos("ACORDE1",copy,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",copy,"ALIC", constants->OldModulePositionX(copy-1), constants->OldModulePositionY(copy-1), constants->OldModulePositionZ(copy-1), idrotm[231], "MANY"); // last column, except first and last modules for (Int_t copy = 52; copy < 60; copy++) - gMC->Gspos("ACORDE1",copy,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",copy,"ALIC", constants->OldModulePositionX(copy-1), constants->OldModulePositionY(copy-1), constants->OldModulePositionZ(copy-1), idrotm[231], "MANY"); // the last four modules if (Get4CentralModulesGeometry()) { - gMC->Gspos("ACORDE1",1,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",1,"ALIC", constants->OldExtraModulePositionX(), constants->OldExtraModulePositionY(), constants->OldExtraModulePositionZ(0), 0, "MANY"); - gMC->Gspos("ACORDE1",10,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",10,"ALIC", constants->OldExtraModulePositionX(), constants->OldExtraModulePositionY(), constants->OldExtraModulePositionZ(1), 0, "MANY"); - gMC->Gspos("ACORDE1",51,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",51,"ALIC", constants->OldExtraModulePositionX(), constants->OldExtraModulePositionY(), constants->OldExtraModulePositionZ(2), 0, "MANY"); - gMC->Gspos("ACORDE1",60,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",60,"ALIC", constants->OldExtraModulePositionX(), constants->OldExtraModulePositionY(), constants->OldExtraModulePositionZ(3), 0, "MANY"); } else { - gMC->Gspos("ACORDE1",1,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",1,"ALIC", constants->OldModulePositionX(0), constants->OldModulePositionY(0), constants->OldModulePositionZ(0), idrotm[232], "MANY"); - gMC->Gspos("ACORDE1",10,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",10,"ALIC", constants->OldModulePositionX(9), constants->OldModulePositionY(9), constants->OldModulePositionZ(9), idrotm[232], "MANY"); - gMC->Gspos("ACORDE1",51,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",51,"ALIC", constants->OldModulePositionX(50), constants->OldModulePositionY(50), constants->OldModulePositionZ(50), idrotm[231], "MANY"); - gMC->Gspos("ACORDE1",60,"ALIC", + TVirtualMC::GetMC()->Gspos("ACORDE1",60,"ALIC", constants->OldModulePositionX(59), constants->OldModulePositionY(59), constants->OldModulePositionZ(59), @@ -655,7 +655,7 @@ void AliACORDEv0::StepManager() static Float_t eloss; static Float_t step; // scintillator volume - static Int_t idScint = gMC->VolId("ACORDE2"); + static Int_t idScint = TVirtualMC::GetMC()->VolId("ACORDE2"); // local variables Int_t copy; @@ -663,19 +663,19 @@ void AliACORDEv0::StepManager() TLorentzVector mom; // only charged tracks - if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return; + if ( !TVirtualMC::GetMC()->TrackCharge() || !TVirtualMC::GetMC()->IsTrackAlive() ) return; // only in sensitive material - if (gMC->CurrentVolID(copy) == idScint) { - step += gMC->TrackStep(); - eloss += gMC->Edep(); + if (TVirtualMC::GetMC()->CurrentVolID(copy) == idScint) { + step += TVirtualMC::GetMC()->TrackStep(); + eloss += TVirtualMC::GetMC()->Edep(); // set all hit variables except eloss which is resetted // set volume variables - if (gMC->IsTrackEntering()) { + if (TVirtualMC::GetMC()->IsTrackEntering()) { eloss = 0.0; step = 0.0; - gMC->TrackPosition(pos); - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackPosition(pos); + TVirtualMC::GetMC()->TrackMomentum(mom); // hit // [0] = PID // [1-3] = x, y, z @@ -683,32 +683,32 @@ void AliACORDEv0::StepManager() // [5-7] = px, py, pz // [8] = energy // [9] = energy loss - hits[0] = (Float_t ) gMC->TrackPid(); + hits[0] = (Float_t ) TVirtualMC::GetMC()->TrackPid(); hits[1] = pos[0]; hits[2] = pos[1]; hits[3] = pos[2]; - hits[4] = gMC->TrackTime(); + hits[4] = TVirtualMC::GetMC()->TrackTime(); hits[5] = mom[0]; hits[6] = mom[1]; hits[7] = mom[2]; - hits[8] = gMC->Etot(); + hits[8] = TVirtualMC::GetMC()->Etot(); // volume: // [0] = module number 1-60 (1==>(0-0), 60 (5-9) // [1] = Plastic number: 0 (down) to 1 (up) Int_t copyPlastic; // plastic: down=1, up=2 Int_t copyModule; // module: 1-60 - gMC->CurrentVolID(copyPlastic); - gMC->CurrentVolOffID(1, copyModule); + TVirtualMC::GetMC()->CurrentVolID(copyPlastic); + TVirtualMC::GetMC()->CurrentVolOffID(1, copyModule); // module vol[0] = copyModule; // plastic: 0 = down, 1 = up vol[1] = copyPlastic; - } // end if gMC->IsTrackEntering() + } // end if TVirtualMC::GetMC()->IsTrackEntering() // set hit[9] = total energy loss and book hit - if( gMC->IsTrackExiting() || - gMC->IsTrackStop() || - gMC->IsTrackDisappeared()){ + if( TVirtualMC::GetMC()->IsTrackExiting() || + TVirtualMC::GetMC()->IsTrackStop() || + TVirtualMC::GetMC()->IsTrackDisappeared()){ hits[9] = eloss; hits[10] = step; eloss = 0.0; diff --git a/ACORDE/AliACORDEv1.cxx b/ACORDE/AliACORDEv1.cxx index 38a4d0bedd8..f9762cf211d 100644 --- a/ACORDE/AliACORDEv1.cxx +++ b/ACORDE/AliACORDEv1.cxx @@ -727,27 +727,27 @@ void AliACORDEv1::StepManager() static Float_t eloss; static Float_t step; // scintillator volume - static Int_t idScint = gMC->VolId("ACORDESCINTILLATORMODULE"); + static Int_t idScint = TVirtualMC::GetMC()->VolId("ACORDESCINTILLATORMODULE"); // local variables Int_t copy; TLorentzVector pos; TLorentzVector mom; // only charged tracks - if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return; + if ( !TVirtualMC::GetMC()->TrackCharge() || !TVirtualMC::GetMC()->IsTrackAlive() ) return; // only in sensitive material - if (gMC->CurrentVolID(copy) == idScint) { + if (TVirtualMC::GetMC()->CurrentVolID(copy) == idScint) { - step += gMC->TrackStep(); - eloss += gMC->Edep(); + step += TVirtualMC::GetMC()->TrackStep(); + eloss += TVirtualMC::GetMC()->Edep(); // set all hit variables except eloss which is resetted // set volume variables - if (gMC->IsTrackEntering()) { + if (TVirtualMC::GetMC()->IsTrackEntering()) { eloss = 0.0; step = 0.0; - gMC->TrackPosition(pos); - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackPosition(pos); + TVirtualMC::GetMC()->TrackMomentum(mom); // hit // [0] = PID // [1-3] = x, y, z @@ -755,35 +755,35 @@ void AliACORDEv1::StepManager() // [5-7] = px, py, pz // [8] = energy // [9] = energy loss - hits[0] = (Float_t ) gMC->TrackPid(); + hits[0] = (Float_t ) TVirtualMC::GetMC()->TrackPid(); hits[1] = pos[0]; hits[2] = pos[1]; hits[3] = pos[2]; - hits[4] = gMC->TrackTime(); + hits[4] = TVirtualMC::GetMC()->TrackTime(); hits[5] = mom[0]; hits[6] = mom[1]; hits[7] = mom[2]; - hits[8] = gMC->Etot(); + hits[8] = TVirtualMC::GetMC()->Etot(); // volume: // [0] = module number 1-60 (1==>(0-0), 60 (5-9) // [1] = Plastic number: 0 (down) to 1 (up) Int_t copyPlastic; // plastic: down=1, up=2 Int_t copyModule; // module: 1-60 - gMC->CurrentVolID(copyPlastic); - gMC->CurrentVolOffID(1, copyModule); + TVirtualMC::GetMC()->CurrentVolID(copyPlastic); + TVirtualMC::GetMC()->CurrentVolOffID(1, copyModule); // module vol[0] = copyModule; // plastic: 0 = down, 1 = up vol[1] = copyPlastic - 4 ; // !!!!!!! // vol[1] = copyPlastic; - } // end if gMC->IsTrackEntering() + } // end if TVirtualMC::GetMC()->IsTrackEntering() // set hit[9] = total energy loss and book hit - if( gMC->IsTrackExiting() || - gMC->IsTrackStop() || - gMC->IsTrackDisappeared()){ + if( TVirtualMC::GetMC()->IsTrackExiting() || + TVirtualMC::GetMC()->IsTrackStop() || + TVirtualMC::GetMC()->IsTrackDisappeared()){ hits[9] = eloss; hits[10] = step; eloss = 0.0; diff --git a/AD/AliADv1.cxx b/AD/AliADv1.cxx index d0f0867ba6a..74de1bbbd74 100644 --- a/AD/AliADv1.cxx +++ b/AD/AliADv1.cxx @@ -426,16 +426,16 @@ void AliADv1::StepManager() // Get sensitive volumes id (scintillator pads) - static Int_t idADA = gMC->VolId( "ADApad" ); - static Int_t idADC = gMC->VolId( "ADCpad" ); + static Int_t idADA = TVirtualMC::GetMC()->VolId( "ADApad" ); + static Int_t idADC = TVirtualMC::GetMC()->VolId( "ADCpad" ); // We keep only charged tracks : - // if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return; + // if ( !TVirtualMC::GetMC()->TrackCharge() || !TVirtualMC::GetMC()->IsTrackAlive() ) return; // We keep charged and non-charged tracks : - if ( !gMC->IsTrackAlive() ) return; + if ( !TVirtualMC::GetMC()->IsTrackAlive() ) return; Int_t copy; - Int_t current_volid = gMC->CurrentVolID( copy ); + Int_t current_volid = TVirtualMC::GetMC()->CurrentVolID( copy ); // check is the track is in a sensitive volume if( current_volid != idADA && current_volid != idADC ) { @@ -445,7 +445,7 @@ void AliADv1::StepManager() // First read the position, otherwise weird reults! //ecv Double_t s[3]; Float_t x[3]; - gMC->TrackPosition( s[0], s[1], s[2] ); + TVirtualMC::GetMC()->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 @@ -453,11 +453,11 @@ void AliADv1::StepManager() // Get sector copy (1,2,3,4) ( 1 level up from pad ) Int_t sect; - gMC->CurrentVolOffID( 1, sect ); + TVirtualMC::GetMC()->CurrentVolOffID( 1, sect ); // Get Detector copy (1,2) ( 2 levels up from pad ) Int_t detc; - gMC->CurrentVolOffID( 2, detc ); + TVirtualMC::GetMC()->CurrentVolOffID( 2, detc ); // Sector number // ADA1 = 10-14 @@ -477,8 +477,8 @@ void AliADv1::StepManager() photoCathodeEfficiency = fADAPhotoCathodeEfficiency; } - Float_t destep_ad = gMC->Edep(); - Float_t step_ad = gMC->TrackStep(); + Float_t destep_ad = TVirtualMC::GetMC()->Edep(); + Float_t step_ad = TVirtualMC::GetMC()->TrackStep(); Int_t nPhotonsInStep_ad = Int_t( destep_ad / (lightYield_ad * 1e-9) ); nPhotonsInStep_ad = gRandom->Poisson( nPhotonsInStep_ad ); @@ -491,10 +491,10 @@ void AliADv1::StepManager() eloss_ad += destep_ad; tlength_ad += step_ad; - if ( gMC->IsTrackEntering() ) { + if ( TVirtualMC::GetMC()->IsTrackEntering() ) { nPhotons_ad = nPhotonsInStep_ad; Double_t p[4]; - gMC->TrackMomentum( p[0], p[1], p[2], p[3] ); + TVirtualMC::GetMC()->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(); @@ -517,7 +517,7 @@ void AliADv1::StepManager() hits_ad[5] = p[0]; // Px hits_ad[6] = p[1]; // Py hits_ad[7] = p[2]; // Pz - hits_ad[8] = 1.0e09*gMC->TrackTime(); // in ns! + hits_ad[8] = 1.0e09*TVirtualMC::GetMC()->TrackTime(); // in ns! tlength_ad = 0.0; eloss_ad = 0.0; @@ -527,7 +527,7 @@ void AliADv1::StepManager() nPhotons_ad += nPhotonsInStep_ad; - if( gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared() ) { + if( TVirtualMC::GetMC()->IsTrackExiting() || TVirtualMC::GetMC()->IsTrackStop() || TVirtualMC::GetMC()->IsTrackDisappeared() ) { // Set integer values vol_ad[3] = nPhotons_ad; @@ -568,7 +568,7 @@ void AliADv1::StepManager() } // Do we need track reference ???? - // if( gMC->IsTrackEntering() || gMC->IsTrackExiting() ) { + // if( TVirtualMC::GetMC()->IsTrackEntering() || TVirtualMC::GetMC()->IsTrackExiting() ) { // AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), 49); // } } diff --git a/ANALYSIS/AliAODv0KineCuts.cxx b/ANALYSIS/AliAODv0KineCuts.cxx index 9168b10dfcc..acb491f15b5 100644 --- a/ANALYSIS/AliAODv0KineCuts.cxx +++ b/ANALYSIS/AliAODv0KineCuts.cxx @@ -556,9 +556,9 @@ Bool_t AliAODv0KineCuts::CaseLambda(AliAODv0* const v0, Int_t &pdgV0, Int_t &pd kfMother[1] = CreateMotherParticle(daughter[0], daughter[1], TMath::Abs(kPiPlus), TMath::Abs(kProton)); if(!kfMother[1]) return kFALSE; - Float_t dMass[2] = {TMath::Abs(mMass[0] - cL0mass), TMath::Abs(mMass[1] - cL0mass)}; + Float_t dMass[2] = {static_cast(TMath::Abs(mMass[0] - cL0mass)), static_cast(TMath::Abs(mMass[1] - cL0mass))}; - Float_t p[2] = {daughter[0]->P(), daughter[1]->P()}; + Float_t p[2] = {static_cast(daughter[0]->P()), static_cast(daughter[1]->P())}; // check the 3 lambda - antilambda variables Int_t check[2] = {-1, -1}; // 0 : lambda, 1 : antilambda diff --git a/ANALYSIS/AliESDv0KineCuts.cxx b/ANALYSIS/AliESDv0KineCuts.cxx index 2a348520dbc..4e5735b9f86 100644 --- a/ANALYSIS/AliESDv0KineCuts.cxx +++ b/ANALYSIS/AliESDv0KineCuts.cxx @@ -559,14 +559,14 @@ Bool_t AliESDv0KineCuts::CaseLambda(AliESDv0* const v0, Int_t &pdgV0, Int_t &pd kfMother[1] = CreateMotherParticle(daughter[0], daughter[1], TMath::Abs(kPiPlus), TMath::Abs(kProton)); if(!kfMother[1]) return kFALSE; - Float_t dMass[2] = {TMath::Abs(mMass[0] - cL0mass), TMath::Abs(mMass[1] - cL0mass)}; + Float_t dMass[2] = {static_cast(TMath::Abs(mMass[0] - cL0mass)), static_cast(TMath::Abs(mMass[1] - cL0mass))}; AliESDtrack* d[2]; d[0] = dynamic_cast(fEvent->GetTrack(pIndex)); d[1] = dynamic_cast(fEvent->GetTrack(nIndex)); if(!d[0] || !d[1]) return kFALSE; - Float_t p[2] = {d[0]->GetP(), d[1]->GetP()}; + Float_t p[2] = {static_cast(d[0]->GetP()), static_cast(d[1]->GetP())}; // check the 3 lambda - antilambda variables Int_t check[2] = {-1, -1}; // 0 : lambda, 1 : antilambda diff --git a/BCM/AliBCM.cxx b/BCM/AliBCM.cxx index 5fda6f7b4e8..63dc63afaf0 100644 --- a/BCM/AliBCM.cxx +++ b/BCM/AliBCM.cxx @@ -83,27 +83,27 @@ void AliBCM::StepManager() Int_t copy = -1; - if (gMC->TrackCharge() && - gMC->CurrentVolID(copy) == fVolId) { + if (TVirtualMC::GetMC()->TrackCharge() && + TVirtualMC::GetMC()->CurrentVolID(copy) == fVolId) { // Charged particle inside sensitive volume // // Entering - if (gMC->IsTrackEntering()) { + if (TVirtualMC::GetMC()->IsTrackEntering()) { edepT = 0.; - gMC->TrackPosition(xh[0],xh[1],xh[2]); - xh[3] = gMC->TrackTime(); + TVirtualMC::GetMC()->TrackPosition(xh[0],xh[1],xh[2]); + xh[3] = TVirtualMC::GetMC()->TrackTime(); } // // Any step - if ((edep = gMC->Edep()) > 0.) { + if ((edep = TVirtualMC::GetMC()->Edep()) > 0.) { Double_t x[3]; - gMC->TrackPosition(x[0],x[1],x[2]); + TVirtualMC::GetMC()->TrackPosition(x[0],x[1],x[2]); edepT += edep; } // // Exiting - if(gMC->IsTrackExiting()||gMC->IsTrackStop()||gMC->IsTrackDisappeared()) + if(TVirtualMC::GetMC()->IsTrackExiting()||TVirtualMC::GetMC()->IsTrackStop()||TVirtualMC::GetMC()->IsTrackDisappeared()) { Int_t track = gAlice->GetMCApp()->GetCurrentTrackNumber(); TClonesArray &lhits = *fHits; @@ -198,7 +198,7 @@ void AliBCM::Init() // // Here the BCM initialisation code (if any!) - fVolId = gMC->VolId("BCMpcd"); + fVolId = TVirtualMC::GetMC()->VolId("BCMpcd"); } void AliBCM::MakeBranch(Option_t* option) diff --git a/EMCAL/AliEMCAL.cxx b/EMCAL/AliEMCAL.cxx index 92625201865..58fcab1c4b0 100644 --- a/EMCAL/AliEMCAL.cxx +++ b/EMCAL/AliEMCAL.cxx @@ -140,53 +140,53 @@ void AliEMCAL::InitConstants() // cutele = cutgam = 5.e-4; // } -// gMC->Gstpar(idtmed[1600],"CUTGAM", cutgam); -// gMC->Gstpar(idtmed[1600],"CUTELE", cutele); // 1MEV -> 0.1MEV; 15-aug-05 -// gMC->Gstpar(idtmed[1600],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM -// gMC->Gstpar(idtmed[1600],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM +// TVirtualMC::GetMC()->Gstpar(idtmed[1600],"CUTGAM", cutgam); +// TVirtualMC::GetMC()->Gstpar(idtmed[1600],"CUTELE", cutele); // 1MEV -> 0.1MEV; 15-aug-05 +// TVirtualMC::GetMC()->Gstpar(idtmed[1600],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM +// TVirtualMC::GetMC()->Gstpar(idtmed[1600],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM // // --- Generate explicitly delta rays in Lead --- -// gMC->Gstpar(idtmed[1600], "LOSS", 3) ; -// gMC->Gstpar(idtmed[1600], "DRAY", 1) ; -// gMC->Gstpar(idtmed[1600], "DCUTE", cutele) ; -// gMC->Gstpar(idtmed[1600], "DCUTM", cutele) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1600], "LOSS", 3) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1600], "DRAY", 1) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1600], "DCUTE", cutele) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1600], "DCUTM", cutele) ; // // --- in aluminium parts --- -// gMC->Gstpar(idtmed[1602],"CUTGAM", cutgam) ; -// gMC->Gstpar(idtmed[1602],"CUTELE", cutele) ; -// gMC->Gstpar(idtmed[1602],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM -// gMC->Gstpar(idtmed[1602],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM -// gMC->Gstpar(idtmed[1602], "LOSS",3.) ; -// gMC->Gstpar(idtmed[1602], "DRAY",1.) ; -// gMC->Gstpar(idtmed[1602], "DCUTE", cutele) ; -// gMC->Gstpar(idtmed[1602], "DCUTM", cutele) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1602],"CUTGAM", cutgam) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1602],"CUTELE", cutele) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1602],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM +// TVirtualMC::GetMC()->Gstpar(idtmed[1602],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM +// TVirtualMC::GetMC()->Gstpar(idtmed[1602], "LOSS",3.) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1602], "DRAY",1.) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1602], "DCUTE", cutele) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1602], "DCUTM", cutele) ; // // --- and finally thresholds for photons and electrons in the scintillator --- -// gMC->Gstpar(idtmed[1601],"CUTGAM", cutgam) ; -// gMC->Gstpar(idtmed[1601],"CUTELE", cutele) ;// 1MEV -> 0.1MEV; 15-aug-05 -// gMC->Gstpar(idtmed[1601],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM -// gMC->Gstpar(idtmed[1601],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM -// gMC->Gstpar(idtmed[1601], "LOSS",3) ; // generate delta rays -// gMC->Gstpar(idtmed[1601], "DRAY",1) ; -// gMC->Gstpar(idtmed[1601], "DCUTE", cutele) ; -// gMC->Gstpar(idtmed[1601], "DCUTM", cutele) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1601],"CUTGAM", cutgam) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1601],"CUTELE", cutele) ;// 1MEV -> 0.1MEV; 15-aug-05 +// TVirtualMC::GetMC()->Gstpar(idtmed[1601],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM +// TVirtualMC::GetMC()->Gstpar(idtmed[1601],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM +// TVirtualMC::GetMC()->Gstpar(idtmed[1601], "LOSS",3) ; // generate delta rays +// TVirtualMC::GetMC()->Gstpar(idtmed[1601], "DRAY",1) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1601], "DCUTE", cutele) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1601], "DCUTM", cutele) ; // // S steel - -// gMC->Gstpar(idtmed[1603],"CUTGAM", cutgam); -// gMC->Gstpar(idtmed[1603],"CUTELE", cutele); -// gMC->Gstpar(idtmed[1603],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM -// gMC->Gstpar(idtmed[1603],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM +// TVirtualMC::GetMC()->Gstpar(idtmed[1603],"CUTGAM", cutgam); +// TVirtualMC::GetMC()->Gstpar(idtmed[1603],"CUTELE", cutele); +// TVirtualMC::GetMC()->Gstpar(idtmed[1603],"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM +// TVirtualMC::GetMC()->Gstpar(idtmed[1603],"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM // // --- Generate explicitly delta rays -// gMC->Gstpar(idtmed[1603], "LOSS",3); -// gMC->Gstpar(idtmed[1603], "DRAY",1); -// gMC->Gstpar(idtmed[1603], "DCUTE", cutele) ; -// gMC->Gstpar(idtmed[1603], "DCUTM", cutele) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1603], "LOSS",3); +// TVirtualMC::GetMC()->Gstpar(idtmed[1603], "DRAY",1); +// TVirtualMC::GetMC()->Gstpar(idtmed[1603], "DCUTE", cutele) ; +// TVirtualMC::GetMC()->Gstpar(idtmed[1603], "DCUTM", cutele) ; // AliEMCALGeometry* geom = GetGeometry(); // if(geom->GetILOSS()>=0) { -// for(int i=1600; i<=1603; i++) gMC->Gstpar(idtmed[i], "LOSS", geom->GetILOSS()) ; +// for(int i=1600; i<=1603; i++) TVirtualMC::GetMC()->Gstpar(idtmed[i], "LOSS", geom->GetILOSS()) ; // } // if(geom->GetIHADR()>=0) { -// for(int i=1600; i<=1603; i++) gMC->Gstpar(idtmed[i], "HADR", geom->GetIHADR()) ; +// for(int i=1600; i<=1603; i++) TVirtualMC::GetMC()->Gstpar(idtmed[i], "HADR", geom->GetIHADR()) ; // } // } @@ -439,9 +439,9 @@ AliEMCALGeometry* AliEMCAL::GetGeometry() const // Pass the transpor model name (Geant3, Geant4, Fluka) and title to the geometry TString mcname = ""; TString mctitle = ""; - if(gMC){ - mcname = gMC->GetName() ; - mctitle = gMC->GetTitle() ; + if(TVirtualMC::GetMC()){ + mcname = TVirtualMC::GetMC()->GetName() ; + mctitle = TVirtualMC::GetMC()->GetTitle() ; } TString geoName(GetTitle()); diff --git a/EMCAL/AliEMCALTracker.cxx b/EMCAL/AliEMCALTracker.cxx index b571bef7d8f..482478168ab 100644 --- a/EMCAL/AliEMCALTracker.cxx +++ b/EMCAL/AliEMCALTracker.cxx @@ -409,7 +409,7 @@ Int_t AliEMCALTracker::FindMatchedCluster(AliESDtrack *track) Int_t nclusters = fClusters->GetEntries(); for (Int_t ic=0; icAt(ic); - Float_t clsPos[3] = {cluster->X(),cluster->Y(),cluster->Z()}; + Float_t clsPos[3] = {static_cast(cluster->X()),static_cast(cluster->Y()),static_cast(cluster->Z())}; Double_t dR = TMath::Sqrt(TMath::Power(trkPos[0]-clsPos[0],2)+TMath::Power(trkPos[1]-clsPos[1],2)+TMath::Power(trkPos[2]-clsPos[2],2)); //printf("\n dR=%f,wind=%f\n",dR,fClusterWindow); //MARCEL if (dR > fClusterWindow) continue; diff --git a/EMCAL/AliEMCALTriggerRawDigitMaker.cxx b/EMCAL/AliEMCALTriggerRawDigitMaker.cxx index 2804a3f3c36..5a31fdc89d2 100644 --- a/EMCAL/AliEMCALTriggerRawDigitMaker.cxx +++ b/EMCAL/AliEMCALTriggerRawDigitMaker.cxx @@ -324,25 +324,25 @@ void AliEMCALTriggerRawDigitMaker::PostProcess() fTriggerData->SetL1JetThreshold( i, fSTURawStream->GetL1JetThreshold(i) ); } - Int_t v0[2] = {fSTURawStream->GetV0A(), fSTURawStream->GetV0C()}; + Int_t v0[2] = { static_cast(fSTURawStream->GetV0A()), static_cast(fSTURawStream->GetV0C())}; Int_t type[15] = { - fSTURawStream->GetG(0, 0), - fSTURawStream->GetG(1, 0), - fSTURawStream->GetG(2, 0), - fSTURawStream->GetJ(0, 0), - fSTURawStream->GetJ(1, 0), - fSTURawStream->GetJ(2, 0), - fSTURawStream->GetG(0, 1), - fSTURawStream->GetG(1, 1), - fSTURawStream->GetG(2, 1), - fSTURawStream->GetJ(0, 1), - fSTURawStream->GetJ(1, 1), - fSTURawStream->GetJ(2, 1), - fSTURawStream->GetRawData(), - fSTURawStream->GetRegionEnable(), - fSTURawStream->GetFwVersion() + static_cast(fSTURawStream->GetG(0, 0)), + static_cast(fSTURawStream->GetG(1, 0)), + static_cast(fSTURawStream->GetG(2, 0)), + static_cast(fSTURawStream->GetJ(0, 0)), + static_cast(fSTURawStream->GetJ(1, 0)), + static_cast(fSTURawStream->GetJ(2, 0)), + static_cast(fSTURawStream->GetG(0, 1)), + static_cast(fSTURawStream->GetG(1, 1)), + static_cast(fSTURawStream->GetG(2, 1)), + static_cast(fSTURawStream->GetJ(0, 1)), + static_cast(fSTURawStream->GetJ(1, 1)), + static_cast(fSTURawStream->GetJ(2, 1)), + static_cast(fSTURawStream->GetRawData()), + static_cast(fSTURawStream->GetRegionEnable()), + static_cast(fSTURawStream->GetFwVersion()) }; // Modify DCS config from STU payload content diff --git a/EMCAL/AliEMCALWsuCosmicRaySetUp.cxx b/EMCAL/AliEMCALWsuCosmicRaySetUp.cxx index 97f5779971b..9908592ad65 100644 --- a/EMCAL/AliEMCALWsuCosmicRaySetUp.cxx +++ b/EMCAL/AliEMCALWsuCosmicRaySetUp.cxx @@ -111,7 +111,7 @@ void AliEMCALWsuCosmicRaySetUp::CreateGeometry() Int_t *idtmed = fIdtmed->GetArray()+1; int idAir = idtmed[0]; - gMC->Gsvolu(GetName(),"BOX",idAir, fMasterVolume,3); // Master volume + TVirtualMC::GetMC()->Gsvolu(GetName(),"BOX",idAir, fMasterVolume,3); // Master volume // // Sc counters // @@ -121,24 +121,24 @@ void AliEMCALWsuCosmicRaySetUp::CreateGeometry() sc[2] = 1.0; // thicness of Sc is 2 cm Float_t zsc[3] = {10.,330.6, 810.1}; int idSC = idtmed[1]; - gMC->Gsvolu("SCOU","TUBE",idSC, sc,3); // Master volume + TVirtualMC::GetMC()->Gsvolu("SCOU","TUBE",idSC, sc,3); // Master volume printf(" idtmed[0] %i idtmed[1] %i \n", idtmed[0] , idtmed[1]); Int_t idRot=0; // no rotation for(Int_t i=0; i<3; i++) { Float_t zpos = zsc[i] - fMasterVolume[2]; - gMC->Gspos("SCOU", i+1, "WSUC", 0.0, 0.0, zpos, idRot, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCOU", i+1, "WSUC", 0.0, 0.0, zpos, idRot, "ONLY"); } // // Dead end : Dec 2,2010 // Float_t zbox[3]={30., 30.0, 0.1}; - gMC->Gsvolu("SEND","BOX",idAir, zbox,3); // Master volume - gMC->Gspos("SEND", 1, "WSUC", 0.0, 0.0, 448.0, idRot, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("SEND","BOX",idAir, zbox,3); // Master volume + TVirtualMC::GetMC()->Gspos("SEND", 1, "WSUC", 0.0, 0.0, 448.0, idRot, "ONLY"); // Hists fLHists = new TList; fLHists->SetName("hists"); // - //AliMC *ALIMC = dynamic_cast(gMC); + //AliMC *ALIMC = dynamic_cast(TVirtualMC::GetMC()); //AliGenBox* gB = dynamic_cast(ALIMC->Generator()); //Double_t p = gB-> Double_t pmom=1.5; @@ -183,15 +183,15 @@ void AliEMCALWsuCosmicRaySetUp::DefineCuts(const Int_t idtmed) // Dec 2,2010 : it works Float_t cutgam=10.e-5; // 100 kev; Float_t cutele=10.e-5; // 100 kev; - gMC->Gstpar(idtmed,"CUTGAM", cutgam); - gMC->Gstpar(idtmed,"CUTELE", cutele); // 1MEV -> 0.1MEV; 15-aug-05 - gMC->Gstpar(idtmed,"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM - gMC->Gstpar(idtmed,"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM + TVirtualMC::GetMC()->Gstpar(idtmed,"CUTGAM", cutgam); + TVirtualMC::GetMC()->Gstpar(idtmed,"CUTELE", cutele); // 1MEV -> 0.1MEV; 15-aug-05 + TVirtualMC::GetMC()->Gstpar(idtmed,"BCUTE", cutgam); // BCUTE and BCUTM start from GUTGUM + TVirtualMC::GetMC()->Gstpar(idtmed,"BCUTM", cutgam); // BCUTE and BCUTM start from GUTGUM // --- Generate explicitly delta rays in Lead --- - gMC->Gstpar(idtmed, "LOSS", 3) ; - gMC->Gstpar(idtmed, "DRAY", 1) ; - gMC->Gstpar(idtmed, "DCUTE", cutele) ; - gMC->Gstpar(idtmed, "DCUTM", cutele) ; + TVirtualMC::GetMC()->Gstpar(idtmed, "LOSS", 3) ; + TVirtualMC::GetMC()->Gstpar(idtmed, "DRAY", 1) ; + TVirtualMC::GetMC()->Gstpar(idtmed, "DCUTE", cutele) ; + TVirtualMC::GetMC()->Gstpar(idtmed, "DCUTM", cutele) ; } void AliEMCALWsuCosmicRaySetUp::StepManager(void) @@ -202,17 +202,17 @@ void AliEMCALWsuCosmicRaySetUp::StepManager(void) static TLorentzVector pos; // Lorentz vector of the track current position. static TLorentzVector mom; // Lorentz vector of the track current momentum. - if(pri>=2) printf(" AliEMCALWsuCosmicRaySetUp::StepManager %s \n", gMC->CurrentVolName()); + if(pri>=2) printf(" AliEMCALWsuCosmicRaySetUp::StepManager %s \n", TVirtualMC::GetMC()->CurrentVolName()); Int_t tracknumber = gAlice->GetMCApp()->GetCurrentTrackNumber(); // Int_t parent=0; TParticle* part=0; - curVolName = gMC->CurrentVolName(); + curVolName = TVirtualMC::GetMC()->CurrentVolName(); if(curVolName.Contains("SEND")) { - gMC->TrackMomentum(mom); - gMC->TrackPosition(pos); + TVirtualMC::GetMC()->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackPosition(pos); if(pri>=2) printf(" %s tracknumber %i p %f \n", curVolName.Data(), tracknumber, mom.P()); if(pri>=2) printf(" x %f y %f z %f \n", pos[0], pos[1], pos[2]); - if(gMC->IsTrackEntering()) { // primary only TList *l = GetLhists(1); + if(TVirtualMC::GetMC()->IsTrackEntering()) { // primary only TList *l = GetLhists(1); TList *l = 0; if(tracknumber==0){ l = GetLhists(1); diff --git a/EMCAL/AliEMCALv0.cxx b/EMCAL/AliEMCALv0.cxx index 6d4abec3e97..816a5041879 100644 --- a/EMCAL/AliEMCALv0.cxx +++ b/EMCAL/AliEMCALv0.cxx @@ -101,8 +101,8 @@ AliEMCALv0::AliEMCALv0(const char *name, const char *title, fGeometry = g; fSampleWidth = double(g->GetECPbRadThick()+g->GetECScintThick()); if(gn.Contains("V1")) fSampleWidth += 2.*g->GetTrd1BondPaperThick(); - AliDebug(2,Form("fGeometry %p : gMC %p : fSampleWidth %5.4f\n", - fGeometry, gMC, fSampleWidth)); + AliDebug(2,Form("fGeometry %p : TVirtualMC::GetMC() %p : fSampleWidth %5.4f\n", + fGeometry, TVirtualMC::GetMC(), fSampleWidth)); //Set geometry name again, in case it was changed during the initialization of the geometry. SetTitle(fGeometry->GetEMCGeometry()->GetName()); @@ -126,7 +126,7 @@ void AliEMCALv0::CreateGeometry() fIdTmedArr = fIdtmed->GetArray() - 1599 ; fIdRotm = 1; - // gMC->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3) - see AliModule + // TVirtualMC::GetMC()->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3) - see AliModule AliMatrix(fIdRotm, 90.0, 0., 90.0, 90.0, 0.0, 0.0) ; // Create the EMCAL Mother Volume (a polygone) within which to place the Detector and named XEN1 @@ -137,12 +137,12 @@ void AliEMCALv0::CreateGeometry() envelopA[0] = 30.; envelopA[1] = 30; envelopA[2] = 20; - gMC->Gsvolu("XEN1", "BOX", fIdTmedArr[kIdSC], envelopA, 3) ; + TVirtualMC::GetMC()->Gsvolu("XEN1", "BOX", fIdTmedArr[kIdSC], envelopA, 3) ; fEnvelop1.Set(3); for(int i=0; i<3; i++) fEnvelop1[i] = envelopA[i]; // 23-may-05 // Position the EMCAL Mother Volume (XEN1) in WSUC. // Look to AliEMCALWsuCosmicRaySetUp. - gMC->Gspos("XEN1", 1, "WSUC", 0.0, 0.0, + 265., fIdRotm, "ONLY") ; + TVirtualMC::GetMC()->Gspos("XEN1", 1, "WSUC", 0.0, 0.0, + 265., fIdRotm, "ONLY") ; } else { envelopA[0] = geom->GetArm1PhiMin(); // minimum phi angle envelopA[1] = geom->GetArm1PhiMax() - geom->GetArm1PhiMin(); // angular range in phi @@ -156,14 +156,14 @@ void AliEMCALv0::CreateGeometry() envelopA[8] = envelopA[5] ; // radii are the same. envelopA[9] = envelopA[6] ; // radii are the same. - gMC->Gsvolu("XEN1", "PGON", fIdTmedArr[kIdAIR], envelopA, 10) ; // Polygone filled with air + TVirtualMC::GetMC()->Gsvolu("XEN1", "PGON", fIdTmedArr[kIdAIR], envelopA, 10) ; // Polygone filled with air fEnvelop1.Set(10, envelopA); if (gDebug==2) { printf("CreateGeometry: XEN1 = %f, %f\n", envelopA[5], envelopA[6]); printf("CreateGeometry: XU0 = %f, %f\n", envelopA[5], envelopA[6]); } // Position the EMCAL Mother Volume (XEN1) in Alice (ALIC) - gMC->Gspos(geom->GetNameOfEMCALEnvelope(), 1, "ALIC", 0.0, 0.0, 0.0, fIdRotm, "ONLY") ; + TVirtualMC::GetMC()->Gspos(geom->GetNameOfEMCALEnvelope(), 1, "ALIC", 0.0, 0.0, 0.0, fIdRotm, "ONLY") ; } // COMPACT, TRD1 @@ -245,17 +245,17 @@ void AliEMCALv0::CreateShishKebabGeometry() double wallThickness = g->GetPhiModuleSize()/g->GetNPHIdiv() - g->GetPhiTileSize(); for(int i=0; i<3; i++) parSCM0[i] = fParEMOD[i] - wallThickness; parSCM0[3] = fParEMOD[3]; - gMC->Gsvolu("SCM0", "TRD1", fIdTmedArr[kIdAIR], parSCM0, 4); - gMC->Gspos("SCM0", 1, "EMOD", 0., 0., 0., 0, "ONLY") ; + TVirtualMC::GetMC()->Gsvolu("SCM0", "TRD1", fIdTmedArr[kIdAIR], parSCM0, 4); + TVirtualMC::GetMC()->Gspos("SCM0", 1, "EMOD", 0., 0., 0., 0, "ONLY") ; } else { double wTh = g->GetLateralSteelStrip(); parSCM0[0] = fParEMOD[0] - wTh + tanTrd1*g->GetTrd1AlFrontThick(); parSCM0[1] = fParEMOD[1] - wTh; parSCM0[2] = fParEMOD[2] - wTh; parSCM0[3] = fParEMOD[3] - g->GetTrd1AlFrontThick()/2.; - gMC->Gsvolu("SCM0", "TRD1", fIdTmedArr[kIdAIR], parSCM0, 4); + TVirtualMC::GetMC()->Gsvolu("SCM0", "TRD1", fIdTmedArr[kIdAIR], parSCM0, 4); double zshift = g->GetTrd1AlFrontThick()/2.; - gMC->Gspos("SCM0", 1, "EMOD", 0., 0., zshift, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCM0", 1, "EMOD", 0., 0., zshift, 0, "ONLY"); // CreateAlFrontPlate("EMOD","ALFP"); } @@ -263,7 +263,7 @@ void AliEMCALv0::CreateShishKebabGeometry() if(g->GetNPHIdiv()==2 && g->GetNETAdiv()==2) { // Division to tile size - 1-oct-04 AliDebug(2,Form(" Divide SCM0 on y-axis %i\n", g->GetNETAdiv())); - gMC->Gsdvn("SCMY","SCM0", g->GetNETAdiv(), 2); // y-axis + TVirtualMC::GetMC()->Gsdvn("SCMY","SCM0", g->GetNETAdiv(), 2); // y-axis // Trapesoid 2x2 parTRAP[0] = parSCM0[3]; // dz parTRAP[1] = TMath::ATan2((parSCM0[1]-parSCM0[0])/2.,2.*parSCM0[3])*180./TMath::Pi(); // theta @@ -281,14 +281,14 @@ void AliEMCALv0::CreateShishKebabGeometry() AliDebug(2,Form(" ** TRAP ** \n")); for(int i=0; i<11; i++) AliDebug(3, Form(" par[%2.2i] %9.4f\n", i, parTRAP[i])); - gMC->Gsvolu("SCMX", "TRAP", fIdTmedArr[kIdSC], parTRAP, 11); + TVirtualMC::GetMC()->Gsvolu("SCMX", "TRAP", fIdTmedArr[kIdSC], parTRAP, 11); xpos = +(parSCM0[1]+parSCM0[0])/4.; - gMC->Gspos("SCMX", 1, "SCMY", xpos, 0.0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("SCMX", 1, "SCMY", xpos, 0.0, 0.0, 0, "ONLY") ; // Using rotation because SCMX should be the same due to Pb tiles xpos = -xpos; AliMatrix(fIdRotm, 90.0,180., 90.0, 270.0, 0.0,0.0) ; - gMC->Gspos("SCMX", 2, "SCMY", xpos, 0.0, 0.0, fIdRotm, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCMX", 2, "SCMY", xpos, 0.0, 0.0, fIdRotm, "ONLY"); // put LED to the SCM0 AliEMCALShishKebabTrd1Module *mod = (AliEMCALShishKebabTrd1Module*)fShishKebabModules->At(0); Double_t tanBetta = mod->GetTanBetta(); @@ -299,13 +299,13 @@ void AliEMCALv0::CreateShishKebabGeometry() if(!gn.Contains("V1")) { par[1] = parSCM0[2]/2; // y par[2] = g->GetECPbRadThick()/2.; // z - gMC->Gsvolu("PBTI", "BOX", fIdTmedArr[kIdPB], dummy, 0); + TVirtualMC::GetMC()->Gsvolu("PBTI", "BOX", fIdTmedArr[kIdPB], dummy, 0); zpos = -fSampleWidth*g->GetNECLayers()/2. + g->GetECPbRadThick()/2.; AliDebug(2,Form(" Pb tiles \n")); for(int iz=0; izGetNECLayers(); iz++){ par[0] = (parSCM0[0] + tanBetta*fSampleWidth*iz)/2.; xpos = par[0] - xCenterSCMX; - gMC->Gsposp("PBTI", ++nr, "SCMX", xpos, ypos, zpos, 0, "ONLY", par, 3) ; + TVirtualMC::GetMC()->Gsposp("PBTI", ++nr, "SCMX", xpos, ypos, zpos, 0, "ONLY", par, 3) ; AliDebug(3,Form(" %i xpos %f zpos %f par[0] %f \n", iz+1, xpos, zpos, par[0])); zpos += fSampleWidth; } @@ -316,10 +316,10 @@ void AliEMCALv0::CreateShishKebabGeometry() par[1] = parSCM0[2]/2.; // y par[2] = g->GetTrd1BondPaperThick()/2.; // z par[0] = parSCM0[0]/2.; // x - gMC->Gsvolu("PAP1", "BOX", fIdTmedArr[kIdPAPER], par, 3); + TVirtualMC::GetMC()->Gsvolu("PAP1", "BOX", fIdTmedArr[kIdPAPER], par, 3); xpos = par[0] - xCenterSCMX; zpos = -parSCM0[3] + g->GetTrd1BondPaperThick()/2.; - gMC->Gspos("PAP1", 1, "SCMX", xpos, ypos, zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("PAP1", 1, "SCMX", xpos, ypos, zpos, 0, "ONLY"); for(int iz=0; izGetNECLayers()-1; iz++){ nr = iz + 1; Double_t dz = g->GetECScintThick() + g->GetTrd1BondPaperThick() + fSampleWidth*iz; @@ -327,15 +327,15 @@ void AliEMCALv0::CreateShishKebabGeometry() par[2] = g->GetECPbRadThick()/2. + g->GetTrd1BondPaperThick(); // z par[0] = (parSCM0[0] + tanBetta*dz)/2.; TString pa(Form("PA%2.2i",nr)); - gMC->Gsvolu(pa.Data(), "BOX", fIdTmedArr[kIdPAPER], par, 3); + TVirtualMC::GetMC()->Gsvolu(pa.Data(), "BOX", fIdTmedArr[kIdPAPER], par, 3); xpos = par[0] - xCenterSCMX; zpos = -parSCM0[3] + dz + par[2]; - gMC->Gspos(pa.Data(), 1, "SCMX", xpos, ypos, zpos, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos(pa.Data(), 1, "SCMX", xpos, ypos, zpos, 0, "ONLY") ; // Pb TString pb(Form("PB%2.2i",nr)); par[2] = g->GetECPbRadThick()/2.; // z - gMC->Gsvolu(pb.Data(), "BOX", fIdTmedArr[kIdPB], par, 3); - gMC->Gspos(pb.Data(), 1, pa.Data(), 0.0, 0.0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gsvolu(pb.Data(), "BOX", fIdTmedArr[kIdPB], par, 3); + TVirtualMC::GetMC()->Gspos(pb.Data(), 1, pa.Data(), 0.0, 0.0, 0.0, 0, "ONLY") ; } } @@ -387,7 +387,7 @@ void AliEMCALv0::CreateSmod(const char* mother) par[1] = g->GetShellThickness()/2.; par[2] = g->GetEtaModuleSize()*g->GetNZ()/2. + 5; - gMC->Gsvolu("SMOD", "BOX", fIdTmedArr[kIdAIR], par, 3); + TVirtualMC::GetMC()->Gsvolu("SMOD", "BOX", fIdTmedArr[kIdAIR], par, 3); AliDebug(2,Form("SMOD in WSUC : tmed %i | dx %7.2f dy %7.2f dz %7.2f (SMOD, BOX)\n", fIdTmedArr[kIdAIR], par[0],par[1],par[2])); @@ -398,7 +398,7 @@ void AliEMCALv0::CreateSmod(const char* mother) for(int i=0; iGspos("SMOD", 1, mother, xpos, ypos, zpos, fIdRotm, "ONLY") ; + TVirtualMC::GetMC()->Gspos("SMOD", 1, mother, xpos, ypos, zpos, fIdRotm, "ONLY") ; printf(" fIdRotm %3i phi %6.1f(%5.3f) xpos %7.2f ypos %7.2f zpos %7.2f \n", fIdRotm, phi, phiRad, xpos, ypos, zpos); nr++; @@ -451,7 +451,7 @@ void AliEMCALv0::CreateSmod(const char* mother) } else AliError("Unkown SM Type!!"); if(SMOrder == 1) {//first time, create the SM - gMC->Gsvolu(smName.Data(), "BOX", fIdTmedArr[kIdAIR], parC, 3); + TVirtualMC::GetMC()->Gsvolu(smName.Data(), "BOX", fIdTmedArr[kIdAIR], parC, 3); AliDebug(2,Form(" Super module with name \"%s\" was created in \"box\" with: par[0] = %f, par[1] = %f, par[2] = %f\n", smName.Data(), parC[0], parC[1], parC[2])); } @@ -462,7 +462,7 @@ void AliEMCALv0::CreateSmod(const char* mother) zpos *= -1.; } AliMatrix(fIdRotm, 90.0, phi, 90.0, phiy, phiz, 0.0); - gMC->Gspos(smName.Data(), SMOrder, mother, xpos, ypos, zpos, fIdRotm, "ONLY") ; + TVirtualMC::GetMC()->Gspos(smName.Data(), SMOrder, mother, xpos, ypos, zpos, fIdRotm, "ONLY") ; AliDebug(3, Form(" %s : %2i, fIdRotm %3i phi %6.1f(%5.3f) xpos %7.2f ypos %7.2f zpos %7.2f : i %i \n", smName.Data(), SMOrder, fIdRotm, phi, phiRad, xpos, ypos, zpos, smodnum)); } @@ -472,10 +472,10 @@ void AliEMCALv0::CreateSmod(const char* mother) // Steel plate if(g->GetSteelFrontThickness() > 0.0) { // 28-mar-05 par[0] = g->GetSteelFrontThickness()/2.; - gMC->Gsvolu("STPL", "BOX", fIdTmedArr[kIdSTEEL], par, 3); + TVirtualMC::GetMC()->Gsvolu("STPL", "BOX", fIdTmedArr[kIdSTEEL], par, 3); printf("tmed %i | dx %7.2f dy %7.2f dz %7.2f (STPL) \n", fIdTmedArr[kIdSTEEL], par[0],par[1],par[2]); xpos = -(g->GetShellThickness() - g->GetSteelFrontThickness())/2.; - gMC->Gspos("STPL", 1, "SMOD", xpos, 0.0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("STPL", 1, "SMOD", xpos, 0.0, 0.0, 0, "ONLY") ; } } @@ -495,7 +495,7 @@ void AliEMCALv0::CreateEmod(const char* mother, const char* child) fParEMOD[1] = g->Get2Trd1Dx2()/2.; // dx2 fParEMOD[2] = g->GetPhiModuleSize()/2.;; // dy fParEMOD[3] = g->GetLongModuleSize()/2.; // dz - gMC->Gsvolu(child, "TRD1", fIdTmedArr[kIdSTEEL], fParEMOD, 4); + TVirtualMC::GetMC()->Gsvolu(child, "TRD1", fIdTmedArr[kIdSTEEL], fParEMOD, 4); } int nr=0; @@ -529,7 +529,7 @@ void AliEMCALv0::CreateEmod(const char* mother, const char* child) AliError("Unknown super module Type!!"); for(int iy=0; iyGetPhiModuleSize()*(2*iy+1 - iyMax)/2.; - gMC->Gspos(child, ++nr, mother, xpos, ypos, zpos, fIdRotm, "ONLY") ; + TVirtualMC::GetMC()->Gspos(child, ++nr, mother, xpos, ypos, zpos, fIdRotm, "ONLY") ; // //printf(" %2i xpos %7.2f ypos %7.2f zpos %7.2f fIdRotm %i\n", nr, xpos, ypos, zpos, fIdRotm); AliDebug(3,Form("%3.3i(%2.2i,%2.2i) ", nr,iy+1,iz+1)); @@ -547,7 +547,7 @@ void AliEMCALv0::CreateEmod(const char* mother, const char* child) for(int ix=0; ixGetNPhi(); ix++) { // flat in phi xpos = g->GetPhiModuleSize()*(2*ix+1 - g->GetNPhi())/2.; - gMC->Gspos(child, ++nr, mother, xpos, ypos, zpos, fIdRotm, "ONLY") ; + TVirtualMC::GetMC()->Gspos(child, ++nr, mother, xpos, ypos, zpos, fIdRotm, "ONLY") ; printf(" %7.2f ", xpos); } printf("\n"); @@ -568,9 +568,9 @@ void AliEMCALv0::CreateAlFrontPlate(const char* mother, const char* child) parALFP[1] = parALFP[0] + tanTrd1*g->GetTrd1AlFrontThick(); // dx2 parALFP[2] = g->GetPhiModuleSize()/2. - g->GetLateralSteelStrip(); // dy parALFP[3] = g->GetTrd1AlFrontThick()/2.; // dz - gMC->Gsvolu(child, "TRD1", fIdTmedArr[kIdAL], parALFP, 4); + TVirtualMC::GetMC()->Gsvolu(child, "TRD1", fIdTmedArr[kIdAL], parALFP, 4); zposALFP = -fParEMOD[3] + g->GetTrd1AlFrontThick()/2.; - gMC->Gspos (child, 1, mother, 0.0, 0.0, zposALFP, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos (child, 1, mother, 0.0, 0.0, zposALFP, 0, "ONLY"); } //______________________________________________________________________ @@ -588,11 +588,11 @@ void AliEMCALv0::Trd1Tower3X3(const double *parSCM0) gn.ToUpper(); // Division to tile size AliDebug(2,Form("Trd1Tower3X3() : Divide SCM0 on y-axis %i", g->GetNETAdiv())); - gMC->Gsdvn("SCMY","SCM0", g->GetNETAdiv(), 2); // y-axis + TVirtualMC::GetMC()->Gsdvn("SCMY","SCM0", g->GetNETAdiv(), 2); // y-axis double dx1=parSCM0[0], dx2=parSCM0[1], dy=parSCM0[2], dz=parSCM0[3]; double ndiv=3., xpos=0.0; // should be defined once - gMC->Gsvolu("PBTI", "BOX", fIdTmedArr[kIdPB], dummy, 0); + TVirtualMC::GetMC()->Gsvolu("PBTI", "BOX", fIdTmedArr[kIdPB], dummy, 0); for(int ix=1; ix<=3; ix++) { // 3X3 scmx = "SCX"; // Nov 10,2006 // ix=1 @@ -626,8 +626,8 @@ void AliEMCALv0::Trd1Tower3X3(const double *parSCM0) for(int i=0; i<11; i++) AliDebug(2,Form(" par[%2.2i] %9.4f\n", i, parTRAP[i])); scmx += ix; - gMC->Gsvolu(scmx.Data(), "TRAP", fIdTmedArr[kIdSC], parTRAP, 11); - gMC->Gspos(scmx.Data(), 1, "SCMY", xpos, 0.0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gsvolu(scmx.Data(), "TRAP", fIdTmedArr[kIdSC], parTRAP, 11); + TVirtualMC::GetMC()->Gspos(scmx.Data(), 1, "SCMY", xpos, 0.0, 0.0, 0, "ONLY") ; PbInTrap(parTRAP, scmx); } @@ -657,7 +657,7 @@ void AliEMCALv0::PbInTrap(const double parTRAP[11], TString n) par[0] = parTRAP[4] + coef*fSampleWidth*iz; xpos = par[0] - xCenterSCMX; if(parTRAP[1] < 0.) xpos = -xpos; - gMC->Gsposp("PBTI", ++nr, n.Data(), xpos, ypos, zpos, 0, "ONLY", par, 3) ; + TVirtualMC::GetMC()->Gsposp("PBTI", ++nr, n.Data(), xpos, ypos, zpos, 0, "ONLY", par, 3) ; AliDebug(2,Form(" %i xpos %9.3f zpos %9.3f par[0] %9.3f |", iz+1, xpos, zpos, par[0])); zpos += fSampleWidth; if(iz%2>0) printf("\n"); @@ -686,14 +686,14 @@ void AliEMCALv0::Trd1Tower1X1(double *parSCM0) // and as consequence the same abs is scheme AliDebug(2,"Trd1Tower1X1() : Create SCMX(SCMY) as SCM0"); - gMC->Gsvolu("SCMY", "TRD1", fIdTmedArr[kIdAIR], parSCM0, 4); - gMC->Gspos("SCMY", 1, "SCM0", 0.0, 0.0, 0.0, 0, "ONLY"); - gMC->Gsvolu("SCMX", "TRD1", fIdTmedArr[kIdSC], parSCM0, 4); - gMC->Gspos("SCMX", 1, "SCMY", 0.0, 0.0, 0.0, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("SCMY", "TRD1", fIdTmedArr[kIdAIR], parSCM0, 4); + TVirtualMC::GetMC()->Gspos("SCMY", 1, "SCM0", 0.0, 0.0, 0.0, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("SCMX", "TRD1", fIdTmedArr[kIdSC], parSCM0, 4); + TVirtualMC::GetMC()->Gspos("SCMX", 1, "SCMY", 0.0, 0.0, 0.0, 0, "ONLY"); // should be defined once double *dummy=0; - gMC->Gsvolu("PBTI", "BOX", fIdTmedArr[kIdPB], dummy, 0); + TVirtualMC::GetMC()->Gsvolu("PBTI", "BOX", fIdTmedArr[kIdPB], dummy, 0); PbInTrd1(parSCM0, "SCMX"); @@ -718,7 +718,7 @@ void AliEMCALv0::PbInTrd1(const double *parTrd1, TString n) for(int iz=0; izGetNECLayers(); iz++){ par[0] = parTrd1[0] + coef*fSampleWidth*iz; - gMC->Gsposp("PBTI", ++nr, n.Data(), xpos, ypos, zpos, 0, "ONLY", par, 3) ; + TVirtualMC::GetMC()->Gsposp("PBTI", ++nr, n.Data(), xpos, ypos, zpos, 0, "ONLY", par, 3) ; AliDebug(2,Form(" %i xpos %9.3f zpos %9.3f par[0] %9.3f |", iz+1, xpos, zpos, par[0])); zpos += fSampleWidth; if(iz%2>0) printf("\n"); @@ -740,8 +740,8 @@ void AliEMCALv0::Scm0InTrd2(const AliEMCALGeometry * g, const Double_t emodPar[5 i, parSCM0[i],emodPar[i], parSCM0[i]-emodPar[i])); } parSCM0[4] = emodPar[4]; - gMC->Gsvolu("SCM0", "TRD2", fIdTmedArr[kIdSC], parSCM0, 5); // kIdAIR -> kIdSC - gMC->Gspos("SCM0", 1, "EMOD", 0., 0., 0., 0, "ONLY") ; + TVirtualMC::GetMC()->Gsvolu("SCM0", "TRD2", fIdTmedArr[kIdSC], parSCM0, 5); // kIdAIR -> kIdSC + TVirtualMC::GetMC()->Gspos("SCM0", 1, "EMOD", 0., 0., 0., 0, "ONLY") ; // Division if(g->GetNPHIdiv()==2 && g->GetNETAdiv()==2) { Division2X2InScm0(g, parSCM0); @@ -787,14 +787,14 @@ void AliEMCALv0::Division2X2InScm0(const AliEMCALGeometry * g, const Double_t pa for(int i=0; i<11; i++) AliDebug(2,Form(" par[%2.2i] %9.4f\n", i, parTRAP[i])); fIdRotm=0; - gMC->Gsvolu("SCMY", "TRAP", fIdTmedArr[kIdSC], parTRAP, 11); // kIdAIR -> kIdSC + TVirtualMC::GetMC()->Gsvolu("SCMY", "TRAP", fIdTmedArr[kIdSC], parTRAP, 11); // kIdAIR -> kIdSC ypos = +(parTRAP[3]+parTRAP[7])/2.; // AliDebug(2,Form(" Y shift SCMY inside SCM0 : %7.3f : opt %s\n", ypos, overLapFlagSCMY.Data())); - gMC->Gspos("SCMY", 1, "SCM0", 0.0, ypos, 0.0, fIdRotm, overLapFlagSCMY.Data()) ; + TVirtualMC::GetMC()->Gspos("SCMY", 1, "SCM0", 0.0, ypos, 0.0, fIdRotm, overLapFlagSCMY.Data()) ; // Rotation SCMY around z-axis on 180 degree; x'=-x; y'=-y and z=z AliMatrix(fIdRotm, 90.0,180., 90.0, 270.0, 0.0,0.0) ; // We may have problem with numeration due to rotation - 4-feb-05 - gMC->Gspos("SCMY", 2, "SCM0", 0.0, -ypos, 0.0, fIdRotm, overLapFlagSCMY.Data()); + TVirtualMC::GetMC()->Gspos("SCMY", 2, "SCM0", 0.0, -ypos, 0.0, fIdRotm, overLapFlagSCMY.Data()); Info("Division2X2InScm0","Divide SCMY on x-axis %i\n", g->GetNPHIdiv()); dx1 = parSCM0[0]; @@ -819,13 +819,13 @@ void AliEMCALv0::Division2X2InScm0(const AliEMCALGeometry * g, const Double_t pa for(int i=0; i<11; i++) AliDebug(2,Form(" par[%2.2i] %9.4f\n", i, parTRAP[i])); fIdRotm=0; - gMC->Gsvolu("SCMX", "TRAP", fIdTmedArr[kIdSC], parTRAP, 11); + TVirtualMC::GetMC()->Gsvolu("SCMX", "TRAP", fIdTmedArr[kIdSC], parTRAP, 11); xpos = (parTRAP[4]+parTRAP[8])/2.; AliDebug(2,Form(" X shift SCMX inside SCMX : %7.3f : opt %s\n", xpos, overLapFlagSCMX.Data())); - gMC->Gspos("SCMX", 1, "SCMY", xpos, 0.0, 0.0, fIdRotm, overLapFlagSCMX.Data()) ; + TVirtualMC::GetMC()->Gspos("SCMX", 1, "SCMY", xpos, 0.0, 0.0, fIdRotm, overLapFlagSCMX.Data()) ; // AliMatrix(fIdRotm, 90.0,270., 90.0, 0.0, 0.0,0.0); // x'=-y; y'=x; z'=z AliMatrix(fIdRotm, 90.0,90., 90.0, -180.0, 0.0,0.0); // x'=y; y'=-x; z'=z - gMC->Gspos("SCMX", 2, "SCMY", -xpos, 0.0, 0.0, fIdRotm, overLapFlagSCMX.Data()) ; + TVirtualMC::GetMC()->Gspos("SCMX", 2, "SCMY", -xpos, 0.0, 0.0, fIdRotm, overLapFlagSCMX.Data()) ; // PB: if(n=="SCMX" && overLapFlagSCMY == "ONLY") { PbInTrapForTrd2(parTRAP, n); @@ -843,7 +843,7 @@ void AliEMCALv0::PbInTrapForTrd2(const double *parTRAP, TString name) pbShape = "TRD2"; // pbtiChonly = "MANY"; } - gMC->Gsvolu("PBTI", pbShape.Data(), fIdTmedArr[kIdPB], dummy, 0); + TVirtualMC::GetMC()->Gsvolu("PBTI", pbShape.Data(), fIdTmedArr[kIdPB], dummy, 0); int nr=0; Info("PbInTrapForTrd2"," Pb tiles inside %s: shape %s :pbtiChonly %s\n nrstart %i\n", @@ -864,7 +864,7 @@ void AliEMCALv0::PbInTrapForTrd2(const double *parTRAP, TString name) par[1] = par[0]; xpos = ypos = par[0] - xCenterSCMX; //if(parTRAP[1] < 0.) xpos = -xpos; - gMC->Gsposp("PBTI", ++nr, name.Data(), xpos, ypos, zpos, 0, "ONLY", par, 3) ; + TVirtualMC::GetMC()->Gsposp("PBTI", ++nr, name.Data(), xpos, ypos, zpos, 0, "ONLY", par, 3) ; AliDebug(2,Form(" %2.2i xpos %8.5f zpos %6.3f par[0,1] %6.3f |", iz+1, xpos, zpos, par[0])); if(iz%2>0) AliDebug(2,Form("\n")); zpos += fSampleWidth; @@ -886,14 +886,14 @@ void AliEMCALv0::PbInTrapForTrd2(const double *parTRAP, TString name) parPB[1] = parPB[0] + tanx*g->GetECPbRadThick(); parPB[2] = parTRAP[2] + tany*ztmp; parPB[3] = parPB[2] + tany*g->GetECPbRadThick(); - gMC->Gsposp("PBTI", ++nr, name.Data(), xpos, ypos, zpos, 0, pbtiChonly.Data(), parPB, 5) ; + TVirtualMC::GetMC()->Gsposp("PBTI", ++nr, name.Data(), xpos, ypos, zpos, 0, pbtiChonly.Data(), parPB, 5) ; AliDebug(2,Form("\n PBTI %2i | zpos %6.3f | par = ", nr, zpos)); /* for(int i=0; i<5; i++) printf(" %9.5f ", parPB[i]); // individual SC tile parSC[0] = parPB[0]; parSC[1] = parPB[1]; - gMC->Gsposp("SCTI", nr, name.Data(), xpos, ypos, zpos+g->GetECScintThick(), + TVirtualMC::GetMC()->Gsposp("SCTI", nr, name.Data(), xpos, ypos, zpos+g->GetECScintThick(), 0, pbtiChonly.Data(), parSC, 3) ; printf("\n SCTI zpos %6.3f | par = ", zpos+g->GetECScintThick()); for(int i=0; i<3; i++) printf(" %9.5f ", parPB[i]); @@ -919,8 +919,8 @@ void AliEMCALv0::PbmoInTrd2(const AliEMCALGeometry * g, const Double_t emodPar[5 i, parPBMO[i],emodPar[i], parPBMO[i]-emodPar[i])); } parPBMO[4] = emodPar[4]; - gMC->Gsvolu("PBMO", "TRD2", fIdTmedArr[kIdPB], parPBMO, 5); - gMC->Gspos("PBMO", 1, "EMOD", 0., 0., 0., 0, "ONLY") ; + TVirtualMC::GetMC()->Gsvolu("PBMO", "TRD2", fIdTmedArr[kIdPB], parPBMO, 5); + TVirtualMC::GetMC()->Gspos("PBMO", 1, "EMOD", 0., 0., 0., 0, "ONLY") ; // Division if(g->GetNPHIdiv()==2 && g->GetNETAdiv()==2) { Division2X2InPbmo(g, parPBMO); @@ -937,7 +937,7 @@ void AliEMCALv0::Division2X2InPbmo(const AliEMCALGeometry * g, const Double_t pa // Division 2X2 Info("Division2X2InPbmo"," started : geometry %s ", g->GetName()); //Double_t *dummy=0; - // gMC->Gsvolu("SCTI", "BOX", fIdTmedArr[kIdSC], dummy, 0); + // TVirtualMC::GetMC()->Gsvolu("SCTI", "BOX", fIdTmedArr[kIdSC], dummy, 0); double parSC[3]; double xpos = 0.0, ypos = 0.0, zpos = 0.0, ztmp=0;; @@ -959,18 +959,18 @@ void AliEMCALv0::Division2X2InPbmo(const AliEMCALGeometry * g, const Double_t pa parSC[1] = parPBMO[2] + tany*ztmp; snprintf(name,buffersize,"SC%2.2i", iz+1); - gMC->Gsvolu(name, "BOX", fIdTmedArr[kIdSC], parSC, 3); - gMC->Gspos(name, 1, "PBMO", xpos, ypos, zpos, 0, "ONLY") ; + TVirtualMC::GetMC()->Gsvolu(name, "BOX", fIdTmedArr[kIdSC], parSC, 3); + TVirtualMC::GetMC()->Gspos(name, 1, "PBMO", xpos, ypos, zpos, 0, "ONLY") ; AliDebug(2,Form("%s | zpos %6.3f | parSC[0,1]=(%7.5f,%7.5f) -> ", name, zpos, parSC[0], parSC[1])); snprintf(named,buffersize,"SY%2.2i", iz+1); printf(" %s -> ", named); - gMC->Gsdvn(named,name, 2, 2); + TVirtualMC::GetMC()->Gsdvn(named,name, 2, 2); snprintf(named2,buffersize,"SX%2.2i", iz+1); printf(" %s \n", named2); - gMC->Gsdvn(named2,named, 2, 1); + TVirtualMC::GetMC()->Gsdvn(named2,named, 2, 1); zpos += fSampleWidth; } diff --git a/EMCAL/AliEMCALv1.cxx b/EMCAL/AliEMCALv1.cxx index b34f1ecaa1c..2bdd6a8d1a4 100644 --- a/EMCAL/AliEMCALv1.cxx +++ b/EMCAL/AliEMCALv1.cxx @@ -140,11 +140,11 @@ void AliEMCALv1::StepManager(void){ TParticle *part=0; Int_t parent=-1; - static Int_t idXPHI = gMC->VolId("XPHI"); - if(gMC->CurrentVolID(copy) == idXPHI ) { // We are in a Scintillator Layer + static Int_t idXPHI = TVirtualMC::GetMC()->VolId("XPHI"); + if(TVirtualMC::GetMC()->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 + if( ((depositedEnergy = TVirtualMC::GetMC()->Edep()) > 0.) && (TVirtualMC::GetMC()->TrackTime() < fTimeCut)){// Track is inside a scintillator and deposits some energy if (fCurPrimary==-1) fCurPrimary=gAlice->GetMCApp()->GetPrimary(tracknumber); @@ -185,20 +185,20 @@ void AliEMCALv1::StepManager(void){ } fCurTrack=tracknumber; } - gMC->TrackPosition(pos); + TVirtualMC::GetMC()->TrackPosition(pos); xyzte[0] = pos[0]; xyzte[1] = pos[1]; xyzte[2] = pos[2]; - xyzte[3] = gMC->TrackTime() ; + xyzte[3] = TVirtualMC::GetMC()->TrackTime() ; - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackMomentum(mom); pmom[0] = mom[0]; pmom[1] = mom[1]; pmom[2] = mom[2]; pmom[3] = mom[3]; - gMC->CurrentVolOffID(1, id[0]); // get the POLY copy number; - gMC->CurrentVolID(id[1]); // get the phi number inside the layer + TVirtualMC::GetMC()->CurrentVolOffID(1, id[0]); // get the POLY copy number; + TVirtualMC::GetMC()->CurrentVolID(id[1]); // get the phi number inside the layer Int_t tower = (id[0]-1) % geom->GetNZ() + 1 + (id[1] - 1) * geom->GetNZ() ; Int_t layer = static_cast((id[0]-1)/(geom->GetNZ())) + 1 ; @@ -210,17 +210,17 @@ void AliEMCALv1::StepManager(void){ Float_t lightYield = depositedEnergy ; // Apply Birk's law (copied from G3BIRK) - if (gMC->TrackCharge()!=0) { // Check + if (TVirtualMC::GetMC()->TrackCharge()!=0) { // Check Float_t birkC1Mod = 0; if (fBirkC0==1){ // Apply correction for higher charge states - if (TMath::Abs(gMC->TrackCharge())>=2) + if (TMath::Abs(TVirtualMC::GetMC()->TrackCharge())>=2) birkC1Mod=fBirkC1*7.2/12.6; else birkC1Mod=fBirkC1; } Float_t dedxcm=0.; - if (gMC->TrackStep()>0) - dedxcm=1000.*gMC->Edep()/gMC->TrackStep(); + if (TVirtualMC::GetMC()->TrackStep()>0) + dedxcm=1000.*TVirtualMC::GetMC()->Edep()/TVirtualMC::GetMC()->TrackStep(); else dedxcm=0; lightYield=lightYield/(1.+birkC1Mod*dedxcm+fBirkC2*dedxcm*dedxcm); diff --git a/EMCAL/AliEMCALv2.cxx b/EMCAL/AliEMCALv2.cxx index 9aa73221219..9c56a5aa24b 100644 --- a/EMCAL/AliEMCALv2.cxx +++ b/EMCAL/AliEMCALv2.cxx @@ -137,22 +137,22 @@ void AliEMCALv2::StepManager(void){ if(keyGeom == 0) { keyGeom = 2; - if(gMC->VolId("PBMO")==0 || gMC->VolId("WSUC")==1) { + if(TVirtualMC::GetMC()->VolId("PBMO")==0 || TVirtualMC::GetMC()->VolId("WSUC")==1) { vn = "SCMX"; // old TRD2(TRD1) or WSUC keyGeom = 1; } printf("AliEMCALv2::StepManager(): keyGeom %i : Sensetive volume %s \n", keyGeom, vn); - if(gMC->VolId("WSUC")==1) printf(" WSUC - cosmic ray stand geometry \n"); + if(TVirtualMC::GetMC()->VolId("WSUC")==1) printf(" WSUC - cosmic ray stand geometry \n"); } Int_t tracknumber = gAlice->GetMCApp()->GetCurrentTrackNumber(); Int_t parent=0; TParticle* part=0; - curVolName = gMC->CurrentVolName(); + curVolName = TVirtualMC::GetMC()->CurrentVolName(); if(curVolName.Contains(vn) || curVolName.Contains("SCX")) { // We are in a scintillator layer; SCX for 3X3 - if( ((depositedEnergy = gMC->Edep()) > 0.) && (gMC->TrackTime() < fTimeCut)){// Track is inside a scintillator and deposits some energy + if( ((depositedEnergy = TVirtualMC::GetMC()->Edep()) > 0.) && (TVirtualMC::GetMC()->TrackTime() < fTimeCut)){// Track is inside a scintillator and deposits some energy // Info("StepManager "," entry %i DE %f",++ientry, depositedEnergy); // for testing if (fCurPrimary==-1) fCurPrimary=gAlice->GetMCApp()->GetPrimary(tracknumber); @@ -198,13 +198,13 @@ void AliEMCALv2::StepManager(void){ } fCurTrack=tracknumber; } - gMC->TrackPosition(pos); + TVirtualMC::GetMC()->TrackPosition(pos); xyzte[0] = pos[0]; xyzte[1] = pos[1]; xyzte[2] = pos[2]; - xyzte[3] = gMC->TrackTime() ; + xyzte[3] = TVirtualMC::GetMC()->TrackTime() ; - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackMomentum(mom); pmom[0] = mom[0]; pmom[1] = mom[1]; pmom[2] = mom[2]; @@ -213,35 +213,35 @@ void AliEMCALv2::StepManager(void){ // if(ientry%200 > 0) return; // testing supModuleNumber = moduleNumber = yNumber = xNumber = absid = 0; if(keyGeom >= 1) { // TRD1 case now - gMC->CurrentVolOffID(4, supModuleNumber); - gMC->CurrentVolOffID(3, moduleNumber); - gMC->CurrentVolOffID(1, yNumber); - gMC->CurrentVolOffID(0, xNumber); // really x number now + TVirtualMC::GetMC()->CurrentVolOffID(4, supModuleNumber); + TVirtualMC::GetMC()->CurrentVolOffID(3, moduleNumber); + TVirtualMC::GetMC()->CurrentVolOffID(1, yNumber); + TVirtualMC::GetMC()->CurrentVolOffID(0, xNumber); // really x number now Int_t CurrentSMType = 0; - if(strcmp(gMC->CurrentVolOffName(4),"SMOD")==0) CurrentSMType = AliEMCALGeometry::kEMCAL_Standard ; - else if(strcmp(gMC->CurrentVolOffName(4),"SM10")==0) CurrentSMType = AliEMCALGeometry::kEMCAL_Half ; - else if(strcmp(gMC->CurrentVolOffName(4),"SM3rd")==0) CurrentSMType = AliEMCALGeometry::kEMCAL_3rd ; - else if(strcmp(gMC->CurrentVolOffName(4),"DCSM")==0) CurrentSMType = AliEMCALGeometry::kDCAL_Standard ; - else if(strcmp(gMC->CurrentVolOffName(4),"DCEXT")==0) CurrentSMType = AliEMCALGeometry::kDCAL_Ext ; + if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(4),"SMOD")==0) CurrentSMType = AliEMCALGeometry::kEMCAL_Standard ; + else if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(4),"SM10")==0) CurrentSMType = AliEMCALGeometry::kEMCAL_Half ; + else if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(4),"SM3rd")==0) CurrentSMType = AliEMCALGeometry::kEMCAL_3rd ; + else if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(4),"DCSM")==0) CurrentSMType = AliEMCALGeometry::kDCAL_Standard ; + else if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(4),"DCEXT")==0) CurrentSMType = AliEMCALGeometry::kDCAL_Ext ; else AliError("Unkown SM Type!!"); Int_t preSM = 0; while( fGeometry->GetSMType(preSM) != CurrentSMType ) preSM++; supModuleNumber += preSM; // Nov 10,2006 - if(strcmp(gMC->CurrentVolOffName(0),vn) != 0) { // 3X3 case - if (strcmp(gMC->CurrentVolOffName(0),"SCX1")==0) xNumber=1; - else if(strcmp(gMC->CurrentVolOffName(0),"SCX2")==0) xNumber=2; - else if(strcmp(gMC->CurrentVolOffName(0),"SCX3")==0) xNumber=3; - else Fatal("StepManager()", "Wrong name of sensitive volume in 3X3 case : %s ", gMC->CurrentVolOffName(0)); + if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(0),vn) != 0) { // 3X3 case + if (strcmp(TVirtualMC::GetMC()->CurrentVolOffName(0),"SCX1")==0) xNumber=1; + else if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(0),"SCX2")==0) xNumber=2; + else if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(0),"SCX3")==0) xNumber=3; + else Fatal("StepManager()", "Wrong name of sensitive volume in 3X3 case : %s ", TVirtualMC::GetMC()->CurrentVolOffName(0)); } } else { - gMC->CurrentVolOffID(5, supModuleNumber); - gMC->CurrentVolOffID(4, moduleNumber); - gMC->CurrentVolOffID(1, yNumber); - gMC->CurrentVolOffID(0, xNumber); - if (strcmp(gMC->CurrentVolOffName(5),"SMOP")==0) supModuleNumber = 2*(supModuleNumber-1)+1; - else if(strcmp(gMC->CurrentVolOffName(5),"SMON")==0) supModuleNumber = 2*(supModuleNumber-1)+2; + TVirtualMC::GetMC()->CurrentVolOffID(5, supModuleNumber); + TVirtualMC::GetMC()->CurrentVolOffID(4, moduleNumber); + TVirtualMC::GetMC()->CurrentVolOffID(1, yNumber); + TVirtualMC::GetMC()->CurrentVolOffID(0, xNumber); + if (strcmp(TVirtualMC::GetMC()->CurrentVolOffName(5),"SMOP")==0) supModuleNumber = 2*(supModuleNumber-1)+1; + else if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(5),"SMON")==0) supModuleNumber = 2*(supModuleNumber-1)+2; else assert(0); // something wrong } @@ -255,13 +255,13 @@ void AliEMCALv2::StepManager(void){ Int_t smType = 1; fGeometry->GetCellPhiEtaIndexInSModule(smNumber,moduleNumber-1,yNumber-1,xNumber-1, iphi, ieta); if (smNumber%2 == 0) { - if(strcmp(gMC->CurrentVolOffName(4),"DCSM")==0) smType = 3; //DCal supermodule. previous design/idea + if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(4),"DCSM")==0) smType = 3; //DCal supermodule. previous design/idea else smType = 2; ieta = ((fGeometry->GetCentersOfCellsEtaDir()).GetSize()* 2/smType -1)-ieta;// 47/31-ieta, revert the ordering on A side in order to keep convention. } else { - if(strcmp(gMC->CurrentVolOffName(4),"SM10")==0) smType = 2 ; //half supermodule. previous design/idea - if(strcmp(gMC->CurrentVolOffName(4),"SM3rd")==0) smType = 3 ; //one third (installed in 2012) supermodule - if(strcmp(gMC->CurrentVolOffName(4),"DCEXT")==0) smType = 3 ; //one third (installed in 2012) supermodule + if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(4),"SM10")==0) smType = 2 ; //half supermodule. previous design/idea + if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(4),"SM3rd")==0) smType = 3 ; //one third (installed in 2012) supermodule + if(strcmp(TVirtualMC::GetMC()->CurrentVolOffName(4),"DCEXT")==0) smType = 3 ; //one third (installed in 2012) supermodule iphi= ((fGeometry->GetCentersOfCellsPhiDir()).GetSize()/smType-1)-iphi;// 23/7-iphi, revert the ordering on C side in order to keep convention. } @@ -277,15 +277,15 @@ void AliEMCALv2::StepManager(void){ Float_t lightYield = depositedEnergy ; // Apply Birk's law (copied from G3BIRK) - if (gMC->TrackCharge()!=0) { // Check + if (TVirtualMC::GetMC()->TrackCharge()!=0) { // Check Float_t birkC1Mod = 0; if (fBirkC0==1){ // Apply correction for higher charge states - if (TMath::Abs(gMC->TrackCharge())>=2) birkC1Mod = fBirkC1*7.2/12.6; + if (TMath::Abs(TVirtualMC::GetMC()->TrackCharge())>=2) birkC1Mod = fBirkC1*7.2/12.6; else birkC1Mod = fBirkC1; } Float_t dedxcm=0.; - if (gMC->TrackStep()>0) dedxcm=1000.*gMC->Edep()/gMC->TrackStep(); + if (TVirtualMC::GetMC()->TrackStep()>0) dedxcm=1000.*TVirtualMC::GetMC()->Edep()/TVirtualMC::GetMC()->TrackStep(); else dedxcm=0; lightYield=lightYield/(1.+birkC1Mod*dedxcm+fBirkC2*dedxcm*dedxcm); } diff --git a/EVGEN/AliGenCorrHF.cxx b/EVGEN/AliGenCorrHF.cxx index 024c2ec1443..4e5ba352c01 100644 --- a/EVGEN/AliGenCorrHF.cxx +++ b/EVGEN/AliGenCorrHF.cxx @@ -273,7 +273,7 @@ void AliGenCorrHF::Init() // particle decay related initialization - if (gMC) fDecayer = gMC->GetDecayer(); + if (TVirtualMC::GetMC()) fDecayer = TVirtualMC::GetMC()->GetDecayer(); fDecayer->SetForceDecay(fForceDecay); fDecayer->Init(); diff --git a/EVGEN/AliGenEMCocktail.cxx b/EVGEN/AliGenEMCocktail.cxx index bb6f8d36d6a..3be063f2d69 100644 --- a/EVGEN/AliGenEMCocktail.cxx +++ b/EVGEN/AliGenEMCocktail.cxx @@ -254,7 +254,7 @@ void AliGenEMCocktail::AddSource2Generator(Char_t* nameSource, genSource->SetPhiRange(phiMin, phiMax); genSource->SetWeighting(fWeightingMode); genSource->SetForceGammaConversion(fForceConv); - if (!gMC) genSource->SetDecayer(fDecayer); + if (!TVirtualMC::GetMC()) genSource->SetDecayer(fDecayer); genSource->Init(); AddGenerator(genSource,nameSource,1.); // Adding Generator diff --git a/EVGEN/AliGenHIJINGpara.cxx b/EVGEN/AliGenHIJINGpara.cxx index f3fa75d3573..89063510b98 100644 --- a/EVGEN/AliGenHIJINGpara.cxx +++ b/EVGEN/AliGenHIJINGpara.cxx @@ -279,8 +279,8 @@ void AliGenHIJINGpara::Init() } // // - if (fPi0Decays && gMC) - fDecayer = gMC->GetDecayer(); + if (fPi0Decays && TVirtualMC::GetMC()) + fDecayer = TVirtualMC::GetMC()->GetDecayer(); if (fPi0Decays) { diff --git a/EVGEN/AliGenMUONCocktailpp.cxx b/EVGEN/AliGenMUONCocktailpp.cxx index 4096c7b1739..0d0dd401098 100644 --- a/EVGEN/AliGenMUONCocktailpp.cxx +++ b/EVGEN/AliGenMUONCocktailpp.cxx @@ -562,7 +562,7 @@ void AliGenMUONCocktailpp::CreateCocktail() gencharm->SetMomentumRange(0,9999); gencharm->SetForceDecay(kAll); Double_t ratioccbar = chard[fCentralityBin]*sigmaccbar/fSigmaReaction; - if (!gMC) gencharm->SetDecayer(fDecayer); + if (!TVirtualMC::GetMC()) gencharm->SetDecayer(fDecayer); gencharm->Init(); if (!fSigmaSilent) { AliInfo(Form("c-cbar prod. cross-section in pp %5.3g b",sigmaccbar)); @@ -575,7 +575,7 @@ void AliGenMUONCocktailpp::CreateCocktail() genbeauty->SetMomentumRange(0,9999); genbeauty->SetForceDecay(kAll); Double_t ratiobbbar = bhard[fCentralityBin]*sigmabbbar/fSigmaReaction; - if (!gMC) genbeauty->SetDecayer(fDecayer); + if (!TVirtualMC::GetMC()) genbeauty->SetDecayer(fDecayer); genbeauty->Init(); if (!fSigmaSilent) { AliInfo(Form("b-bbar prod. cross-section in pp %5.3g b",sigmabbbar)); @@ -620,7 +620,7 @@ void AliGenMUONCocktailpp::AddReso2Generator(Char_t* nameReso, genReso->SetYRange(-8.,8.); genReso->SetPhiRange(0.,360.); genReso->SetForceDecay(fDecayModeResonance); - if (!gMC) genReso->SetDecayer(fDecayer); + if (!TVirtualMC::GetMC()) genReso->SetDecayer(fDecayer); genReso->Init(); // generation in 4pi // Ratios with respect to the reaction cross-section in the // kinematics limit of the MUONCocktail diff --git a/EVGEN/AliGenParam.cxx b/EVGEN/AliGenParam.cxx index a2dafd2b1ba..662a1855072 100644 --- a/EVGEN/AliGenParam.cxx +++ b/EVGEN/AliGenParam.cxx @@ -427,7 +427,7 @@ void AliGenParam::Init() { // Initialisation - if (gMC) fDecayer = gMC->GetDecayer(); + if (TVirtualMC::GetMC()) fDecayer = TVirtualMC::GetMC()->GetDecayer(); //Begin_Html /* diff --git a/EVGEN/AliGenReaderCwn.cxx b/EVGEN/AliGenReaderCwn.cxx index 33f75e5aaee..08444493f7e 100644 --- a/EVGEN/AliGenReaderCwn.cxx +++ b/EVGEN/AliGenReaderCwn.cxx @@ -142,7 +142,7 @@ TParticle* AliGenReaderCwn::NextParticle() Float_t prwn; Float_t p[4]; // Read the next particle - if (fCode == kGEANT3) fIdpart=gMC->PDGFromId(fIdpart); + if (fCode == kGEANT3) fIdpart=TVirtualMC::GetMC()->PDGFromId(fIdpart); Double_t amass = TDatabasePDG::Instance()->GetParticle(fIdpart)->Mass(); if(fE<=amass) { Warning("Generate","Particle %d E = %f mass = %f %f %f \n", diff --git a/EVGEN/AliGenTunedOnPbPb.cxx b/EVGEN/AliGenTunedOnPbPb.cxx index 1a3fe9fc819..fd52f9ef543 100644 --- a/EVGEN/AliGenTunedOnPbPb.cxx +++ b/EVGEN/AliGenTunedOnPbPb.cxx @@ -187,7 +187,7 @@ void AliGenTunedOnPbPb::Generate() Double_t phi = fgV2->GetRandom(-TMath::Pi(),TMath::Pi()); Double_t px = pt*TMath::Cos(phi); Double_t py = pt*TMath::Sin(phi); - Float_t p[3] = {px,py,pz}; + Float_t p[3] = {static_cast(px),static_cast(py),static_cast(pz)}; Float_t polar[3] = {0.,0.,0.}; if(TMath::Abs(y)< fYlimitForFlatness || gRandom->Rndm() < 1 - fYdecreaseSp*(TMath::Abs(y) - fYlimitForFlatness)){// check on pseudorapidity distribution diff --git a/FIT/AliFITv0.cxx b/FIT/AliFITv0.cxx index 4b81d412ff2..ac5ce4ea68d 100644 --- a/FIT/AliFITv0.cxx +++ b/FIT/AliFITv0.cxx @@ -135,24 +135,24 @@ void AliFITv0::CreateGeometry() //mother tube - gMC->Gsvolu("0STR","TUBE",idtmed[kAir],pstart,18); - gMC->Gspos("0STR",1,"ALIC",0.,0.,-zdetC-pstart[2],idrotm[901],"ONLY"); - gMC->Gspos("0STR",2,"ALIC",0.,0.,zdetA+pstart[2],0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0STR","TUBE",idtmed[kAir],pstart,18); + TVirtualMC::GetMC()->Gspos("0STR",1,"ALIC",0.,0.,-zdetC-pstart[2],idrotm[901],"ONLY"); + TVirtualMC::GetMC()->Gspos("0STR",2,"ALIC",0.,0.,zdetA+pstart[2],0,"ONLY"); //T0 interior - gMC->Gsvolu("0INS","BOX",idtmed[kAir],pinstart,3); + TVirtualMC::GetMC()->Gsvolu("0INS","BOX",idtmed[kAir],pinstart,3); z=-pstart[2]+pinstart[2]; for (Int_t is=0; is<20; is++) { - gMC->Gspos ("0INS", is + 1, "0STR", x1[is], y1[is], z, 0, "ONLY"); - gMC->Gspos ("0INS", is + 21, "0STR", x1[is], y1[is], z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0INS", is + 1, "0STR", x1[is], y1[is], z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0INS", is + 21, "0STR", x1[is], y1[is], z, 0, "ONLY"); printf(" 0INS is %i x %f y %f z %f \n",is, x1[is],y1[is], z); } // x=y=0; // Entry window (glass) - gMC->Gsvolu("0TOP","BOX",idtmed[kAir],ptop,3); //glass - gMC->Gsvolu ("0REG", "BOX", idtmed[kSensAir], preg, 3); - gMC->Gsvolu("0MCP","BOX",idtmed[kGlass],pmcp,3); //glass + TVirtualMC::GetMC()->Gsvolu("0TOP","BOX",idtmed[kAir],ptop,3); //glass + TVirtualMC::GetMC()->Gsvolu ("0REG", "BOX", idtmed[kSensAir], preg, 3); + TVirtualMC::GetMC()->Gsvolu("0MCP","BOX",idtmed[kGlass],pmcp,3); //glass Int_t ntops=0; Float_t xin=0, yin=0; for (Int_t ix=0; ix<4; ix++) { @@ -161,10 +161,10 @@ void AliFITv0::CreateGeometry() z = - pinstart[2]+ptop[2]; yin = - pinstart[1] + 0.35 + (iy+0.5)*2*ptop[1]; ntops++; - gMC->Gspos("0TOP",ntops,"0INS",xin,yin,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0TOP",ntops,"0INS",xin,yin,z,0,"ONLY"); // printf(" 0TOP full x %f y %f z %f \n", xin, yin, z); z = -pinstart[2] + 2 * ptop[2] + preg[2]; - gMC->Gspos ("0REG",ntops, "0INS", xin, yin, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0REG",ntops, "0INS", xin, yin, z, 0, "ONLY"); printf(" GEOGEO %i %i %i %f %f %f %f %f %f", ntops, ix, iy, xin,yin,x1[ntops],y1[ntops],x1[ntops]+xin,y1[ntops]+yin); } @@ -173,7 +173,7 @@ void AliFITv0::CreateGeometry() // MCP // TGeoVolume* mcp = gGeoManager->MakeBox("0MCP",kMedMCPGlass, 2.95, 2.95, 1.5); z=-pinstart[2] + 2*ptop[2] + 2*preg[2] + pmcp[2]; - gMC->Gspos("0MCP",1,"0INS",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0MCP",1,"0INS",0,0,z,0,"ONLY"); } //------------------------------------------------------------------------ @@ -248,7 +248,7 @@ void AliFITv0::Init() // Initialises version 0 of the Forward Multiplicity Detector // AliFIT::Init(); - fIdSens1=gMC->VolId("0REG"); + fIdSens1=TVirtualMC::GetMC()->VolId("0REG"); AliDebug(1,Form("%s: *** FIT version 0 initialized ***\n",ClassName())); } @@ -268,16 +268,16 @@ void AliFITv0::StepManager() // TClonesArray &lhits = *fHits; - if(!gMC->IsTrackAlive()) return; // particle has disappeared + if(!TVirtualMC::GetMC()->IsTrackAlive()) return; // particle has disappeared - id=gMC->CurrentVolID(copy); + id=TVirtualMC::GetMC()->CurrentVolID(copy); // Check the sensetive volume if(id==fIdSens1 ) { - if(gMC->IsTrackEntering()) { - gMC->CurrentVolOffID(1,copy1); + if(TVirtualMC::GetMC()->IsTrackEntering()) { + TVirtualMC::GetMC()->CurrentVolOffID(1,copy1); vol[1] = copy1; vol[0]=copy; - gMC->TrackPosition(pos); + TVirtualMC::GetMC()->TrackPosition(pos); hits[0] = pos[0]; hits[1] = pos[1]; hits[2] = pos[2]; @@ -285,19 +285,19 @@ void AliFITv0::StepManager() else vol[2] = 1 ; printf(" volumes pmt %i mcp %i side %i x %f y %f z %f\n", vol[0], vol[1], vol[2], hits[0], hits[1], hits[2] ); - Float_t etot=gMC->Etot(); + Float_t etot=TVirtualMC::GetMC()->Etot(); hits[3]=etot; - Int_t iPart= gMC->TrackPid(); - Int_t partID=gMC->IdFromPDG(iPart); + Int_t iPart= TVirtualMC::GetMC()->TrackPid(); + Int_t partID=TVirtualMC::GetMC()->IdFromPDG(iPart); hits[4]=partID; - Float_t ttime=gMC->TrackTime(); + Float_t ttime=TVirtualMC::GetMC()->TrackTime(); hits[5]=ttime*1e12; AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol,hits); // Create a track reference at the exit of photocatode } //charge particle - if ( gMC->TrackCharge() ) + if ( TVirtualMC::GetMC()->TrackCharge() ) AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kFIT); } //sensitive diff --git a/FIT/AliFITv1.cxx b/FIT/AliFITv1.cxx index 192ec2c7786..2b5efb4bf63 100644 --- a/FIT/AliFITv1.cxx +++ b/FIT/AliFITv1.cxx @@ -133,7 +133,7 @@ void AliFITv1::CreateGeometry() TGeoVolumeAssembly * stlin = new TGeoVolumeAssembly("0STL");//empty segment //T0 interior - gMC->Gsvolu("0INS","BOX",idtmed[kAir],pinstart,3); + TVirtualMC::GetMC()->Gsvolu("0INS","BOX",idtmed[kAir],pinstart,3); TGeoVolume *ins = gGeoManager->GetVolume("0INS"); // TGeoTranslation *tr [20]; @@ -154,11 +154,11 @@ void AliFITv1::CreateGeometry() y=0; // Entry window (glass) - gMC->Gsvolu("0TOP","BOX",idtmed[kOpGlass],ptop,3); //glass + TVirtualMC::GetMC()->Gsvolu("0TOP","BOX",idtmed[kOpGlass],ptop,3); //glass TGeoVolume *top = gGeoManager->GetVolume("0TOP"); - gMC->Gsvolu ("0REG", "BOX", idtmed[kOpGlassCathode], preg, 3); + TVirtualMC::GetMC()->Gsvolu ("0REG", "BOX", idtmed[kOpGlassCathode], preg, 3); TGeoVolume *cat = gGeoManager->GetVolume("0REG"); - gMC->Gsvolu("0MCP","BOX",idtmed[kGlass],pmcp,3); //glass + TVirtualMC::GetMC()->Gsvolu("0MCP","BOX",idtmed[kGlass],pmcp,3); //glass TGeoVolume *mcp = gGeoManager->GetVolume("0MCP"); Int_t ntops=0; @@ -314,16 +314,16 @@ void AliFITv1::DefineOpticalProperties() } - gMC->SetCerenkov (idtmed[kOpGlass], kNbins, aPckov, aAbsSiO2, efficAll, rindexSiO2 ); - // gMC->SetCerenkov (idtmed[kOpGlassCathode], kNbins, aPckov, aAbsSiO2, effCathode, rindexSiO2 ); - gMC->SetCerenkov (idtmed[kOpGlassCathode], kNbins, aPckov, aAbsSiO2,efficAll , rindexSiO2 ); - // gMC->SetCerenkov (idtmed[kOpAir], kNbins, aPckov,absorAir , efficAll,rindexAir ); - // gMC->SetCerenkov (idtmed[kOpAirNext], kNbins, aPckov,absorbCathodeNext , efficAll, rindexCathodeNext); + TVirtualMC::GetMC()->SetCerenkov (idtmed[kOpGlass], kNbins, aPckov, aAbsSiO2, efficAll, rindexSiO2 ); + // TVirtualMC::GetMC()->SetCerenkov (idtmed[kOpGlassCathode], kNbins, aPckov, aAbsSiO2, effCathode, rindexSiO2 ); + TVirtualMC::GetMC()->SetCerenkov (idtmed[kOpGlassCathode], kNbins, aPckov, aAbsSiO2,efficAll , rindexSiO2 ); + // TVirtualMC::GetMC()->SetCerenkov (idtmed[kOpAir], kNbins, aPckov,absorAir , efficAll,rindexAir ); + // TVirtualMC::GetMC()->SetCerenkov (idtmed[kOpAirNext], kNbins, aPckov,absorbCathodeNext , efficAll, rindexCathodeNext); //Define a boarder for radiator optical properties - gMC->DefineOpSurface("surfRd", kUnified /*kGlisur*/,kDielectric_metal,kPolished, 0.); - gMC->SetMaterialProperty("surfRd", "EFFICIENCY", kNbins, dPckov, efficMet); - gMC->SetMaterialProperty("surfRd", "REFLECTIVITY", kNbins, dPckov, aReflMet); + TVirtualMC::GetMC()->DefineOpSurface("surfRd", kUnified /*kGlisur*/,kDielectric_metal,kPolished, 0.); + TVirtualMC::GetMC()->SetMaterialProperty("surfRd", "EFFICIENCY", kNbins, dPckov, efficMet); + TVirtualMC::GetMC()->SetMaterialProperty("surfRd", "REFLECTIVITY", kNbins, dPckov, aReflMet); } @@ -334,7 +334,7 @@ void AliFITv1::Init() // Initialises version 0 of the Forward Multiplicity Detector // AliFIT::Init(); - fIdSens1=gMC->VolId("0REG"); + fIdSens1=TVirtualMC::GetMC()->VolId("0REG"); AliDebug(1,Form("%s: *** FIT version 1 initialized ***\n",ClassName())); } @@ -354,16 +354,16 @@ void AliFITv1::StepManager() // TClonesArray &lhits = *fHits; - if(!gMC->IsTrackAlive()) return; // particle has disappeared + if(!TVirtualMC::GetMC()->IsTrackAlive()) return; // particle has disappeared - id=gMC->CurrentVolID(copy); + id=TVirtualMC::GetMC()->CurrentVolID(copy); // Check the sensetive volume if(id==fIdSens1 ) { - if(gMC->IsTrackEntering()) { - gMC->CurrentVolOffID(1,copy1); + if(TVirtualMC::GetMC()->IsTrackEntering()) { + TVirtualMC::GetMC()->CurrentVolOffID(1,copy1); vol[1] = copy1; vol[0]=copy; - gMC->TrackPosition(pos); + TVirtualMC::GetMC()->TrackPosition(pos); hits[0] = pos[0]; hits[1] = pos[1]; hits[2] = pos[2]; @@ -371,14 +371,14 @@ void AliFITv1::StepManager() else vol[2] = 1 ; // printf(" volumes pmt %i mcp %i side %i x %f y %f z %f\n", vol[0], vol[1], vol[2], hits[0], hits[1], hits[2] ); - Float_t etot=gMC->Etot(); + Float_t etot=TVirtualMC::GetMC()->Etot(); hits[3]=etot; - Int_t iPart= gMC->TrackPid(); - Int_t partID=gMC->IdFromPDG(iPart); + Int_t iPart= TVirtualMC::GetMC()->TrackPid(); + Int_t partID=TVirtualMC::GetMC()->IdFromPDG(iPart); hits[4]=partID; - Float_t ttime=gMC->TrackTime(); + Float_t ttime=TVirtualMC::GetMC()->TrackTime(); hits[5]=ttime*1e12; - if (gMC->TrackPid() == 50000050) // If particles is photon then ... + if (TVirtualMC::GetMC()->TrackPid() == 50000050) // If particles is photon then ... { // if(RegisterPhotoE(vol[1]-1,hits[3])) { if(RegisterPhotoE(hits[3])) { @@ -388,7 +388,7 @@ void AliFITv1::StepManager() } //charge particle - if ( gMC->TrackCharge() ) + if ( TVirtualMC::GetMC()->TrackCharge() ) AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kFIT); }// trck entering diff --git a/FMD/AliFMD.cxx b/FMD/AliFMD.cxx index aa0e671c61b..9f950a956cb 100644 --- a/FMD/AliFMD.cxx +++ b/FMD/AliFMD.cxx @@ -458,30 +458,30 @@ AliFMD::SetTrackingParameters(Int_t imed, Int_t rayleigh_scattering) { // Disabled by request of FCA, kept for reference only - if (!gMC) return; + if (!TVirtualMC::GetMC()) return; TArrayI& idtmed = *(GetIdtmed()); Int_t iimed = idtmed[imed]; - // gMC->Gstpar(iimed, "CUTGAM", gamma); - // gMC->Gstpar(iimed, "CUTELE", electron); - // gMC->Gstpar(iimed, "CUTNEU", neutral_hadron); - // gMC->Gstpar(iimed, "CUTHAD", charged_hadron); - // gMC->Gstpar(iimed, "CUTMUO", muon); - // gMC->Gstpar(iimed, "BCUTE", electron_bremstrahlung); - // gMC->Gstpar(iimed, "BCUTM", muon__bremstrahlung); - // gMC->Gstpar(iimed, "DCUTE", electron_delta); - // gMC->Gstpar(iimed, "DCUTM", muon_delta); - // gMC->Gstpar(iimed, "PPCUTM", muon_pair); - // gMC->Gstpar(iimed, "ANNI", Float_t(annihilation)); - // gMC->Gstpar(iimed, "BREM", Float_t(bremstrahlung)); - // gMC->Gstpar(iimed, "COMP", Float_t(compton_scattering)); - // gMC->Gstpar(iimed, "DCAY", Float_t(decay)); - // gMC->Gstpar(iimed, "DRAY", Float_t(delta_ray)); - // gMC->Gstpar(iimed, "HADR", Float_t(hadronic)); - // gMC->Gstpar(iimed, "LOSS", Float_t(energy_loss)); - // gMC->Gstpar(iimed, "MULS", Float_t(multiple_scattering)); - // gMC->Gstpar(iimed, "PAIR", Float_t(pair_production)); - // gMC->Gstpar(iimed, "PHOT", Float_t(photon_production)); - // gMC->Gstpar(iimed, "RAYL", Float_t(rayleigh_scattering)); + // TVirtualMC::GetMC()->Gstpar(iimed, "CUTGAM", gamma); + // TVirtualMC::GetMC()->Gstpar(iimed, "CUTELE", electron); + // TVirtualMC::GetMC()->Gstpar(iimed, "CUTNEU", neutral_hadron); + // TVirtualMC::GetMC()->Gstpar(iimed, "CUTHAD", charged_hadron); + // TVirtualMC::GetMC()->Gstpar(iimed, "CUTMUO", muon); + // TVirtualMC::GetMC()->Gstpar(iimed, "BCUTE", electron_bremstrahlung); + // TVirtualMC::GetMC()->Gstpar(iimed, "BCUTM", muon__bremstrahlung); + // TVirtualMC::GetMC()->Gstpar(iimed, "DCUTE", electron_delta); + // TVirtualMC::GetMC()->Gstpar(iimed, "DCUTM", muon_delta); + // TVirtualMC::GetMC()->Gstpar(iimed, "PPCUTM", muon_pair); + // TVirtualMC::GetMC()->Gstpar(iimed, "ANNI", Float_t(annihilation)); + // TVirtualMC::GetMC()->Gstpar(iimed, "BREM", Float_t(bremstrahlung)); + // TVirtualMC::GetMC()->Gstpar(iimed, "COMP", Float_t(compton_scattering)); + // TVirtualMC::GetMC()->Gstpar(iimed, "DCAY", Float_t(decay)); + // TVirtualMC::GetMC()->Gstpar(iimed, "DRAY", Float_t(delta_ray)); + // TVirtualMC::GetMC()->Gstpar(iimed, "HADR", Float_t(hadronic)); + // TVirtualMC::GetMC()->Gstpar(iimed, "LOSS", Float_t(energy_loss)); + // TVirtualMC::GetMC()->Gstpar(iimed, "MULS", Float_t(multiple_scattering)); + // TVirtualMC::GetMC()->Gstpar(iimed, "PAIR", Float_t(pair_production)); + // TVirtualMC::GetMC()->Gstpar(iimed, "PHOT", Float_t(photon_production)); + // TVirtualMC::GetMC()->Gstpar(iimed, "RAYL", Float_t(rayleigh_scattering)); } #endif @@ -730,7 +730,7 @@ AliFMD::AddHitByFields(Int_t track, hit = new (a[fNhits]) AliFMDHit(fIshunt, track, detector, ring, sector, strip, x, y, z, px, py, pz, edep, pdg, t, l, stop); - // gMC->AddTrackReference(track, 12); + // TVirtualMC::GetMC()->AddTrackReference(track, 12); fNhits++; //Reference track diff --git a/HLT/BASE/AliHLTComponent.cxx b/HLT/BASE/AliHLTComponent.cxx index ebcdba1c16c..1b64a0f17b7 100644 --- a/HLT/BASE/AliHLTComponent.cxx +++ b/HLT/BASE/AliHLTComponent.cxx @@ -85,7 +85,7 @@ AliHLTComponent::AliHLTComponent() fpStopwatches(new TObjArray(kSWTypeCount)), fMemFiles(), fpRunDesc(NULL), - fCDBSetRunNoFunc(false), + fCDBSetRunNoFunc(NULL), fChainId(), fChainIdCrc(0), fpBenchmark(NULL), diff --git a/HLT/CALO/AliHLTCaloClusterizerComponent.cxx b/HLT/CALO/AliHLTCaloClusterizerComponent.cxx index dc26fc40041..cde658f4fa0 100644 --- a/HLT/CALO/AliHLTCaloClusterizerComponent.cxx +++ b/HLT/CALO/AliHLTCaloClusterizerComponent.cxx @@ -43,7 +43,7 @@ ClassImp(AliHLTCaloClusterizerComponent); AliHLTCaloClusterizerComponent::AliHLTCaloClusterizerComponent(TString det): AliHLTCaloProcessor(), AliHLTCaloConstantsHandler(det), - fDataOrigin('\0'), + fDataOrigin(0), fAnalyserPtr(0), fRecoParamsPtr(0), fClusterizerPtr(0), diff --git a/HMPID/AliHMPIDv1.cxx b/HMPID/AliHMPIDv1.cxx index 0ce7e8d56b9..5d89fd43cd2 100644 --- a/HMPID/AliHMPIDv1.cxx +++ b/HMPID/AliHMPIDv1.cxx @@ -20,7 +20,7 @@ #include "AliHMPIDDigit.h" //Digits2Raw(), Raw2SDigits() #include "AliHMPIDRawStream.h" //Digits2Raw(), Raw2SDigits() #include "AliRawReader.h" //Raw2SDigits() -#include //StepManager() for gMC +#include //StepManager() for TVirtualMC::GetMC() #include //StepHistory() #include //StepManager(),Hits2SDigits() #include //Hits2SDigits() @@ -93,7 +93,7 @@ void AliHMPIDv1::CreateGeometry() { //Creates detailed geometry simulation (currently GEANT volumes tree) AliDebug(1,"Start main."); - if(!gMC->IsRootGeometrySupported()) return; + if(!TVirtualMC::GetMC()->IsRootGeometrySupported()) return; Double_t cm=1,mm=0.1*cm,mkm=0.001*mm,dx,dy,dz;//default is cm @@ -109,90 +109,90 @@ void AliHMPIDv1::CreateGeometry() Float_t par[3]; Int_t matrixIdReturn=0; //matrix id returned by AliMatrix //Pad Panel frame 6 sectors - par[0]=648*mm/2;par[1]= 411*mm/2;par[2]=40 *mm/2;gMC->Gsvolu("Rppf" ,"BOX ",(*fIdtmed)[kAl] ,par,3);//PPF 2001P2 inner size of the slab by 1mm more - par[0]=181*mm/2;par[1]=89.25*mm/2;par[2]=38.3*mm/2;gMC->Gsvolu("RppfLarge","BOX ",(*fIdtmed)[kAir] ,par,3);//large whole - par[0]=114*mm/2;par[1]=89.25*mm/2;par[2]=38.3*mm/2;gMC->Gsvolu("RppfSmall","BOX ",(*fIdtmed)[kAir] ,par,3);//small whole - par[0]=644*mm/2;par[1]= 407*mm/2;par[2]= 1.7*mm/2;gMC->Gsvolu("Rpc" ,"BOX ",(*fIdtmed)[kCsI] ,par,3);//by 0.2 mm more then actual size (PCB 2006P1) + par[0]=648*mm/2;par[1]= 411*mm/2;par[2]=40 *mm/2;TVirtualMC::GetMC()->Gsvolu("Rppf" ,"BOX ",(*fIdtmed)[kAl] ,par,3);//PPF 2001P2 inner size of the slab by 1mm more + par[0]=181*mm/2;par[1]=89.25*mm/2;par[2]=38.3*mm/2;TVirtualMC::GetMC()->Gsvolu("RppfLarge","BOX ",(*fIdtmed)[kAir] ,par,3);//large whole + par[0]=114*mm/2;par[1]=89.25*mm/2;par[2]=38.3*mm/2;TVirtualMC::GetMC()->Gsvolu("RppfSmall","BOX ",(*fIdtmed)[kAir] ,par,3);//small whole + par[0]=644*mm/2;par[1]= 407*mm/2;par[2]= 1.7*mm/2;TVirtualMC::GetMC()->Gsvolu("Rpc" ,"BOX ",(*fIdtmed)[kCsI] ,par,3);//by 0.2 mm more then actual size (PCB 2006P1) - gMC->Gspos("Rppf",0,"HMPID", -335*mm, -433*mm, 8*cm+20*mm, 0,"ONLY");//F1 2040P1 z p.84 TDR - gMC->Gspos("Rppf",1,"HMPID", +335*mm, -433*mm, 8*cm+20*mm, 0,"ONLY"); - gMC->Gspos("Rppf",2,"HMPID", -335*mm, 0*mm, 8*cm+20*mm, 0,"ONLY"); - gMC->Gspos("Rppf",3,"HMPID", +335*mm, 0*mm, 8*cm+20*mm, 0,"ONLY"); - gMC->Gspos("Rppf",4,"HMPID", -335*mm, +433*mm, 8*cm+20*mm, 0,"ONLY"); - gMC->Gspos("Rppf",5,"HMPID", +335*mm, +433*mm, 8*cm+20*mm, 0,"ONLY"); - gMC->Gspos("Rpc" ,1,"Rppf", 0*mm, 0*mm, -19.15*mm, 0,"ONLY");//PPF 2001P2 - gMC->Gspos("RppfLarge",1,"Rppf", -224.5*mm, -151.875*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfLarge",2,"Rppf", -224.5*mm, - 50.625*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfLarge",3,"Rppf", -224.5*mm, + 50.625*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfLarge",4,"Rppf", -224.5*mm, +151.875*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfSmall",1,"Rppf", - 65.0*mm, -151.875*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfSmall",2,"Rppf", - 65.0*mm, - 50.625*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfSmall",3,"Rppf", - 65.0*mm, + 50.625*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfSmall",4,"Rppf", - 65.0*mm, +151.875*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfSmall",5,"Rppf", + 65.0*mm, -151.875*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfSmall",6,"Rppf", + 65.0*mm, - 50.625*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfSmall",7,"Rppf", + 65.0*mm, + 50.625*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfSmall",8,"Rppf", + 65.0*mm, +151.875*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfLarge",5,"Rppf", +224.5*mm, -151.875*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfLarge",6,"Rppf", +224.5*mm, - 50.625*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfLarge",7,"Rppf", +224.5*mm, + 50.625*mm, 0.85*mm, 0,"ONLY"); - gMC->Gspos("RppfLarge",8,"Rppf", +224.5*mm, +151.875*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rppf",0,"HMPID", -335*mm, -433*mm, 8*cm+20*mm, 0,"ONLY");//F1 2040P1 z p.84 TDR + TVirtualMC::GetMC()->Gspos("Rppf",1,"HMPID", +335*mm, -433*mm, 8*cm+20*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rppf",2,"HMPID", -335*mm, 0*mm, 8*cm+20*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rppf",3,"HMPID", +335*mm, 0*mm, 8*cm+20*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rppf",4,"HMPID", -335*mm, +433*mm, 8*cm+20*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rppf",5,"HMPID", +335*mm, +433*mm, 8*cm+20*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rpc" ,1,"Rppf", 0*mm, 0*mm, -19.15*mm, 0,"ONLY");//PPF 2001P2 + TVirtualMC::GetMC()->Gspos("RppfLarge",1,"Rppf", -224.5*mm, -151.875*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfLarge",2,"Rppf", -224.5*mm, - 50.625*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfLarge",3,"Rppf", -224.5*mm, + 50.625*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfLarge",4,"Rppf", -224.5*mm, +151.875*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfSmall",1,"Rppf", - 65.0*mm, -151.875*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfSmall",2,"Rppf", - 65.0*mm, - 50.625*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfSmall",3,"Rppf", - 65.0*mm, + 50.625*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfSmall",4,"Rppf", - 65.0*mm, +151.875*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfSmall",5,"Rppf", + 65.0*mm, -151.875*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfSmall",6,"Rppf", + 65.0*mm, - 50.625*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfSmall",7,"Rppf", + 65.0*mm, + 50.625*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfSmall",8,"Rppf", + 65.0*mm, +151.875*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfLarge",5,"Rppf", +224.5*mm, -151.875*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfLarge",6,"Rppf", +224.5*mm, - 50.625*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfLarge",7,"Rppf", +224.5*mm, + 50.625*mm, 0.85*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RppfLarge",8,"Rppf", +224.5*mm, +151.875*mm, 0.85*mm, 0,"ONLY"); //Gap - anod wires 6 copies to HMPID - par[0]=648*mm/2;par[1]= 411*mm/2 ;par[2]=4.45*mm/2;gMC->Gsvolu("Rgap","BOX ",(*fIdtmed)[kCH4] ,par,3);//xy as PPF 2001P2 z WP 2099P1 - par[0]= 0*mm ;par[1]= 20*mkm/2 ;par[2]= 648*mm/2;gMC->Gsvolu("Rano","TUBE",(*fIdtmed)[kW] ,par,3);//WP 2099P1 z = gap x PPF 2001P2 + par[0]=648*mm/2;par[1]= 411*mm/2 ;par[2]=4.45*mm/2;TVirtualMC::GetMC()->Gsvolu("Rgap","BOX ",(*fIdtmed)[kCH4] ,par,3);//xy as PPF 2001P2 z WP 2099P1 + par[0]= 0*mm ;par[1]= 20*mkm/2 ;par[2]= 648*mm/2;TVirtualMC::GetMC()->Gsvolu("Rano","TUBE",(*fIdtmed)[kW] ,par,3);//WP 2099P1 z = gap x PPF 2001P2 AliMatrix(matrixIdReturn,180,0, 90,90, 90,0); //wires along x - gMC->Gspos("Rgap",0,"HMPID", -335*mm, -433*mm,8*cm-2.225*mm, 0,"ONLY"); //F1 2040P1 z WP 2099P1 - gMC->Gspos("Rgap",1,"HMPID", +335*mm, -433*mm,8*cm-2.225*mm, 0,"ONLY"); - gMC->Gspos("Rgap",2,"HMPID", -335*mm, 0*mm,8*cm-2.225*mm, 0,"ONLY"); - gMC->Gspos("Rgap",3,"HMPID", +335*mm, 0*mm,8*cm-2.225*mm, 0,"ONLY"); - gMC->Gspos("Rgap",4,"HMPID", -335*mm, +433*mm,8*cm-2.225*mm, 0,"ONLY"); - gMC->Gspos("Rgap",5,"HMPID", +335*mm, +433*mm,8*cm-2.225*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rgap",0,"HMPID", -335*mm, -433*mm,8*cm-2.225*mm, 0,"ONLY"); //F1 2040P1 z WP 2099P1 + TVirtualMC::GetMC()->Gspos("Rgap",1,"HMPID", +335*mm, -433*mm,8*cm-2.225*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rgap",2,"HMPID", -335*mm, 0*mm,8*cm-2.225*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rgap",3,"HMPID", +335*mm, 0*mm,8*cm-2.225*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rgap",4,"HMPID", -335*mm, +433*mm,8*cm-2.225*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rgap",5,"HMPID", +335*mm, +433*mm,8*cm-2.225*mm, 0,"ONLY"); for(int i=1;i<=96;i++) - gMC->Gspos("Rano",i,"Rgap", 0*mm, -411/2*mm+i*4*mm, 0.185*mm, matrixIdReturn,"ONLY"); //WP 2099P1 + TVirtualMC::GetMC()->Gspos("Rano",i,"Rgap", 0*mm, -411/2*mm+i*4*mm, 0.185*mm, matrixIdReturn,"ONLY"); //WP 2099P1 //Defines radiators geometry - par[0]=1330*mm/2 ;par[1]= 413*mm/2 ;par[2]= 24*mm/2; gMC->Gsvolu("Rrad" ,"BOX ",(*fIdtmed)[kC6F14] ,par,3); // Rad 2011P1 - par[0]=1330*mm/2 ;par[1]= 413*mm/2 ;par[2]= 4*mm/2; gMC->Gsvolu("RradFront" ,"BOX ",(*fIdtmed)[kRoha] ,par,3); //front - par[0]=1330*mm/2 ;par[1]= 413*mm/2 ;par[2]= 5*mm/2; gMC->Gsvolu("RradWin" ,"BOX ",(*fIdtmed)[kSiO2] ,par,3); //window - par[0]=1330*mm/2 ;par[1]= 5*mm/2 ;par[2]= 15*mm/2; gMC->Gsvolu("RradLong" ,"BOX ",(*fIdtmed)[kRoha] ,par,3); //long side - par[0]= 10*mm/2 ;par[1]= 403*mm/2 ;par[2]= 15*mm/2; gMC->Gsvolu("RradShort" ,"BOX ",(*fIdtmed)[kRoha] ,par,3); //short side - par[0]= 0 ;par[1]= 10*mm/2 ;par[2]= 15*mm/2; gMC->Gsvolu("RradSpacer","TUBE",(*fIdtmed)[kSiO2] ,par,3); //spacer + par[0]=1330*mm/2 ;par[1]= 413*mm/2 ;par[2]= 24*mm/2; TVirtualMC::GetMC()->Gsvolu("Rrad" ,"BOX ",(*fIdtmed)[kC6F14] ,par,3); // Rad 2011P1 + par[0]=1330*mm/2 ;par[1]= 413*mm/2 ;par[2]= 4*mm/2; TVirtualMC::GetMC()->Gsvolu("RradFront" ,"BOX ",(*fIdtmed)[kRoha] ,par,3); //front + par[0]=1330*mm/2 ;par[1]= 413*mm/2 ;par[2]= 5*mm/2; TVirtualMC::GetMC()->Gsvolu("RradWin" ,"BOX ",(*fIdtmed)[kSiO2] ,par,3); //window + par[0]=1330*mm/2 ;par[1]= 5*mm/2 ;par[2]= 15*mm/2; TVirtualMC::GetMC()->Gsvolu("RradLong" ,"BOX ",(*fIdtmed)[kRoha] ,par,3); //long side + par[0]= 10*mm/2 ;par[1]= 403*mm/2 ;par[2]= 15*mm/2; TVirtualMC::GetMC()->Gsvolu("RradShort" ,"BOX ",(*fIdtmed)[kRoha] ,par,3); //short side + par[0]= 0 ;par[1]= 10*mm/2 ;par[2]= 15*mm/2; TVirtualMC::GetMC()->Gsvolu("RradSpacer","TUBE",(*fIdtmed)[kSiO2] ,par,3); //spacer - gMC->Gspos("Rrad",1,"HMPID", 0*mm,-434*mm, -12*mm, 0,"ONLY"); //3 radiators to HMPID - gMC->Gspos("Rrad",2,"HMPID", 0*mm, 0*mm, -12*mm, 0,"ONLY"); - gMC->Gspos("Rrad",3,"HMPID", 0*mm,+434*mm, -12*mm, 0,"ONLY"); - gMC->Gspos("RradFront",1,"Rrad", 0*mm, 0*mm, -10.0*mm, 0,"ONLY"); //front cover - gMC->Gspos("RradWin" ,1,"Rrad", 0*mm, 0*mm, 9.5*mm, 0,"ONLY"); //quartz window (back cover) - gMC->Gspos("RradLong" ,1,"Rrad", 0*mm,-204*mm, -0.5*mm, 0,"ONLY"); //long side - gMC->Gspos("RradLong" ,2,"Rrad", 0*mm,+204*mm, -0.5*mm, 0,"ONLY"); //long side - gMC->Gspos("RradShort",1,"Rrad",-660*mm, 0*mm, -0.5*mm, 0,"ONLY"); //short side - gMC->Gspos("RradShort",2,"Rrad",+660*mm, 0*mm, -0.5*mm, 0,"ONLY"); //short side + TVirtualMC::GetMC()->Gspos("Rrad",1,"HMPID", 0*mm,-434*mm, -12*mm, 0,"ONLY"); //3 radiators to HMPID + TVirtualMC::GetMC()->Gspos("Rrad",2,"HMPID", 0*mm, 0*mm, -12*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("Rrad",3,"HMPID", 0*mm,+434*mm, -12*mm, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("RradFront",1,"Rrad", 0*mm, 0*mm, -10.0*mm, 0,"ONLY"); //front cover + TVirtualMC::GetMC()->Gspos("RradWin" ,1,"Rrad", 0*mm, 0*mm, 9.5*mm, 0,"ONLY"); //quartz window (back cover) + TVirtualMC::GetMC()->Gspos("RradLong" ,1,"Rrad", 0*mm,-204*mm, -0.5*mm, 0,"ONLY"); //long side + TVirtualMC::GetMC()->Gspos("RradLong" ,2,"Rrad", 0*mm,+204*mm, -0.5*mm, 0,"ONLY"); //long side + TVirtualMC::GetMC()->Gspos("RradShort",1,"Rrad",-660*mm, 0*mm, -0.5*mm, 0,"ONLY"); //short side + TVirtualMC::GetMC()->Gspos("RradShort",2,"Rrad",+660*mm, 0*mm, -0.5*mm, 0,"ONLY"); //short side for(int i=0;i<3;i++) for(int j=0;j<10;j++) - gMC->Gspos("RradSpacer",10*i+j,"Rrad",-1330*mm/2+116*mm+j*122*mm,(i-1)*105*mm,-0.5*mm,0,"ONLY");//spacers + TVirtualMC::GetMC()->Gspos("RradSpacer",10*i+j,"Rrad",-1330*mm/2+116*mm+j*122*mm,(i-1)*105*mm,-0.5*mm,0,"ONLY");//spacers //Defines SandBox geometry - par[0]=1419*mm/2 ;par[1]=1378*mm/2;par[2]=50.5*mm/2; gMC->Gsvolu("Rsb" ,"BOX ",(*fIdtmed)[kAir] ,par,3); //2072P1 - par[0]=1419*mm/2 ;par[1]=1378*mm/2;par[2]= 0.5*mm/2; gMC->Gsvolu("RsbCover","BOX ",(*fIdtmed)[kAl] ,par,3); //cover - par[0]=1359*mm/2 ;par[1]=1318*mm/2;par[2]=49.5*mm/2; gMC->Gsvolu("RsbComb" ,"BOX ",(*fIdtmed)[kRoha] ,par,3); //honeycomb structure + par[0]=1419*mm/2 ;par[1]=1378*mm/2;par[2]=50.5*mm/2; TVirtualMC::GetMC()->Gsvolu("Rsb" ,"BOX ",(*fIdtmed)[kAir] ,par,3); //2072P1 + par[0]=1419*mm/2 ;par[1]=1378*mm/2;par[2]= 0.5*mm/2; TVirtualMC::GetMC()->Gsvolu("RsbCover","BOX ",(*fIdtmed)[kAl] ,par,3); //cover + par[0]=1359*mm/2 ;par[1]=1318*mm/2;par[2]=49.5*mm/2; TVirtualMC::GetMC()->Gsvolu("RsbComb" ,"BOX ",(*fIdtmed)[kRoha] ,par,3); //honeycomb structure - gMC->Gspos("Rsb",1,"HMPID", 0*mm, 0*mm, -73.75*mm, 0,"ONLY"); //p.84 TDR sandbox to rich - gMC->Gspos("RsbComb" ,1,"Rsb", 0*mm, 0*mm, 0*mm, 0,"ONLY"); //2072P1 honeycomv to sandbox - gMC->Gspos("RsbCover",1,"Rsb", 0*mm, 0*mm, +25*mm, 0,"ONLY"); //cover to sandbox - gMC->Gspos("RsbCover",2,"Rsb", 0*mm, 0*mm, -25*mm, 0,"ONLY"); //cover to sandbox + TVirtualMC::GetMC()->Gspos("Rsb",1,"HMPID", 0*mm, 0*mm, -73.75*mm, 0,"ONLY"); //p.84 TDR sandbox to rich + TVirtualMC::GetMC()->Gspos("RsbComb" ,1,"Rsb", 0*mm, 0*mm, 0*mm, 0,"ONLY"); //2072P1 honeycomv to sandbox + TVirtualMC::GetMC()->Gspos("RsbCover",1,"Rsb", 0*mm, 0*mm, +25*mm, 0,"ONLY"); //cover to sandbox + TVirtualMC::GetMC()->Gspos("RsbCover",2,"Rsb", 0*mm, 0*mm, -25*mm, 0,"ONLY"); //cover to sandbox AliDebug(1,"Stop v1. HMPID option"); }//CreateGeometry() //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void AliHMPIDv1::Init() { -// This methode defines ID for sensitive volumes, i.e. such geometry volumes for which there are if(gMC->CurrentVolID()==XXX) statements in StepManager() +// This methode defines ID for sensitive volumes, i.e. such geometry volumes for which there are if(TVirtualMC::GetMC()->CurrentVolID()==XXX) statements in StepManager() // Arguments: none // Returns: none AliDebug(1,"Start v1 HMPID."); - fIdRad = gMC->VolId("Rrad"); - fIdWin = gMC->VolId("RradWin"); - fIdPc = gMC->VolId("Rpc"); - fIdAmpGap = gMC->VolId("Rgap"); - fIdProxGap = gMC->VolId("Rgap"); + fIdRad = TVirtualMC::GetMC()->VolId("Rrad"); + fIdWin = TVirtualMC::GetMC()->VolId("RradWin"); + fIdPc = TVirtualMC::GetMC()->VolId("Rpc"); + fIdAmpGap = TVirtualMC::GetMC()->VolId("Rgap"); + fIdProxGap = TVirtualMC::GetMC()->VolId("Rgap"); AliDebug(1,"Stop v1 HMPID."); } @@ -233,19 +233,19 @@ void AliHMPIDv1::DefineOpticalProperties() dQePc [i]=pQeF->Eval(eV); dReflMet[i] = 0.; // no reflection on the surface of the pc (?) } - gMC->SetCerenkov((*fIdtmed)[kC6F14] , kNbins, aEckov, aAbsRad , aQeAll , aIdxRad ); - gMC->SetCerenkov((*fIdtmed)[kSiO2] , kNbins, aEckov, aAbsWin , aQeAll , aIdxWin ); - gMC->SetCerenkov((*fIdtmed)[kCH4] , kNbins, aEckov, aAbsGap , aQeAll , aIdxGap ); - gMC->SetCerenkov((*fIdtmed)[kCu] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); - gMC->SetCerenkov((*fIdtmed)[kW] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); //n=0 means reflect photons - gMC->SetCerenkov((*fIdtmed)[kCsI] , kNbins, aEckov, aAbsMet , aQePc , aIdxPc ); //n=1 means convert photons - gMC->SetCerenkov((*fIdtmed)[kAl] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kC6F14] , kNbins, aEckov, aAbsRad , aQeAll , aIdxRad ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kSiO2] , kNbins, aEckov, aAbsWin , aQeAll , aIdxWin ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kCH4] , kNbins, aEckov, aAbsGap , aQeAll , aIdxGap ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kCu] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kW] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); //n=0 means reflect photons + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kCsI] , kNbins, aEckov, aAbsMet , aQePc , aIdxPc ); //n=1 means convert photons + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kAl] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); // Define a skin surface for the photocatode to enable 'detection' in G4 - gMC->DefineOpSurface("surfPc", kGlisur /*kUnified*/,kDielectric_metal,kPolished, 0.); - gMC->SetMaterialProperty("surfPc", "EFFICIENCY", kNbins, dEckov, dQePc); - gMC->SetMaterialProperty("surfPc", "REFLECTIVITY", kNbins, dEckov, dReflMet); - gMC->SetSkinSurface("skinPc", "Rpc", "surfPc"); + TVirtualMC::GetMC()->DefineOpSurface("surfPc", kGlisur /*kUnified*/,kDielectric_metal,kPolished, 0.); + TVirtualMC::GetMC()->SetMaterialProperty("surfPc", "EFFICIENCY", kNbins, dEckov, dQePc); + TVirtualMC::GetMC()->SetMaterialProperty("surfPc", "REFLECTIVITY", kNbins, dEckov, dReflMet); + TVirtualMC::GetMC()->SetSkinSurface("skinPc", "Rpc", "surfPc"); delete pRaAF;delete pWiAF;delete pGaAF; delete pRaIF; delete pWiIF; delete pGaIF; delete pQeF; } @@ -255,13 +255,13 @@ Bool_t AliHMPIDv1::IsLostByFresnel() // Calculate probability for the photon to be lost by Fresnel reflection. TLorentzVector p4; Double_t mom[3],localMom[3]; - gMC->TrackMomentum(p4); mom[0]=p4(1); mom[1]=p4(2); mom[2]=p4(3); + TVirtualMC::GetMC()->TrackMomentum(p4); mom[0]=p4(1); mom[1]=p4(2); mom[2]=p4(3); localMom[0]=0; localMom[1]=0; localMom[2]=0; - gMC->Gmtod(mom,localMom,2); + TVirtualMC::GetMC()->Gmtod(mom,localMom,2); Double_t localTc = localMom[0]*localMom[0]+localMom[2]*localMom[2]; Double_t localTheta = TMath::ATan2(TMath::Sqrt(localTc),localMom[1]); Double_t cotheta = TMath::Abs(TMath::Cos(localTheta)); - if(gMC->GetRandom()->Rndm() < Fresnel(p4.E()*1e9,cotheta,1)){ + if(TVirtualMC::GetMC()->GetRandom()->Rndm() < Fresnel(p4.E()*1e9,cotheta,1)){ AliDebug(1,"Photon lost"); return kTRUE; }else @@ -273,21 +273,21 @@ void AliHMPIDv1::GenFee(Float_t qtot) // Generate FeedBack photons for the current particle. To be invoked from StepManager(). // eloss=0 means photon so only pulse height distribution is to be analysed. TLorentzVector x4; - gMC->TrackPosition(x4); - Int_t iNphotons=gMC->GetRandom()->Poisson(0.02*qtot); //# of feedback photons is proportional to the charge of hit + TVirtualMC::GetMC()->TrackPosition(x4); + Int_t iNphotons=TVirtualMC::GetMC()->GetRandom()->Poisson(0.02*qtot); //# of feedback photons is proportional to the charge of hit AliDebug(1,Form("N photons=%i",iNphotons)); Int_t j; Float_t cthf, phif, enfp = 0, sthf, e1[3], e2[3], e3[3], vmod, uswop,dir[3], phi,pol[3], mom[4]; //Generate photons for(Int_t i=0;iGetRandom()->RndmArray(2,ranf); //Sample direction + TVirtualMC::GetMC()->GetRandom()->RndmArray(2,ranf); //Sample direction cthf=ranf[0]*2-1.0; if(cthf<0) continue; sthf = TMath::Sqrt((1. - cthf) * (1. + cthf)); phif = ranf[1] * 2 * TMath::Pi(); - if(Double_t randomNumber=gMC->GetRandom()->Rndm()<=0.57) + if(Double_t randomNumber=TVirtualMC::GetMC()->GetRandom()->Rndm()<=0.57) enfp = 7.5e-9; else if(randomNumber<=0.7) enfp = 6.4e-9; @@ -296,7 +296,7 @@ void AliHMPIDv1::GenFee(Float_t qtot) dir[0] = sthf * TMath::Sin(phif); dir[1] = cthf; dir[2] = sthf * TMath::Cos(phif); - gMC->Gdtom(dir, mom, 2); + TVirtualMC::GetMC()->Gdtom(dir, mom, 2); mom[0]*=enfp; mom[1]*=enfp; mom[2]*=enfp; mom[3] = TMath::Sqrt(mom[0]*mom[0]+mom[1]*mom[1]+mom[2]*mom[2]); @@ -323,9 +323,9 @@ void AliHMPIDv1::GenFee(Float_t qtot) vmod=0; for(j=0;j<3;j++) vmod+=e1[j]*e1[j]; vmod=TMath::Sqrt(1/vmod); for(j=0;j<3;j++) e1[j]*=vmod; vmod=0; for(j=0;j<3;j++) vmod+=e2[j]*e2[j]; vmod=TMath::Sqrt(1/vmod); for(j=0;j<3;j++) e2[j]*=vmod; - phi = gMC->GetRandom()->Rndm()* 2 * TMath::Pi(); + phi = TVirtualMC::GetMC()->GetRandom()->Rndm()* 2 * TMath::Pi(); for(j=0;j<3;j++) pol[j]=e1[j]*TMath::Sin(phi)+e2[j]*TMath::Cos(phi); - gMC->Gdtom(pol, pol, 2); + TVirtualMC::GetMC()->Gdtom(pol, pol, 2); Int_t outputNtracksStored; gAlice->GetMCApp()->PushTrack(1, //transport gAlice->GetMCApp()->GetCurrentTrackNumber(),//parent track @@ -497,7 +497,7 @@ void AliHMPIDv1::StepHistory() // This methode is invoked from StepManager() in order to print out static Int_t iStepN; const char *sParticle; - switch(gMC->TrackPid()){ + switch(TVirtualMC::GetMC()->TrackPid()){ case kProton: sParticle="PROTON" ;break; case kNeutron: sParticle="neutron" ;break; case kGamma: sParticle="gamma" ;break; @@ -510,28 +510,28 @@ void AliHMPIDv1::StepHistory() } TString flag="fanny combination"; - if(gMC->IsTrackAlive()) { - if(gMC->IsTrackEntering()) flag="enters to"; - else if(gMC->IsTrackExiting()) flag="exits from"; - else if(gMC->IsTrackInside()) flag="inside"; + if(TVirtualMC::GetMC()->IsTrackAlive()) { + if(TVirtualMC::GetMC()->IsTrackEntering()) flag="enters to"; + else if(TVirtualMC::GetMC()->IsTrackExiting()) flag="exits from"; + else if(TVirtualMC::GetMC()->IsTrackInside()) flag="inside"; } else { - if(gMC->IsTrackStop()) flag="stopped in"; + if(TVirtualMC::GetMC()->IsTrackStop()) flag="stopped in"; } Int_t vid=0,copy=0; - TString path=gMC->CurrentVolName(); path.Prepend("-");path.Prepend(gMC->CurrentVolOffName(1));//current volume and his mother are always there - vid=gMC->CurrentVolOffID(2,copy); if(vid) {path.Prepend("-");path.Prepend(gMC->VolName(vid));} - vid=gMC->CurrentVolOffID(3,copy); if(vid) {path.Prepend("-");path.Prepend(gMC->VolName(vid));} + TString path=TVirtualMC::GetMC()->CurrentVolName(); path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->CurrentVolOffName(1));//current volume and his mother are always there + vid=TVirtualMC::GetMC()->CurrentVolOffID(2,copy); if(vid) {path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->VolName(vid));} + vid=TVirtualMC::GetMC()->CurrentVolOffID(3,copy); if(vid) {path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->VolName(vid));} - Printf("Step %i: %s (%i) %s %s m=%.6f GeV q=%.1f dEdX=%.4f",iStepN,sParticle,gMC->TrackPid(),flag.Data(),path.Data(),gMC->TrackMass(),gMC->TrackCharge(),gMC->Edep()*1e9); + Printf("Step %i: %s (%i) %s %s m=%.6f GeV q=%.1f dEdX=%.4f",iStepN,sParticle,TVirtualMC::GetMC()->TrackPid(),flag.Data(),path.Data(),TVirtualMC::GetMC()->TrackMass(),TVirtualMC::GetMC()->TrackCharge(),TVirtualMC::GetMC()->Edep()*1e9); Printf("Step %i: tid=%i flags alive=%i disap=%i enter=%i exit=%i inside=%i out=%i stop=%i new=%i", iStepN, gAlice->GetMCApp()->GetCurrentTrackNumber(), - gMC->IsTrackAlive(), gMC->IsTrackDisappeared(),gMC->IsTrackEntering(), gMC->IsTrackExiting(), - gMC->IsTrackInside(),gMC->IsTrackOut(), gMC->IsTrackStop(), gMC->IsNewTrack()); + TVirtualMC::GetMC()->IsTrackAlive(), TVirtualMC::GetMC()->IsTrackDisappeared(),TVirtualMC::GetMC()->IsTrackEntering(), TVirtualMC::GetMC()->IsTrackExiting(), + TVirtualMC::GetMC()->IsTrackInside(),TVirtualMC::GetMC()->IsTrackOut(), TVirtualMC::GetMC()->IsTrackStop(), TVirtualMC::GetMC()->IsNewTrack()); Float_t a,z,den,rad,abs; a=z=den=rad=abs=-1; - Int_t mid=gMC->CurrentMaterial(a,z,den,rad,abs); + Int_t mid=TVirtualMC::GetMC()->CurrentMaterial(a,z,den,rad,abs); Printf("Step %i: id=%i a=%7.2f z=%7.2f den=%9.4f rad=%9.2f abs=%9.2f\n\n",iStepN,mid,a,z,den,rad,abs); iStepN++; }//StepHistory() @@ -547,15 +547,15 @@ void AliHMPIDv1::StepManager() Int_t copy; //volume copy aka node //Treat photons - if((gMC->TrackPid()==50000050||gMC->TrackPid()==50000051)&&gMC->CurrentVolID(copy)==fIdPc){ //photon (Ckov or feedback) hit PC (fIdPc) - if(gMC->Edep()>0){ //photon survided QE test i.e. produces electron - if(IsLostByFresnel()){ gMC->StopTrack(); return;} //photon lost due to fersnel reflection on PC - gMC->CurrentVolOffID(2,copy); //current chamber since geomtry tree is HMPID-Rppf-Rpc - Int_t tid= gMC->GetStack()->GetCurrentTrackNumber(); //take TID - Int_t pid= gMC->TrackPid(); //take PID - Float_t etot= gMC->Etot(); //total hpoton energy, [GeV] - Double_t x[3]; gMC->TrackPosition(x[0],x[1],x[2]); //take MARS position at entrance to PC - Float_t hitTime=(Float_t)gMC->TrackTime(); //hit formation time + if((TVirtualMC::GetMC()->TrackPid()==50000050||TVirtualMC::GetMC()->TrackPid()==50000051)&&TVirtualMC::GetMC()->CurrentVolID(copy)==fIdPc){ //photon (Ckov or feedback) hit PC (fIdPc) + if(TVirtualMC::GetMC()->Edep()>0){ //photon survided QE test i.e. produces electron + if(IsLostByFresnel()){ TVirtualMC::GetMC()->StopTrack(); return;} //photon lost due to fersnel reflection on PC + TVirtualMC::GetMC()->CurrentVolOffID(2,copy); //current chamber since geomtry tree is HMPID-Rppf-Rpc + Int_t tid= TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber(); //take TID + Int_t pid= TVirtualMC::GetMC()->TrackPid(); //take PID + Float_t etot= TVirtualMC::GetMC()->Etot(); //total hpoton energy, [GeV] + Double_t x[3]; TVirtualMC::GetMC()->TrackPosition(x[0],x[1],x[2]); //take MARS position at entrance to PC + Float_t hitTime=(Float_t)TVirtualMC::GetMC()->TrackTime(); //hit formation time Float_t xl,yl; AliHMPIDParam::Instance()->Mars2Lors(copy,x,xl,yl); //take LORS position new((*fHits)[fNhits++])AliHMPIDHit(copy,etot,pid,tid,xl,yl,hitTime,x); //HIT for photon, position at P, etot will be set to Q GenFee(etot); //generate feedback photons etot is modified in hit ctor to Q of hit @@ -565,17 +565,17 @@ void AliHMPIDv1::StepManager() //Treat charged particles static Float_t eloss; //need to store mip parameters between different steps static Double_t in[3]; - if(gMC->TrackCharge() && gMC->CurrentVolID(copy)==fIdAmpGap){ //charged particle in amplification gap (fIdAmpGap) - if(gMC->IsTrackEntering()||gMC->IsNewTrack()) { //entering or newly created + if(TVirtualMC::GetMC()->TrackCharge() && TVirtualMC::GetMC()->CurrentVolID(copy)==fIdAmpGap){ //charged particle in amplification gap (fIdAmpGap) + if(TVirtualMC::GetMC()->IsTrackEntering()||TVirtualMC::GetMC()->IsNewTrack()) { //entering or newly created eloss=0; //reset Eloss collector - gMC->TrackPosition(in[0],in[1],in[2]); //take position at the entrance - }else if(gMC->IsTrackExiting()||gMC->IsTrackStop()||gMC->IsTrackDisappeared()){ //exiting or disappeared - eloss +=gMC->Edep(); //take into account last step Eloss - gMC->CurrentVolOffID(1,copy); //take current chamber since geometry tree is HMPID-Rgap - Int_t tid= gMC->GetStack()->GetCurrentTrackNumber(); //take TID - Int_t pid= gMC->TrackPid(); //take PID - Double_t out[3]; gMC->TrackPosition(out[0],out[1],out[2]); //take MARS position at exit - Float_t hitTime= (Float_t)gMC->TrackTime(); //hit formation time + TVirtualMC::GetMC()->TrackPosition(in[0],in[1],in[2]); //take position at the entrance + }else if(TVirtualMC::GetMC()->IsTrackExiting()||TVirtualMC::GetMC()->IsTrackStop()||TVirtualMC::GetMC()->IsTrackDisappeared()){ //exiting or disappeared + eloss +=TVirtualMC::GetMC()->Edep(); //take into account last step Eloss + TVirtualMC::GetMC()->CurrentVolOffID(1,copy); //take current chamber since geometry tree is HMPID-Rgap + Int_t tid= TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber(); //take TID + Int_t pid= TVirtualMC::GetMC()->TrackPid(); //take PID + Double_t out[3]; TVirtualMC::GetMC()->TrackPosition(out[0],out[1],out[2]); //take MARS position at exit + Float_t hitTime= (Float_t)TVirtualMC::GetMC()->TrackTime(); //hit formation time out[0]=0.5*(out[0]+in[0]); //> out[1]=0.5*(out[1]+in[1]); //take hit position at the anod plane out[2]=0.5*(out[2]+in[2]); //> @@ -583,7 +583,7 @@ void AliHMPIDv1::StepManager() new((*fHits)[fNhits++])AliHMPIDHit(copy,eloss,pid,tid,xl,yl,hitTime,out); //HIT for MIP, position near anod plane, eloss will be set to Q GenFee(eloss); //generate feedback photons }else //just going inside - eloss += gMC->Edep(); //collect this step eloss + eloss += TVirtualMC::GetMC()->Edep(); //collect this step eloss }//MIP in GAP }//StepManager() //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/HMPID/AliHMPIDv2.cxx b/HMPID/AliHMPIDv2.cxx index fea5c6b4c8d..cf809cc2b92 100644 --- a/HMPID/AliHMPIDv2.cxx +++ b/HMPID/AliHMPIDv2.cxx @@ -21,7 +21,7 @@ #include "AliHMPIDRawStream.h" //Digits2Raw(), Raw2SDigits() #include "AliRawReader.h" //Raw2SDigits() #include "AliTrackReference.h" -#include //StepManager() for gMC +#include //StepManager() for TVirtualMC::GetMC() #include //StepHistory() #include //StepManager(),Hits2SDigits()78.6 #include //Hits2SDigits() @@ -158,81 +158,81 @@ HMPID 12 1.e-5 1.e-5 1.e-4 -1. 1.e-4 -1. -1. 5.e-5 5.e-5 -1. -1 -1 Int_t imed; imed = kSiO2; // * Quarz Window (>1000 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,1.e-3); - gMC->Gstpar(idtmed[imed], "CUTHAD",1.e-3); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,1.e-3); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",1.e-3); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kC6F14; // * Freon Radiator (> 500 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,5.e-4); - gMC->Gstpar(idtmed[imed], "CUTHAD",5.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,5.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",5.e-4); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kCH4; // * Methane Gap (> 100 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",5.e-5); - gMC->Gstpar(idtmed[imed], "CUTELE",5.e-5); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,1.e-4); - gMC->Gstpar(idtmed[imed], "CUTHAD",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",1.e-4); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kCsI; // * CSI (> 50 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); - gMC->Gstpar(idtmed[imed], "CUTHAD",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",5.e-5); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kAl; // * Alluminium (> 50 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); - gMC->Gstpar(idtmed[imed], "CUTHAD",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",5.e-5); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kCu; // * Copper (> 50 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); - gMC->Gstpar(idtmed[imed], "CUTHAD",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",5.e-5); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kW; // * Tungsten (> 50 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); - gMC->Gstpar(idtmed[imed], "CUTHAD",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",5.e-5); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); }*/ //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -240,7 +240,7 @@ void AliHMPIDv2::CreateGeometry() { //Creates detailed geometry simulation (currently GEANT volumes tree) AliDebug(1,"Start main."); - if(!gMC->IsRootGeometrySupported()) return; + if(!TVirtualMC::GetMC()->IsRootGeometrySupported()) return; Double_t cm=1,mm=0.1*cm,um=0.001*mm;//default is cm @@ -434,13 +434,13 @@ hmp->AddNode(fr3,1,new TGeoTranslation(0.,0.,(80.-29.)*mm-34.*mm/2)); //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void AliHMPIDv2::Init() { -// This method defines ID for sensitive volumes, i.e. such geometry volumes for which there are if(gMC->CurrentVolID()==XXX) +// This method defines ID for sensitive volumes, i.e. such geometry volumes for which there are if(TVirtualMC::GetMC()->CurrentVolID()==XXX) // statements in StepManager() // Arguments: none // Returns: none AliDebug(1,"Start v2 HMPID."); - fIdPad = gMC->VolId("Hpad"); - fIdCell = gMC->VolId("Hcel"); + fIdPad = TVirtualMC::GetMC()->VolId("Hpad"); + fIdCell = TVirtualMC::GetMC()->VolId("Hcel"); AliDebug(1,"Stop v2 HMPID."); } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -483,19 +483,19 @@ void AliHMPIDv2::DefineOpticalProperties() dQePc [i]=pQeF->Eval(eV); dReflMet[i] = 0.; // no reflection on the surface of the pc (?) } - gMC->SetCerenkov((*fIdtmed)[kC6F14] , kNbins, aEckov, aAbsRad , aQeAll , aIdxRad ); - gMC->SetCerenkov((*fIdtmed)[kSiO2] , kNbins, aEckov, aAbsWin , aQeAll , aIdxWin ); - gMC->SetCerenkov((*fIdtmed)[kCH4] , kNbins, aEckov, aAbsGap , aQeAll , aIdxGap ); - gMC->SetCerenkov((*fIdtmed)[kCu] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); - gMC->SetCerenkov((*fIdtmed)[kW] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); //n=0 means reflect photons - gMC->SetCerenkov((*fIdtmed)[kCsI] , kNbins, aEckov, aAbsMet , aQePc , aIdxPc ); //n=1 means convert photons - gMC->SetCerenkov((*fIdtmed)[kAl] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kC6F14] , kNbins, aEckov, aAbsRad , aQeAll , aIdxRad ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kSiO2] , kNbins, aEckov, aAbsWin , aQeAll , aIdxWin ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kCH4] , kNbins, aEckov, aAbsGap , aQeAll , aIdxGap ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kCu] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kW] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); //n=0 means reflect photons + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kCsI] , kNbins, aEckov, aAbsMet , aQePc , aIdxPc ); //n=1 means convert photons + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kAl] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); // Define a skin surface for the photocatode to enable 'detection' in G4 - gMC->DefineOpSurface("surfPc", kGlisur /*kUnified*/,kDielectric_metal,kPolished, 0.); - gMC->SetMaterialProperty("surfPc", "EFFICIENCY", kNbins, dEckov, dQePc); - gMC->SetMaterialProperty("surfPc", "REFLECTIVITY", kNbins, dEckov, dReflMet); - gMC->SetSkinSurface("skinPc", "Rpc", "surfPc"); + TVirtualMC::GetMC()->DefineOpSurface("surfPc", kGlisur /*kUnified*/,kDielectric_metal,kPolished, 0.); + TVirtualMC::GetMC()->SetMaterialProperty("surfPc", "EFFICIENCY", kNbins, dEckov, dQePc); + TVirtualMC::GetMC()->SetMaterialProperty("surfPc", "REFLECTIVITY", kNbins, dEckov, dReflMet); + TVirtualMC::GetMC()->SetSkinSurface("skinPc", "Rpc", "surfPc"); delete pRaAF;delete pWiAF;delete pGaAF; delete pRaIF; delete pWiIF; delete pGaIF; delete pQeF; } @@ -505,13 +505,13 @@ Bool_t AliHMPIDv2::IsLostByFresnel() // Calculate probability for the photon to be lost by Fresnel reflection. TLorentzVector p4; Double_t mom[3],localMom[3]; - gMC->TrackMomentum(p4); mom[0]=p4(1); mom[1]=p4(2); mom[2]=p4(3); + TVirtualMC::GetMC()->TrackMomentum(p4); mom[0]=p4(1); mom[1]=p4(2); mom[2]=p4(3); localMom[0]=0; localMom[1]=0; localMom[2]=0; - gMC->Gmtod(mom,localMom,2); + TVirtualMC::GetMC()->Gmtod(mom,localMom,2); Double_t localTc = localMom[0]*localMom[0]+localMom[2]*localMom[2]; Double_t localTheta = TMath::ATan2(TMath::Sqrt(localTc),localMom[1]); Double_t cotheta = TMath::Abs(TMath::Cos(localTheta)); - if(gMC->GetRandom()->Rndm() < Fresnel(p4.E()*1e9,cotheta,1)){ + if(TVirtualMC::GetMC()->GetRandom()->Rndm() < Fresnel(p4.E()*1e9,cotheta,1)){ AliDebug(1,"Photon lost"); return kTRUE; }else @@ -523,21 +523,21 @@ void AliHMPIDv2::GenFee(Float_t qtot) // Generate FeedBack photons for the current particle. To be invoked from StepManager(). // eloss=0 means photon so only pulse height distribution is to be analysed. TLorentzVector x4; - gMC->TrackPosition(x4); - Int_t iNphotons=gMC->GetRandom()->Poisson(0.02*qtot); //# of feedback photons is proportional to the charge of hit + TVirtualMC::GetMC()->TrackPosition(x4); + Int_t iNphotons=TVirtualMC::GetMC()->GetRandom()->Poisson(0.02*qtot); //# of feedback photons is proportional to the charge of hit AliDebug(1,Form("N photons=%i",iNphotons)); Int_t j; Float_t cthf, phif, enfp = 0, sthf, e1[3], e2[3], e3[3], vmod, uswop,dir[3], phi,pol[3], mom[4]; //Generate photons for(Int_t i=0;iGetRandom()->RndmArray(2,ranf); //Sample direction + TVirtualMC::GetMC()->GetRandom()->RndmArray(2,ranf); //Sample direction cthf=ranf[0]*2-1.0; if(cthf<0) continue; sthf = TMath::Sqrt((1. - cthf) * (1. + cthf)); phif = ranf[1] * 2 * TMath::Pi(); - if(Double_t randomNumber=gMC->GetRandom()->Rndm()<=0.57) + if(Double_t randomNumber=TVirtualMC::GetMC()->GetRandom()->Rndm()<=0.57) enfp = 7.5e-9; else if(randomNumber<=0.7) enfp = 6.4e-9; @@ -546,7 +546,7 @@ void AliHMPIDv2::GenFee(Float_t qtot) dir[0] = sthf * TMath::Sin(phif); dir[1] = cthf; dir[2] = sthf * TMath::Cos(phif); - gMC->Gdtom(dir, mom, 2); + TVirtualMC::GetMC()->Gdtom(dir, mom, 2); mom[0]*=enfp; mom[1]*=enfp; mom[2]*=enfp; mom[3] = TMath::Sqrt(mom[0]*mom[0]+mom[1]*mom[1]+mom[2]*mom[2]); @@ -573,9 +573,9 @@ void AliHMPIDv2::GenFee(Float_t qtot) vmod=0; for(j=0;j<3;j++) vmod+=e1[j]*e1[j]; vmod=TMath::Sqrt(1/vmod); for(j=0;j<3;j++) e1[j]*=vmod; vmod=0; for(j=0;j<3;j++) vmod+=e2[j]*e2[j]; vmod=TMath::Sqrt(1/vmod); for(j=0;j<3;j++) e2[j]*=vmod; - phi = gMC->GetRandom()->Rndm()* 2 * TMath::Pi(); + phi = TVirtualMC::GetMC()->GetRandom()->Rndm()* 2 * TMath::Pi(); for(j=0;j<3;j++) pol[j]=e1[j]*TMath::Sin(phi)+e2[j]*TMath::Cos(phi); - gMC->Gdtom(pol, pol, 2); + TVirtualMC::GetMC()->Gdtom(pol, pol, 2); Int_t outputNtracksStored; gAlice->GetMCApp()->PushTrack(1, //transport gAlice->GetMCApp()->GetCurrentTrackNumber(),//parent track @@ -747,7 +747,7 @@ void AliHMPIDv2::StepHistory() // This methode is invoked from StepManager() in order to print out static Int_t iStepN; const char *sParticle; - switch(gMC->TrackPid()){ + switch(TVirtualMC::GetMC()->TrackPid()){ case kProton: sParticle="PROTON" ;break; case kNeutron: sParticle="neutron" ;break; case kGamma: sParticle="gamma" ;break; @@ -760,38 +760,38 @@ void AliHMPIDv2::StepHistory() } TString flag="fanny combination"; - if(gMC->IsTrackAlive()) { - if(gMC->IsTrackEntering()) flag="enters to"; - else if(gMC->IsTrackExiting()) flag="exits from"; - else if(gMC->IsTrackInside()) flag="inside"; + if(TVirtualMC::GetMC()->IsTrackAlive()) { + if(TVirtualMC::GetMC()->IsTrackEntering()) flag="enters to"; + else if(TVirtualMC::GetMC()->IsTrackExiting()) flag="exits from"; + else if(TVirtualMC::GetMC()->IsTrackInside()) flag="inside"; } else { - if(gMC->IsTrackStop()) flag="stopped in"; + if(TVirtualMC::GetMC()->IsTrackStop()) flag="stopped in"; } Int_t vid=0,copy=0; - TString path=gMC->CurrentVolName(); path.Prepend("-");path.Prepend(gMC->CurrentVolOffName(1));//current volume and his mother are always there - vid=gMC->CurrentVolOffID(2,copy); if(vid) {path.Prepend("-");path.Prepend(gMC->VolName(vid));} - vid=gMC->CurrentVolOffID(3,copy); if(vid) {path.Prepend("-");path.Prepend(gMC->VolName(vid));} + TString path=TVirtualMC::GetMC()->CurrentVolName(); path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->CurrentVolOffName(1));//current volume and his mother are always there + vid=TVirtualMC::GetMC()->CurrentVolOffID(2,copy); if(vid) {path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->VolName(vid));} + vid=TVirtualMC::GetMC()->CurrentVolOffID(3,copy); if(vid) {path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->VolName(vid));} - Printf("Step %i: %s (%i) %s %s m=%.6f GeV q=%.1f dEdX=%.4f Etot=%.4f",iStepN,sParticle,gMC->TrackPid(),flag.Data(),path.Data(),gMC->TrackMass(),gMC->TrackCharge(),gMC->Edep()*1e9,gMC->Etot()); + Printf("Step %i: %s (%i) %s %s m=%.6f GeV q=%.1f dEdX=%.4f Etot=%.4f",iStepN,sParticle,TVirtualMC::GetMC()->TrackPid(),flag.Data(),path.Data(),TVirtualMC::GetMC()->TrackMass(),TVirtualMC::GetMC()->TrackCharge(),TVirtualMC::GetMC()->Edep()*1e9,TVirtualMC::GetMC()->Etot()); - Double_t gMcTrackPos[3]; gMC->TrackPosition(gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2]); - Double_t gMcTrackPosLoc[3]; gMC->Gmtod(gMcTrackPos,gMcTrackPosLoc,1); - Printf("gMC Track Position (MARS) x: %5.3lf, y: %5.3lf, z: %5.3lf (r: %5.3lf) ---> (LOC) x: %5.3f, y: %5.3f, z: %5.3f",gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2],TMath::Sqrt(gMcTrackPos[0]*gMcTrackPos[0]+gMcTrackPos[1]*gMcTrackPos[1]+gMcTrackPos[2]*gMcTrackPos[2]),gMcTrackPosLoc[0],gMcTrackPosLoc[1],gMcTrackPosLoc[2]); + Double_t gMcTrackPos[3]; TVirtualMC::GetMC()->TrackPosition(gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2]); + Double_t gMcTrackPosLoc[3]; TVirtualMC::GetMC()->Gmtod(gMcTrackPos,gMcTrackPosLoc,1); + Printf("TVirtualMC::GetMC() Track Position (MARS) x: %5.3lf, y: %5.3lf, z: %5.3lf (r: %5.3lf) ---> (LOC) x: %5.3f, y: %5.3f, z: %5.3f",gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2],TMath::Sqrt(gMcTrackPos[0]*gMcTrackPos[0]+gMcTrackPos[1]*gMcTrackPos[1]+gMcTrackPos[2]*gMcTrackPos[2]),gMcTrackPosLoc[0],gMcTrackPosLoc[1],gMcTrackPosLoc[2]); Printf("Step %i: tid=%i flags alive=%i disap=%i enter=%i exit=%i inside=%i out=%i stop=%i new=%i", iStepN, gAlice->GetMCApp()->GetCurrentTrackNumber(), - gMC->IsTrackAlive(), gMC->IsTrackDisappeared(),gMC->IsTrackEntering(), gMC->IsTrackExiting(), - gMC->IsTrackInside(),gMC->IsTrackOut(), gMC->IsTrackStop(), gMC->IsNewTrack()); + TVirtualMC::GetMC()->IsTrackAlive(), TVirtualMC::GetMC()->IsTrackDisappeared(),TVirtualMC::GetMC()->IsTrackEntering(), TVirtualMC::GetMC()->IsTrackExiting(), + TVirtualMC::GetMC()->IsTrackInside(),TVirtualMC::GetMC()->IsTrackOut(), TVirtualMC::GetMC()->IsTrackStop(), TVirtualMC::GetMC()->IsNewTrack()); Float_t a,z,den,rad,abs; a=z=den=rad=abs=-1; - Int_t mid=gMC->CurrentMaterial(a,z,den,rad,abs); + Int_t mid=TVirtualMC::GetMC()->CurrentMaterial(a,z,den,rad,abs); Printf("Step %i: mid=%i a=%7.2f z=%7.2f den=%9.4f rad=%9.2f abs=%9.2f\n\n",iStepN,mid,a,z,den,rad,abs); - TArrayI proc; gMC->StepProcesses(proc); + TArrayI proc; TVirtualMC::GetMC()->StepProcesses(proc); Printf("Processes in this step:"); for ( int i = 0 ; i < proc.GetSize(); i++) { @@ -813,15 +813,15 @@ void AliHMPIDv2::StepManager() Int_t copy; //volume copy aka node //Treat photons - if((gMC->TrackPid()==50000050||gMC->TrackPid()==50000051)&&gMC->CurrentVolID(copy)==fIdPad){ //photon (Ckov or feedback) hit PC (fIdPad) - if(gMC->Edep()>0){ //photon survided QE test i.e. produces electron - if(IsLostByFresnel()){ gMC->StopTrack(); return;} //photon lost due to fersnel reflection on PC - gMC->CurrentVolOffID(5,copy); //current chamber since geomtry tree is Hmp-Hsec-Hgap-Hrow-Hcel-Hpad - Int_t tid= gMC->GetStack()->GetCurrentTrackNumber(); //take TID - Int_t pid= gMC->TrackPid(); //take PID - Float_t etot= gMC->Etot(); //total hpoton energy, [GeV] - Double_t x[3]; gMC->TrackPosition(x[0],x[1],x[2]); //take MARS position at entrance to PC - Float_t hitTime= (Float_t)gMC->TrackTime(); //hit formation time + if((TVirtualMC::GetMC()->TrackPid()==50000050||TVirtualMC::GetMC()->TrackPid()==50000051)&&TVirtualMC::GetMC()->CurrentVolID(copy)==fIdPad){ //photon (Ckov or feedback) hit PC (fIdPad) + if(TVirtualMC::GetMC()->Edep()>0){ //photon survided QE test i.e. produces electron + if(IsLostByFresnel()){ TVirtualMC::GetMC()->StopTrack(); return;} //photon lost due to fersnel reflection on PC + TVirtualMC::GetMC()->CurrentVolOffID(5,copy); //current chamber since geomtry tree is Hmp-Hsec-Hgap-Hrow-Hcel-Hpad + Int_t tid= TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber(); //take TID + Int_t pid= TVirtualMC::GetMC()->TrackPid(); //take PID + Float_t etot= TVirtualMC::GetMC()->Etot(); //total hpoton energy, [GeV] + Double_t x[3]; TVirtualMC::GetMC()->TrackPosition(x[0],x[1],x[2]); //take MARS position at entrance to PC + Float_t hitTime= (Float_t)TVirtualMC::GetMC()->TrackTime(); //hit formation time Float_t xl,yl; AliHMPIDParam::Instance()->Mars2Lors(copy,x,xl,yl); //take LORS position new((*fHits)[fNhits++])AliHMPIDHit(copy,etot,pid,tid,xl,yl,hitTime,x); //HIT for photon, position at P, etot will be set to Q if(fDoFeed) GenFee(etot); //generate feedback photons etot is modified in hit ctor to Q of hit @@ -831,19 +831,19 @@ void AliHMPIDv2::StepManager() //Treat charged particles static Float_t eloss; //need to store mip parameters between different steps static Double_t in[3]; - if(gMC->IsTrackEntering() && gMC->TrackCharge() && gMC->CurrentVolID(copy)==fIdPad) //Trackref stored when entering in the pad volume - AddTrackReference(gMC->GetStack()->GetCurrentTrackNumber(), AliTrackReference::kHMPID); //for acceptance calculations - if(gMC->TrackCharge() && gMC->CurrentVolID(copy)==fIdCell){ //charged particle in amplification gap (fIdCell) - if(gMC->IsTrackEntering()||gMC->IsNewTrack()) { //entering or newly created + if(TVirtualMC::GetMC()->IsTrackEntering() && TVirtualMC::GetMC()->TrackCharge() && TVirtualMC::GetMC()->CurrentVolID(copy)==fIdPad) //Trackref stored when entering in the pad volume + AddTrackReference(TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber(), AliTrackReference::kHMPID); //for acceptance calculations + if(TVirtualMC::GetMC()->TrackCharge() && TVirtualMC::GetMC()->CurrentVolID(copy)==fIdCell){ //charged particle in amplification gap (fIdCell) + if(TVirtualMC::GetMC()->IsTrackEntering()||TVirtualMC::GetMC()->IsNewTrack()) { //entering or newly created eloss=0; //reset Eloss collector - gMC->TrackPosition(in[0],in[1],in[2]); //take position at the entrance - }else if(gMC->IsTrackExiting()||gMC->IsTrackStop()||gMC->IsTrackDisappeared()){ //exiting or disappeared - eloss +=gMC->Edep(); //take into account last step Eloss - gMC->CurrentVolOffID(4,copy); //take current chamber since geometry tree is Hmp-Hsec-Hgap-Hrow-Hcel - Int_t tid= gMC->GetStack()->GetCurrentTrackNumber(); //take TID - Int_t pid= gMC->TrackPid(); //take PID - Double_t out[3]; gMC->TrackPosition(out[0],out[1],out[2]); //take MARS position at exit - Float_t hitTime= (Float_t)gMC->TrackTime(); //hit formation time + TVirtualMC::GetMC()->TrackPosition(in[0],in[1],in[2]); //take position at the entrance + }else if(TVirtualMC::GetMC()->IsTrackExiting()||TVirtualMC::GetMC()->IsTrackStop()||TVirtualMC::GetMC()->IsTrackDisappeared()){ //exiting or disappeared + eloss +=TVirtualMC::GetMC()->Edep(); //take into account last step Eloss + TVirtualMC::GetMC()->CurrentVolOffID(4,copy); //take current chamber since geometry tree is Hmp-Hsec-Hgap-Hrow-Hcel + Int_t tid= TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber(); //take TID + Int_t pid= TVirtualMC::GetMC()->TrackPid(); //take PID + Double_t out[3]; TVirtualMC::GetMC()->TrackPosition(out[0],out[1],out[2]); //take MARS position at exit + Float_t hitTime= (Float_t)TVirtualMC::GetMC()->TrackTime(); //hit formation time out[0]=0.5*(out[0]+in[0]); //> out[1]=0.5*(out[1]+in[1]); //take hit position at the anod plane out[2]=0.5*(out[2]+in[2]); //> @@ -851,7 +851,7 @@ void AliHMPIDv2::StepManager() new((*fHits)[fNhits++])AliHMPIDHit(copy,eloss,pid,tid,xl,yl,hitTime,out); //HIT for MIP, position near anod plane, eloss will be set to Q if(fDoFeed) GenFee(eloss); //generate feedback photons }else //just going inside - eloss += gMC->Edep(); //collect this step eloss + eloss += TVirtualMC::GetMC()->Edep(); //collect this step eloss }//MIP in GAP }//StepManager() //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/HMPID/AliHMPIDv3.cxx b/HMPID/AliHMPIDv3.cxx index fd84ee67581..1cef2f4a5e4 100644 --- a/HMPID/AliHMPIDv3.cxx +++ b/HMPID/AliHMPIDv3.cxx @@ -21,7 +21,7 @@ #include "AliHMPIDRawStream.h" //Digits2Raw(), Raw2SDigits() #include "AliRawReader.h" //Raw2SDigits() #include "AliTrackReference.h" -#include //StepManager() for gMC +#include //StepManager() for TVirtualMC::GetMC() #include //StepHistory() #include //StepManager(),Hits2SDigits()78.6 #include //Hits2SDigits() @@ -160,81 +160,81 @@ HMPID 12 1.e-5 1.e-5 1.e-4 -1. 1.e-4 -1. -1. 5.e-5 5.e-5 -1. -1 -1 Int_t imed; imed = kSiO2; // * Quarz Window (>1000 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,1.e-3); - gMC->Gstpar(idtmed[imed], "CUTHAD",1.e-3); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,1.e-3); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",1.e-3); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kC6F14; // * Freon Radiator (> 500 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,5.e-4); - gMC->Gstpar(idtmed[imed], "CUTHAD",5.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,5.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",5.e-4); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kCH4; // * Methane Gap (> 100 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",5.e-5); - gMC->Gstpar(idtmed[imed], "CUTELE",5.e-5); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,1.e-4); - gMC->Gstpar(idtmed[imed], "CUTHAD",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",1.e-4); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kCsI; // * CSI (> 50 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); - gMC->Gstpar(idtmed[imed], "CUTHAD",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",5.e-5); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kAl; // * Alluminium (> 50 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); - gMC->Gstpar(idtmed[imed], "CUTHAD",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",5.e-5); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kCu; // * Copper (> 50 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); - gMC->Gstpar(idtmed[imed], "CUTHAD",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",5.e-5); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); imed = kW; // * Tungsten (> 50 keV delta-electrons) - gMC->Gstpar(idtmed[imed], "CUTGAM",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTELE",1.e-5); - gMC->Gstpar(idtmed[imed], "CUTNEU",1.e-4); - gMC->Gstpar(idtmed[imed], "CUTMUO",1.e-4); - gMC->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); - gMC->Gstpar(idtmed[imed], "CUTHAD",5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTGAM",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTELE",1.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTNEU",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTMUO",1.e-4); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DCUTE" ,5.e-5); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "CUTHAD",5.e-5); - gMC->Gstpar(idtmed[imed], "DRAY",1); - gMC->Gstpar(idtmed[imed], "LOSS",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "DRAY",1); + TVirtualMC::GetMC()->Gstpar(idtmed[imed], "LOSS",1); }*/ //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -244,7 +244,7 @@ void AliHMPIDv3::CreateGeometry() //includind the HMPID cradle AliDebug(1,"Start main."); - if(!gMC->IsRootGeometrySupported()) return; + if(!TVirtualMC::GetMC()->IsRootGeometrySupported()) return; TGeoVolume *hmpcradle = CreateCradle(); TString title=GetTitle(); @@ -503,7 +503,7 @@ return hmp; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void AliHMPIDv3::Init() { -// This method defines ID for sensitive volumes, i.e. such geometry volumes for which there are if(gMC->CurrentVolID()==XXX) +// This method defines ID for sensitive volumes, i.e. such geometry volumes for which there are if(TVirtualMC::GetMC()->CurrentVolID()==XXX) // statements in StepManager() // Arguments: none // Returns: none @@ -554,20 +554,20 @@ void AliHMPIDv3::DefineOpticalProperties() dQePc [i]= pQeF->Eval(eV); dReflMet[i] = 0.; // no reflection on the surface of the pc (?) } - gMC->SetCerenkov((*fIdtmed)[kC6F14] , kNbins, aEckov, aAbsRad , aQeAll , aIdxRad ); - gMC->SetCerenkov((*fIdtmed)[kSiO2] , kNbins, aEckov, aAbsWin , aQeAll , aIdxWin ); - gMC->SetCerenkov((*fIdtmed)[kCH4] , kNbins, aEckov, aAbsGap , aQeAll , aIdxGap ); - gMC->SetCerenkov((*fIdtmed)[kCu] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); - gMC->SetCerenkov((*fIdtmed)[kW] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); //n=0 means reflect photons - gMC->SetCerenkov((*fIdtmed)[kCsI] , kNbins, aEckov, aAbsMet , aQePc , aIdxPc ); //n=1 means convert photons - gMC->SetCerenkov((*fIdtmed)[kAl] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kC6F14] , kNbins, aEckov, aAbsRad , aQeAll , aIdxRad ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kSiO2] , kNbins, aEckov, aAbsWin , aQeAll , aIdxWin ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kCH4] , kNbins, aEckov, aAbsGap , aQeAll , aIdxGap ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kCu] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kW] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); //n=0 means reflect photons + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kCsI] , kNbins, aEckov, aAbsMet , aQePc , aIdxPc ); //n=1 means convert photons + TVirtualMC::GetMC()->SetCerenkov((*fIdtmed)[kAl] , kNbins, aEckov, aAbsMet , aQeAll , aIdxMet ); // Define a skin surface for the photocatode to enable 'detection' in G4 for(Int_t i=0; i<7; i++){ - gMC->DefineOpSurface(Form("surfPc%i",i), kGlisur /*kUnified*/,kDielectric_metal,kPolished, 0.); - gMC->SetMaterialProperty(Form("surfPc%i",i), "EFFICIENCY", kNbins, dEckov, dQePc); - gMC->SetMaterialProperty(Form("surfPc%i",i), "REFLECTIVITY", kNbins, dEckov, dReflMet); - gMC->SetSkinSurface(Form("skinPc%i",i), Form("Hpad%i",i),Form("surfPc%i",i)); } + TVirtualMC::GetMC()->DefineOpSurface(Form("surfPc%i",i), kGlisur /*kUnified*/,kDielectric_metal,kPolished, 0.); + TVirtualMC::GetMC()->SetMaterialProperty(Form("surfPc%i",i), "EFFICIENCY", kNbins, dEckov, dQePc); + TVirtualMC::GetMC()->SetMaterialProperty(Form("surfPc%i",i), "REFLECTIVITY", kNbins, dEckov, dReflMet); + TVirtualMC::GetMC()->SetSkinSurface(Form("skinPc%i",i), Form("Hpad%i",i),Form("surfPc%i",i)); } delete pRaAF;delete pWiAF;delete pGaAF; delete pRaIF; delete pWiIF; delete pGaIF; delete pQeF; } @@ -577,13 +577,13 @@ Bool_t AliHMPIDv3::IsLostByFresnel() // Calculate probability for the photon to be lost by Fresnel reflection. TLorentzVector p4; Double_t mom[3],localMom[3]; - gMC->TrackMomentum(p4); mom[0]=p4(1); mom[1]=p4(2); mom[2]=p4(3); + TVirtualMC::GetMC()->TrackMomentum(p4); mom[0]=p4(1); mom[1]=p4(2); mom[2]=p4(3); localMom[0]=0; localMom[1]=0; localMom[2]=0; - gMC->Gmtod(mom,localMom,2); + TVirtualMC::GetMC()->Gmtod(mom,localMom,2); Double_t localTc = localMom[0]*localMom[0]+localMom[2]*localMom[2]; Double_t localTheta = TMath::ATan2(TMath::Sqrt(localTc),localMom[1]); Double_t cotheta = TMath::Abs(TMath::Cos(localTheta)); - if(gMC->GetRandom()->Rndm() < Fresnel(p4.E()*1e9,cotheta,1)){ + if(TVirtualMC::GetMC()->GetRandom()->Rndm() < Fresnel(p4.E()*1e9,cotheta,1)){ AliDebug(1,"Photon lost"); return kTRUE; }else @@ -595,21 +595,21 @@ void AliHMPIDv3::GenFee(Float_t qtot) // Generate FeedBack photons for the current particle. To be invoked from StepManager(). // eloss=0 means photon so only pulse height distribution is to be analysed. TLorentzVector x4; - gMC->TrackPosition(x4); - Int_t iNphotons=gMC->GetRandom()->Poisson(0.02*qtot); //# of feedback photons is proportional to the charge of hit + TVirtualMC::GetMC()->TrackPosition(x4); + Int_t iNphotons=TVirtualMC::GetMC()->GetRandom()->Poisson(0.02*qtot); //# of feedback photons is proportional to the charge of hit AliDebug(1,Form("N photons=%i",iNphotons)); Int_t j; Float_t cthf, phif, enfp = 0, sthf, e1[3], e2[3], e3[3], vmod, uswop,dir[3], phi,pol[3], mom[4]; //Generate photons for(Int_t i=0;iGetRandom()->RndmArray(2,ranf); //Sample direction + TVirtualMC::GetMC()->GetRandom()->RndmArray(2,ranf); //Sample direction cthf=ranf[0]*2-1.0; if(cthf<0) continue; sthf = TMath::Sqrt((1. - cthf) * (1. + cthf)); phif = ranf[1] * 2 * TMath::Pi(); - if(Double_t randomNumber=gMC->GetRandom()->Rndm()<=0.57) + if(Double_t randomNumber=TVirtualMC::GetMC()->GetRandom()->Rndm()<=0.57) enfp = 7.5e-9; else if(randomNumber<=0.7) enfp = 6.4e-9; @@ -618,7 +618,7 @@ void AliHMPIDv3::GenFee(Float_t qtot) dir[0] = sthf * TMath::Sin(phif); dir[1] = cthf; dir[2] = sthf * TMath::Cos(phif); - gMC->Gdtom(dir, mom, 2); + TVirtualMC::GetMC()->Gdtom(dir, mom, 2); mom[0]*=enfp; mom[1]*=enfp; mom[2]*=enfp; mom[3] = TMath::Sqrt(mom[0]*mom[0]+mom[1]*mom[1]+mom[2]*mom[2]); @@ -645,9 +645,9 @@ void AliHMPIDv3::GenFee(Float_t qtot) vmod=0; for(j=0;j<3;j++) vmod+=e1[j]*e1[j]; vmod=TMath::Sqrt(1/vmod); for(j=0;j<3;j++) e1[j]*=vmod; vmod=0; for(j=0;j<3;j++) vmod+=e2[j]*e2[j]; vmod=TMath::Sqrt(1/vmod); for(j=0;j<3;j++) e2[j]*=vmod; - phi = gMC->GetRandom()->Rndm()* 2 * TMath::Pi(); + phi = TVirtualMC::GetMC()->GetRandom()->Rndm()* 2 * TMath::Pi(); for(j=0;j<3;j++) pol[j]=e1[j]*TMath::Sin(phi)+e2[j]*TMath::Cos(phi); - gMC->Gdtom(pol, pol, 2); + TVirtualMC::GetMC()->Gdtom(pol, pol, 2); Int_t outputNtracksStored; gAlice->GetMCApp()->PushTrack(1, //transport gAlice->GetMCApp()->GetCurrentTrackNumber(),//parent track @@ -821,7 +821,7 @@ void AliHMPIDv3::StepHistory() // This methode is invoked from StepManager() in order to print out static Int_t iStepN; const char *sParticle; - switch(gMC->TrackPid()){ + switch(TVirtualMC::GetMC()->TrackPid()){ case kProton: sParticle="PROTON" ;break; case kNeutron: sParticle="neutron" ;break; case kGamma: sParticle="gamma" ;break; @@ -834,38 +834,38 @@ void AliHMPIDv3::StepHistory() } TString flag="fanny combination"; - if(gMC->IsTrackAlive()) { - if(gMC->IsTrackEntering()) flag="enters to"; - else if(gMC->IsTrackExiting()) flag="exits from"; - else if(gMC->IsTrackInside()) flag="inside"; + if(TVirtualMC::GetMC()->IsTrackAlive()) { + if(TVirtualMC::GetMC()->IsTrackEntering()) flag="enters to"; + else if(TVirtualMC::GetMC()->IsTrackExiting()) flag="exits from"; + else if(TVirtualMC::GetMC()->IsTrackInside()) flag="inside"; } else { - if(gMC->IsTrackStop()) flag="stopped in"; + if(TVirtualMC::GetMC()->IsTrackStop()) flag="stopped in"; } Int_t vid=0,copy=0; - TString path=gMC->CurrentVolName(); path.Prepend("-");path.Prepend(gMC->CurrentVolOffName(1));//current volume and his mother are always there - vid=gMC->CurrentVolOffID(2,copy); if(vid) {path.Prepend("-");path.Prepend(gMC->VolName(vid));} - vid=gMC->CurrentVolOffID(3,copy); if(vid) {path.Prepend("-");path.Prepend(gMC->VolName(vid));} + TString path=TVirtualMC::GetMC()->CurrentVolName(); path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->CurrentVolOffName(1));//current volume and his mother are always there + vid=TVirtualMC::GetMC()->CurrentVolOffID(2,copy); if(vid) {path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->VolName(vid));} + vid=TVirtualMC::GetMC()->CurrentVolOffID(3,copy); if(vid) {path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->VolName(vid));} - Printf("Step %i: %s (%i) %s %s m=%.6f GeV q=%.1f dEdX=%.4f Etot=%.4f",iStepN,sParticle,gMC->TrackPid(),flag.Data(),path.Data(),gMC->TrackMass(),gMC->TrackCharge(),gMC->Edep()*1e9,gMC->Etot()); + Printf("Step %i: %s (%i) %s %s m=%.6f GeV q=%.1f dEdX=%.4f Etot=%.4f",iStepN,sParticle,TVirtualMC::GetMC()->TrackPid(),flag.Data(),path.Data(),TVirtualMC::GetMC()->TrackMass(),TVirtualMC::GetMC()->TrackCharge(),TVirtualMC::GetMC()->Edep()*1e9,TVirtualMC::GetMC()->Etot()); - Double_t gMcTrackPos[3]; gMC->TrackPosition(gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2]); - Double_t gMcTrackPosLoc[3]; gMC->Gmtod(gMcTrackPos,gMcTrackPosLoc,1); - Printf("gMC Track Position (MARS) x: %5.3lf, y: %5.3lf, z: %5.3lf (r: %5.3lf) ---> (LOC) x: %5.3f, y: %5.3f, z: %5.3f",gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2],TMath::Sqrt(gMcTrackPos[0]*gMcTrackPos[0]+gMcTrackPos[1]*gMcTrackPos[1]+gMcTrackPos[2]*gMcTrackPos[2]),gMcTrackPosLoc[0],gMcTrackPosLoc[1],gMcTrackPosLoc[2]); + Double_t gMcTrackPos[3]; TVirtualMC::GetMC()->TrackPosition(gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2]); + Double_t gMcTrackPosLoc[3]; TVirtualMC::GetMC()->Gmtod(gMcTrackPos,gMcTrackPosLoc,1); + Printf("TVirtualMC::GetMC() Track Position (MARS) x: %5.3lf, y: %5.3lf, z: %5.3lf (r: %5.3lf) ---> (LOC) x: %5.3f, y: %5.3f, z: %5.3f",gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2],TMath::Sqrt(gMcTrackPos[0]*gMcTrackPos[0]+gMcTrackPos[1]*gMcTrackPos[1]+gMcTrackPos[2]*gMcTrackPos[2]),gMcTrackPosLoc[0],gMcTrackPosLoc[1],gMcTrackPosLoc[2]); Printf("Step %i: tid=%i flags alive=%i disap=%i enter=%i exit=%i inside=%i out=%i stop=%i new=%i", iStepN, gAlice->GetMCApp()->GetCurrentTrackNumber(), - gMC->IsTrackAlive(), gMC->IsTrackDisappeared(),gMC->IsTrackEntering(), gMC->IsTrackExiting(), - gMC->IsTrackInside(),gMC->IsTrackOut(), gMC->IsTrackStop(), gMC->IsNewTrack()); + TVirtualMC::GetMC()->IsTrackAlive(), TVirtualMC::GetMC()->IsTrackDisappeared(),TVirtualMC::GetMC()->IsTrackEntering(), TVirtualMC::GetMC()->IsTrackExiting(), + TVirtualMC::GetMC()->IsTrackInside(),TVirtualMC::GetMC()->IsTrackOut(), TVirtualMC::GetMC()->IsTrackStop(), TVirtualMC::GetMC()->IsNewTrack()); Float_t a,z,den,rad,abs; a=z=den=rad=abs=-1; - Int_t mid=gMC->CurrentMaterial(a,z,den,rad,abs); + Int_t mid=TVirtualMC::GetMC()->CurrentMaterial(a,z,den,rad,abs); Printf("Step %i: mid=%i a=%7.2f z=%7.2f den=%9.4f rad=%9.2f abs=%9.2f\n\n",iStepN,mid,a,z,den,rad,abs); - TArrayI proc; gMC->StepProcesses(proc); + TArrayI proc; TVirtualMC::GetMC()->StepProcesses(proc); Printf("Processes in this step:"); for ( int i = 0 ; i < proc.GetSize(); i++) { @@ -884,17 +884,17 @@ void AliHMPIDv3::StepManager() // StepHistory(); return; //uncomment to print tracks history // StepCount(); return; //uncomment to count photons - TString volname = gMC->CurrentVolName(); + TString volname = TVirtualMC::GetMC()->CurrentVolName(); //Treat photons - if((gMC->TrackPid()==50000050||gMC->TrackPid()==50000051)&&volname.Contains("Hpad")){ //photon (Ckov or feedback) hits on module PC (Hpad) - if(gMC->Edep()>0){ //photon survided QE test i.e. produces electron - if(IsLostByFresnel()){ gMC->StopTrack(); return;} //photon lost due to fersnel reflection on PC - Int_t tid= gMC->GetStack()->GetCurrentTrackNumber(); //take TID - Int_t pid= gMC->TrackPid(); //take PID - Float_t etot= gMC->Etot(); //total hpoton energy, [GeV] - Double_t x[3]; gMC->TrackPosition(x[0],x[1],x[2]); //take MARS position at entrance to PC - Float_t hitTime= (Float_t)gMC->TrackTime(); //hit formation time + if((TVirtualMC::GetMC()->TrackPid()==50000050||TVirtualMC::GetMC()->TrackPid()==50000051)&&volname.Contains("Hpad")){ //photon (Ckov or feedback) hits on module PC (Hpad) + if(TVirtualMC::GetMC()->Edep()>0){ //photon survided QE test i.e. produces electron + if(IsLostByFresnel()){ TVirtualMC::GetMC()->StopTrack(); return;} //photon lost due to fersnel reflection on PC + Int_t tid= TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber(); //take TID + Int_t pid= TVirtualMC::GetMC()->TrackPid(); //take PID + Float_t etot= TVirtualMC::GetMC()->Etot(); //total hpoton energy, [GeV] + Double_t x[3]; TVirtualMC::GetMC()->TrackPosition(x[0],x[1],x[2]); //take MARS position at entrance to PC + Float_t hitTime= (Float_t)TVirtualMC::GetMC()->TrackTime(); //hit formation time TString tmpname = volname; tmpname.Remove(0,4); Int_t idch = tmpname.Atoi(); //retrieve the chamber number Float_t xl,yl; AliHMPIDParam::Instance()->Mars2Lors(idch,x,xl,yl); //take LORS position new((*fHits)[fNhits++])AliHMPIDHit(idch,etot,pid,tid,xl,yl,hitTime,x); //HIT for photon, position at P, etot will be set to Q @@ -907,20 +907,20 @@ void AliHMPIDv3::StepManager() static Float_t eloss; //need to store mip parameters between different steps static Double_t in[3]; - if(gMC->IsTrackEntering() && gMC->TrackCharge() && volname.Contains("Hpad")) //Trackref stored when entering in the pad volume - AddTrackReference(gMC->GetStack()->GetCurrentTrackNumber(), AliTrackReference::kHMPID); //for acceptance calculations + if(TVirtualMC::GetMC()->IsTrackEntering() && TVirtualMC::GetMC()->TrackCharge() && volname.Contains("Hpad")) //Trackref stored when entering in the pad volume + AddTrackReference(TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber(), AliTrackReference::kHMPID); //for acceptance calculations - if(gMC->TrackCharge() && volname.Contains("Hcel")){ //charged particle in amplification gap (Hcel) - if(gMC->IsTrackEntering()||gMC->IsNewTrack()) { //entering or newly created + if(TVirtualMC::GetMC()->TrackCharge() && volname.Contains("Hcel")){ //charged particle in amplification gap (Hcel) + if(TVirtualMC::GetMC()->IsTrackEntering()||TVirtualMC::GetMC()->IsNewTrack()) { //entering or newly created eloss=0; //reset Eloss collector - gMC->TrackPosition(in[0],in[1],in[2]); //take position at the entrance - }else if(gMC->IsTrackExiting()||gMC->IsTrackStop()||gMC->IsTrackDisappeared()){ //exiting or disappeared - eloss +=gMC->Edep(); //take into account last step Eloss - Int_t tid= gMC->GetStack()->GetCurrentTrackNumber(); //take TID - Int_t pid= gMC->TrackPid(); //take PID - Double_t out[3]; gMC->TrackPosition(out[0],out[1],out[2]); //take MARS position at exit - Float_t hitTime= (Float_t)gMC->TrackTime(); //hit formation time + TVirtualMC::GetMC()->TrackPosition(in[0],in[1],in[2]); //take position at the entrance + }else if(TVirtualMC::GetMC()->IsTrackExiting()||TVirtualMC::GetMC()->IsTrackStop()||TVirtualMC::GetMC()->IsTrackDisappeared()){ //exiting or disappeared + eloss +=TVirtualMC::GetMC()->Edep(); //take into account last step Eloss + Int_t tid= TVirtualMC::GetMC()->GetStack()->GetCurrentTrackNumber(); //take TID + Int_t pid= TVirtualMC::GetMC()->TrackPid(); //take PID + Double_t out[3]; TVirtualMC::GetMC()->TrackPosition(out[0],out[1],out[2]); //take MARS position at exit + Float_t hitTime= (Float_t)TVirtualMC::GetMC()->TrackTime(); //hit formation time out[0]=0.5*(out[0]+in[0]); // out[1]=0.5*(out[1]+in[1]); //take hit position at the anod plane out[2]=0.5*(out[2]+in[2]); @@ -931,7 +931,7 @@ void AliHMPIDv3::StepManager() if(fDoFeed) GenFee(eloss); //generate feedback photons } }else //just going inside - eloss += gMC->Edep(); //collect this step eloss + eloss += TVirtualMC::GetMC()->Edep(); //collect this step eloss }//MIP in GAP }//StepManager() diff --git a/ITS/AliITS.cxx b/ITS/AliITS.cxx index d62eebdcaef..ae9d9b566e9 100644 --- a/ITS/AliITS.cxx +++ b/ITS/AliITS.cxx @@ -286,7 +286,7 @@ void AliITS::Init(){ // none. Int_t i; // Array of TStrings - if(gMC) for(i=0;iVolId(fIdName[i]); + if(TVirtualMC::GetMC()) for(i=0;iVolId(fIdName[i]); } //______________________________________________________________________ diff --git a/ITS/AliITSMultReconstructor.cxx b/ITS/AliITSMultReconstructor.cxx index 88cb54ae516..a1881bb9c96 100644 --- a/ITS/AliITSMultReconstructor.cxx +++ b/ITS/AliITSMultReconstructor.cxx @@ -422,7 +422,7 @@ void AliITSMultReconstructor::Reconstruct(AliESDEvent* esd, TTree* treeRP) vtx = 0; } if(vtx){ - float vtxf[3] = {vtx->GetX(),vtx->GetY(),vtx->GetZ()}; + float vtxf[3] = {static_cast(vtx->GetX()),static_cast(vtx->GetY()),static_cast(vtx->GetZ())}; FindTracklets(vtxf); } else { diff --git a/ITS/AliITSV0Finder.cxx b/ITS/AliITSV0Finder.cxx index fef4e3367bc..89c95a22029 100644 --- a/ITS/AliITSV0Finder.cxx +++ b/ITS/AliITSV0Finder.cxx @@ -273,7 +273,7 @@ void AliITSV0Finder::FindV02(AliESDEvent *event, dummy->SetLabel(0); AliITStrackMI trackat0; //temporary track for DCA calculation // - Float_t primvertex[3]={tracker->GetX(),tracker->GetY(),tracker->GetZ()}; + Float_t primvertex[3]={static_cast(tracker->GetX()),static_cast(tracker->GetY()),static_cast(tracker->GetZ())}; // // make ITS - ESD map // @@ -1052,7 +1052,7 @@ void AliITSV0Finder::RefitV02(const AliESDEvent *event, TTreeSRedirector &cstream = *(tracker->GetDebugStreamer()); // Int_t nv0s = event->GetNumberOfV0s(); - Float_t primvertex[3]={tracker->GetX(),tracker->GetY(),tracker->GetZ()}; + Float_t primvertex[3]={static_cast(tracker->GetX()),static_cast(tracker->GetY()),static_cast(tracker->GetZ())}; AliV0 v0temp; for (Int_t iv0 = 0; iv0GetV0(iv0); diff --git a/ITS/AliITSgeomMatrix.cxx b/ITS/AliITSgeomMatrix.cxx index f1264fefeb8..d4fbdef124c 100644 --- a/ITS/AliITSgeomMatrix.cxx +++ b/ITS/AliITSgeomMatrix.cxx @@ -1062,19 +1062,19 @@ TNode* AliITSgeomMatrix::CreateNode(const Char_t *nodeName, Int_t i,j; const Float_t kScale=0.5,kLw=0.2; Float_t xchar[13][2]={ - {0.5*kLw,1.},{0.,0.5*kLw},{0.5-0.5*kLw,0.5}, - {0.,0.5*kLw},{0.5*kLw,0.},{0.5,0.5-0.5*kLw}, - {1-0.5*kLw,0.},{1.,0.5*kLw},{0.5+0.5*kLw,0.5}, - {1.,1.-0.5*kLw},{1.-0.5*kLw,1.},{0.5,0.5+0.5*kLw}, - {0.5*kLw,1.}}; + {static_cast(0.5*kLw),1.},{0.,static_cast(0.5*kLw)},{static_cast(0.5-0.5*kLw),0.5}, + {0.,static_cast(0.5*kLw)},{static_cast(0.5*kLw),0.},{0.5,static_cast(0.5-0.5*kLw)}, + {static_cast(1-0.5*kLw),0.},{1.,static_cast(0.5*kLw)},{static_cast(0.5+0.5*kLw),0.5}, + {1.,static_cast(1.-0.5*kLw)},{static_cast(1.-0.5*kLw),1.},{0.5,static_cast(0.5+0.5*kLw)}, + {static_cast(0.5*kLw),1.}}; Float_t ychar[10][2]={ - {.5-0.5*kLw,0.},{.5+0.5*kLw,0.},{.5+0.5*kLw,0.5-0.5*kLw}, - {1.,1.-0.5*kLw},{1.-0.5*kLw,1.},{0.5+0.5*kLw,0.5}, - {0.5*kLw,1.} ,{0.,1-0.5*kLw} ,{0.5-0.5*kLw,0.5}, - {.5-0.5*kLw,0.}}; + {static_cast(.5-0.5*kLw),0.},{static_cast(.5+0.5*kLw),0.},{static_cast(.5+0.5*kLw),static_cast(0.5-0.5*kLw)}, + {1.,static_cast(1.-0.5*kLw)},{static_cast(1.-0.5*kLw),1.},{static_cast(0.5+0.5*kLw),0.5}, + {static_cast(0.5*kLw),1.} ,{0.,static_cast(1-0.5*kLw)} ,{static_cast(0.5-0.5*kLw),0.5}, + {static_cast(.5-0.5*kLw),0.}}; Float_t zchar[11][2]={ - {0.,1.},{0,1.-kLw},{1.-kLw,1.-kLw},{0.,kLw} ,{0.,0.}, - {1.,0.},{1.,kLw} ,{kLw,kLw} ,{1.,1.-kLw},{1.,1.}, + {0.,1.},{0,static_cast(1.-kLw)},{static_cast(1.-kLw),static_cast(1.-kLw)},{0.,kLw} ,{0.,0.}, + {1.,0.},{1.,kLw} ,{kLw,kLw} ,{1.,static_cast(1.-kLw)},{1.,1.}, {0.,1.}}; for(i=0;i<13;i++)for(j=0;j<2;j++){ if(i<13) xchar[i][j] = kScale*xchar[i][j]; @@ -1091,17 +1091,17 @@ TNode* AliITSgeomMatrix::CreateNode(const Char_t *nodeName, for(i=0;i<10;i++) axiszl->DefineVertex(i,zchar[i][0],zchar[i][1]); axiszl->DefineSection(0,-0.5*kLw);axiszl->DefineSection(1,0.5*kLw); Float_t lxy[13][2]={ - {-0.5*kLw,-0.5*kLw},{0.8,-0.5*kLw},{0.8,-0.1},{1.0,0.0}, - {0.8,0.1},{0.8,0.5*kLw},{0.5*kLw,0.5*kLw},{0.5*kLw,0.8}, - {0.1,0.8},{0.0,1.0},{-0.1,0.8},{-0.5*kLw,0.8}, - {-0.5*kLw,-0.5*kLw}}; + {static_cast(-0.5*kLw),static_cast(-0.5*kLw)},{0.8,static_cast(-0.5*kLw)},{0.8,-0.1},{1.0,0.0}, + {0.8,0.1},{0.8,static_cast(0.5*kLw)},{static_cast(0.5*kLw),static_cast(0.5*kLw)},{static_cast(0.5*kLw),0.8}, + {0.1,0.8},{0.0,1.0},{-0.1,0.8},{static_cast(-0.5*kLw),0.8}, + {static_cast(-0.5*kLw),static_cast(-0.5*kLw)}}; TXTRU *axisxy = new TXTRU("axisxy","axisxy","text",13,2); for(i=0;i<13;i++) axisxy->DefineVertex(i,lxy[i][0],lxy[i][1]); axisxy->DefineSection(0,-0.5*kLw);axisxy->DefineSection(1,0.5*kLw); Float_t lz[8][2]={ - {0.5*kLw,-0.5*kLw},{0.8,-0.5*kLw},{0.8,-0.1},{1.0,0.0}, - {0.8,0.1},{0.8,0.5*kLw},{0.5*kLw,0.5*kLw}, - {0.5*kLw,-0.5*kLw}}; + {static_cast(0.5*kLw),static_cast(-0.5*kLw)},{0.8,static_cast(-0.5*kLw)},{0.8,-0.1},{1.0,0.0}, + {0.8,0.1},{0.8,static_cast(0.5*kLw)},{static_cast(0.5*kLw),static_cast(0.5*kLw)}, + {static_cast(0.5*kLw),static_cast(-0.5*kLw)}}; TXTRU *axisz = new TXTRU("axisz","axisz","text",8,2); for(i=0;i<8;i++) axisz->DefineVertex(i,lz[i][0],lz[i][1]); axisz->DefineSection(0,-0.5*kLw);axisz->DefineSection(1,0.5*kLw); diff --git a/ITS/AliITSsimulationFastPoints.cxx b/ITS/AliITSsimulationFastPoints.cxx index 84afdd3d2b6..e5510e35801 100644 --- a/ITS/AliITSsimulationFastPoints.cxx +++ b/ITS/AliITSsimulationFastPoints.cxx @@ -132,7 +132,7 @@ void AliITSsimulationFastPoints::CreateFastRecPoints(AliITSmodule *mod, Int_t lab[4] = {hit->GetTrack(),-3,-3,ind}; Float_t q=kdEdXtoQ*(hitdestep+deltaDe); if(hitlay<3) q=1.; // SPD binary readout - Float_t hitv[6] = {locals[0],locals[2],sigmarphi*sigmarphi,sigmaz*sigmaz,q,q}; + Float_t hitv[6] = {locals[0],locals[2],static_cast(sigmarphi*sigmarphi),static_cast(sigmaz*sigmaz),q,q}; Int_t info[3] = {0,0,lyr}; AliITSRecPoint rp(lab,hitv,info,kTRUE); diff --git a/ITS/AliITStrackerMI.cxx b/ITS/AliITStrackerMI.cxx index 425bb142f5b..d7df282aa40 100644 --- a/ITS/AliITStrackerMI.cxx +++ b/ITS/AliITStrackerMI.cxx @@ -449,8 +449,8 @@ Int_t AliITStrackerMI::LoadClusters(TTree *cTree) { Float_t q = 0.; // this identifies virtual clusters Float_t hit[6] = {xdead, 0., - AliITSReconstructor::GetRecoParam()->GetSigmaXDeadZoneHit2(), - AliITSReconstructor::GetRecoParam()->GetSigmaZDeadZoneHit2(), + static_cast(AliITSReconstructor::GetRecoParam()->GetSigmaXDeadZoneHit2()), + static_cast(AliITSReconstructor::GetRecoParam()->GetSigmaZDeadZoneHit2()), q, 0.}; Bool_t local = kTRUE; @@ -1447,7 +1447,7 @@ void AliITStrackerMI::FollowProlongationTree(AliITStrackMI * otrack, Int_t esdin // update TPC V0 information // if (otrack->GetESDtrack()->GetV0Index(0)>0){ - Float_t fprimvertex[3]={GetX(),GetY(),GetZ()}; + Float_t fprimvertex[3]={static_cast(GetX()),static_cast(GetY()),static_cast(GetZ())}; for (Int_t i=0;i<3;i++){ Int_t index = otrack->GetESDtrack()->GetV0Index(i); if (index==0) break; diff --git a/ITS/AliITSv11.cxx b/ITS/AliITSv11.cxx index 091df0679d6..97fb2764452 100644 --- a/ITS/AliITSv11.cxx +++ b/ITS/AliITSv11.cxx @@ -1560,7 +1560,7 @@ void AliITSv11::Init() UpdateInternalGeometry(); AliITS::Init(); - fIDMother = gMC->VolId("ITSV"); // ITS Mother Volume ID. + fIDMother = TVirtualMC::GetMC()->VolId("ITSV"); // ITS Mother Volume ID. } //______________________________________________________________________ @@ -1607,16 +1607,16 @@ void AliITSv11::StepManager() // none. if(!(this->IsActive())) return; - if(!(gMC->TrackCharge())) return; + if(!(TVirtualMC::GetMC()->TrackCharge())) return; Int_t copy, lay = 0; - Int_t id = gMC->CurrentVolID(copy); + Int_t id = TVirtualMC::GetMC()->CurrentVolID(copy); Bool_t notSens = kFALSE; while ((layIsTrackExiting()) { + if(TVirtualMC::GetMC()->IsTrackExiting()) { AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kITS); } // if Outer ITS mother Volume @@ -1627,32 +1627,32 @@ void AliITSv11::StepManager() Int_t cpn0, cpn1, mod, status = 0; // // Track status - if(gMC->IsTrackInside()) status += 1; - if(gMC->IsTrackEntering()) status += 2; - if(gMC->IsTrackExiting()) status += 4; - if(gMC->IsTrackOut()) status += 8; - if(gMC->IsTrackDisappeared()) status += 16; - if(gMC->IsTrackStop()) status += 32; - if(gMC->IsTrackAlive()) status += 64; + if(TVirtualMC::GetMC()->IsTrackInside()) status += 1; + if(TVirtualMC::GetMC()->IsTrackEntering()) status += 2; + if(TVirtualMC::GetMC()->IsTrackExiting()) status += 4; + if(TVirtualMC::GetMC()->IsTrackOut()) status += 8; + if(TVirtualMC::GetMC()->IsTrackDisappeared()) status += 16; + if(TVirtualMC::GetMC()->IsTrackStop()) status += 32; + if(TVirtualMC::GetMC()->IsTrackAlive()) status += 64; // // retrieve the indices with the volume path // switch (lay) { case 0:case 1: // SPD - gMC->CurrentVolOffID(1,copy); // ladder - gMC->CurrentVolOffID(3,cpn1); // stave - gMC->CurrentVolOffID(5,cpn0); // sector + TVirtualMC::GetMC()->CurrentVolOffID(1,copy); // ladder + TVirtualMC::GetMC()->CurrentVolOffID(3,cpn1); // stave + TVirtualMC::GetMC()->CurrentVolOffID(5,cpn0); // sector break; case 2:case 3: // SDD copy = 1; - gMC->CurrentVolOffID(2,cpn1); - gMC->CurrentVolOffID(3,cpn0); + TVirtualMC::GetMC()->CurrentVolOffID(2,cpn1); + TVirtualMC::GetMC()->CurrentVolOffID(3,cpn0); break; case 4:case 5: // SSD copy = 1; - gMC->CurrentVolOffID(1,cpn1); - gMC->CurrentVolOffID(2,cpn0); + TVirtualMC::GetMC()->CurrentVolOffID(1,cpn1); + TVirtualMC::GetMC()->CurrentVolOffID(2,cpn0); break; default: AliError(Form("Invalid value: lay= %d . Not an ITS sensitive volume",lay)); @@ -1671,17 +1671,17 @@ void AliITSv11::StepManager() // hit.SetModule(mod); hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber()); - gMC->TrackPosition(position); - gMC->TrackMomentum(momentum); + TVirtualMC::GetMC()->TrackPosition(position); + TVirtualMC::GetMC()->TrackMomentum(momentum); hit.SetPosition(position); - hit.SetTime(gMC->TrackTime()); + hit.SetTime(TVirtualMC::GetMC()->TrackTime()); hit.SetMomentum(momentum); hit.SetStatus(status); - hit.SetEdep(gMC->Edep()); + hit.SetEdep(TVirtualMC::GetMC()->Edep()); hit.SetShunt(GetIshunt()); - if(gMC->IsTrackEntering()){ + if(TVirtualMC::GetMC()->IsTrackEntering()){ hit.SetStartPosition(position); - hit.SetStartTime(gMC->TrackTime()); + hit.SetStartTime(TVirtualMC::GetMC()->TrackTime()); hit.SetStartStatus(status); return; // don't save entering hit. } // end if IsEntering @@ -1690,7 +1690,7 @@ void AliITSv11::StepManager() new(lhits[fNhits++]) AliITShit(hit); // Use Copy Construtor. // Save old position... for next hit. hit.SetStartPosition(position); - hit.SetStartTime(gMC->TrackTime()); + hit.SetStartTime(TVirtualMC::GetMC()->TrackTime()); hit.SetStartStatus(status); return; diff --git a/ITS/UPGRADE/AliITSU.cxx b/ITS/UPGRADE/AliITSU.cxx index 85e676c18e5..6cb32acad7f 100644 --- a/ITS/UPGRADE/AliITSU.cxx +++ b/ITS/UPGRADE/AliITSU.cxx @@ -237,7 +237,7 @@ void AliITSU::Init() // classes therefore it should be called after a call to CreateGeometry. // if (!fIdSens) fIdSens = new Int_t[fNLayers]; - for(int i=0;iVolId(fLayerName[i]) : 0; + for(int i=0;iVolId(fLayerName[i]) : 0; fGeomTGeo = new AliITSUGeomTGeo(kTRUE); InitSimulation(); // diff --git a/ITS/UPGRADE/AliITSUv0.cxx b/ITS/UPGRADE/AliITSUv0.cxx index 4ab4d274cd2..b7d2c3907fe 100644 --- a/ITS/UPGRADE/AliITSUv0.cxx +++ b/ITS/UPGRADE/AliITSUv0.cxx @@ -682,10 +682,10 @@ void AliITSUv0::StepManager() // Return: // none. if(!(this->IsActive())) return; - if(!(gMC->TrackCharge())) return; + if(!(TVirtualMC::GetMC()->TrackCharge())) return; // Int_t copy, lay = 0; - Int_t id = gMC->CurrentVolID(copy); + Int_t id = TVirtualMC::GetMC()->CurrentVolID(copy); Bool_t notSens = kFALSE; while ((layIsTrackExiting()) { + if(TVirtualMC::GetMC()->IsTrackExiting()) { AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kITS); } // if Outer ITS mother Volume @@ -704,13 +704,13 @@ void AliITSUv0::StepManager() Int_t cpn0, cpn1, mod, status = 0; // // Track status - if(gMC->IsTrackInside()) status += 1; - if(gMC->IsTrackEntering()) status += 2; - if(gMC->IsTrackExiting()) status += 4; - if(gMC->IsTrackOut()) status += 8; - if(gMC->IsTrackDisappeared()) status += 16; - if(gMC->IsTrackStop()) status += 32; - if(gMC->IsTrackAlive()) status += 64; + if(TVirtualMC::GetMC()->IsTrackInside()) status += 1; + if(TVirtualMC::GetMC()->IsTrackEntering()) status += 2; + if(TVirtualMC::GetMC()->IsTrackExiting()) status += 4; + if(TVirtualMC::GetMC()->IsTrackOut()) status += 8; + if(TVirtualMC::GetMC()->IsTrackDisappeared()) status += 16; + if(TVirtualMC::GetMC()->IsTrackStop()) status += 32; + if(TVirtualMC::GetMC()->IsTrackAlive()) status += 64; // // retrieve the indices with the volume path @@ -720,8 +720,8 @@ void AliITSUv0::StepManager() return; // not an ITS sensitive volume. } else { copy = 1; - gMC->CurrentVolOffID(1,cpn1); - gMC->CurrentVolOffID(2,cpn0); + TVirtualMC::GetMC()->CurrentVolOffID(1,cpn1); + TVirtualMC::GetMC()->CurrentVolOffID(2,cpn0); } // mod = fGeomTGeo->GetChipIndex(lay,cpn0,cpn1); @@ -731,17 +731,17 @@ void AliITSUv0::StepManager() // hit.SetChip(mod); hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber()); - gMC->TrackPosition(position); - gMC->TrackMomentum(momentum); + TVirtualMC::GetMC()->TrackPosition(position); + TVirtualMC::GetMC()->TrackMomentum(momentum); hit.SetPosition(position); - hit.SetTime(gMC->TrackTime()); + hit.SetTime(TVirtualMC::GetMC()->TrackTime()); hit.SetMomentum(momentum); hit.SetStatus(status); - hit.SetEdep(gMC->Edep()); + hit.SetEdep(TVirtualMC::GetMC()->Edep()); hit.SetShunt(GetIshunt()); - if(gMC->IsTrackEntering()){ + if(TVirtualMC::GetMC()->IsTrackEntering()){ hit.SetStartPosition(position); - hit.SetStartTime(gMC->TrackTime()); + hit.SetStartTime(TVirtualMC::GetMC()->TrackTime()); hit.SetStartStatus(status); return; // don't save entering hit. } // end if IsEntering @@ -750,7 +750,7 @@ void AliITSUv0::StepManager() new(lhits[fNhits++]) AliITSUHit(hit); // Use Copy Construtor. // Save old position... for next hit. hit.SetStartPosition(position); - hit.SetStartTime(gMC->TrackTime()); + hit.SetStartTime(TVirtualMC::GetMC()->TrackTime()); hit.SetStartStatus(status); return; diff --git a/ITS/UPGRADE/AliITSUv1.cxx b/ITS/UPGRADE/AliITSUv1.cxx index e7b850454e1..d63857fe797 100644 --- a/ITS/UPGRADE/AliITSUv1.cxx +++ b/ITS/UPGRADE/AliITSUv1.cxx @@ -759,10 +759,10 @@ void AliITSUv1::StepManager() // none. // if(!(this->IsActive())) return; - if(!(gMC->TrackCharge())) return; + if(!(TVirtualMC::GetMC()->TrackCharge())) return; // Int_t copy, lay = 0; - Int_t id = gMC->CurrentVolID(copy); + Int_t id = TVirtualMC::GetMC()->CurrentVolID(copy); Bool_t notSens = kFALSE; while ((layIsTrackInside()) status += 1; - if(gMC->IsTrackEntering()) status += 2; - if(gMC->IsTrackExiting()) { + if(TVirtualMC::GetMC()->IsTrackInside()) status += 1; + if(TVirtualMC::GetMC()->IsTrackEntering()) status += 2; + if(TVirtualMC::GetMC()->IsTrackExiting()) { AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kITS); status += 4; } // if Outer ITS mother Volume - if(gMC->IsTrackOut()) status += 8; - if(gMC->IsTrackDisappeared()) status += 16; - if(gMC->IsTrackStop()) status += 32; - if(gMC->IsTrackAlive()) status += 64; + if(TVirtualMC::GetMC()->IsTrackOut()) status += 8; + if(TVirtualMC::GetMC()->IsTrackDisappeared()) status += 16; + if(TVirtualMC::GetMC()->IsTrackStop()) status += 32; + if(TVirtualMC::GetMC()->IsTrackAlive()) status += 64; // // retrieve the indices with the volume path // - gMC->TrackPosition(position); + TVirtualMC::GetMC()->TrackPosition(position); int chip=-1,module=-1,sstave=-1,stave=-1,level=0; // volume copies on different levels - gMC->CurrentVolOffID(++level,chip); - if (fGeomTGeo->GetNModules(lay)>0) gMC->CurrentVolOffID(++level,module); - if (fGeomTGeo->GetNHalfStaves(lay)>0) gMC->CurrentVolOffID(++level,sstave); - gMC->CurrentVolOffID(++level,stave); + TVirtualMC::GetMC()->CurrentVolOffID(++level,chip); + if (fGeomTGeo->GetNModules(lay)>0) TVirtualMC::GetMC()->CurrentVolOffID(++level,module); + if (fGeomTGeo->GetNHalfStaves(lay)>0) TVirtualMC::GetMC()->CurrentVolOffID(++level,sstave); + TVirtualMC::GetMC()->CurrentVolOffID(++level,stave); // chipID = fGeomTGeo->GetChipIndex(lay,stave,sstave,module,chip); // Fill hit structure. // hit.SetChip(chipID); hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber()); - gMC->TrackPosition(position); - gMC->TrackMomentum(momentum); + TVirtualMC::GetMC()->TrackPosition(position); + TVirtualMC::GetMC()->TrackMomentum(momentum); hit.SetPosition(position); - hit.SetTime(gMC->TrackTime()); + hit.SetTime(TVirtualMC::GetMC()->TrackTime()); hit.SetMomentum(momentum); hit.SetStatus(status); - hit.SetEdep(gMC->Edep()); + hit.SetEdep(TVirtualMC::GetMC()->Edep()); hit.SetShunt(GetIshunt()); - if(gMC->IsTrackEntering()){ + if(TVirtualMC::GetMC()->IsTrackEntering()){ hit.SetStartPosition(position); - hit.SetStartTime(gMC->TrackTime()); + hit.SetStartTime(TVirtualMC::GetMC()->TrackTime()); hit.SetStartStatus(status); return; // don't save entering hit. } // end if IsEntering @@ -826,7 +826,7 @@ void AliITSUv1::StepManager() new(lhits[fNhits++]) AliITSUHit(hit); // Use Copy Construtor. // Save old position... for next hit. hit.SetStartPosition(position); - hit.SetStartTime(gMC->TrackTime()); + hit.SetStartTime(TVirtualMC::GetMC()->TrackTime()); hit.SetStartStatus(status); return; diff --git a/ITS/UPGRADE/v0/AliITSupgrade.cxx b/ITS/UPGRADE/v0/AliITSupgrade.cxx index 2b210ae36bf..7cc766c7929 100644 --- a/ITS/UPGRADE/v0/AliITSupgrade.cxx +++ b/ITS/UPGRADE/v0/AliITSupgrade.cxx @@ -21,7 +21,7 @@ #include #include //CreateGeometry() #include -#include //->gMC in StepManager +#include //->TVirtualMC::GetMC() in StepManager #include //StepHistory #include #include @@ -251,7 +251,7 @@ void AliITSupgrade::CreateGeometry() //Creates detailed geometry simulation (currently GEANT volumes tree) // AliInfo("Start ITS upgrade preliminary version building"); - if(!gMC->IsRootGeometrySupported()) return; + if(!TVirtualMC::GetMC()->IsRootGeometrySupported()) return; TGeoVolumeAssembly *vol= CreateVol(); gGeoManager->GetVolume("ALIC")->AddNode(vol,0); AliInfo("Stop ITS upgrade preliminary version building"); @@ -269,11 +269,11 @@ void AliITSupgrade::StepManager() if(!fSegmentation) AliFatal("No segmentation available"); if(!(this->IsActive())) return; - if(!(gMC->TrackCharge())) return; - TString volumeName=gMC->CurrentVolName(); + if(!(TVirtualMC::GetMC()->TrackCharge())) return; + TString volumeName=TVirtualMC::GetMC()->CurrentVolName(); if(volumeName.Contains("Be")) return; if(volumeName.Contains("Cu")) return; - if(gMC->IsTrackExiting()) { + if(TVirtualMC::GetMC()->IsTrackExiting()) { AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kITS); } // if Outer ITS mother Volume @@ -285,36 +285,36 @@ void AliITSupgrade::StepManager() // // Track status - if(gMC->IsTrackInside()) status += 1; - if(gMC->IsTrackEntering()) status += 2; - if(gMC->IsTrackExiting()) status += 4; - if(gMC->IsTrackOut()) status += 8; - if(gMC->IsTrackDisappeared()) status += 16; - if(gMC->IsTrackStop()) status += 32; - if(gMC->IsTrackAlive()) status += 64; + if(TVirtualMC::GetMC()->IsTrackInside()) status += 1; + if(TVirtualMC::GetMC()->IsTrackEntering()) status += 2; + if(TVirtualMC::GetMC()->IsTrackExiting()) status += 4; + if(TVirtualMC::GetMC()->IsTrackOut()) status += 8; + if(TVirtualMC::GetMC()->IsTrackDisappeared()) status += 16; + if(TVirtualMC::GetMC()->IsTrackStop()) status += 32; + if(TVirtualMC::GetMC()->IsTrackAlive()) status += 64; // // Fill hit structure. // Int_t copy=-1; - gMC->CurrentVolID(copy); + TVirtualMC::GetMC()->CurrentVolID(copy); volumeName.Remove(0,12); // remove letters to get the layer number hit.SetModule(fSegmentation->GetIdIndex(volumeName.Atoi(),copy)); // layer and sector information are together in the IdIndex (if copy=0 the idIndex is the layer)); hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber()); - gMC->TrackPosition(position); - gMC->TrackMomentum(momentum); + TVirtualMC::GetMC()->TrackPosition(position); + TVirtualMC::GetMC()->TrackMomentum(momentum); hit.SetPosition(position); - hit.SetTime(gMC->TrackTime()); + hit.SetTime(TVirtualMC::GetMC()->TrackTime()); hit.SetMomentum(momentum); hit.SetStatus(status); - hit.SetEdep(gMC->Edep()); + hit.SetEdep(TVirtualMC::GetMC()->Edep()); hit.SetShunt(GetIshunt()); - if(gMC->IsTrackEntering()){ + if(TVirtualMC::GetMC()->IsTrackEntering()){ hit.SetStartPosition(position); - hit.SetStartTime(gMC->TrackTime()); + hit.SetStartTime(TVirtualMC::GetMC()->TrackTime()); hit.SetStartStatus(status); return; // don't save entering hit. } @@ -323,7 +323,7 @@ void AliITSupgrade::StepManager() new((*fHits)[fNhits++]) AliITShit(hit); // Use Copy Construtor. // Save old position... for next hit. hit.SetStartPosition(position); - hit.SetStartTime(gMC->TrackTime()); + hit.SetStartTime(TVirtualMC::GetMC()->TrackTime()); hit.SetStartStatus(status); return; @@ -401,11 +401,11 @@ void AliITSupgrade::SetFullSegmentation(TArrayD xsize,TArrayD zsize){ void AliITSupgrade::StepHistory() { // This methode is invoked from StepManager() in order to print out - TString volumeName=gMC->CurrentVolName(); + TString volumeName=TVirtualMC::GetMC()->CurrentVolName(); if(!volumeName.Contains("Silicon")) return; static Int_t iStepN; const char *sParticle; - switch(gMC->TrackPid()){ + switch(TVirtualMC::GetMC()->TrackPid()){ case kProton: sParticle="PROTON" ;break; case kNeutron: sParticle="neutron" ;break; case kGamma: sParticle="gamma" ;break; @@ -417,40 +417,40 @@ void AliITSupgrade::StepHistory() } TString flag="funny combination"; - if(gMC->IsTrackAlive()) { - if(gMC->IsTrackEntering()) flag="enters to"; - else if(gMC->IsTrackExiting()) flag="exits from"; - else if(gMC->IsTrackInside()) flag="inside"; - else if(gMC->IsTrackStop()) flag="stopped in"; + if(TVirtualMC::GetMC()->IsTrackAlive()) { + if(TVirtualMC::GetMC()->IsTrackEntering()) flag="enters to"; + else if(TVirtualMC::GetMC()->IsTrackExiting()) flag="exits from"; + else if(TVirtualMC::GetMC()->IsTrackInside()) flag="inside"; + else if(TVirtualMC::GetMC()->IsTrackStop()) flag="stopped in"; } Int_t vid=0,copy=0; - TString path=gMC->CurrentVolName(); path.Prepend("-");path.Prepend(gMC->CurrentVolOffName(1));//current volume and his mother are always there - vid=gMC->CurrentVolOffID(2,copy); if(vid) {path.Prepend("-");path.Prepend(gMC->VolName(vid));} - vid=gMC->CurrentVolOffID(3,copy); if(vid) {path.Prepend("-");path.Prepend(gMC->VolName(vid));} + TString path=TVirtualMC::GetMC()->CurrentVolName(); path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->CurrentVolOffName(1));//current volume and his mother are always there + vid=TVirtualMC::GetMC()->CurrentVolOffID(2,copy); if(vid) {path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->VolName(vid));} + vid=TVirtualMC::GetMC()->CurrentVolOffID(3,copy); if(vid) {path.Prepend("-");path.Prepend(TVirtualMC::GetMC()->VolName(vid));} - AliInfo(Form("\n Step %i: %s (%i) %s %s m=%.6f GeV q=%.1f dEdX=%.4f Etot=%.4f",iStepN,sParticle,gMC->TrackPid(),flag.Data(),path.Data(),gMC->TrackMass(),gMC->TrackCharge(),gMC->Edep()*1e9,gMC->Etot())); + AliInfo(Form("\n Step %i: %s (%i) %s %s m=%.6f GeV q=%.1f dEdX=%.4f Etot=%.4f",iStepN,sParticle,TVirtualMC::GetMC()->TrackPid(),flag.Data(),path.Data(),TVirtualMC::GetMC()->TrackMass(),TVirtualMC::GetMC()->TrackCharge(),TVirtualMC::GetMC()->Edep()*1e9,TVirtualMC::GetMC()->Etot())); - Double_t gMcTrackPos[3]; gMC->TrackPosition(gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2]); - Double_t gMcTrackPosLoc[3]; gMC->Gmtod(gMcTrackPos,gMcTrackPosLoc,1); + Double_t gMcTrackPos[3]; TVirtualMC::GetMC()->TrackPosition(gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2]); + Double_t gMcTrackPosLoc[3]; TVirtualMC::GetMC()->Gmtod(gMcTrackPos,gMcTrackPosLoc,1); TString v(volumeName.Data()); v.ReplaceAll("LayerSilicon",""); Int_t ilayer = v.Atoi(); Double_t rXY = TMath::Sqrt(gMcTrackPos[0]*gMcTrackPos[0]+gMcTrackPos[1]*gMcTrackPos[1]); - AliInfo(Form("gMC Track Position (MARS) x: %5.3lf, y: %5.3lf, z: %5.3lf (r: %5.3lf) (deltaR %5.5lf - width %5.5f)",gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2], rXY , rXY - (fRadii.At(ilayer)),fWidths.At(ilayer))); + AliInfo(Form("TVirtualMC::GetMC() Track Position (MARS) x: %5.3lf, y: %5.3lf, z: %5.3lf (r: %5.3lf) (deltaR %5.5lf - width %5.5f)",gMcTrackPos[0],gMcTrackPos[1],gMcTrackPos[2], rXY , rXY - (fRadii.At(ilayer)),fWidths.At(ilayer))); AliDebug(10,Form("Step %i: tid=%i flags alive=%i disap=%i enter=%i exit=%i inside=%i out=%i stop=%i new=%i", iStepN, gAlice->GetMCApp()->GetCurrentTrackNumber(), - gMC->IsTrackAlive(), gMC->IsTrackDisappeared(),gMC->IsTrackEntering(), gMC->IsTrackExiting(), - gMC->IsTrackInside(),gMC->IsTrackOut(), gMC->IsTrackStop(), gMC->IsNewTrack())); + TVirtualMC::GetMC()->IsTrackAlive(), TVirtualMC::GetMC()->IsTrackDisappeared(),TVirtualMC::GetMC()->IsTrackEntering(), TVirtualMC::GetMC()->IsTrackExiting(), + TVirtualMC::GetMC()->IsTrackInside(),TVirtualMC::GetMC()->IsTrackOut(), TVirtualMC::GetMC()->IsTrackStop(), TVirtualMC::GetMC()->IsNewTrack())); Float_t a,z,den,rad,abs; a=z=den=rad=abs=-1; - Int_t mid=gMC->CurrentMaterial(a,z,den,rad,abs); + Int_t mid=TVirtualMC::GetMC()->CurrentMaterial(a,z,den,rad,abs); AliDebug(10, Form("Step %i: mid=%i a=%7.2f z=%7.2f den=%9.4f rad=%9.2f abs=%9.2f\n\n",iStepN,mid,a,z,den,rad,abs)); /* - TArrayI proc; gMC->StepProcesses(proc); + TArrayI proc; TVirtualMC::GetMC()->StepProcesses(proc); AliInfo("Processes in this step:"); for ( int i = 0 ; i < proc.GetSize(); i++) diff --git a/MFT/AliMFT.cxx b/MFT/AliMFT.cxx index 1d179ae746e..0b1e35a6fd7 100644 --- a/MFT/AliMFT.cxx +++ b/MFT/AliMFT.cxx @@ -224,7 +224,7 @@ void AliMFT::CreateGeometry() { // Creates detailed geometry simulation (currently GEANT volumes tree) AliInfo("Start MFT preliminary version building"); - if(!gMC->IsRootGeometrySupported()) return; + if(!TVirtualMC::GetMC()->IsRootGeometrySupported()) return; TGeoVolumeAssembly *vol = CreateVol(); AliInfo("TGeoVolumeAssembly created!"); gGeoManager->GetVolume("ALIC")->AddNode(vol,0); @@ -257,15 +257,15 @@ void AliMFT::StepManager() { // Full Step Manager - AliDebug(2, Form("Entering StepManager: gMC->CurrentVolName() = %s", gMC->CurrentVolName())); + AliDebug(2, Form("Entering StepManager: TVirtualMC::GetMC()->CurrentVolName() = %s", TVirtualMC::GetMC()->CurrentVolName())); if (!fSegmentation) AliFatal("No segmentation available"); // DO WE HAVE A SEGMENTATION??? if (!(this->IsActive())) return; - if (!(gMC->TrackCharge())) return; + if (!(TVirtualMC::GetMC()->TrackCharge())) return; - TString planeNumber = gMC->CurrentVolName(); - TString detElemNumber = gMC->CurrentVolName(); + TString planeNumber = TVirtualMC::GetMC()->CurrentVolName(); + TString detElemNumber = TVirtualMC::GetMC()->CurrentVolName(); if (planeNumber.Contains("support")) return; if (planeNumber.Contains("readout")) return; planeNumber.Remove(0,9); @@ -274,7 +274,7 @@ void AliMFT::StepManager() { detElemNumber.Remove(3); Int_t detElemID = fSegmentation->GetDetElemGlobalID(planeNumber.Atoi(), detElemNumber.Atoi()); - if (gMC->IsTrackExiting()) { + if (TVirtualMC::GetMC()->IsTrackExiting()) { AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kMFT); } @@ -284,13 +284,13 @@ void AliMFT::StepManager() { Int_t status = 0; // Track status - if (gMC->IsTrackInside()) status += 1; - if (gMC->IsTrackEntering()) status += 2; - if (gMC->IsTrackExiting()) status += 4; - if (gMC->IsTrackOut()) status += 8; - if (gMC->IsTrackDisappeared()) status += 16; - if (gMC->IsTrackStop()) status += 32; - if (gMC->IsTrackAlive()) status += 64; + if (TVirtualMC::GetMC()->IsTrackInside()) status += 1; + if (TVirtualMC::GetMC()->IsTrackEntering()) status += 2; + if (TVirtualMC::GetMC()->IsTrackExiting()) status += 4; + if (TVirtualMC::GetMC()->IsTrackOut()) status += 8; + if (TVirtualMC::GetMC()->IsTrackDisappeared()) status += 16; + if (TVirtualMC::GetMC()->IsTrackStop()) status += 32; + if (TVirtualMC::GetMC()->IsTrackAlive()) status += 64; // ---------- Fill hit structure @@ -298,21 +298,21 @@ void AliMFT::StepManager() { hit.SetPlane(planeNumber.Atoi()); hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber()); - gMC->TrackPosition(position); - gMC->TrackMomentum(momentum); + TVirtualMC::GetMC()->TrackPosition(position); + TVirtualMC::GetMC()->TrackMomentum(momentum); AliDebug(1, Form("AliMFT::StepManager()->%s Hit #%06d (x=%f, y=%f, z=%f) belongs to track %02d\n", - gMC->CurrentVolName(), fNhits, position.X(), position.Y(), position.Z(), gAlice->GetMCApp()->GetCurrentTrackNumber())); + TVirtualMC::GetMC()->CurrentVolName(), fNhits, position.X(), position.Y(), position.Z(), gAlice->GetMCApp()->GetCurrentTrackNumber())); hit.SetPosition(position); - hit.SetTOF(gMC->TrackTime()); + hit.SetTOF(TVirtualMC::GetMC()->TrackTime()); hit.SetMomentum(momentum); hit.SetStatus(status); - hit.SetEloss(gMC->Edep()); + hit.SetEloss(TVirtualMC::GetMC()->Edep()); // hit.SetShunt(GetIshunt()); -// if (gMC->IsTrackEntering()) { +// if (TVirtualMC::GetMC()->IsTrackEntering()) { // hit.SetStartPosition(position); -// hit.SetStartTime(gMC->TrackTime()); +// hit.SetStartTime(TVirtualMC::GetMC()->TrackTime()); // hit.SetStartStatus(status); // return; // don't save entering hit. // } @@ -322,7 +322,7 @@ void AliMFT::StepManager() { // Save old position... for next hit. // hit.SetStartPosition(position); -// hit.SetStartTime(gMC->TrackTime()); +// hit.SetStartTime(TVirtualMC::GetMC()->TrackTime()); // hit.SetStartStatus(status); return; diff --git a/MFT/AliMuonForwardTrackFinder.cxx b/MFT/AliMuonForwardTrackFinder.cxx index aea32652d18..484d1328f5e 100644 --- a/MFT/AliMuonForwardTrackFinder.cxx +++ b/MFT/AliMuonForwardTrackFinder.cxx @@ -701,26 +701,26 @@ Int_t AliMuonForwardTrackFinder::LoadNextTrack() { // fOutputQAFile->cd(); - Float_t finalCandidatesInfo[] = {Double_t(fRun), - Double_t(fEv), - Double_t(fCountRealTracksAnalyzedOfEvent), - Double_t(nFinalTracks), - Double_t(fLabelMC>=0), - xVtx, yVtx, zVtx, - motherPdg, - Double_t(fMuonTrackReco->GetMatchTrigger()), - Double_t(nClustersMC), - Double_t(nGoodClusters), - pt, theta, eta, - chi2AtPlane[0], - chi2AtPlane[1], - chi2AtPlane[2], - chi2AtPlane[3], - chi2AtPlane[4], - chi2AtPlane[5], - chi2AtPlane[6], - chi2AtPlane[7], - chi2AtPlane[8]}; + Float_t finalCandidatesInfo[] = {static_cast(fRun), + static_cast(fEv), + static_cast(fCountRealTracksAnalyzedOfEvent), + static_cast(nFinalTracks), + static_cast(fLabelMC>=0), + static_cast(xVtx), static_cast(yVtx), static_cast(zVtx), + static_cast(motherPdg), + static_cast(fMuonTrackReco->GetMatchTrigger()), + static_cast(nClustersMC), + static_cast(nGoodClusters), + static_cast(pt), static_cast(theta), static_cast(eta), + static_cast(chi2AtPlane[0]), + static_cast(chi2AtPlane[1]), + static_cast(chi2AtPlane[2]), + static_cast(chi2AtPlane[3]), + static_cast(chi2AtPlane[4]), + static_cast(chi2AtPlane[5]), + static_cast(chi2AtPlane[6]), + static_cast(chi2AtPlane[7]), + static_cast(chi2AtPlane[8])}; fNtuFinalCandidates -> Fill(finalCandidatesInfo); @@ -763,35 +763,35 @@ Int_t AliMuonForwardTrackFinder::LoadNextTrack() { // fOutputQAFile->cd(); - Float_t finalBestCandidatesInfo[] = {Double_t(fRun), - Double_t(fEv), - Double_t(fCountRealTracksAnalyzedOfEvent), - Double_t(nFinalTracks), - Double_t(fLabelMC>=0), - xVtx, yVtx, zVtx, - motherPdg, - Double_t(fMuonTrackReco->GetMatchTrigger()), - Double_t(nClustersMC), - Double_t(nGoodClustersBestCandidate), - pt, theta, eta, - chi2HistoryForBestCandidate[0], - chi2HistoryForBestCandidate[1], - chi2HistoryForBestCandidate[2], - chi2HistoryForBestCandidate[3], - chi2HistoryForBestCandidate[4], - chi2HistoryForBestCandidate[5], - chi2HistoryForBestCandidate[6], - chi2HistoryForBestCandidate[7], - chi2HistoryForBestCandidate[8], - nClustersPerPlane[0], - nClustersPerPlane[1], - nClustersPerPlane[2], - nClustersPerPlane[3], - nClustersPerPlane[4], - nClustersPerPlane[5], - nClustersPerPlane[6], - nClustersPerPlane[7], - nClustersPerPlane[8]}; + Float_t finalBestCandidatesInfo[] = {static_cast(fRun), + static_cast(fEv), + static_cast(fCountRealTracksAnalyzedOfEvent), + static_cast(nFinalTracks), + static_cast(fLabelMC>=0), + static_cast(xVtx), static_cast(yVtx), static_cast(zVtx), + static_cast(motherPdg), + static_cast(fMuonTrackReco->GetMatchTrigger()), + static_cast(nClustersMC), + static_cast(nGoodClustersBestCandidate), + static_cast(pt), static_cast(theta), static_cast(eta), + static_cast(chi2HistoryForBestCandidate[0]), + static_cast(chi2HistoryForBestCandidate[1]), + static_cast(chi2HistoryForBestCandidate[2]), + static_cast(chi2HistoryForBestCandidate[3]), + static_cast(chi2HistoryForBestCandidate[4]), + static_cast(chi2HistoryForBestCandidate[5]), + static_cast(chi2HistoryForBestCandidate[6]), + static_cast(chi2HistoryForBestCandidate[7]), + static_cast(chi2HistoryForBestCandidate[8]), + static_cast(nClustersPerPlane[0]), + static_cast(nClustersPerPlane[1]), + static_cast(nClustersPerPlane[2]), + static_cast(nClustersPerPlane[3]), + static_cast(nClustersPerPlane[4]), + static_cast(nClustersPerPlane[5]), + static_cast(nClustersPerPlane[6]), + static_cast(nClustersPerPlane[7]), + static_cast(nClustersPerPlane[8])}; fNtuFinalBestCandidates -> Fill(finalBestCandidatesInfo); diff --git a/MONITOR/CMakebinmonitorGDC.pkg b/MONITOR/CMakebinmonitorGDC.pkg index a993556234d..e595809b72a 100644 --- a/MONITOR/CMakebinmonitorGDC.pkg +++ b/MONITOR/CMakebinmonitorGDC.pkg @@ -54,9 +54,3 @@ if (DATE_ROOT) endif(DATE_ROOT) -if( ALICE_TARGET MATCHES "macosx") - - ALICE_Format(TEMP "-Wl,-u,_G__cpp_setupG__" "" ${ELIBS}) - set ( PACKLDFLAGS "${LDFLAGS} ${TEMP}") - -endif( ALICE_TARGET MATCHES "macosx") diff --git a/MUON/AliMUON.h b/MUON/AliMUON.h index 04cd31887a4..c6150b288df 100644 --- a/MUON/AliMUON.h +++ b/MUON/AliMUON.h @@ -98,7 +98,7 @@ class AliMUON : public AliDetector virtual void SetAlign(Bool_t align = true); virtual void SetAlign(const TString& fileName, Bool_t align = true); - /// Set flag to inactivate calls to gMC->SetMaxStep + /// Set flag to inactivate calls to TVirtualMC::GetMC()->SetMaxStep virtual void SetIsMaxStep(Bool_t isMaxStep) { fIsMaxStep = isMaxStep; } /// Set scaler event for trigger @@ -175,7 +175,7 @@ class AliMUON : public AliDetector Int_t fCurIterPad; ///< Current pad index // Options - Bool_t fIsMaxStep; ///< Flag to inactivate calls to gMC->SetMaxStep + Bool_t fIsMaxStep; ///< Flag to inactivate calls to TVirtualMC::GetMC()->SetMaxStep Bool_t fTriggerScalerEvent; ///< Flag to generates scaler event Int_t fTriggerResponseV1; ///< Flag to select TriggerResponseV1 (for cluster size in MTR) Int_t fTriggerCoinc44; ///< Flag to select TriggerCoinc44 diff --git a/MUON/AliMUONGain.cxx b/MUON/AliMUONGain.cxx index 1a7c0c960e2..8c3a0a6de99 100644 --- a/MUON/AliMUONGain.cxx +++ b/MUON/AliMUONGain.cxx @@ -492,7 +492,7 @@ void AliMUONGain::MakeGainStore(TString shuttleFile) // 1. - linear fit over gAlinbpf1 points - Double_t par[4] = {0.,0.5,0.,ADCMax()}; + Double_t par[4] = {0.,0.5,0.,static_cast(ADCMax())}; Int_t nbs = nEntries - fnInit; if(nbs < fnbpf1)fnbpf1=nbs; diff --git a/MUON/AliMUONGeometryBuilder.cxx b/MUON/AliMUONGeometryBuilder.cxx index 7fbd5aabb9b..1811e43e154 100644 --- a/MUON/AliMUONGeometryBuilder.cxx +++ b/MUON/AliMUONGeometryBuilder.cxx @@ -253,9 +253,9 @@ void AliMUONGeometryBuilder::PlaceVolume(const TString& name, const TString& mNa // Place the volume if (npar == 0) - gMC->Gspos(name, copyNo, mName, xyz[0], xyz[1], xyz[2] , krot, only); + TVirtualMC::GetMC()->Gspos(name, copyNo, mName, xyz[0], xyz[1], xyz[2] , krot, only); else - gMC->Gsposp(name, copyNo, mName, xyz[0], xyz[1], xyz[2] , krot, only, + TVirtualMC::GetMC()->Gsposp(name, copyNo, mName, xyz[0], xyz[1], xyz[2] , krot, only, param, npar); } @@ -556,7 +556,7 @@ void AliMUONGeometryBuilder::CreateGeometry() { /// Construct geometry using geometry builders. - if ( gMC->IsRootGeometrySupported() ) { + if ( TVirtualMC::GetMC()->IsRootGeometrySupported() ) { CreateGeometryWithTGeo(); } diff --git a/MUON/AliMUONGeometryModule.cxx b/MUON/AliMUONGeometryModule.cxx index 01f3c9197f5..db3eb5fc805 100644 --- a/MUON/AliMUONGeometryModule.cxx +++ b/MUON/AliMUONGeometryModule.cxx @@ -150,7 +150,7 @@ void AliMUONGeometryModule::SetSensitiveVolume(const TString& volName) /// Add the volume specified by volName to the list of sensitive /// volumes - SetSensitiveVolume(gMC->VolId(volName)); + SetSensitiveVolume(TVirtualMC::GetMC()->VolId(volName)); } //______________________________________________________________________________ @@ -193,5 +193,5 @@ Bool_t AliMUONGeometryModule::IsSensitiveVolume(const TString& volName) const /// Check if the volume specified by volName is present in the list /// of sensitive volumes. - return IsSensitiveVolume(gMC->VolId(volName)); + return IsSensitiveVolume(TVirtualMC::GetMC()->VolId(volName)); } diff --git a/MUON/AliMUONLocalStruct.cxx b/MUON/AliMUONLocalStruct.cxx index b98ab0d0d65..efc294e609f 100644 --- a/MUON/AliMUONLocalStruct.cxx +++ b/MUON/AliMUONLocalStruct.cxx @@ -137,7 +137,7 @@ AliMUONLocalStruct::operator=(const AliMUONLocalStruct& event) void AliMUONLocalStruct::GetXPattern(TArrayS& array) const { /// return array of X pattern - Short_t vec[4] = {GetX1(), GetX2(), GetX3(), GetX4()}; + Short_t vec[4] = {static_cast(GetX1()), static_cast(GetX2()), static_cast(GetX3()), static_cast(GetX4())}; array.Set(4, vec); } @@ -145,7 +145,7 @@ void AliMUONLocalStruct::GetXPattern(TArrayS& array) const void AliMUONLocalStruct::GetYPattern(TArrayS& array) const { /// return array of Y pattern - Short_t vec[4] = {GetY1(), GetY2(), GetY3(), GetY4()}; + Short_t vec[4] = {static_cast(GetY1()), static_cast(GetY2()), static_cast(GetY3()), static_cast(GetY4())}; array.Set(4, vec); } diff --git a/MUON/AliMUONLocalTrigger.cxx b/MUON/AliMUONLocalTrigger.cxx index 8edceef1bed..39a6a159493 100644 --- a/MUON/AliMUONLocalTrigger.cxx +++ b/MUON/AliMUONLocalTrigger.cxx @@ -154,7 +154,7 @@ Char_t AliMUONLocalTrigger::GetLoDecision() const void AliMUONLocalTrigger::GetXPattern(TArrayS& array) const { /// return array of X pattern - Short_t vec[4] = {GetX1Pattern(), GetX2Pattern(), GetX3Pattern(), GetX4Pattern()}; + Short_t vec[4] = {static_cast(GetX1Pattern()), static_cast(GetX2Pattern()), static_cast(GetX3Pattern()), static_cast(GetX4Pattern())}; array.Set(4, vec); } @@ -162,7 +162,7 @@ void AliMUONLocalTrigger::GetXPattern(TArrayS& array) const void AliMUONLocalTrigger::GetYPattern(TArrayS& array) const { /// return array of Y pattern - Short_t vec[4] = {GetY1Pattern(), GetY2Pattern(), GetY3Pattern(), GetY4Pattern()}; + Short_t vec[4] = {static_cast(GetY1Pattern()), static_cast(GetY2Pattern()), static_cast(GetY3Pattern()), static_cast(GetY4Pattern())}; array.Set(4, vec); } diff --git a/MUON/AliMUONSlatGeometryBuilder.cxx b/MUON/AliMUONSlatGeometryBuilder.cxx index c5df6525edb..6f162101898 100644 --- a/MUON/AliMUONSlatGeometryBuilder.cxx +++ b/MUON/AliMUONSlatGeometryBuilder.cxx @@ -208,22 +208,22 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() Int_t moduleId; // the panel volume contains the nomex - Float_t panelpar[3] = { kPanelLength/2., kPanelHeight/2., kPanelWidth/2. }; - Float_t nomexpar[3] = { kNomexLength/2., kNomexHeight/2., kNomexWidth/2. }; + Float_t panelpar[3] = { static_cast(kPanelLength/2.), static_cast(kPanelHeight/2.), static_cast(kPanelWidth/2.) }; + Float_t nomexpar[3] = { static_cast(kNomexLength/2.), static_cast(kNomexHeight/2.), static_cast(kNomexWidth/2.) }; Float_t twidth = kPanelWidth + kNomexBWidth; - Float_t nomexbpar[3] = {kNomexLength/2., kNomexHeight/2.,twidth/2. };// bulk nomex + Float_t nomexbpar[3] = {static_cast(kNomexLength/2.), static_cast(kNomexHeight/2.),static_cast(twidth/2.) };// bulk nomex // insulating material contains PCB-> gas twidth = 2*(kInsuWidth + kPcbWidth) + kSensWidth ; - Float_t insupar[3] = {kInsuLength/2., kInsuHeight/2., twidth/2. }; + Float_t insupar[3] = {static_cast(kInsuLength/2.), static_cast(kInsuHeight/2.), static_cast(twidth/2.) }; twidth -= 2 * kInsuWidth; - Float_t pcbpar[3] = {kPcbLength/2., kPcbHeight/2., twidth/2. }; - Float_t senspar[3] = {kSensLength/2., kSensHeight/2., kSensWidth/2. }; + Float_t pcbpar[3] = {static_cast(kPcbLength/2.), static_cast(kPcbHeight/2.), static_cast(twidth/2.) }; + Float_t senspar[3] = {static_cast(kSensLength/2.), static_cast(kSensHeight/2.), static_cast(kSensWidth/2.) }; Float_t theight = 2 * kHframeHeight + kSensHeight; - Float_t hFramepar[3] = {kHframeLength/2., theight/2., kHframeWidth/2.}; - Float_t bFramepar[3] = {kBframeLength/2., kBframeHeight/2., kBframeWidth/2.}; - Float_t vFramepar[3] = {kVframeLength/2., kVframeHeight/2., kVframeWidth/2.}; - Float_t nulocpar[3] = {kNulocLength/2., kNulocHeight/2., kNulocWidth/2.}; + Float_t hFramepar[3] = {static_cast(kHframeLength/2.), static_cast(theight/2.), static_cast(kHframeWidth/2.)}; + Float_t bFramepar[3] = {static_cast(kBframeLength/2.), static_cast(kBframeHeight/2.), static_cast(kBframeWidth/2.)}; + Float_t vFramepar[3] = {static_cast(kVframeLength/2.), static_cast(kVframeHeight/2.), static_cast(kVframeWidth/2.)}; + Float_t nulocpar[3] = {static_cast(kNulocLength/2.), static_cast(kNulocHeight/2.), static_cast(kNulocWidth/2.)}; Float_t xx; Float_t xxmax = (kBframeLength - kNulocLength)/2.; @@ -255,26 +255,26 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() // Only for chamber 5: slat 1 has a PCB shorter by 5cm! Float_t tlength = 35.; - Float_t panelpar2[3] = { tlength/2., panelpar[1], panelpar[2]}; - Float_t nomexpar2[3] = { tlength/2., nomexpar[1], nomexpar[2]}; - Float_t nomexbpar2[3] = { tlength/2., nomexbpar[1], nomexbpar[2]}; - Float_t insupar2[3] = { tlength/2., insupar[1], insupar[2]}; - Float_t pcbpar2[3] = { tlength/2., pcbpar[1], pcbpar[2]}; - Float_t senspar2[3] = { tlength/2., senspar[1], senspar[2]}; - Float_t hFramepar2[3] = { tlength/2., hFramepar[1], hFramepar[2]}; - Float_t bFramepar2[3] = { tlength/2., bFramepar[1], bFramepar[2]}; + Float_t panelpar2[3] = { static_cast(tlength/2.), panelpar[1], panelpar[2]}; + Float_t nomexpar2[3] = { static_cast(tlength/2.), nomexpar[1], nomexpar[2]}; + Float_t nomexbpar2[3] = { static_cast(tlength/2.), nomexbpar[1], nomexbpar[2]}; + Float_t insupar2[3] = { static_cast(tlength/2.), insupar[1], insupar[2]}; + Float_t pcbpar2[3] = { static_cast(tlength/2.), pcbpar[1], pcbpar[2]}; + Float_t senspar2[3] = { static_cast(tlength/2.), senspar[1], senspar[2]}; + Float_t hFramepar2[3] = { static_cast(tlength/2.), hFramepar[1], hFramepar[2]}; + Float_t bFramepar2[3] = { static_cast(tlength/2.), bFramepar[1], bFramepar[2]}; Float_t pcbDLength3 = (kPcbLength - tlength); // For rounded pcb of central slat Float_t csvPcbLength = 59.25-40.; // PQ-LAT-SR1 - Float_t panelpar3[3] = { csvPcbLength/2., panelpar[1], panelpar[2]}; - Float_t nomexpar3[3] = { csvPcbLength/2., nomexpar[1], nomexpar[2]}; - Float_t nomexbpar3[3] = { csvPcbLength/2., nomexbpar[1], nomexbpar[2]}; - Float_t insupar3[3] = { csvPcbLength/2., insupar[1], insupar[2]}; - Float_t pcbpar3[3] = { csvPcbLength/2., pcbpar[1], pcbpar[2]}; - Float_t senspar3[3] = { csvPcbLength/2., senspar[1], senspar[2]}; - Float_t hFramepar3[3] = { csvPcbLength/2., hFramepar[1], hFramepar[2]}; - Float_t bFramepar3[3] = { csvPcbLength/2., bFramepar[1], bFramepar[2]}; + Float_t panelpar3[3] = { static_cast(csvPcbLength/2.), panelpar[1], panelpar[2]}; + Float_t nomexpar3[3] = { static_cast(csvPcbLength/2.), nomexpar[1], nomexpar[2]}; + Float_t nomexbpar3[3] = {static_cast( csvPcbLength/2.), nomexbpar[1], nomexbpar[2]}; + Float_t insupar3[3] = { static_cast(csvPcbLength/2.), insupar[1], insupar[2]}; + Float_t pcbpar3[3] = { static_cast(csvPcbLength/2.), pcbpar[1], pcbpar[2]}; + Float_t senspar3[3] = { static_cast(csvPcbLength/2.), senspar[1], senspar[2]}; + Float_t hFramepar3[3] = { static_cast(csvPcbLength/2.), hFramepar[1], hFramepar[2]}; + Float_t bFramepar3[3] = { static_cast(csvPcbLength/2.), bFramepar[1], bFramepar[2]}; Float_t cPhi = TMath::RadToDeg()*(TMath::Pi()/2.-TMath::ACos(hFramepar3[1]/(AliMUONConstants::Rmin(2)-kRframeLength))); Float_t cFramepar3[5] = { AliMUONConstants::Rmin(2)-kRframeLength, AliMUONConstants::Rmin(2), kRframeWidth, -cPhi, cPhi}; @@ -446,98 +446,98 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() // create the panel volume - gMC->Gsvolu("S05C","BOX",kCarbonMaterial,panelpar,3); - gMC->Gsvolu("SB5C","BOX",kCarbonMaterial,panelpar2,3); - gMC->Gsvolu("SC5C","BOX",kCarbonMaterial,panelpar3,3); - gMC->Gsvolu("SD5C","BOX",kCarbonMaterial,panelpar,3); - gMC->Gsvolu("S06C","BOX",kCarbonMaterial,panelpar,3); - gMC->Gsvolu("SC6C","BOX",kCarbonMaterial,panelpar3,3); - gMC->Gsvolu("SD6C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("S05C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("SB5C","BOX",kCarbonMaterial,panelpar2,3); + TVirtualMC::GetMC()->Gsvolu("SC5C","BOX",kCarbonMaterial,panelpar3,3); + TVirtualMC::GetMC()->Gsvolu("SD5C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("S06C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("SC6C","BOX",kCarbonMaterial,panelpar3,3); + TVirtualMC::GetMC()->Gsvolu("SD6C","BOX",kCarbonMaterial,panelpar,3); // create the nomex volume (honey comb) - gMC->Gsvolu("S05N","BOX",kNomexMaterial,nomexpar,3); - gMC->Gsvolu("SB5N","BOX",kNomexMaterial,nomexpar2,3); - gMC->Gsvolu("SC5N","BOX",kNomexMaterial,nomexpar3,3); - gMC->Gsvolu("SD5N","BOX",kNomexMaterial,nomexpar,3); - gMC->Gsvolu("S06N","BOX",kNomexMaterial,nomexpar,3); - gMC->Gsvolu("SC6N","BOX",kNomexMaterial,nomexpar3,3); - gMC->Gsvolu("SD6N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("S05N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("SB5N","BOX",kNomexMaterial,nomexpar2,3); + TVirtualMC::GetMC()->Gsvolu("SC5N","BOX",kNomexMaterial,nomexpar3,3); + TVirtualMC::GetMC()->Gsvolu("SD5N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("S06N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("SC6N","BOX",kNomexMaterial,nomexpar3,3); + TVirtualMC::GetMC()->Gsvolu("SD6N","BOX",kNomexMaterial,nomexpar,3); // create the nomex volume (bulk) - gMC->Gsvolu("S05X","BOX",kNomexBMaterial,nomexbpar,3); - gMC->Gsvolu("SB5X","BOX",kNomexBMaterial,nomexbpar2,3); - gMC->Gsvolu("SC5X","BOX",kNomexBMaterial,nomexbpar3,3); - gMC->Gsvolu("SD5X","BOX",kNomexBMaterial,nomexbpar,3); - gMC->Gsvolu("S06X","BOX",kNomexBMaterial,nomexbpar,3); - gMC->Gsvolu("SC6X","BOX",kNomexBMaterial,nomexbpar3,3); - gMC->Gsvolu("SD6X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("S05X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("SB5X","BOX",kNomexBMaterial,nomexbpar2,3); + TVirtualMC::GetMC()->Gsvolu("SC5X","BOX",kNomexBMaterial,nomexbpar3,3); + TVirtualMC::GetMC()->Gsvolu("SD5X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("S06X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("SC6X","BOX",kNomexBMaterial,nomexbpar3,3); + TVirtualMC::GetMC()->Gsvolu("SD6X","BOX",kNomexBMaterial,nomexbpar,3); // create the insulating material volume - gMC->Gsvolu("S05I","BOX",kInsuMaterial,insupar,3); - gMC->Gsvolu("SB5I","BOX",kInsuMaterial,insupar2,3); - gMC->Gsvolu("SC5I","BOX",kInsuMaterial,insupar3,3); - gMC->Gsvolu("SD5I","BOX",kInsuMaterial,insupar,3); - gMC->Gsvolu("S06I","BOX",kInsuMaterial,insupar,3); - gMC->Gsvolu("SC6I","BOX",kInsuMaterial,insupar3,3); - gMC->Gsvolu("SD6I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("S05I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("SB5I","BOX",kInsuMaterial,insupar2,3); + TVirtualMC::GetMC()->Gsvolu("SC5I","BOX",kInsuMaterial,insupar3,3); + TVirtualMC::GetMC()->Gsvolu("SD5I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("S06I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("SC6I","BOX",kInsuMaterial,insupar3,3); + TVirtualMC::GetMC()->Gsvolu("SD6I","BOX",kInsuMaterial,insupar,3); // create the PCB volume - gMC->Gsvolu("S05P","BOX",kPcbMaterial,pcbpar,3); - gMC->Gsvolu("SB5P","BOX",kPcbMaterial,pcbpar2,3); - gMC->Gsvolu("SC5P","BOX",kPcbMaterial,pcbpar3,3); - gMC->Gsvolu("SD5P","BOX",kPcbMaterial,pcbpar,3); - gMC->Gsvolu("S06P","BOX",kPcbMaterial,pcbpar,3); - gMC->Gsvolu("SC6P","BOX",kPcbMaterial,pcbpar3,3); - gMC->Gsvolu("SD6P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("S05P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("SB5P","BOX",kPcbMaterial,pcbpar2,3); + TVirtualMC::GetMC()->Gsvolu("SC5P","BOX",kPcbMaterial,pcbpar3,3); + TVirtualMC::GetMC()->Gsvolu("SD5P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("S06P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("SC6P","BOX",kPcbMaterial,pcbpar3,3); + TVirtualMC::GetMC()->Gsvolu("SD6P","BOX",kPcbMaterial,pcbpar,3); // create the sensitive volumes, - gMC->Gsvolu("S05G","BOX",kSensMaterial,dum,0); - gMC->Gsvolu("SC5G","BOX",kSensMaterial,senspar3,3); - gMC->Gsvolu("SD5G","BOX",kSensMaterial,senspar,3); - gMC->Gsvolu("S06G","BOX",kSensMaterial,dum,0); - gMC->Gsvolu("SC6G","BOX",kSensMaterial,senspar3,3); - gMC->Gsvolu("SD6G","BOX",kSensMaterial,senspar,3); + TVirtualMC::GetMC()->Gsvolu("S05G","BOX",kSensMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("SC5G","BOX",kSensMaterial,senspar3,3); + TVirtualMC::GetMC()->Gsvolu("SD5G","BOX",kSensMaterial,senspar,3); + TVirtualMC::GetMC()->Gsvolu("S06G","BOX",kSensMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("SC6G","BOX",kSensMaterial,senspar3,3); + TVirtualMC::GetMC()->Gsvolu("SD6G","BOX",kSensMaterial,senspar,3); // create the vertical frame volume - gMC->Gsvolu("S05V","BOX",kVframeMaterial,vFramepar,3); - gMC->Gsvolu("S06V","BOX",kVframeMaterial,vFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S05V","BOX",kVframeMaterial,vFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S06V","BOX",kVframeMaterial,vFramepar,3); // create the rounded vertical frame volume - gMC->Gsvolu("SC5D","TUBS",kRframeMaterial,cFramepar3,5); - gMC->Gsvolu("SD5D","TUBS",kRframeMaterial,rFramepar3,5); - gMC->Gsvolu("SC6D","TUBS",kRframeMaterial,cFramepar3,5); - gMC->Gsvolu("SD6D","TUBS",kRframeMaterial,rFramepar3,5); + TVirtualMC::GetMC()->Gsvolu("SC5D","TUBS",kRframeMaterial,cFramepar3,5); + TVirtualMC::GetMC()->Gsvolu("SD5D","TUBS",kRframeMaterial,rFramepar3,5); + TVirtualMC::GetMC()->Gsvolu("SC6D","TUBS",kRframeMaterial,cFramepar3,5); + TVirtualMC::GetMC()->Gsvolu("SD6D","TUBS",kRframeMaterial,rFramepar3,5); // create the horizontal frame volume - gMC->Gsvolu("S05H","BOX",kHframeMaterial,hFramepar,3); - gMC->Gsvolu("SB5H","BOX",kHframeMaterial,hFramepar2,3); - gMC->Gsvolu("SC5H","BOX",kHframeMaterial,hFramepar3,3); - gMC->Gsvolu("SD5H","BOX",kHframeMaterial,hFramepar,3); - gMC->Gsvolu("S06H","BOX",kHframeMaterial,hFramepar,3); - gMC->Gsvolu("SC6H","BOX",kHframeMaterial,hFramepar3,3); - gMC->Gsvolu("SD6H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S05H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SB5H","BOX",kHframeMaterial,hFramepar2,3); + TVirtualMC::GetMC()->Gsvolu("SC5H","BOX",kHframeMaterial,hFramepar3,3); + TVirtualMC::GetMC()->Gsvolu("SD5H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S06H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SC6H","BOX",kHframeMaterial,hFramepar3,3); + TVirtualMC::GetMC()->Gsvolu("SD6H","BOX",kHframeMaterial,hFramepar,3); // create the horizontal border volume - gMC->Gsvolu("S05B","BOX",kBframeMaterial,bFramepar,3); - gMC->Gsvolu("SB5B","BOX",kBframeMaterial,bFramepar2,3); - gMC->Gsvolu("SC5B","BOX",kBframeMaterial,bFramepar3,3); - gMC->Gsvolu("SD5B","BOX",kBframeMaterial,bFramepar,3); - gMC->Gsvolu("S06B","BOX",kBframeMaterial,bFramepar,3); - gMC->Gsvolu("SC6B","BOX",kBframeMaterial,bFramepar3,3); - gMC->Gsvolu("SD6B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S05B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SB5B","BOX",kBframeMaterial,bFramepar2,3); + TVirtualMC::GetMC()->Gsvolu("SC5B","BOX",kBframeMaterial,bFramepar3,3); + TVirtualMC::GetMC()->Gsvolu("SD5B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S06B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SC6B","BOX",kBframeMaterial,bFramepar3,3); + TVirtualMC::GetMC()->Gsvolu("SD6B","BOX",kBframeMaterial,bFramepar,3); // Replace the volume shape with a composite shape // with substracted overlap with beam shield - if ( gMC->IsRootGeometrySupported() ) { + if ( TVirtualMC::GetMC()->IsRootGeometrySupported() ) { // Get shape Int_t nSlatType = 2; @@ -764,75 +764,75 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() // position the nomex volume inside the panel volume - gMC->Gspos("S05N",1,"S05C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SB5N",1,"SB5C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SC5N",1,"SC5C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD5N",1,"SD5C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S06N",1,"S06C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SC6N",1,"SC6C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD6N",1,"SD6C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S05N",1,"S05C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SB5N",1,"SB5C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC5N",1,"SC5C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD5N",1,"SD5C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S06N",1,"S06C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC6N",1,"SC6C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD6N",1,"SD6C",0.,0.,0.,0,"ONLY"); // position panel volume inside the bulk nomex material volume - gMC->Gspos("S05C",1,"S05X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("SB5C",1,"SB5X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("SC5C",1,"SC5X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("SD5C",1,"SD5X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("S06C",1,"S06X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("SC6C",1,"SC6X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("SD6C",1,"SD6X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S05C",1,"S05X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SB5C",1,"SB5X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC5C",1,"SC5X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD5C",1,"SD5X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S06C",1,"S06X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC6C",1,"SC6X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD6C",1,"SD6X",0.,0.,kNomexBWidth/2.,0,"ONLY"); // position the PCB volume inside the insulating material volume - gMC->Gspos("S05P",1,"S05I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SB5P",1,"SB5I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SC5P",1,"SC5I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD5P",1,"SD5I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S06P",1,"S06I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SC6P",1,"SC6I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD6P",1,"SD6I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S05P",1,"S05I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SB5P",1,"SB5I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC5P",1,"SC5I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD5P",1,"SD5I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S06P",1,"S06I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC6P",1,"SC6I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD6P",1,"SD6I",0.,0.,0.,0,"ONLY"); // position the horizontal frame volume inside the PCB volume - gMC->Gspos("S05H",1,"S05P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SB5H",1,"SB5P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SC5H",1,"SC5P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD5H",1,"SD5P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S06H",1,"S06P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SC6H",1,"SC6P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD6H",1,"SD6P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S05H",1,"S05P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SB5H",1,"SB5P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC5H",1,"SC5P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD5H",1,"SD5P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S06H",1,"S06P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC6H",1,"SC6P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD6H",1,"SD6P",0.,0.,0.,0,"ONLY"); // position the sensitive volume inside the horizontal frame volume - gMC->Gsposp("S05G",1,"S05H",0.,0.,0.,0,"ONLY",senspar,3); - gMC->Gsposp("S05G",1,"SB5H",0.,0.,0.,0,"ONLY",senspar2,3); - gMC->Gspos("SC5G",1,"SC5H",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD5G",1,"SD5H",0.,0.,0.,0,"ONLY"); - gMC->Gsposp("S06G",1,"S06H",0.,0.,0.,0,"ONLY",senspar,3); - gMC->Gspos("SC6G",1,"SC6H",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD6G",1,"SD6H",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gsposp("S05G",1,"S05H",0.,0.,0.,0,"ONLY",senspar,3); + TVirtualMC::GetMC()->Gsposp("S05G",1,"SB5H",0.,0.,0.,0,"ONLY",senspar2,3); + TVirtualMC::GetMC()->Gspos("SC5G",1,"SC5H",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD5G",1,"SD5H",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gsposp("S06G",1,"S06H",0.,0.,0.,0,"ONLY",senspar,3); + TVirtualMC::GetMC()->Gspos("SC6G",1,"SC6H",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD6G",1,"SD6H",0.,0.,0.,0,"ONLY"); // position the border volumes inside the PCB volume Float_t yborder = ( kPcbHeight - kBframeHeight ) / 2.; Int_t rotB = 0; - gMC->Matrix(rotB,90,0,90,270,180,0); // rotation around x for second border - - gMC->Gspos("S05B",1,"S05P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S05B",2,"S05P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("SB5B",1,"SB5P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("SB5B",2,"SB5P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("SC5B",1,"SC5P",0., yborder,0.,rotB,"ONLY"); - gMC->Gspos("SC5B",2,"SC5P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S05B",1,"SD5P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("SD5B",1,"SD5P",0.,-yborder,0.,0,"ONLY"); - - gMC->Gspos("S06B",1,"S06P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S06B",2,"S06P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("SC6B",1,"SC6P",0., yborder,0.,rotB,"ONLY"); - gMC->Gspos("SC6B",2,"SC6P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S06B",1,"SD6P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("SD6B",1,"SD6P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Matrix(rotB,90,0,90,270,180,0); // rotation around x for second border + + TVirtualMC::GetMC()->Gspos("S05B",1,"S05P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S05B",2,"S05P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SB5B",1,"SB5P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SB5B",2,"SB5P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC5B",1,"SC5P",0., yborder,0.,rotB,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC5B",2,"SC5P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S05B",1,"SD5P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD5B",1,"SD5P",0.,-yborder,0.,0,"ONLY"); + + TVirtualMC::GetMC()->Gspos("S06B",1,"S06P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S06B",2,"S06P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC6B",1,"SC6P",0., yborder,0.,rotB,"ONLY"); + TVirtualMC::GetMC()->Gspos("SC6B",2,"SC6P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S06B",1,"SD6P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD6B",1,"SD6P",0.,-yborder,0.,0,"ONLY"); // create the NULOC volume and position it in the horizontal frame - gMC->Gsvolu("S05E","BOX",kNulocMaterial,nulocpar,3); - gMC->Gsvolu("S06E","BOX",kNulocMaterial,nulocpar,3); + TVirtualMC::GetMC()->Gsvolu("S05E","BOX",kNulocMaterial,nulocpar,3); + TVirtualMC::GetMC()->Gsvolu("S06E","BOX",kNulocMaterial,nulocpar,3); index = 0; Float_t xxmax2 = xxmax - pcbDLength3/2.; Float_t xxmax3 = xxmax - (kPcbLength-csvPcbLength)/2.; @@ -840,25 +840,25 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() Float_t xxmax4 = (AliMUONConstants::Rmin(2)*TMath::Cos(rPhi3)-kVframeLength/2.) - (kBframeLength - kNulocLength)/2.; for (xx = -xxmax; xx <= xxmax; xx += 2*kNulocLength) { index++; - gMC->Gspos("S05E",2*index-1,"S05B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S05E",2*index ,"S05B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S06E",2*index-1,"S06B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S06E",2*index ,"S06B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S05E",2*index-1,"S05B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S05E",2*index ,"S05B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S06E",2*index-1,"S06B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S06E",2*index ,"S06B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); if (xx > -xxmax2 && xx< xxmax2) { - gMC->Gspos("S05E",2*index-1,"SB5B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S05E",2*index ,"SB5B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S05E",2*index-1,"SB5B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S05E",2*index ,"SB5B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); } if (xx > -xxmax3 && xx< xxmax3) { - gMC->Gspos("S05E",2*index-1,"SC5B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2., 0, "ONLY"); - gMC->Gspos("S05E",2*index ,"SC5B", xx, 0., kBframeWidth/2.- kNulocWidth/2., 0, "ONLY"); - gMC->Gspos("S06E",2*index-1,"SC6B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S06E",2*index ,"SC6B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S05E",2*index-1,"SC5B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S05E",2*index ,"SC5B", xx, 0., kBframeWidth/2.- kNulocWidth/2., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S06E",2*index-1,"SC6B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S06E",2*index ,"SC6B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); } if (xx > xxmax4 && xx< xxmax) { - gMC->Gspos("S05E",2*index-1,"SD5B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S05E",2*index ,"SD5B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S06E",2*index-1,"SD6B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S06E",2*index ,"SD6B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S05E",2*index-1,"SD5B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S05E",2*index ,"SD5B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S06E",2*index-1,"SD6B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S06E",2*index ,"SD6B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); } } @@ -905,16 +905,16 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() // Add readout cables - gMC->Gsvolu("S05L","BOX",kCableMaterial,dum,0); - gMC->Gsvolu("S06L","BOX",kCableMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("S05L","BOX",kCableMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("S06L","BOX",kCableMaterial,dum,0); ySlat3 = 0.; Float_t lCableX = 0.; Float_t lCableX6 = 0.; Float_t lCableY = 0.; Float_t lCableZ = 0.; - Float_t cablepar[3] = {supporthlength/2., kCableHeight/2., kCableWidth/2.}; - Float_t cablepar6[3] = {supporthlengthCh6/2., kCableHeight/2., kCableWidth/2.}; + Float_t cablepar[3] = {static_cast(supporthlength/2.), static_cast(kCableHeight/2.), static_cast(kCableWidth/2.)}; + Float_t cablepar6[3] = {static_cast(supporthlengthCh6/2.), static_cast(kCableHeight/2.), static_cast(kCableWidth/2.)}; Float_t lCableDY = 0.; Int_t cIndex = 0; Int_t cIndex6 = 0; @@ -940,10 +940,10 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() cablepar6[0] -= (kPcbLength-csvPcbLength)/2.; lCableX6 = (kPcbLength-csvPcbLength)/2.; } - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar6,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar6,3); // Then bottom cables if(i>0){ @@ -960,10 +960,10 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() lCableDY = lCableY - dMotherInner - cablepar[1]; } } - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar6,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar6,3); } } @@ -976,16 +976,16 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() lCableX6 = (kPcbLength+kVframeLength)/2.; lCableDY = (kYpos3[i+1]+kYpos3[i+2])/2.-cablepar[1]; // half way between 2 slats on same side lCableZ = TMath::Power(-1,i)*(nomexthickness/2.+carbonthickness+(-1+iCable++)*kCableWidth+kCableWidth/2.); - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar6,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar6,3); // Then bottom cables lCableDY = (kYpos3[i]+kYpos3[i])/2.-cablepar[1]; - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar6,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar6,3); } // Cables going out from the end of the slats @@ -1006,10 +1006,10 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() cablepar[0] += pcbDLength3/2.; lCableX -= pcbDLength3/2.; } - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar6,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar6,3); // Then bottom cables if(i>0){ // Loop is over top half of slats, lower half are symmetric if (i==1) { @@ -1018,10 +1018,10 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() else{ lCableDY = (kYpos3[i]+kYpos3[i-1])/2.-cablepar[1]; // half way between 2 slats on same side } - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar6,3); - gMC->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S05L",100*i+cIndex++,"S05S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar6,3); + TVirtualMC::GetMC()->Gsposp("S06L",100*i+cIndex6++,"S06S",lCableX6,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar6,3); } } @@ -1206,74 +1206,74 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() // create the panel volume - gMC->Gsvolu("S07C","BOX",kCarbonMaterial,panelpar,3); - gMC->Gsvolu("SD7C","BOX",kCarbonMaterial,panelpar,3); - gMC->Gsvolu("S08C","BOX",kCarbonMaterial,panelpar,3); - gMC->Gsvolu("SD8C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("S07C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("SD7C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("S08C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("SD8C","BOX",kCarbonMaterial,panelpar,3); // create the nomex volume - gMC->Gsvolu("S07N","BOX",kNomexMaterial,nomexpar,3); - gMC->Gsvolu("SD7N","BOX",kNomexMaterial,nomexpar,3); - gMC->Gsvolu("S08N","BOX",kNomexMaterial,nomexpar,3); - gMC->Gsvolu("SD8N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("S07N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("SD7N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("S08N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("SD8N","BOX",kNomexMaterial,nomexpar,3); // create the nomex volume (bulk) - gMC->Gsvolu("S07X","BOX",kNomexBMaterial,nomexbpar,3); - gMC->Gsvolu("SD7X","BOX",kNomexBMaterial,nomexbpar,3); - gMC->Gsvolu("S08X","BOX",kNomexBMaterial,nomexbpar,3); - gMC->Gsvolu("SD8X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("S07X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("SD7X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("S08X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("SD8X","BOX",kNomexBMaterial,nomexbpar,3); // create the insulating material volume - gMC->Gsvolu("S07I","BOX",kInsuMaterial,insupar,3); - gMC->Gsvolu("SD7I","BOX",kInsuMaterial,insupar,3); - gMC->Gsvolu("S08I","BOX",kInsuMaterial,insupar,3); - gMC->Gsvolu("SD8I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("S07I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("SD7I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("S08I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("SD8I","BOX",kInsuMaterial,insupar,3); // create the PCB volume - gMC->Gsvolu("S07P","BOX",kPcbMaterial,pcbpar,3); - gMC->Gsvolu("SD7P","BOX",kPcbMaterial,pcbpar,3); - gMC->Gsvolu("S08P","BOX",kPcbMaterial,pcbpar,3); - gMC->Gsvolu("SD8P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("S07P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("SD7P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("S08P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("SD8P","BOX",kPcbMaterial,pcbpar,3); // create the sensitive volumes, - gMC->Gsvolu("S07G","BOX",kSensMaterial,dum,0); - gMC->Gsvolu("SD7G","BOX",kSensMaterial,senspar,3); - gMC->Gsvolu("S08G","BOX",kSensMaterial,dum,0); - gMC->Gsvolu("SD8G","BOX",kSensMaterial,senspar,3); + TVirtualMC::GetMC()->Gsvolu("S07G","BOX",kSensMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("SD7G","BOX",kSensMaterial,senspar,3); + TVirtualMC::GetMC()->Gsvolu("S08G","BOX",kSensMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("SD8G","BOX",kSensMaterial,senspar,3); // create the vertical frame volume - gMC->Gsvolu("S07V","BOX",kVframeMaterial,vFramepar,3); - gMC->Gsvolu("S08V","BOX",kVframeMaterial,vFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S07V","BOX",kVframeMaterial,vFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S08V","BOX",kVframeMaterial,vFramepar,3); // create the rounded vertical frame volume - gMC->Gsvolu("SD7D","TUBS",kRframeMaterial,rFramepar4,5); - gMC->Gsvolu("SD8D","TUBS",kRframeMaterial,rFramepar4,5); + TVirtualMC::GetMC()->Gsvolu("SD7D","TUBS",kRframeMaterial,rFramepar4,5); + TVirtualMC::GetMC()->Gsvolu("SD8D","TUBS",kRframeMaterial,rFramepar4,5); // create the horizontal frame volume - gMC->Gsvolu("S07H","BOX",kHframeMaterial,hFramepar,3); - gMC->Gsvolu("SD7H","BOX",kHframeMaterial,hFramepar,3); - gMC->Gsvolu("S08H","BOX",kHframeMaterial,hFramepar,3); - gMC->Gsvolu("SD8H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S07H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SD7H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S08H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SD8H","BOX",kHframeMaterial,hFramepar,3); // create the horizontal border volume - gMC->Gsvolu("S07B","BOX",kBframeMaterial,bFramepar,3); - gMC->Gsvolu("SD7B","BOX",kBframeMaterial,bFramepar,3); - gMC->Gsvolu("S08B","BOX",kBframeMaterial,bFramepar,3); - gMC->Gsvolu("SD8B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S07B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SD7B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S08B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SD8B","BOX",kBframeMaterial,bFramepar,3); // Replace the volume shape with a composite shape // with substracted overlap with beam shield - if ( gMC->IsRootGeometrySupported() ) { + if ( TVirtualMC::GetMC()->IsRootGeometrySupported() ) { // Get shape Int_t nSlatType = 1; @@ -1424,65 +1424,65 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() } // position the nomex volume inside the panel volume - gMC->Gspos("S07N",1,"S07C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD7N",1,"SD7C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S08N",1,"S08C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD8N",1,"SD8C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S07N",1,"S07C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD7N",1,"SD7C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S08N",1,"S08C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD8N",1,"SD8C",0.,0.,0.,0,"ONLY"); // position panel volume inside the bulk nomex material volume - gMC->Gspos("S07C",1,"S07X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("SD7C",1,"SD7X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("S08C",1,"S08X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("SD8C",1,"SD8X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S07C",1,"S07X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD7C",1,"SD7X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S08C",1,"S08X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD8C",1,"SD8X",0.,0.,kNomexBWidth/2.,0,"ONLY"); // position the PCB volume inside the insulating material volume - gMC->Gspos("S07P",1,"S07I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD7P",1,"SD7I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S08P",1,"S08I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD8P",1,"SD8I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S07P",1,"S07I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD7P",1,"SD7I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S08P",1,"S08I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD8P",1,"SD8I",0.,0.,0.,0,"ONLY"); // position the horizontal frame volume inside the PCB volume - gMC->Gspos("S07H",1,"S07P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD7H",1,"SD7P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S08H",1,"S08P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD8H",1,"SD8P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S07H",1,"S07P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD7H",1,"SD7P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S08H",1,"S08P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD8H",1,"SD8P",0.,0.,0.,0,"ONLY"); // position the sensitive volume inside the horizontal frame volume - gMC->Gsposp("S07G",1,"S07H",0.,0.,0.,0,"ONLY",senspar,3); - gMC->Gspos("SD7G",1,"SD7H",0.,0.,0.,0,"ONLY"); - gMC->Gsposp("S08G",1,"S08H",0.,0.,0.,0,"ONLY",senspar,3); - gMC->Gspos("SD8G",1,"SD8H",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gsposp("S07G",1,"S07H",0.,0.,0.,0,"ONLY",senspar,3); + TVirtualMC::GetMC()->Gspos("SD7G",1,"SD7H",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gsposp("S08G",1,"S08H",0.,0.,0.,0,"ONLY",senspar,3); + TVirtualMC::GetMC()->Gspos("SD8G",1,"SD8H",0.,0.,0.,0,"ONLY"); // position the border volumes inside the PCB volume Float_t yborder = ( kPcbHeight - kBframeHeight ) / 2.; - gMC->Gspos("S07B",1,"S07P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S07B",2,"S07P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S07B",1,"SD7P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("SD7B",1,"SD7P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S08B",1,"S08P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S08B",2,"S08P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S08B",1,"SD8P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("SD8B",1,"SD8P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S07B",1,"S07P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S07B",2,"S07P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S07B",1,"SD7P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD7B",1,"SD7P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S08B",1,"S08P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S08B",2,"S08P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S08B",1,"SD8P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD8B",1,"SD8P",0.,-yborder,0.,0,"ONLY"); // create the NULOC volume and position it in the horizontal frame - gMC->Gsvolu("S07E","BOX",kNulocMaterial,nulocpar,3); - gMC->Gsvolu("S08E","BOX",kNulocMaterial,nulocpar,3); + TVirtualMC::GetMC()->Gsvolu("S07E","BOX",kNulocMaterial,nulocpar,3); + TVirtualMC::GetMC()->Gsvolu("S08E","BOX",kNulocMaterial,nulocpar,3); index = 0; Float_t rPhi3 = TMath::ASin((kYpos41[1]-kPcbHeight/2.)/AliMUONConstants::Rmin(3)); Float_t xxmax4 = (AliMUONConstants::Rmin(3)*TMath::Cos(rPhi3)-kVframeLength/2.) - (kBframeLength - kNulocLength)/2.; for (xx = -xxmax; xx <= xxmax; xx += 2*kNulocLength) { index++; - gMC->Gspos("S07E",2*index-1,"S07B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S07E",2*index ,"S07B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S08E",2*index-1,"S08B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S08E",2*index ,"S08B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S07E",2*index-1,"S07B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S07E",2*index ,"S07B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S08E",2*index-1,"S08B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S08E",2*index ,"S08B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); } if (xx > xxmax4 && xx< xxmax) { - gMC->Gspos("S07E",2*index-1,"SD7B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S07E",2*index ,"SD7B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S08E",2*index-1,"SD8B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S08E",2*index ,"SD8B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S07E",2*index-1,"SD7B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S07E",2*index ,"SD7B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S08E",2*index-1,"SD8B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S08E",2*index ,"SD8B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); } // @@ -1516,8 +1516,8 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() voNomexSupportSt4Ch8->AddNode(voCarbonSupportSt4Ch8,2,trCarbon2St4); // Add readout cables - gMC->Gsvolu("S07L","BOX",kCableMaterial,dum,0); - gMC->Gsvolu("S08L","BOX",kCableMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("S07L","BOX",kCableMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("S08L","BOX",kCableMaterial,dum,0); ySlat41 = 0.; ySlat42 = 0.; @@ -1525,7 +1525,7 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() Float_t lCableY = 0.; Float_t lCableY8 = 0.; Float_t lCableZ = 0.; - Float_t cablepar[3] = {supporthlength/2., kCableHeight/2., kCableWidth/2.}; + Float_t cablepar[3] = {static_cast(supporthlength/2.), static_cast(kCableHeight/2.), static_cast(kCableWidth/2.)}; Float_t lCableDY = 0.; Float_t lCableDY8 = 0.; for (i = 0; iGsposp("S07L",10*i+cIndex++,"S07S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,lCableY8+lCableDY8,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,-(lCableY8+lCableDY8),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,lCableY8+lCableDY8,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,-(lCableY8+lCableDY8),lCableZ,0,"ONLY",cablepar,3); // Then bottom cables if (i>0){ if (i==1) { // Rounded slat. Bottom cable starts at dMotherInner (beam pipe) @@ -1568,10 +1568,10 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() lCableDY8 = lCableY8 - dMotherInner - cablepar[1]; } } - gMC->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,lCableY8-lCableDY8,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,-(lCableY8-lCableDY8),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,lCableY8-lCableDY8,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,-(lCableY8-lCableDY8),lCableZ,0,"ONLY",cablepar,3); } } @@ -1583,10 +1583,10 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() lCableDY = (kYpos41[i+1]+kYpos41[i+2])/2.-cablepar[1]; // half way between 2 slats on same side lCableDY8 = (kYpos42[i+1]+kYpos42[i+2])/2.-cablepar[1]; // half way between 2 slats on same side lCableZ = TMath::Power(-1,i)*(nomexthickness/2.+carbonthickness+(-1+iCable++)*kCableWidth+kCableWidth/2.); - gMC->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,lCableY8+lCableDY8,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,-(lCableY8+lCableDY8),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,lCableY8+lCableDY8,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,-(lCableY8+lCableDY8),lCableZ,0,"ONLY",cablepar,3); } // Cables going out from the end of the slats @@ -1601,10 +1601,10 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() lCableDY8 = (kYpos42[i+1]+kYpos42[i+2])/2.-cablepar[1]; } lCableZ = TMath::Power(-1,i)*(nomexthickness/2.+carbonthickness+(-1+iCable++)*kCableWidth+kCableWidth/2.); - gMC->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,lCableY8+lCableDY8,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,-(lCableY8+lCableDY8),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,lCableY8+lCableDY8,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,-(lCableY8+lCableDY8),lCableZ,0,"ONLY",cablepar,3); // Then bottom cables if(i>0){ if (i==1) { @@ -1621,10 +1621,10 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() lCableDY8 = lCableY8 - dMotherInner - cablepar[1]; } } - gMC->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,lCableY8-lCableDY8,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,-(lCableY8-lCableDY8),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S07L",10*i+cIndex++,"S07S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,lCableY8-lCableDY8,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S08L",10*i+cIndex8++,"S08S",lCableX,-(lCableY8-lCableDY8),lCableZ,0,"ONLY",cablepar,3); } } @@ -1809,74 +1809,74 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() // create the panel volume - gMC->Gsvolu("S09C","BOX",kCarbonMaterial,panelpar,3); - gMC->Gsvolu("SD9C","BOX",kCarbonMaterial,panelpar,3); - gMC->Gsvolu("S10C","BOX",kCarbonMaterial,panelpar,3); - gMC->Gsvolu("SD0C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("S09C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("SD9C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("S10C","BOX",kCarbonMaterial,panelpar,3); + TVirtualMC::GetMC()->Gsvolu("SD0C","BOX",kCarbonMaterial,panelpar,3); // create the nomex volume - gMC->Gsvolu("S09N","BOX",kNomexMaterial,nomexpar,3); - gMC->Gsvolu("SD9N","BOX",kNomexMaterial,nomexpar,3); - gMC->Gsvolu("S10N","BOX",kNomexMaterial,nomexpar,3); - gMC->Gsvolu("SD0N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("S09N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("SD9N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("S10N","BOX",kNomexMaterial,nomexpar,3); + TVirtualMC::GetMC()->Gsvolu("SD0N","BOX",kNomexMaterial,nomexpar,3); // create the nomex volume (bulk) - gMC->Gsvolu("S09X","BOX",kNomexBMaterial,nomexbpar,3); - gMC->Gsvolu("SD9X","BOX",kNomexBMaterial,nomexbpar,3); - gMC->Gsvolu("S10X","BOX",kNomexBMaterial,nomexbpar,3); - gMC->Gsvolu("SD0X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("S09X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("SD9X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("S10X","BOX",kNomexBMaterial,nomexbpar,3); + TVirtualMC::GetMC()->Gsvolu("SD0X","BOX",kNomexBMaterial,nomexbpar,3); // create the insulating material volume - gMC->Gsvolu("S09I","BOX",kInsuMaterial,insupar,3); - gMC->Gsvolu("SD9I","BOX",kInsuMaterial,insupar,3); - gMC->Gsvolu("S10I","BOX",kInsuMaterial,insupar,3); - gMC->Gsvolu("SD0I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("S09I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("SD9I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("S10I","BOX",kInsuMaterial,insupar,3); + TVirtualMC::GetMC()->Gsvolu("SD0I","BOX",kInsuMaterial,insupar,3); // create the PCB volume - gMC->Gsvolu("S09P","BOX",kPcbMaterial,pcbpar,3); - gMC->Gsvolu("SD9P","BOX",kPcbMaterial,pcbpar,3); - gMC->Gsvolu("S10P","BOX",kPcbMaterial,pcbpar,3); - gMC->Gsvolu("SD0P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("S09P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("SD9P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("S10P","BOX",kPcbMaterial,pcbpar,3); + TVirtualMC::GetMC()->Gsvolu("SD0P","BOX",kPcbMaterial,pcbpar,3); // create the sensitive volumes, - gMC->Gsvolu("S09G","BOX",kSensMaterial,dum,0); - gMC->Gsvolu("SD9G","BOX",kSensMaterial,senspar,3); - gMC->Gsvolu("S10G","BOX",kSensMaterial,dum,0); - gMC->Gsvolu("SD0G","BOX",kSensMaterial,senspar,3); + TVirtualMC::GetMC()->Gsvolu("S09G","BOX",kSensMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("SD9G","BOX",kSensMaterial,senspar,3); + TVirtualMC::GetMC()->Gsvolu("S10G","BOX",kSensMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("SD0G","BOX",kSensMaterial,senspar,3); // create the vertical frame volume - gMC->Gsvolu("S09V","BOX",kVframeMaterial,vFramepar,3); - gMC->Gsvolu("S10V","BOX",kVframeMaterial,vFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S09V","BOX",kVframeMaterial,vFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S10V","BOX",kVframeMaterial,vFramepar,3); // create the rounded vertical frame volume - gMC->Gsvolu("SD9D","TUBS",kRframeMaterial,rFramepar5,5); - gMC->Gsvolu("SD0D","TUBS",kRframeMaterial,rFramepar5,5); + TVirtualMC::GetMC()->Gsvolu("SD9D","TUBS",kRframeMaterial,rFramepar5,5); + TVirtualMC::GetMC()->Gsvolu("SD0D","TUBS",kRframeMaterial,rFramepar5,5); // create the horizontal frame volume - gMC->Gsvolu("S09H","BOX",kHframeMaterial,hFramepar,3); - gMC->Gsvolu("SD9H","BOX",kHframeMaterial,hFramepar,3); - gMC->Gsvolu("S10H","BOX",kHframeMaterial,hFramepar,3); - gMC->Gsvolu("SD0H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S09H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SD9H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S10H","BOX",kHframeMaterial,hFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SD0H","BOX",kHframeMaterial,hFramepar,3); // create the horizontal border volume - gMC->Gsvolu("S09B","BOX",kBframeMaterial,bFramepar,3); - gMC->Gsvolu("SD9B","BOX",kBframeMaterial,bFramepar,3); - gMC->Gsvolu("S10B","BOX",kBframeMaterial,bFramepar,3); - gMC->Gsvolu("SD0B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S09B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SD9B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("S10B","BOX",kBframeMaterial,bFramepar,3); + TVirtualMC::GetMC()->Gsvolu("SD0B","BOX",kBframeMaterial,bFramepar,3); // Replace the volume shape with a composite shape // with substracted overlap with beam shield - if ( gMC->IsRootGeometrySupported() ) { + if ( TVirtualMC::GetMC()->IsRootGeometrySupported() ) { // Get shape Int_t nSlatType = 1; @@ -2027,65 +2027,65 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() } // position the nomex volume inside the panel volume - gMC->Gspos("S09N",1,"S09C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD9N",1,"SD9C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S10N",1,"S10C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD0N",1,"SD0C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S09N",1,"S09C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD9N",1,"SD9C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S10N",1,"S10C",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD0N",1,"SD0C",0.,0.,0.,0,"ONLY"); // position panel volume inside the bulk nomex material volume - gMC->Gspos("S09C",1,"S09X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("SD9C",1,"SD9X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("S10C",1,"S10X",0.,0.,kNomexBWidth/2.,0,"ONLY"); - gMC->Gspos("SD0C",1,"SD0X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S09C",1,"S09X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD9C",1,"SD9X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S10C",1,"S10X",0.,0.,kNomexBWidth/2.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD0C",1,"SD0X",0.,0.,kNomexBWidth/2.,0,"ONLY"); // position the PCB volume inside the insulating material volume - gMC->Gspos("S09P",1,"S09I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD9P",1,"SD9I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S10P",1,"S10I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD0P",1,"SD0I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S09P",1,"S09I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD9P",1,"SD9I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S10P",1,"S10I",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD0P",1,"SD0I",0.,0.,0.,0,"ONLY"); // position the horizontal frame volume inside the PCB volume - gMC->Gspos("S09H",1,"S09P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD9H",1,"SD9P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S10H",1,"S10P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SD0H",1,"SD0P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S09H",1,"S09P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD9H",1,"SD9P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S10H",1,"S10P",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD0H",1,"SD0P",0.,0.,0.,0,"ONLY"); // position the sensitive volume inside the horizontal frame volume - gMC->Gsposp("S09G",1,"S09H",0.,0.,0.,0,"ONLY",senspar,3); - gMC->Gspos("SD9G",1,"SD9H",0.,0.,0.,0,"ONLY"); - gMC->Gsposp("S10G",1,"S10H",0.,0.,0.,0,"ONLY",senspar,3); - gMC->Gspos("SD0G",1,"SD0H",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gsposp("S09G",1,"S09H",0.,0.,0.,0,"ONLY",senspar,3); + TVirtualMC::GetMC()->Gspos("SD9G",1,"SD9H",0.,0.,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gsposp("S10G",1,"S10H",0.,0.,0.,0,"ONLY",senspar,3); + TVirtualMC::GetMC()->Gspos("SD0G",1,"SD0H",0.,0.,0.,0,"ONLY"); // position the border volumes inside the PCB volume Float_t yborder = ( kPcbHeight - kBframeHeight ) / 2.; - gMC->Gspos("S09B",1,"S09P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S09B",2,"S09P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S09B",1,"SD9P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("SD9B",1,"SD9P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S10B",1,"S10P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S10B",2,"S10P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S10B",1,"SD0P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("SD0B",1,"SD0P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S09B",1,"S09P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S09B",2,"S09P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S09B",1,"SD9P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD9B",1,"SD9P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S10B",1,"S10P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S10B",2,"S10P",0.,-yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("S10B",1,"SD0P",0., yborder,0.,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SD0B",1,"SD0P",0.,-yborder,0.,0,"ONLY"); // // create the NULOC volume and position it in the horizontal frame - gMC->Gsvolu("S09E","BOX",kNulocMaterial,nulocpar,3); - gMC->Gsvolu("S10E","BOX",kNulocMaterial,nulocpar,3); + TVirtualMC::GetMC()->Gsvolu("S09E","BOX",kNulocMaterial,nulocpar,3); + TVirtualMC::GetMC()->Gsvolu("S10E","BOX",kNulocMaterial,nulocpar,3); index = 0; Float_t rPhi3 = TMath::ASin((kYpos5[1]-kPcbHeight/2.)/AliMUONConstants::Rmin(4)); Float_t xxmax4 = (AliMUONConstants::Rmin(4)*TMath::Cos(rPhi3)-kVframeLength/2.) - (kBframeLength - kNulocLength)/2.; for (xx = -xxmax; xx <= xxmax; xx += 2*kNulocLength) { index++; - gMC->Gspos("S09E",2*index-1,"S09B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S09E",2*index ,"S09B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S10E",2*index-1,"S10B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S10E",2*index ,"S10B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S09E",2*index-1,"S09B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S09E",2*index ,"S09B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S10E",2*index-1,"S10B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S10E",2*index ,"S10B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); } if (xx > xxmax4 && xx< xxmax) { - gMC->Gspos("S09E",2*index-1,"SD9B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S09E",2*index ,"SD9B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S10E",2*index-1,"SD0B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); - gMC->Gspos("S10E",2*index ,"SD0B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S09E",2*index-1,"SD9B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S09E",2*index ,"SD9B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S10E",2*index-1,"SD0B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S10E",2*index ,"SD0B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); } // @@ -2115,13 +2115,13 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() voNomexSupportSt5->AddNode(voCarbonSupportSt5,2,trCarbon2St5); // Add readout cables - gMC->Gsvolu("S09L","BOX",kCableMaterial,dum,0); + TVirtualMC::GetMC()->Gsvolu("S09L","BOX",kCableMaterial,dum,0); ySlat5 = 0.; Float_t lCableX = 0.; Float_t lCableY = 0.; Float_t lCableZ = 0.; - Float_t cablepar[3] = {supporthlength/2., kCableHeight/2., kCableWidth/2.}; + Float_t cablepar[3] = {static_cast(supporthlength/2.), static_cast(kCableHeight/2.), static_cast(kCableWidth/2.)}; Float_t lCableDY = 0.; for (i = 0; iGsposp("S09L",10*i+cIndex++,"S09S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); // Then bottom cables if (i>0) { if (i==1) { // Rounded slat. Bottom cable starts at dMotherInner (beam pipe) @@ -2157,8 +2157,8 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() lCableDY = lCableY - dMotherInner - cablepar[1]; } } - gMC->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); } } @@ -2169,8 +2169,8 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() lCableX = (kPcbLength+kVframeLength)/2.; lCableDY = (kYpos5[i+1]+kYpos5[i+2])/2.-cablepar[1]; // half way between 2 slats on same side lCableZ = TMath::Power(-1,i)*(nomexthickness/2.+carbonthickness+(-1+iCable++)*kCableWidth+kCableWidth/2.); - gMC->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); } // Cables going out from the end of the slats @@ -2184,8 +2184,8 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() lCableDY = (kYpos5[i+1]+kYpos5[i+2])/2.-cablepar[1]; } lCableZ = TMath::Power(-1,i)*(nomexthickness/2.+carbonthickness+(-1+iCable++)*kCableWidth+kCableWidth/2.); - gMC->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,lCableY+lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,-(lCableY+lCableDY),lCableZ,0,"ONLY",cablepar,3); if(i>0){ if (i==1) { // Rounded slat. Bottom cable starts at dMotherInner (beam pipe) lCableDY = (kYpos5[i]+kYpos5[i])/2.-cablepar[1]; @@ -2196,8 +2196,8 @@ void AliMUONSlatGeometryBuilder::CreateGeometry() lCableDY = lCableY - dMotherInner - cablepar[1]; } } - gMC->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); - gMC->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,lCableY-lCableDY,lCableZ,0,"ONLY",cablepar,3); + TVirtualMC::GetMC()->Gsposp("S09L",10*i+cIndex++,"S09S",lCableX,-(lCableY-lCableDY),lCableZ,0,"ONLY",cablepar,3); } } diff --git a/MUON/AliMUONSt1GeometryBuilder.cxx b/MUON/AliMUONSt1GeometryBuilder.cxx index d4561101d83..ae9b0591aff 100644 --- a/MUON/AliMUONSt1GeometryBuilder.cxx +++ b/MUON/AliMUONSt1GeometryBuilder.cxx @@ -130,12 +130,12 @@ void AliMUONSt1GeometryBuilder::CreateGeometry() tpar[1] = (AliMUONConstants::Rmax(0)+dframep)/TMath::Cos(phi); tpar[2] = dstation/5; - gMC->Gsvolu("S01M", "TUBE", idAir, tpar, 3); - gMC->Gsvolu("S02M", "TUBE", idAir, tpar, 3); + TVirtualMC::GetMC()->Gsvolu("S01M", "TUBE", idAir, tpar, 3); + TVirtualMC::GetMC()->Gsvolu("S02M", "TUBE", idAir, tpar, 3); // CHANGED - //gMC->Gspos("S01M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); - //gMC->Gspos("S02M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); + //TVirtualMC::GetMC()->Gspos("S01M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); + //TVirtualMC::GetMC()->Gspos("S02M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); GetEnvelopes(0)->AddEnvelope("S01M", 100, false); GetEnvelopes(1)->AddEnvelope("S02M", 200, false); @@ -153,24 +153,24 @@ void AliMUONSt1GeometryBuilder::CreateGeometry() // pgpar[7] = +dframez/2; // pgpar[8] = pgpar[5]; // pgpar[9] = pgpar[6]; -// gMC->Gsvolu("S01O", "PGON", idAlu1, pgpar, 10); -// gMC->Gsvolu("S02O", "PGON", idAlu1, pgpar, 10); -// gMC->Gspos("S01O",1,"S01M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S01O",2,"S01M", 0.,0.,+zfpos, 0,"ONLY"); -// gMC->Gspos("S02O",1,"S02M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S02O",2,"S02M", 0.,0.,+zfpos, 0,"ONLY"); +// TVirtualMC::GetMC()->Gsvolu("S01O", "PGON", idAlu1, pgpar, 10); +// TVirtualMC::GetMC()->Gsvolu("S02O", "PGON", idAlu1, pgpar, 10); +// TVirtualMC::GetMC()->Gspos("S01O",1,"S01M", 0.,0.,-zfpos, 0,"ONLY"); +// TVirtualMC::GetMC()->Gspos("S01O",2,"S01M", 0.,0.,+zfpos, 0,"ONLY"); +// TVirtualMC::GetMC()->Gspos("S02O",1,"S02M", 0.,0.,-zfpos, 0,"ONLY"); +// TVirtualMC::GetMC()->Gspos("S02O",2,"S02M", 0.,0.,+zfpos, 0,"ONLY"); // // // // Inner frame // tpar[0]= AliMUONConstants::Rmin(0)-dframep1; // tpar[1]= AliMUONConstants::Rmin(0); // tpar[2]= dframez/2; -// gMC->Gsvolu("S01I", "TUBE", idAlu1, tpar, 3); -// gMC->Gsvolu("S02I", "TUBE", idAlu1, tpar, 3); +// TVirtualMC::GetMC()->Gsvolu("S01I", "TUBE", idAlu1, tpar, 3); +// TVirtualMC::GetMC()->Gsvolu("S02I", "TUBE", idAlu1, tpar, 3); -// gMC->Gspos("S01I",1,"S01M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S01I",2,"S01M", 0.,0.,+zfpos, 0,"ONLY"); -// gMC->Gspos("S02I",1,"S02M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S02I",2,"S02M", 0.,0.,+zfpos, 0,"ONLY"); +// TVirtualMC::GetMC()->Gspos("S01I",1,"S01M", 0.,0.,-zfpos, 0,"ONLY"); +// TVirtualMC::GetMC()->Gspos("S01I",2,"S01M", 0.,0.,+zfpos, 0,"ONLY"); +// TVirtualMC::GetMC()->Gspos("S02I",1,"S02M", 0.,0.,-zfpos, 0,"ONLY"); +// TVirtualMC::GetMC()->Gspos("S02I",2,"S02M", 0.,0.,+zfpos, 0,"ONLY"); // // Frame Crosses if (frameCrosses) { @@ -185,41 +185,41 @@ void AliMUONSt1GeometryBuilder::CreateGeometry() // total thickness will be (4 * bpar[2]) for each chamber, // which has to be equal to (2 * dframez) - DAlu bpar[2] = (2.0 * dframez - kDAlu) / 4.0; - gMC->Gsvolu("S01B", "BOX", idAlu1, bpar, 3); - gMC->Gsvolu("S02B", "BOX", idAlu1, bpar, 3); + TVirtualMC::GetMC()->Gsvolu("S01B", "BOX", idAlu1, bpar, 3); + TVirtualMC::GetMC()->Gsvolu("S02B", "BOX", idAlu1, bpar, 3); - gMC->Gspos("S01B",1,"S01M", +AliMUONConstants::Rmin(0)+bpar[0] , 0,-zfpos, + TVirtualMC::GetMC()->Gspos("S01B",1,"S01M", +AliMUONConstants::Rmin(0)+bpar[0] , 0,-zfpos, irot1,"ONLY"); - gMC->Gspos("S01B",2,"S01M", -AliMUONConstants::Rmin(0)-bpar[0] , 0,-zfpos, + TVirtualMC::GetMC()->Gspos("S01B",2,"S01M", -AliMUONConstants::Rmin(0)-bpar[0] , 0,-zfpos, irot1,"ONLY"); - gMC->Gspos("S01B",3,"S01M", 0, +AliMUONConstants::Rmin(0)+bpar[0] ,-zfpos, + TVirtualMC::GetMC()->Gspos("S01B",3,"S01M", 0, +AliMUONConstants::Rmin(0)+bpar[0] ,-zfpos, irot2,"ONLY"); - gMC->Gspos("S01B",4,"S01M", 0, -AliMUONConstants::Rmin(0)-bpar[0] ,-zfpos, + TVirtualMC::GetMC()->Gspos("S01B",4,"S01M", 0, -AliMUONConstants::Rmin(0)-bpar[0] ,-zfpos, irot2,"ONLY"); - gMC->Gspos("S01B",5,"S01M", +AliMUONConstants::Rmin(0)+bpar[0] , 0,+zfpos, + TVirtualMC::GetMC()->Gspos("S01B",5,"S01M", +AliMUONConstants::Rmin(0)+bpar[0] , 0,+zfpos, irot1,"ONLY"); - gMC->Gspos("S01B",6,"S01M", -AliMUONConstants::Rmin(0)-bpar[0] , 0,+zfpos, + TVirtualMC::GetMC()->Gspos("S01B",6,"S01M", -AliMUONConstants::Rmin(0)-bpar[0] , 0,+zfpos, irot1,"ONLY"); - gMC->Gspos("S01B",7,"S01M", 0, +AliMUONConstants::Rmin(0)+bpar[0] ,+zfpos, + TVirtualMC::GetMC()->Gspos("S01B",7,"S01M", 0, +AliMUONConstants::Rmin(0)+bpar[0] ,+zfpos, irot2,"ONLY"); - gMC->Gspos("S01B",8,"S01M", 0, -AliMUONConstants::Rmin(0)-bpar[0] ,+zfpos, + TVirtualMC::GetMC()->Gspos("S01B",8,"S01M", 0, -AliMUONConstants::Rmin(0)-bpar[0] ,+zfpos, irot2,"ONLY"); - gMC->Gspos("S02B",1,"S02M", +AliMUONConstants::Rmin(0)+bpar[0] , 0,-zfpos, + TVirtualMC::GetMC()->Gspos("S02B",1,"S02M", +AliMUONConstants::Rmin(0)+bpar[0] , 0,-zfpos, irot1,"ONLY"); - gMC->Gspos("S02B",2,"S02M", -AliMUONConstants::Rmin(0)-bpar[0] , 0,-zfpos, + TVirtualMC::GetMC()->Gspos("S02B",2,"S02M", -AliMUONConstants::Rmin(0)-bpar[0] , 0,-zfpos, irot1,"ONLY"); - gMC->Gspos("S02B",3,"S02M", 0, +AliMUONConstants::Rmin(0)+bpar[0] ,-zfpos, + TVirtualMC::GetMC()->Gspos("S02B",3,"S02M", 0, +AliMUONConstants::Rmin(0)+bpar[0] ,-zfpos, irot2,"ONLY"); - gMC->Gspos("S02B",4,"S02M", 0, -AliMUONConstants::Rmin(0)-bpar[0] ,-zfpos, + TVirtualMC::GetMC()->Gspos("S02B",4,"S02M", 0, -AliMUONConstants::Rmin(0)-bpar[0] ,-zfpos, irot2,"ONLY"); - gMC->Gspos("S02B",5,"S02M", +AliMUONConstants::Rmin(0)+bpar[0] , 0,+zfpos, + TVirtualMC::GetMC()->Gspos("S02B",5,"S02M", +AliMUONConstants::Rmin(0)+bpar[0] , 0,+zfpos, irot1,"ONLY"); - gMC->Gspos("S02B",6,"S02M", -AliMUONConstants::Rmin(0)-bpar[0] , 0,+zfpos, + TVirtualMC::GetMC()->Gspos("S02B",6,"S02M", -AliMUONConstants::Rmin(0)-bpar[0] , 0,+zfpos, irot1,"ONLY"); - gMC->Gspos("S02B",7,"S02M", 0, +AliMUONConstants::Rmin(0)+bpar[0] ,+zfpos, + TVirtualMC::GetMC()->Gspos("S02B",7,"S02M", 0, +AliMUONConstants::Rmin(0)+bpar[0] ,+zfpos, irot2,"ONLY"); - gMC->Gspos("S02B",8,"S02M", 0, -AliMUONConstants::Rmin(0)-bpar[0] ,+zfpos, + TVirtualMC::GetMC()->Gspos("S02B",8,"S02M", 0, -AliMUONConstants::Rmin(0)-bpar[0] ,+zfpos, irot2,"ONLY"); } // @@ -227,18 +227,18 @@ void AliMUONSt1GeometryBuilder::CreateGeometry() tpar[0]= AliMUONConstants::Rmin(0); tpar[1]= AliMUONConstants::Rmax(0); tpar[2] = (kDGas+kDAlu)/2; - gMC->Gsvolu("S01A", "TUBE", idAlu2, tpar, 3); - gMC->Gsvolu("S02A", "TUBE",idAlu2, tpar, 3); - gMC->Gspos("S01A", 1, "S01M", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("S02A", 1, "S02M", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("S01A", "TUBE", idAlu2, tpar, 3); + TVirtualMC::GetMC()->Gsvolu("S02A", "TUBE",idAlu2, tpar, 3); + TVirtualMC::GetMC()->Gspos("S01A", 1, "S01M", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S02A", 1, "S02M", 0., 0., 0., 0, "ONLY"); // // Sensitive volumes // tpar[2] = kDGas; tpar[2] = kDGas/2; - gMC->Gsvolu("S01G", "TUBE", idGas, tpar, 3); - gMC->Gsvolu("S02G", "TUBE", idGas, tpar, 3); - gMC->Gspos("S01G", 1, "S01A", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("S02G", 1, "S02A", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("S01G", "TUBE", idGas, tpar, 3); + TVirtualMC::GetMC()->Gsvolu("S02G", "TUBE", idGas, tpar, 3); + TVirtualMC::GetMC()->Gspos("S01G", 1, "S01A", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("S02G", 1, "S02A", 0., 0., 0., 0, "ONLY"); // // Frame Crosses to be placed inside gas // NONE: chambers are sensitive everywhere @@ -248,25 +248,25 @@ void AliMUONSt1GeometryBuilder::CreateGeometry() // bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2; // bpar[1] = dframep1/2; // bpar[2] = kDGas/2; -// gMC->Gsvolu("S01F", "BOX", idAlu1, bpar, 3); -// gMC->Gsvolu("S02F", "BOX", idAlu1, bpar, 3); +// TVirtualMC::GetMC()->Gsvolu("S01F", "BOX", idAlu1, bpar, 3); +// TVirtualMC::GetMC()->Gsvolu("S02F", "BOX", idAlu1, bpar, 3); -// gMC->Gspos("S01F",1,"S01G", +AliMUONConstants::Rmin(0)+bpar[0] , 0, 0, +// TVirtualMC::GetMC()->Gspos("S01F",1,"S01G", +AliMUONConstants::Rmin(0)+bpar[0] , 0, 0, // irot1,"ONLY"); -// gMC->Gspos("S01F",2,"S01G", -AliMUONConstants::Rmin(0)-bpar[0] , 0, 0, +// TVirtualMC::GetMC()->Gspos("S01F",2,"S01G", -AliMUONConstants::Rmin(0)-bpar[0] , 0, 0, // irot1,"ONLY"); -// gMC->Gspos("S01F",3,"S01G", 0, +AliMUONConstants::Rmin(0)+bpar[0] , 0, +// TVirtualMC::GetMC()->Gspos("S01F",3,"S01G", 0, +AliMUONConstants::Rmin(0)+bpar[0] , 0, // irot2,"ONLY"); -// gMC->Gspos("S01F",4,"S01G", 0, -AliMUONConstants::Rmin(0)-bpar[0] , 0, +// TVirtualMC::GetMC()->Gspos("S01F",4,"S01G", 0, -AliMUONConstants::Rmin(0)-bpar[0] , 0, // irot2,"ONLY"); -// gMC->Gspos("S02F",1,"S02G", +AliMUONConstants::Rmin(0)+bpar[0] , 0, 0, +// TVirtualMC::GetMC()->Gspos("S02F",1,"S02G", +AliMUONConstants::Rmin(0)+bpar[0] , 0, 0, // irot1,"ONLY"); -// gMC->Gspos("S02F",2,"S02G", -AliMUONConstants::Rmin(0)-bpar[0] , 0, 0, +// TVirtualMC::GetMC()->Gspos("S02F",2,"S02G", -AliMUONConstants::Rmin(0)-bpar[0] , 0, 0, // irot1,"ONLY"); -// gMC->Gspos("S02F",3,"S02G", 0, +AliMUONConstants::Rmin(0)+bpar[0] , 0, +// TVirtualMC::GetMC()->Gspos("S02F",3,"S02G", 0, +AliMUONConstants::Rmin(0)+bpar[0] , 0, // irot2,"ONLY"); -// gMC->Gspos("S02F",4,"S02G", 0, -AliMUONConstants::Rmin(0)-bpar[0] , 0, +// TVirtualMC::GetMC()->Gspos("S02F",4,"S02G", 0, -AliMUONConstants::Rmin(0)-bpar[0] , 0, // irot2,"ONLY"); // } } diff --git a/MUON/AliMUONSt1GeometryBuilderV2.cxx b/MUON/AliMUONSt1GeometryBuilderV2.cxx index 1eced077669..a74611db039 100644 --- a/MUON/AliMUONSt1GeometryBuilderV2.cxx +++ b/MUON/AliMUONSt1GeometryBuilderV2.cxx @@ -179,25 +179,25 @@ void AliMUONSt1GeometryBuilderV2::CreateHole() par[0] = fgkHxHole; par[1] = fgkHyHole; par[2] = fgkHzFoam; - gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3); + TVirtualMC::GetMC()->Gsvolu(fgkHoleName,"BOX",idAir,par,3); par[0] = fgkHxKapton; par[1] = fgkHyKapton; par[2] = fgkHzSnPb; - gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3); + TVirtualMC::GetMC()->Gsvolu("SNPB", "BOX", idCopper, par, 3); posX = 0.; posY = 0.; posZ = -fgkHzFoam+fgkHzSnPb; - gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY"); par[0] = fgkHxHole; par[1] = fgkHyBergPlastic; par[2] = fgkHzKapton; - gMC->Gsvolu("SKPT", "BOX", idCopper, par, 3); + TVirtualMC::GetMC()->Gsvolu("SKPT", "BOX", idCopper, par, 3); posX = 0.; posY = 0.; posZ = 0.; - gMC->Gspos("SKPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SKPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY"); } //______________________________________________________________________________ @@ -218,34 +218,34 @@ void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard() par[0]=fgkHxDaughter; par[1]=fgkHyDaughter; par[2]=TotalHzDaughter(); - gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3); + TVirtualMC::GetMC()->Gsvolu(fgkDaughterName,"BOX",idAir,par,3); par[0]=fgkHxBergPlastic; par[1]=fgkHyBergPlastic; par[2]=fgkHzBergPlastic; - gMC->Gsvolu("SBGP","BOX",idPlastic,par,3); + TVirtualMC::GetMC()->Gsvolu("SBGP","BOX",idPlastic,par,3); posX=0.; posY=0.; posZ = -TotalHzDaughter() + fgkHzBergPlastic; - gMC->Gspos("SBGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SBGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY"); par[0]=fgkHxBergCopper; par[1]=fgkHyBergCopper; par[2]=fgkHzBergCopper; - gMC->Gsvolu("SBGC","BOX",idCopper,par,3); + TVirtualMC::GetMC()->Gsvolu("SBGC","BOX",idCopper,par,3); posX=0.; posY=0.; posZ=0.; - gMC->Gspos("SBGC",1,"SBGP",posX,posY,posZ,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SBGC",1,"SBGP",posX,posY,posZ,0,"ONLY"); par[0]=fgkHxDaughter; par[1]=fgkHyDaughter; par[2]=fgkHzDaughter; - gMC->Gsvolu("SDGH","BOX",idCopper,par,3); + TVirtualMC::GetMC()->Gsvolu("SDGH","BOX",idCopper,par,3); posX=0.; posY=0.; posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter; - gMC->Gspos("SDGH",1,fgkDaughterName,posX,posY,posZ,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SDGH",1,fgkDaughterName,posX,posY,posZ,0,"ONLY"); } //______________________________________________________________________________ @@ -323,17 +323,17 @@ void AliMUONSt1GeometryBuilderV2::CreateSpacer0() par[0] = 0.575; par[1] = 0.150; par[2] = 2.550; - gMC->Gsvolu("Spacer05","BOX",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("Spacer05","BOX",idFrameEpoxy,par,3); par[0] = 0.575; par[1] = 1.500; par[2] = 0.100; - gMC->Gsvolu("Spacer06","BOX",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("Spacer06","BOX",idFrameEpoxy,par,3); par[0] = 0.000; par[1] = 0.300; par[2] = 2.063; - gMC->Gsvolu("Spacer07","TUBE",idInox,par,3); + TVirtualMC::GetMC()->Gsvolu("Spacer07","TUBE",idInox,par,3); } @@ -363,28 +363,28 @@ void AliMUONSt1GeometryBuilderV2::CreateSpacer() //par[0] = 0.575; //par[1] = 0.150; //par[2] = 2.550; - //gMC->Gsvolu("Spacer5","BOX",idFrameEpoxy,par,3); + //TVirtualMC::GetMC()->Gsvolu("Spacer5","BOX",idFrameEpoxy,par,3); GReal_t par[3]; par[0] = 0.510; par[1] = 0.170; par[2] = 1.1515; - gMC->Gsvolu("Spacer5A","BOX",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("Spacer5A","BOX",idFrameEpoxy,par,3); par[0] = 0.510; par[1] = 1.500; par[2] = 0.100; - gMC->Gsvolu("Spacer6","BOX",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("Spacer6","BOX",idFrameEpoxy,par,3); //par[0] = 0.000; //par[1] = 0.300; //par[2] = 2.063; - //gMC->Gsvolu("Spacer7","TUBE",idInox,par,3); + //TVirtualMC::GetMC()->Gsvolu("Spacer7","TUBE",idInox,par,3); par[0] = 0.000; par[1] = 0.300; par[2] = 1.0315; - gMC->Gsvolu("Spacer7A","TUBE",idInox,par,3); + TVirtualMC::GetMC()->Gsvolu("Spacer7A","TUBE",idInox,par,3); } //______________________________________________________________________________ @@ -487,29 +487,29 @@ void AliMUONSt1GeometryBuilderV2::CreateFoamBox( par[0] = dimensions.X(); par[1] = dimensions.Y(); par[2] = TotalHzPlane(); - gMC->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3); + TVirtualMC::GetMC()->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3); // foam layer par[0] = dimensions.X(); par[1] = dimensions.Y(); par[2] = fgkHzFoam; - gMC->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3); + TVirtualMC::GetMC()->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3); GReal_t posX,posY,posZ; posX=0.; posY=0.; posZ = -TotalHzPlane() + fgkHzFoam; - gMC->Gspos(FoamBoxName(segNumber).Data(),1, + TVirtualMC::GetMC()->Gspos(FoamBoxName(segNumber).Data(),1, PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); // mechanical plane FR4 layer par[0] = dimensions.X(); par[1] = dimensions.Y(); par[2] = fgkHzFR4; - gMC->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3); + TVirtualMC::GetMC()->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3); posX=0.; posY=0.; posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4; - gMC->Gspos(FR4BoxName(segNumber).Data(),1, + TVirtualMC::GetMC()->Gspos(FR4BoxName(segNumber).Data(),1, PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); } @@ -545,24 +545,24 @@ void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(Int_t segNumber, GReal_t posZ = -0.1; if ( FoamBoxName(segNumber) == "S267" || FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP; - gMC->Gspos("Spacer5A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Spacer5A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); posY = -0.75; if ( FoamBoxName(segNumber) == "S267" || FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP; - gMC->Gspos("Spacer5A", 2, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Spacer5A", 2, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); posY = 0.0; posZ = 1.1515; if ( FoamBoxName(segNumber) == "S267" || FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP; - gMC->Gspos("Spacer6", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Spacer6", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); posY = 0.0; posZ = 0.0; if ( FoamBoxName(segNumber) == "S267" || FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP; - gMC->Gspos("Spacer7A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Spacer7A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); } for (Int_t holeNum=0;holeNumGspos(fgkHoleName,holeNum+1, + TVirtualMC::GetMC()->Gspos(fgkHoleName,holeNum+1, FoamBoxName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); } } @@ -594,13 +594,13 @@ void AliMUONSt1GeometryBuilderV2::CreateQuadrantLayersAsVolumes(Int_t chamber) par[2] = fgkMotherThick1; par[3] = fgkMotherPhiL1; par[4] = fgkMotherPhiU1; - gMC->Gsvolu(QuadrantMLayerName(chamber),"TUBS",idAir,par,5); - // gMC->Gsvolu(QuadrantMFLayerName(chamber),"TUBS",idAir,par,5); + TVirtualMC::GetMC()->Gsvolu(QuadrantMLayerName(chamber),"TUBS",idAir,par,5); + // TVirtualMC::GetMC()->Gsvolu(QuadrantMFLayerName(chamber),"TUBS",idAir,par,5); // Replace the volume shape with a composite shape // with substracted overlap with beam shield (YMOT) - if ( gMC->IsRootGeometrySupported() ) { + if ( TVirtualMC::GetMC()->IsRootGeometrySupported() ) { // Get shape TGeoVolume* mlayer @@ -677,8 +677,8 @@ void AliMUONSt1GeometryBuilderV2::CreateQuadrantLayersAsVolumes(Int_t chamber) par[3] = fgkMotherPhiL2; par[4] = fgkMotherPhiU2; - gMC->Gsvolu(QuadrantNLayerName(chamber),"TUBS",idAir,par,5); - gMC->Gsvolu(QuadrantFLayerName(chamber),"TUBS",idAir,par,5); + TVirtualMC::GetMC()->Gsvolu(QuadrantNLayerName(chamber),"TUBS",idAir,par,5); + TVirtualMC::GetMC()->Gsvolu(QuadrantFLayerName(chamber),"TUBS",idAir,par,5); } //______________________________________________________________________________ @@ -1092,13 +1092,13 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[0] = kHxInVFrame; par[1] = kHyInVFrame; par[2] = kHzInVFrame; - gMC->Gsvolu("SQ00","BOX",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ00","BOX",idFrameEpoxy,par,3); //Flat 1mm vertical section par[0] = kHxV1mm; par[1] = kHyV1mm; par[2] = kHzV1mm; - gMC->Gsvolu("SQ01","BOX",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ01","BOX",idFrameEpoxy,par,3); // OutTopFrame // @@ -1110,11 +1110,11 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[0] = kHxTFA; par[1] = kHyTFA; par[2] = kHzTFAE; - gMC->Gsvolu("SQ02","BOX",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ02","BOX",idFrameEpoxy,par,3); // TopFrameAnode - layer 2 of 2 par[2] = kHzTFAI; - gMC->Gsvolu("SQ03","BOX",idInox,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ03","BOX",idInox,par,3); // Common declarations for TGeoXtru parameters @@ -1162,11 +1162,11 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[0] = kHxTA1; par[1] = kHyTA1; par[2] = kHzTA11; - gMC->Gsvolu("SQ08","BOX",idInox,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ08","BOX",idInox,par,3); // TopAnode1 - layer 2 of 2 par[2] = kHzTA12; - gMC->Gsvolu("SQ09","BOX",idFR4,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ09","BOX",idFR4,par,3); // TopAnode2 - layer 1 of 2 par[0] = kHzTA21; @@ -1180,11 +1180,11 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2TA2; par[9] = kTl2TA2; par[10] = kAlp2TA2; - gMC->Gsvolu("SQ10","TRAP",idInox,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ10","TRAP",idInox,par,11); // TopAnode2 - layer 2 of 2 par[0] = kHzTA22; - gMC->Gsvolu("SQ11","TRAP",idFR4,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ11","TRAP",idFR4,par,11); // TopAnode3 - layer 1 of 1 par[0] = kHzTA3; @@ -1198,7 +1198,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2TA3; par[9] = kTl2TA3; par[10] = kAlp2TA3; - gMC->Gsvolu("SQ12","TRAP",idFR4,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ12","TRAP",idFR4,par,11); // TopEarthFace par[0] = kHzTEF; @@ -1212,7 +1212,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2TEF; par[9] = kTl2TEF; par[10] = kAlp2TEF; - gMC->Gsvolu("SQ13","TRAP",idCopper,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ13","TRAP",idCopper,par,11); // TopEarthProfile par[0] = kHzTEP; @@ -1226,13 +1226,13 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2TEP; par[9] = kTl2TEP; par[10] = kAlp2TEP; - gMC->Gsvolu("SQ14","TRAP",idCopper,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ14","TRAP",idCopper,par,11); // TopGasSupport par[0] = kHxTGS; par[1] = kHyTGS; par[2] = kHzTGS; - gMC->Gsvolu("SQ15","BOX",idAlu,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ15","BOX",idAlu,par,3); // TopPositioner parameters - single Stainless Steel trapezoid par[0] = kHzTP; @@ -1246,7 +1246,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2TP; par[9] = kTl2TP; par[10] = kAlp2TP; - gMC->Gsvolu("SQ16","TRAP",idInox,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ16","TRAP",idInox,par,11); // // OutEdgeTrapFrame Epoxy = (4 trapezes)*2 copies*2 layers (Epoxy/Inox) @@ -1300,7 +1300,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[0] = kHxOutVFrame; par[1] = kHyOutVFrame; par[2] = kHzOutVFrame; - gMC->Gsvolu("SQ25","BOX",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ25","BOX",idFrameEpoxy,par,3); // OutVFrame corner par[0] = kHzOCTF; @@ -1314,7 +1314,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2OCTF; par[9] = kTl2OCTF; par[10] = kAlp2OCTF; - gMC->Gsvolu("SQ26","TRAP",idFrameEpoxy,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ26","TRAP",idFrameEpoxy,par,11); // EarthFaceCu trapezoid par[0] = kHzVFC; @@ -1328,7 +1328,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2VFC; par[9] = kTl2VFC; par[10] = kAlp2VFC; - gMC->Gsvolu("SQ27","TRAP",idCopper,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ27","TRAP",idCopper,par,11); // VertEarthSteel trapezoid par[0] = kHzVES; @@ -1342,7 +1342,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2VES; par[9] = kTl2VES; par[10] = kAlp2VES; - gMC->Gsvolu("SQ28","TRAP",idInox,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ28","TRAP",idInox,par,11); // VertEarthProfCu trapezoid par[0] = kHzVPC; @@ -1356,30 +1356,30 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2VPC; par[9] = kTl2VPC; par[10] = kAlp2VPC; - gMC->Gsvolu("SQ29","TRAP",idCopper,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ29","TRAP",idCopper,par,11); // SuppLateralPositionner cuboid par[0] = kHxSLP; par[1] = kHySLP; par[2] = kHzSLP; - gMC->Gsvolu("SQ30","BOX",idAlu,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ30","BOX",idAlu,par,3); // LateralPositionerFace par[0] = kHxLPF; par[1] = kHyLPF; par[2] = kHzLPF; - gMC->Gsvolu("SQ31","BOX",idInox,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ31","BOX",idInox,par,3); // LateralPositionerProfile par[0] = kHxLPP; par[1] = kHyLPP; par[2] = kHzLPP; - gMC->Gsvolu("SQ32","BOX",idInox,par,3); // middle layer + TVirtualMC::GetMC()->Gsvolu("SQ32","BOX",idInox,par,3); // middle layer par[0] = kHxLPP; par[1] = kHyLPP; par[2] = kHzLPNF; - gMC->Gsvolu("SQ33","BOX",idInox,par,3); // near and far layers + TVirtualMC::GetMC()->Gsvolu("SQ33","BOX",idInox,par,3); // near and far layers dy = 2.*kH1VC1; dx0 = 2.*kBl1VC4; @@ -1451,7 +1451,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2VC4; par[9] = kTl2VC4; par[10] = kAlp2VC4; - gMC->Gsvolu("SQ37","TRAP",idAlu,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ37","TRAP",idAlu,par,11); // LateralSightSupport trapezoid par[0] = kHzVSS; @@ -1465,26 +1465,26 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[8] = kBl2VSS; par[9] = kTl2VSS; par[10] = kAlp2VSS; - gMC->Gsvolu("SQ38","TRAP",idAlu,par,11); + TVirtualMC::GetMC()->Gsvolu("SQ38","TRAP",idAlu,par,11); // LateralSight par[0] = kVSInRad; par[1] = kVSOutRad; par[2] = kVSLen; - gMC->Gsvolu("SQ39","TUBE",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ39","TUBE",idFrameEpoxy,par,3); //--- // InHFrame par[0] = kHxInHFrame; par[1] = kHyInHFrame; par[2] = kHzInHFrame; - gMC->Gsvolu("SQ40","BOX",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ40","BOX",idFrameEpoxy,par,3); //Flat 7.5mm horizontal section par[0] = kHxH1mm; par[1] = kHyH1mm; par[2] = kHzH1mm; - gMC->Gsvolu("SQ41","BOX",idFrameEpoxy,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ41","BOX",idFrameEpoxy,par,3); // InArcFrame par[0] = kIAF; @@ -1493,7 +1493,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[3] = kAFphi1; par[4] = kAFphi2; - gMC->Gsvolu("SQ42","TUBS",idFrameEpoxy,par,5); + TVirtualMC::GetMC()->Gsvolu("SQ42","TUBS",idFrameEpoxy,par,5); //--- // ScrewsInFrame - 3 sections in order to avoid overlapping volumes @@ -1502,19 +1502,19 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) par[1] = kSCRUHMA; par[2] = kSCRUHLE; - gMC->Gsvolu("SQ43","TUBE",idInox,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ43","TUBE",idInox,par,3); // Middle part, in the Epoxy par[0] = kSCRUMMI; par[1] = kSCRUMMA; par[2] = kSCRUMLE; - gMC->Gsvolu("SQ44","TUBE",idInox,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ44","TUBE",idInox,par,3); // Screw nut, in air par[0] = kSCRUNMI; par[1] = kSCRUNMA; par[2] = kSCRUNLE; - gMC->Gsvolu("SQ45","TUBE",idInox,par,3); + TVirtualMC::GetMC()->Gsvolu("SQ45","TUBE",idInox,par,3); } // __________________Place volumes in the quadrant ____________ @@ -1523,7 +1523,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = kHxInVFrame; posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyInVFrame; posZ = 0.; - gMC->Gspos("SQ00",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ00",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); // keep memory of the mid position. Used for placing screws const GReal_t kMidVposX = posX; @@ -1534,31 +1534,31 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = 2.0*kHxInVFrame+kHxV1mm; posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyV1mm; posZ = 0.; - gMC->Gspos("SQ01",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ01",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY"); // TopFrameAnode place 2 layers of TopFrameAnode cuboids posX = kHxTFA; posY = 2.*kHyInHFrame+2.*kHyH1mm+kIAF+2.*kHyInVFrame+kHyTFA; posZ = -kHzOuterFrameInox; - gMC->Gspos("SQ02",1,quadrantMLayerName,posX, posY, posZ,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ02",1,quadrantMLayerName,posX, posY, posZ,0,"ONLY"); posZ = kHzOuterFrameEpoxy; - gMC->Gspos("SQ03",1,quadrantMLayerName,posX, posY, posZ,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ03",1,quadrantMLayerName,posX, posY, posZ,0,"ONLY"); // TopFrameAnode - place 2 layers of 2 trapezoids // (SQ04 - SQ07) posX += kHxTFA + 2.*kH1FAA; posZ = -kHzOuterFrameInox; - gMC->Gspos("SQ04toSQ06",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ04toSQ06",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); posZ = kHzOuterFrameEpoxy; - gMC->Gspos("SQ05toSQ07",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ05toSQ07",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); // TopAnode1 place 2 layers posX = 6.8+fgkDeltaQuadLHC; posY = 99.85+fgkDeltaQuadLHC; posZ = -1.*kHzAnodeFR4; - gMC->Gspos("SQ08",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ08",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); posZ = kHzTopAnodeSteel1; - gMC->Gspos("SQ09",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ09",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); // TopAnode2 place 2 layers posX = 18.534+fgkDeltaQuadLHC; @@ -1566,47 +1566,47 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posZ = -1.*kHzAnodeFR4; // shift up to solve overlap with SQ14 posY += 0.1; - gMC->Gspos("SQ10",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ10",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); posZ = kHzTopAnodeSteel2; - gMC->Gspos("SQ11",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ11",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); // TopAnode3 place 1 layer posX = 25.804+fgkDeltaQuadLHC; posY = 98.61+fgkDeltaQuadLHC; posZ = 0.; - gMC->Gspos("SQ12",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ12",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); // TopEarthFace - 2 copies posX = 23.122+fgkDeltaQuadLHC; posY = 96.90+fgkDeltaQuadLHC; posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopEarthFaceCu; - gMC->Gspos("SQ13",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ13",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); posZ = -1.*posZ; - gMC->Gspos("SQ13",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ13",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); // TopEarthProfile posX = 14.475+fgkDeltaQuadLHC; posY = 97.900+fgkDeltaQuadLHC; posZ = kHzTopEarthProfileCu; - gMC->Gspos("SQ14",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ14",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); posZ = -1.0*posZ; - gMC->Gspos("SQ14",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ14",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); // TopGasSupport - 2 copies posX = 4.9500+fgkDeltaQuadLHC; posY = 96.200+fgkDeltaQuadLHC; posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopGasSupportAl; - gMC->Gspos("SQ15",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ15",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); posZ = -1.*posZ; - gMC->Gspos("SQ15",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ15",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); // TopPositioner parameters - single Stainless Steel trapezoid - 2 copies posX = 7.60+fgkDeltaQuadLHC; posY = 98.98+fgkDeltaQuadLHC; posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+2.*kHzTopGasSupportAl+kHzTopPositionerSteel; - gMC->Gspos("SQ16",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ16",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); posZ = -1.*posZ; - gMC->Gspos("SQ16",2,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ16",2,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); // OutEdgeFrame @@ -1614,10 +1614,10 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) //Double_t xCenterAll = 70.6615; Double_t xCenterAll = 70.500; Double_t yCenterAll = 70.350; - gMC->Gspos("SQ17to23",1,quadrantMLayerName, xCenterAll, yCenterAll, posZ, rot4,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ17to23",1,quadrantMLayerName, xCenterAll, yCenterAll, posZ, rot4,"ONLY"); posZ = kHzOuterFrameEpoxy; - gMC->Gspos("SQ18to24",1,quadrantMLayerName, xCenterAll, yCenterAll, posZ, rot4,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ18to24",1,quadrantMLayerName, xCenterAll, yCenterAll, posZ, rot4,"ONLY"); //--- @@ -1625,7 +1625,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = 2.*kHxInVFrame+kIAF+2.*kHxInHFrame-kHxOutVFrame+2.*kHxV1mm; posY = 2.*kHyInHFrame+kHyOutVFrame; posZ = 0.; - gMC->Gspos("SQ25",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ25",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); // keep memory of the mid position. Used for placing screws const GReal_t kMidOVposX = posX; @@ -1641,60 +1641,60 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posZ = 0.; // shift to solve overlap with SQ17to23 and SQ18to24 posX += 0.02; - gMC->Gspos("SQ26",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ26",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY"); // VertEarthFaceCu - 2 copies posX = 89.4000+fgkDeltaQuadLHC; posY = 25.79+fgkDeltaQuadLHC; posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertEarthFaceCu; - gMC->Gspos("SQ27",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ27",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); posZ = -1.0*posZ; - gMC->Gspos("SQ27",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ27",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); // VertEarthSteel - 2 copies posX = 91.00+fgkDeltaQuadLHC; posY = 30.616+fgkDeltaQuadLHC; posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertBarSteel; - gMC->Gspos("SQ28",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ28",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); posZ = -1.0*posZ; - gMC->Gspos("SQ28",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ28",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); // VertEarthProfCu - 2 copies posX = 92.000+fgkDeltaQuadLHC; posY = 29.64+fgkDeltaQuadLHC; posZ = kHzFrameThickness; - gMC->Gspos("SQ29",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ29",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); posZ = -1.0*posZ; - gMC->Gspos("SQ29",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ29",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY"); // SuppLateralPositionner - 2 copies posX = 90.2-kNearFarLHC; posY = 5.00-kNearFarLHC; posZ = kHzLateralPosnAl-fgkMotherThick2; - gMC->Gspos("SQ30",1,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ30",1,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); posZ = -1.0*posZ; - gMC->Gspos("SQ30",2,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ30",2,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); // LateralPositionner - 2 copies - Face view posX = 92.175-kNearFarLHC-2.*kHxLPP; posY = 5.00-kNearFarLHC; posZ =2.0*kHzLateralPosnAl+kHzLateralPosnInoxFace-fgkMotherThick2; - gMC->Gspos("SQ31",1,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ31",1,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); posZ = -1.0*posZ; - gMC->Gspos("SQ31",2,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ31",2,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); // LateralPositionner - Profile view posX = 92.175+fgkDeltaQuadLHC+kHxLPF-kHxLPP; posY = 5.00+fgkDeltaQuadLHC; posZ = 0.; - gMC->Gspos("SQ32",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); // middle layer + TVirtualMC::GetMC()->Gspos("SQ32",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); // middle layer posX = 92.175-kNearFarLHC+kHxLPF-kHxLPP; posY = 5.0000-kNearFarLHC; posZ = fgkMotherThick2-kHzLPNF; - gMC->Gspos("SQ33",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); // near layer + TVirtualMC::GetMC()->Gspos("SQ33",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); // near layer posZ = -1.*posZ; - gMC->Gspos("SQ33",2,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); // far layer + TVirtualMC::GetMC()->Gspos("SQ33",2,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); // far layer // VertCradle - 3 (or 4 ) trapezoids redefined with TGeoXtru shape @@ -1703,16 +1703,16 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posY = 23.02+fgkDeltaQuadLHC; posZ = 0.; posX += 1.39311; - gMC->Gspos("SQ34to37",2,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ34to37",2,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); posX = 97.29-kNearFarLHC; posY = 23.02-kNearFarLHC; posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2; posX += 1.39311; - gMC->Gspos("SQ34to36",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ34to36",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); posZ = -1.0*posZ; - gMC->Gspos("SQ34to36",3,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ34to36",3,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); // OutVertCradleD 4th Trapeze - 3 copies @@ -1720,9 +1720,9 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = 98.81+fgkDeltaQuadLHC; posY = 2.52+fgkDeltaQuadLHC; posZ = fgkMotherThick1-kHzVerticalCradleAl; - gMC->Gspos("SQ37",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ37",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); posZ = -1.0*posZ; - gMC->Gspos("SQ37",3,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ37",3,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); // LateralSightSupport - 2 copies posX = 98.33-kNearFarLHC; @@ -1730,15 +1730,15 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posZ = kHzLateralSightAl-fgkMotherThick2; // Fix (3) of extrusion SQ38 from SQN1, SQN2, SQF1, SQF2 // (was posX = 98.53 ...) - gMC->Gspos("SQ38",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ38",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); posZ = -1.0*posZ; - gMC->Gspos("SQ38",2,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ38",2,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); // Mire placement posX = 92.84+fgkDeltaQuadLHC; posY = 8.13+fgkDeltaQuadLHC; posZ = 0.; - gMC->Gspos("SQ39",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SQ39",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY"); //--- @@ -1746,7 +1746,7 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxInHFrame; posY = kHyInHFrame; posZ = 0.; - gMC->Gspos("SQ40",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ40",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); // keep memory of the mid position. Used for placing screws const GReal_t kMidHposX = posX; @@ -1757,13 +1757,13 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxH1mm; posY = 2.0*kHyInHFrame+kHyH1mm; posZ = 0.; - gMC->Gspos("SQ41",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ41",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY"); // InArcFrame posX = 2.0*kHxInVFrame+2.*kHxV1mm; posY = 2.0*kHyInHFrame+2.*kHyH1mm; posZ = 0.; - gMC->Gspos("SQ42",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ42",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY"); // keep memory of the mid position. Used for placing screws const GReal_t kMidArcposX = posX; @@ -1793,10 +1793,10 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = fgkDeltaQuadLHC + scruX[i]; posY = fgkDeltaQuadLHC + scruY[i]; posZ = 0.; - gMC->Gspos("SQ43",i+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ43",i+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY"); if (chamber==1) - gMC->Gspos("SQ44",i+1,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY"); - gMC->Gspos("SQ45",i+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ44",i+1,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ45",i+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY"); } // special screw coordinates scruX[63] = 16.3; @@ -1804,10 +1804,10 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = fgkDeltaQuadLHC + scruX[63]; posY = fgkDeltaQuadLHC + scruY[63]; posZ = 0.; - gMC->Gspos("SQ43",64,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ43",64,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY"); if (chamber==1) - gMC->Gspos("SQ44",64,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY"); - gMC->Gspos("SQ45",64,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ44",64,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ45",64,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY"); // Screws on the IVEpoxyFrame @@ -1832,10 +1832,10 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = fgkDeltaQuadLHC + scruX[i+lastScrew-1]; posY = fgkDeltaQuadLHC + scruY[i+lastScrew-1]; posZ = 0.; - gMC->Gspos("SQ43",i+lastScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ43",i+lastScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY"); if (chamber==1) - gMC->Gspos("SQ44",i+lastScrew,"SQ00",posX+0.1-kMidVposX, posY+0.1-kMidVposY, posZ-kMidVposZ, 0, "ONLY"); - gMC->Gspos("SQ45",i+lastScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ44",i+lastScrew,"SQ00",posX+0.1-kMidVposX, posY+0.1-kMidVposY, posZ-kMidVposZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ45",i+lastScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY"); } // Screws on the OVEpoxyFrame @@ -1859,18 +1859,18 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = fgkDeltaQuadLHC + scruX[i+firstScrew-1]; posY = fgkDeltaQuadLHC + scruY[i+firstScrew-1]; posZ = 0.; - gMC->Gspos("SQ43",i+firstScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ43",i+firstScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY"); // ?? if (chamber==1) - gMC->Gspos("SQ44",i+firstScrew,"SQ25",posX+0.1-kMidOVposX, posY+0.1-kMidOVposY, posZ-kMidOVposZ, 0, "ONLY"); - gMC->Gspos("SQ45",i+firstScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ44",i+firstScrew,"SQ25",posX+0.1-kMidOVposX, posY+0.1-kMidOVposY, posZ-kMidOVposZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ45",i+firstScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY"); } // special case for 1st screw, inside the horizontal frame (volume 40) posX = fgkDeltaQuadLHC + scruX[firstScrew-1]; posY = fgkDeltaQuadLHC + scruY[firstScrew-1]; posZ = 0.; if (chamber==1) - gMC->Gspos("SQ44",firstScrew,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ44",firstScrew,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY"); // Inner Arc of Frame, screw positions and numbers-1 scruX[62] = 16.009; scruY[62] = 1.401; @@ -1883,10 +1883,10 @@ void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) posX = fgkDeltaQuadLHC + scruX[i+58]; posY = fgkDeltaQuadLHC + scruY[i+58]; posZ = 0.; - gMC->Gspos("SQ43",i+58+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ43",i+58+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY"); if (chamber==1) - gMC->Gspos("SQ44",i+58+1,"SQ42",posX+0.1-kMidArcposX, posY+0.1-kMidArcposY, posZ-kMidArcposZ, 0, "ONLY"); - gMC->Gspos("SQ45",i+58+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ44",i+58+1,"SQ42",posX+0.1-kMidArcposX, posY+0.1-kMidArcposY, posZ-kMidArcposZ, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SQ45",i+58+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY"); } } //______________________________________________________________________________ @@ -1901,9 +1901,9 @@ void AliMUONSt1GeometryBuilderV2::PlaceInnerLayers(Int_t chamber) Int_t dpos = (chamber-1)*2; TString name = GasVolumeName("SAG", chamber); - gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY"); - gMC->Gspos("SA1C", 1+dpos, QuadrantMLayerName(chamber),x,y, zc,0,"ONLY"); - gMC->Gspos("SA1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SA1C", 1+dpos, QuadrantMLayerName(chamber),x,y, zc,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("SA1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY"); } //______________________________________________________________________________ @@ -1926,27 +1926,27 @@ void AliMUONSt1GeometryBuilderV2::PlaceSpacer0(Int_t chamber) y = 43.04 - my; z = 522.41 - mz; AliDebugStream(2) << "spacer05 pos1: " << x << ", " << y << ", " << z << endl; - gMC->Gspos("Spacer05", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Spacer05", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY"); y = 44.54 - my; AliDebugStream(2) << "spacer05 pos2: " << x << ", " << y << ", " << z << endl; - gMC->Gspos("Spacer05", 2, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Spacer05", 2, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY"); x = 40.82 - mx; y = 43.79 - my; z = 519.76 - mz; AliDebugStream(2) << "spacer06 pos1: " << x << ", " << y << ", " << z << endl; - gMC->Gspos("Spacer06", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Spacer06", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY"); z = 525.06 - mz; AliDebugStream(2) << "spacer06 pos2: " << x << ", " << y << ", " << z << endl; - gMC->Gspos("Spacer06", 2, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Spacer06", 2, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY"); x = 40.82 - mx; y = 43.79 - my; z = 522.41 - mz; AliDebugStream(2) << "spacer07 pos1: " << x << ", " << y << ", " << z << endl; - gMC->Gspos("Spacer07", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Spacer07", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY"); } //______________________________________________________________________________ @@ -1998,7 +1998,7 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector, posX = where.X() + seg->GetPositionX(); posY = where.Y() + seg->GetPositionY(); posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane); - gMC->Gspos(PlaneSegmentName(segNum).Data(), 1, + TVirtualMC::GetMC()->Gspos(PlaneSegmentName(segNum).Data(), 1, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY"); // and place all the daughter boards of this segment @@ -2017,7 +2017,7 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector, posX = where.X() + motifPos->GetPositionX() + fgkOffsetX; posY = where.Y() + motifPos->GetPositionY() + fgkOffsetY; posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter()); - gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY"); + TVirtualMC::GetMC()->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY"); } // COMMENT OUT END @@ -2059,7 +2059,7 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector, posX -= 0.1; posY -= 0.1; } - gMC->Gspos(fgkHoleName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY"); + TVirtualMC::GetMC()->Gspos(fgkHoleName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY"); // then place the daughter board for the motif, wrt the requested rotation angle posX = posX+fgkDeltaFilleEtamX; @@ -2070,7 +2070,7 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector, posY += 0.1; } posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter()); - gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY"); + TVirtualMC::GetMC()->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY"); if (nofAlreadyDone == alreadyDone.GetSize()) alreadyDone.Set(2*nofAlreadyDone); @@ -2354,13 +2354,13 @@ void AliMUONSt1GeometryBuilderV2::CreateGeometry() GReal_t posx2 = posx + shiftXY;; GReal_t posy2 = posy + shiftXY;; GReal_t posz2 = posz - shiftZ;; - //gMC->Gspos(QuadrantNLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY"); + //TVirtualMC::GetMC()->Gspos(QuadrantNLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY"); GetEnvelopes(ich-1) ->AddEnvelopeConstituent(QuadrantNLayerName(ich), QuadrantEnvelopeName(ich,i), i+1, TGeoTranslation(posx2, posy2, posz2)); posz2 = posz + shiftZ; - //gMC->Gspos(QuadrantFLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY"); + //TVirtualMC::GetMC()->Gspos(QuadrantFLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY"); GetEnvelopes(ich-1) ->AddEnvelopeConstituent(QuadrantFLayerName(ich), QuadrantEnvelopeName(ich,i), i+1, TGeoTranslation(posx2, posy2, posz2)); diff --git a/MUON/AliMUONSt2GeometryBuilder.cxx b/MUON/AliMUONSt2GeometryBuilder.cxx index de0f380c6ee..5d09a8eda1c 100644 --- a/MUON/AliMUONSt2GeometryBuilder.cxx +++ b/MUON/AliMUONSt2GeometryBuilder.cxx @@ -136,8 +136,8 @@ void AliMUONSt2GeometryBuilder::CreateGeometry() // // Sensitive volumes - gMC->Gsvolu("S03G", "TUBS", idGas, tpar, 5); - gMC->Gsvolu("S04G", "TUBS", idGas, tpar, 5); + TVirtualMC::GetMC()->Gsvolu("S03G", "TUBS", idGas, tpar, 5); + TVirtualMC::GetMC()->Gsvolu("S04G", "TUBS", idGas, tpar, 5); Int_t detElemId; @@ -146,35 +146,35 @@ void AliMUONSt2GeometryBuilder::CreateGeometry() posz = -kDeltaZ; detElemId = 301; - gMC->Gsvolu("LE01", "TUBS", idAir, tpar, 5); + TVirtualMC::GetMC()->Gsvolu("LE01", "TUBS", idAir, tpar, 5); GetEnvelopes(2)->AddEnvelope("LE01", detElemId, true, TGeoTranslation(posx, posy, posz), TGeoRotation("rot1",90,0,90,90,0,0) ); detElemId = 401; - gMC->Gsvolu("LF01", "TUBS", idAir, tpar, 5); + TVirtualMC::GetMC()->Gsvolu("LF01", "TUBS", idAir, tpar, 5); GetEnvelopes(3)->AddEnvelope("LF01", detElemId, true, TGeoTranslation(posx, posy, posz), TGeoRotation("rot1",90,0,90,90,0,0) ); detElemId = 300; - gMC->Gsvolu("LE02", "TUBS", idAir, tpar, 5); + TVirtualMC::GetMC()->Gsvolu("LE02", "TUBS", idAir, tpar, 5); GetEnvelopes(2)->AddEnvelope("LE02", detElemId, true, TGeoTranslation(-posx, posy,-posz), TGeoRotation("rot2",90,180,90,90,180,0) ); detElemId = 400; - gMC->Gsvolu("LF02", "TUBS", idAir, tpar, 5); + TVirtualMC::GetMC()->Gsvolu("LF02", "TUBS", idAir, tpar, 5); GetEnvelopes(3)->AddEnvelope("LF02", detElemId, true, TGeoTranslation(-posx, posy,-posz), TGeoRotation("rot2",90,180,90,90,180,0) ); detElemId = 302; - gMC->Gsvolu("LE03", "TUBS", idAir, tpar, 5); + TVirtualMC::GetMC()->Gsvolu("LE03", "TUBS", idAir, tpar, 5); GetEnvelopes(2)->AddEnvelope("LE03", detElemId, true, TGeoTranslation(posx, -posy, -posz), TGeoRotation("rot3",90,0,90,270,180,0) ); detElemId = 402; - gMC->Gsvolu("LF03", "TUBS", idAir, tpar, 5); + TVirtualMC::GetMC()->Gsvolu("LF03", "TUBS", idAir, tpar, 5); GetEnvelopes(3)->AddEnvelope("LF03", detElemId, true, TGeoTranslation(posx, -posy, -posz), TGeoRotation("rot3",90,0,90,270,180,0) ); detElemId = 303; - gMC->Gsvolu("LE04", "TUBS", idAir, tpar, 5); + TVirtualMC::GetMC()->Gsvolu("LE04", "TUBS", idAir, tpar, 5); GetEnvelopes(2)->AddEnvelope("LE04", detElemId, true, TGeoTranslation(-posx, -posy, posz), TGeoRotation("rot4",90,180,90,270,0,0) ); detElemId = 403; - gMC->Gsvolu("LF04", "TUBS", idAir, tpar, 5); + TVirtualMC::GetMC()->Gsvolu("LF04", "TUBS", idAir, tpar, 5); GetEnvelopes(3)->AddEnvelope("LF04", detElemId, true, TGeoTranslation(-posx, -posy, posz), TGeoRotation("rot4",90,180,90,270,0,0) ); diff --git a/MUON/AliMUONSt2GeometryBuilderV2.cxx b/MUON/AliMUONSt2GeometryBuilderV2.cxx index 8264c822e0d..c86f3076712 100644 --- a/MUON/AliMUONSt2GeometryBuilderV2.cxx +++ b/MUON/AliMUONSt2GeometryBuilderV2.cxx @@ -108,8 +108,8 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() tpar1[4] = 102.0; - gMC->Gsvolu("SQM3","TUBS", idAir, tpar1, 5); - gMC->Gsvolu("SQM4","TUBS", idAir, tpar1, 5); + TVirtualMC::GetMC()->Gsvolu("SQM3","TUBS", idAir, tpar1, 5); + TVirtualMC::GetMC()->Gsvolu("SQM4","TUBS", idAir, tpar1, 5); //================================================================================== @@ -144,19 +144,19 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() bparH[0] = 95.5/2.; // extension beyond 0 deg in x direction // 94.5 bparH[1] = 1.2/2.; // extension beyond 0 deg in y direction (3.7[total extn] - 2.5[frame dim]) bparH[2] = zCu/2.; //Thickness of Copper sheet - gMC->Gsvolu("SCU0L", "BOX", idCU, bparH, 3); + TVirtualMC::GetMC()->Gsvolu("SCU0L", "BOX", idCU, bparH, 3); bparH[2] = zCbb/2.; // thickness of cathode sheet in z direction - gMC->Gsvolu("SCB0L", "BOX", idPCB, bparH, 3); + TVirtualMC::GetMC()->Gsvolu("SCB0L", "BOX", idPCB, bparH, 3); bparH[2] = zRoha/2.; //Thickness of Roha cell - gMC->Gsvolu("SRH0L", "BOX", idRoha, bparH, 3); + TVirtualMC::GetMC()->Gsvolu("SRH0L", "BOX", idRoha, bparH, 3); bparH[2] = zMeb/2; //Thickness of mechanical exit board - gMC->Gsvolu("SMB0L", "BOX", idPCB, bparH, 3); + TVirtualMC::GetMC()->Gsvolu("SMB0L", "BOX", idPCB, bparH, 3); bparH[2] = zEeb/2; //Thickness of effective electronic exit board - gMC->Gsvolu("SEB0L", "BOX", idCU, bparH, 3); + TVirtualMC::GetMC()->Gsvolu("SEB0L", "BOX", idCU, bparH, 3); //Segment-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Float_t pgpar[10]; // polygon @@ -170,23 +170,23 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() pgpar[7] = zCu/2.; // z-position of the second plane pgpar[8] = pgpar[5]; // innner radius of second plane pgpar[9] = pgpar[6]; // outer radious of second plane - gMC->Gsvolu("SCU1L", "PGON", idCU, pgpar, 10); + TVirtualMC::GetMC()->Gsvolu("SCU1L", "PGON", idCU, pgpar, 10); pgpar[4] = -zCbb/2.; // z-position of the first plane pgpar[7] = zCbb/2.; // Thickness of copper-sheet - gMC->Gsvolu("SCB1L", "PGON", idPCB, pgpar, 10); + TVirtualMC::GetMC()->Gsvolu("SCB1L", "PGON", idPCB, pgpar, 10); pgpar[4] = -zRoha/2.; // Thickness of Roha cell pgpar[7] = zRoha/2.; // Thickness of Roha cell - gMC->Gsvolu("SRH1L", "PGON", idRoha, pgpar, 10); + TVirtualMC::GetMC()->Gsvolu("SRH1L", "PGON", idRoha, pgpar, 10); pgpar[4] = -zMeb/2.; // Thickness of mechanical exit board pgpar[7] = zMeb/2.; // Thickness of mechanical exit board - gMC->Gsvolu("SMB1L", "PGON", idPCB, pgpar, 10); + TVirtualMC::GetMC()->Gsvolu("SMB1L", "PGON", idPCB, pgpar, 10); pgpar[4] = -zEeb/2.; // Thickness of electronic readout board pgpar[7] = zEeb/2.; // Thickness of electronic readout board - gMC->Gsvolu("SEB1L", "PGON", idCU, pgpar, 10); + TVirtualMC::GetMC()->Gsvolu("SEB1L", "PGON", idCU, pgpar, 10); //Segment-2 - vertical box (simalar to horizontal bar as in Segment 0)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -196,20 +196,20 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() bparV[0] = 1.0/2.; bparV[1] = 95.5/2.; // 94.5 bparV[2] = zCu/2.; - gMC->Gsvolu("SCU2L", "BOX", idCU, bparV, 3); + TVirtualMC::GetMC()->Gsvolu("SCU2L", "BOX", idCU, bparV, 3); bparV[2] = zCbb/2.; - gMC->Gsvolu("SCB2L", "BOX", idPCB, bparV, 3); + TVirtualMC::GetMC()->Gsvolu("SCB2L", "BOX", idPCB, bparV, 3); bparV[2] = zRoha/2.; - gMC->Gsvolu("SRH2L", "BOX", idRoha, bparV, 3); + TVirtualMC::GetMC()->Gsvolu("SRH2L", "BOX", idRoha, bparV, 3); bparV[2] = zMeb/2; - gMC->Gsvolu("SMB2L", "BOX", idPCB, bparV, 3); + TVirtualMC::GetMC()->Gsvolu("SMB2L", "BOX", idPCB, bparV, 3); bparV[2] = zEeb/2; - gMC->Gsvolu("SEB2L", "BOX", idCU, bparV, 3); + TVirtualMC::GetMC()->Gsvolu("SEB2L", "BOX", idCU, bparV, 3); //....(Setting posion of Segment 0,1,2).................................................................. @@ -224,109 +224,109 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() // chamber 3 - gMC->Gspos("SCB0L",1, "SQM3",xposHorBox,yposHorBox,zposCbbBar,0, "ONLY"); - gMC->Gspos("SCB1L",1, "SQM3", 0.0,0.0,zposCbbBar,0, "ONLY"); - gMC->Gspos("SCB2L",1, "SQM3",xposVerBox,yposVerBox,zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB0L",1, "SQM3",xposHorBox,yposHorBox,zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB1L",1, "SQM3", 0.0,0.0,zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB2L",1, "SQM3",xposVerBox,yposVerBox,zposCbbBar,0, "ONLY"); - gMC->Gspos("SCB0L",2, "SQM3",xposHorBox,yposHorBox,-zposCbbBar,0, "ONLY"); - gMC->Gspos("SCB1L",2, "SQM3", 0.0,0.0,-zposCbbBar,0, "ONLY"); - gMC->Gspos("SCB2L",2, "SQM3",xposVerBox,yposVerBox,-zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB0L",2, "SQM3",xposHorBox,yposHorBox,-zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB1L",2, "SQM3", 0.0,0.0,-zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB2L",2, "SQM3",xposVerBox,yposVerBox,-zposCbbBar,0, "ONLY"); // chamber 4 - gMC->Gspos("SCB0L",3, "SQM4",xposHorBox,yposHorBox,zposCbbBar,0, "ONLY"); - gMC->Gspos("SCB1L",3, "SQM4", 0.0,0.0,zposCbbBar,0, "ONLY"); - gMC->Gspos("SCB2L",3, "SQM4",xposVerBox,yposVerBox,zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB0L",3, "SQM4",xposHorBox,yposHorBox,zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB1L",3, "SQM4", 0.0,0.0,zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB2L",3, "SQM4",xposVerBox,yposVerBox,zposCbbBar,0, "ONLY"); - gMC->Gspos("SCB0L",4, "SQM4",xposHorBox,yposHorBox,-zposCbbBar,0, "ONLY"); - gMC->Gspos("SCB1L",4, "SQM4", 0.0,0.0,-zposCbbBar,0, "ONLY"); - gMC->Gspos("SCB2L",4, "SQM4",xposVerBox,yposVerBox,-zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB0L",4, "SQM4",xposHorBox,yposHorBox,-zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB1L",4, "SQM4", 0.0,0.0,-zposCbbBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCB2L",4, "SQM4",xposVerBox,yposVerBox,-zposCbbBar,0, "ONLY"); //Positioning Copper sheet // chamber 3 - gMC->Gspos("SCU0L",1, "SQM3",xposHorBox,yposHorBox,zposCuBar,0, "ONLY"); - gMC->Gspos("SCU1L",1, "SQM3", 0.0,0.0,zposCuBar,0, "ONLY"); - gMC->Gspos("SCU2L",1, "SQM3",xposVerBox,yposVerBox,zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU0L",1, "SQM3",xposHorBox,yposHorBox,zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU1L",1, "SQM3", 0.0,0.0,zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU2L",1, "SQM3",xposVerBox,yposVerBox,zposCuBar,0, "ONLY"); - gMC->Gspos("SCU0L",2, "SQM3",xposHorBox,yposHorBox,-zposCuBar,0, "ONLY"); - gMC->Gspos("SCU1L",2, "SQM3", 0.0,0.0,-zposCuBar,0, "ONLY"); - gMC->Gspos("SCU2L",2, "SQM3",xposVerBox,yposVerBox,-zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU0L",2, "SQM3",xposHorBox,yposHorBox,-zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU1L",2, "SQM3", 0.0,0.0,-zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU2L",2, "SQM3",xposVerBox,yposVerBox,-zposCuBar,0, "ONLY"); // chamber 4 - gMC->Gspos("SCU0L",3, "SQM4",xposHorBox,yposHorBox,zposCuBar,0, "ONLY"); - gMC->Gspos("SCU1L",3, "SQM4", 0.0,0.0,zposCuBar,0, "ONLY"); - gMC->Gspos("SCU2L",3, "SQM4",xposVerBox,yposVerBox,zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU0L",3, "SQM4",xposHorBox,yposHorBox,zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU1L",3, "SQM4", 0.0,0.0,zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU2L",3, "SQM4",xposVerBox,yposVerBox,zposCuBar,0, "ONLY"); - gMC->Gspos("SCU0L",4, "SQM4",xposHorBox,yposHorBox,-zposCuBar,0, "ONLY"); - gMC->Gspos("SCU1L",4, "SQM4", 0.0,0.0,-zposCuBar,0, "ONLY"); - gMC->Gspos("SCU2L",4, "SQM4",xposVerBox,yposVerBox,-zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU0L",4, "SQM4",xposHorBox,yposHorBox,-zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU1L",4, "SQM4", 0.0,0.0,-zposCuBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SCU2L",4, "SQM4",xposVerBox,yposVerBox,-zposCuBar,0, "ONLY"); //Positioning Roha cell // chamber 3 - gMC->Gspos("SRH0L",1, "SQM3",xposHorBox,yposHorBox,zposRohaBar,0, "ONLY"); - gMC->Gspos("SRH1L",1, "SQM3", 0.0,0.0,zposRohaBar,0, "ONLY"); - gMC->Gspos("SRH2L",1, "SQM3",xposVerBox,yposVerBox,zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH0L",1, "SQM3",xposHorBox,yposHorBox,zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH1L",1, "SQM3", 0.0,0.0,zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH2L",1, "SQM3",xposVerBox,yposVerBox,zposRohaBar,0, "ONLY"); - gMC->Gspos("SRH0L",2, "SQM3",xposHorBox,yposHorBox,-zposRohaBar,0, "ONLY"); - gMC->Gspos("SRH1L",2, "SQM3", 0.0,0.0,-zposRohaBar,0, "ONLY"); - gMC->Gspos("SRH2L",2, "SQM3",xposVerBox,yposVerBox,-zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH0L",2, "SQM3",xposHorBox,yposHorBox,-zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH1L",2, "SQM3", 0.0,0.0,-zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH2L",2, "SQM3",xposVerBox,yposVerBox,-zposRohaBar,0, "ONLY"); // chamber 4 - gMC->Gspos("SRH0L",3, "SQM4",xposHorBox,yposHorBox,zposRohaBar,0, "ONLY"); - gMC->Gspos("SRH1L",3, "SQM4", 0.0,0.0,zposRohaBar,0, "ONLY"); - gMC->Gspos("SRH2L",3, "SQM4",xposVerBox,yposVerBox,zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH0L",3, "SQM4",xposHorBox,yposHorBox,zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH1L",3, "SQM4", 0.0,0.0,zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH2L",3, "SQM4",xposVerBox,yposVerBox,zposRohaBar,0, "ONLY"); - gMC->Gspos("SRH0L",4, "SQM4",xposHorBox,yposHorBox,-zposRohaBar,0, "ONLY"); - gMC->Gspos("SRH1L",4, "SQM4", 0.0,0.0,-zposRohaBar,0, "ONLY"); - gMC->Gspos("SRH2L",4, "SQM4",xposVerBox,yposVerBox,-zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH0L",4, "SQM4",xposHorBox,yposHorBox,-zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH1L",4, "SQM4", 0.0,0.0,-zposRohaBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SRH2L",4, "SQM4",xposVerBox,yposVerBox,-zposRohaBar,0, "ONLY"); //Positioning of Mech. exit board // chamber 3 - gMC->Gspos("SMB0L",1, "SQM3",xposHorBox,yposHorBox,zposMebBar,0, "ONLY"); - gMC->Gspos("SMB1L",1, "SQM3", 0.0,0.0,zposMebBar,0, "ONLY"); - gMC->Gspos("SMB2L",1, "SQM3",xposVerBox,yposVerBox,zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB0L",1, "SQM3",xposHorBox,yposHorBox,zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB1L",1, "SQM3", 0.0,0.0,zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB2L",1, "SQM3",xposVerBox,yposVerBox,zposMebBar,0, "ONLY"); - gMC->Gspos("SMB0L",2, "SQM3",xposHorBox,yposHorBox,-zposMebBar,0, "ONLY"); - gMC->Gspos("SMB1L",2, "SQM3", 0.0,0.0,-zposMebBar,0, "ONLY"); - gMC->Gspos("SMB2L",2, "SQM3",xposVerBox,yposVerBox,-zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB0L",2, "SQM3",xposHorBox,yposHorBox,-zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB1L",2, "SQM3", 0.0,0.0,-zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB2L",2, "SQM3",xposVerBox,yposVerBox,-zposMebBar,0, "ONLY"); // chamber 4 - gMC->Gspos("SMB0L",3, "SQM4",xposHorBox,yposHorBox,zposMebBar,0, "ONLY"); - gMC->Gspos("SMB1L",3, "SQM4", 0.0,0.0,zposMebBar,0, "ONLY"); - gMC->Gspos("SMB2L",3, "SQM4",xposVerBox,yposVerBox,zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB0L",3, "SQM4",xposHorBox,yposHorBox,zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB1L",3, "SQM4", 0.0,0.0,zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB2L",3, "SQM4",xposVerBox,yposVerBox,zposMebBar,0, "ONLY"); - gMC->Gspos("SMB0L",4, "SQM4",xposHorBox,yposHorBox,-zposMebBar,0, "ONLY"); - gMC->Gspos("SMB1L",4, "SQM4", 0.0,0.0,-zposMebBar,0, "ONLY"); - gMC->Gspos("SMB2L",4, "SQM4",xposVerBox,yposVerBox,-zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB0L",4, "SQM4",xposHorBox,yposHorBox,-zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB1L",4, "SQM4", 0.0,0.0,-zposMebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SMB2L",4, "SQM4",xposVerBox,yposVerBox,-zposMebBar,0, "ONLY"); //Positioning of Electronic exit board // chamber 3 - gMC->Gspos("SEB0L",1, "SQM3",xposHorBox,yposHorBox,zposEebBar,0, "ONLY"); - gMC->Gspos("SEB1L",1, "SQM3", 0.0,0.0,zposEebBar,0, "ONLY"); - gMC->Gspos("SEB2L",1, "SQM3",xposVerBox,yposVerBox,zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB0L",1, "SQM3",xposHorBox,yposHorBox,zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB1L",1, "SQM3", 0.0,0.0,zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB2L",1, "SQM3",xposVerBox,yposVerBox,zposEebBar,0, "ONLY"); - gMC->Gspos("SEB0L",2, "SQM3",xposHorBox,yposHorBox,-zposEebBar,0, "ONLY"); - gMC->Gspos("SEB1L",2, "SQM3", 0.0,0.0,-zposEebBar,0, "ONLY"); - gMC->Gspos("SEB2L",2, "SQM3",xposVerBox,yposVerBox,-zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB0L",2, "SQM3",xposHorBox,yposHorBox,-zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB1L",2, "SQM3", 0.0,0.0,-zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB2L",2, "SQM3",xposVerBox,yposVerBox,-zposEebBar,0, "ONLY"); // chamber 4 - gMC->Gspos("SEB0L",3, "SQM4",xposHorBox,yposHorBox,zposEebBar,0, "ONLY"); - gMC->Gspos("SEB1L",3, "SQM4", 0.0,0.0,zposEebBar,0, "ONLY"); - gMC->Gspos("SEB2L",3, "SQM4",xposVerBox,yposVerBox,zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB0L",3, "SQM4",xposHorBox,yposHorBox,zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB1L",3, "SQM4", 0.0,0.0,zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB2L",3, "SQM4",xposVerBox,yposVerBox,zposEebBar,0, "ONLY"); - gMC->Gspos("SEB0L",4, "SQM4",xposHorBox,yposHorBox,-zposEebBar,0, "ONLY"); - gMC->Gspos("SEB1L",4, "SQM4", 0.0,0.0,-zposEebBar,0, "ONLY"); - gMC->Gspos("SEB2L",4, "SQM4",xposVerBox,yposVerBox,-zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB0L",4, "SQM4",xposHorBox,yposHorBox,-zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB1L",4, "SQM4", 0.0,0.0,-zposEebBar,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SEB2L",4, "SQM4",xposVerBox,yposVerBox,-zposEebBar,0, "ONLY"); //---------------------------------------------------------------------- @@ -339,43 +339,43 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() frame1[1] = 2.5/2.; frame1[2] = 5.0/2.; - gMC->Gsvolu("SFRM1", "BOX", idPGF30, frame1, 3); //Frame - 1 // fill with pkk GF30 + TVirtualMC::GetMC()->Gsvolu("SFRM1", "BOX", idPGF30, frame1, 3); //Frame - 1 // fill with pkk GF30 Float_t arib1[3]; arib1[0] = frame1[0]; arib1[1] = 0.9/2.; arib1[2] =(frame1[2]-0.95)/2.0; - gMC->Gsvolu("SFRA1", "BOX", idAir, arib1, 3); // fill with air + TVirtualMC::GetMC()->Gsvolu("SFRA1", "BOX", idAir, arib1, 3); // fill with air Float_t xposarib1 = 0; Float_t yposarib1 = -frame1[1] + arib1[1]; Float_t zposarib1 = frame1[2] - arib1[2]; - gMC->Gspos("SFRA1",1, "SFRM1", xposarib1, yposarib1, zposarib1,0, "ONLY"); //replace pkk GF30 with air(b) - gMC->Gspos("SFRA1",2, "SFRM1", xposarib1, yposarib1, -zposarib1,0, "ONLY"); //replace pkk GF30 with air(nb) + TVirtualMC::GetMC()->Gspos("SFRA1",1, "SFRM1", xposarib1, yposarib1, zposarib1,0, "ONLY"); //replace pkk GF30 with air(b) + TVirtualMC::GetMC()->Gspos("SFRA1",2, "SFRM1", xposarib1, yposarib1, -zposarib1,0, "ONLY"); //replace pkk GF30 with air(nb) Float_t rrib1[3]; rrib1[0] = frame1[0]; rrib1[1] = 0.6/2.; rrib1[2] =(frame1[2]-0.95)/2.0; - gMC->Gsvolu("SFRR1", "BOX", idRoha, rrib1, 3); // fill with rohacell + TVirtualMC::GetMC()->Gsvolu("SFRR1", "BOX", idRoha, rrib1, 3); // fill with rohacell Float_t xposrrib1 = 0.0; Float_t yposrrib1 = frame1[1] - rrib1[1]; Float_t zposrrib1 = frame1[2] - rrib1[2]; - gMC->Gspos("SFRR1",1, "SFRM1", xposrrib1, yposrrib1, zposrrib1,0, "ONLY");//replace pkk GF30 with rohacell - gMC->Gspos("SFRR1",2, "SFRM1", xposrrib1, yposrrib1, -zposrrib1,0, "ONLY");//replace pkk GF30 with rohacell + TVirtualMC::GetMC()->Gspos("SFRR1",1, "SFRM1", xposrrib1, yposrrib1, zposrrib1,0, "ONLY");//replace pkk GF30 with rohacell + TVirtualMC::GetMC()->Gspos("SFRR1",2, "SFRM1", xposrrib1, yposrrib1, -zposrrib1,0, "ONLY");//replace pkk GF30 with rohacell Float_t xposFr1 = frame1[0] + 20.6; Float_t yposFr1 = -3.7 + frame1[1] ; Float_t zposFr1 = 0.0; - gMC->Gspos("SFRM1",1, "SQM3", xposFr1, yposFr1, zposFr1,0, "ONLY");// frame -1 - gMC->Gspos("SFRM1",2, "SQM4", xposFr1, yposFr1, zposFr1,0, "ONLY");// frame -1 + TVirtualMC::GetMC()->Gspos("SFRM1",1, "SQM3", xposFr1, yposFr1, zposFr1,0, "ONLY");// frame -1 + TVirtualMC::GetMC()->Gspos("SFRM1",2, "SQM4", xposFr1, yposFr1, zposFr1,0, "ONLY");// frame -1 //...................................................................................... @@ -386,21 +386,21 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() frame2[1] = 1.2/2.; frame2[2] = 5.0/2; - gMC->Gsvolu("SFRM2", "BOX", idPGF30, frame2, 3); //Frame - 2 + TVirtualMC::GetMC()->Gsvolu("SFRM2", "BOX", idPGF30, frame2, 3); //Frame - 2 Float_t rrib2[3]; rrib2[0] = frame2[0]-1.0/2.0; rrib2[1] = frame2[1]; rrib2[2] =(frame2[2]-0.95)/2.0; - gMC->Gsvolu("SFRR2", "BOX", idRoha, rrib2, 3); + TVirtualMC::GetMC()->Gsvolu("SFRR2", "BOX", idRoha, rrib2, 3); Float_t xposrrib2 = -1.0/2.0; Float_t yposrrib2 = 0.0; Float_t zposrrib2 = frame2[2] - rrib2[2]; - gMC->Gspos("SFRR2",1, "SFRM2", xposrrib2, yposrrib2, zposrrib2,0, "ONLY");//replace pkk GF30 with rohacell - gMC->Gspos("SFRR2",2, "SFRM2", xposrrib2, yposrrib2, -zposrrib2,0, "ONLY");//replace pkk GF30 with roha + TVirtualMC::GetMC()->Gspos("SFRR2",1, "SFRM2", xposrrib2, yposrrib2, zposrrib2,0, "ONLY");//replace pkk GF30 with rohacell + TVirtualMC::GetMC()->Gspos("SFRR2",2, "SFRM2", xposrrib2, yposrrib2, -zposrrib2,0, "ONLY");//replace pkk GF30 with roha @@ -408,8 +408,8 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() Float_t yposFr2 = -frame2[1]; Float_t zposFr2 = 0.0; - gMC->Gspos("SFRM2",1, "SQM3", xposFr2, yposFr2, zposFr2,0, "MANY");//global positing of frame in SQM3 - gMC->Gspos("SFRM2",2, "SQM4", xposFr2, yposFr2, zposFr2,0, "MANY");//global positing of frame in SQM4 + TVirtualMC::GetMC()->Gspos("SFRM2",1, "SQM3", xposFr2, yposFr2, zposFr2,0, "MANY");//global positing of frame in SQM3 + TVirtualMC::GetMC()->Gspos("SFRM2",2, "SQM4", xposFr2, yposFr2, zposFr2,0, "MANY");//global positing of frame in SQM4 //...................................................................................... @@ -428,7 +428,7 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() pgparFr3[8] = pgparFr3[5]; pgparFr3[9] = pgparFr3[6]; - gMC->Gsvolu("SFRM3", "PGON", idPGF30, pgparFr3, 10); + TVirtualMC::GetMC()->Gsvolu("SFRM3", "PGON", idPGF30, pgparFr3, 10); Float_t pgparRrib3[10]; pgparRrib3[0] = 0.; @@ -442,17 +442,17 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() pgparRrib3[8] = pgparRrib3[5]; pgparRrib3[9] = pgparRrib3[6]; - gMC->Gsvolu("SFRR3", "PGON", idRoha, pgparRrib3, 10); + TVirtualMC::GetMC()->Gsvolu("SFRR3", "PGON", idRoha, pgparRrib3, 10); Float_t xposrrib3 = 0.0; Float_t yposrrib3 = 0.0; Float_t zposrrib3 = 0.0; - gMC->Gspos("SFRR3",1, "SFRM3", xposrrib3, yposrrib3, zposrrib3,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR3",1, "SFRM3", xposrrib3, yposrrib3, zposrrib3,0, "ONLY"); zposrrib3 = 3.45; - gMC->Gspos("SFRR3",2, "SFRM3", xposrrib3, yposrrib3, zposrrib3,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR3",2, "SFRM3", xposrrib3, yposrrib3, zposrrib3,0, "ONLY"); @@ -460,8 +460,8 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() Float_t yposFr3 = 0.0; Float_t zposFr3 = -frame1[2]; - gMC->Gspos("SFRM3",1, "SQM3", xposFr3, yposFr3, zposFr3,0, "ONLY");// frame -1 - gMC->Gspos("SFRM3",2, "SQM4", xposFr3, yposFr3, zposFr3,0, "ONLY");// frame -1 + TVirtualMC::GetMC()->Gspos("SFRM3",1, "SQM3", xposFr3, yposFr3, zposFr3,0, "ONLY");// frame -1 + TVirtualMC::GetMC()->Gspos("SFRM3",2, "SQM4", xposFr3, yposFr3, zposFr3,0, "ONLY");// frame -1 //...................................................................................... @@ -472,21 +472,21 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() frame4[1] = 4.0/2.; frame4[2] = frame1[2]; - gMC->Gsvolu("SFRM4", "BOX", idPGF30, frame4, 3); + TVirtualMC::GetMC()->Gsvolu("SFRM4", "BOX", idPGF30, frame4, 3); Float_t rrib4[3]; rrib4[0] = frame4[0]; rrib4[1] = frame4[1]-1.0/2; rrib4[2] =(frame4[2]-0.95)/2.0; - gMC->Gsvolu("SFRR4", "BOX", idRoha, rrib4, 3); + TVirtualMC::GetMC()->Gsvolu("SFRR4", "BOX", idRoha, rrib4, 3); Float_t xposrrib4 = 0.0; Float_t yposrrib4 = -1.0/2; Float_t zposrrib4 = frame4[2] - rrib4[2]; - gMC->Gspos("SFRR4",1, "SFRM4", xposrrib4, yposrrib4, zposrrib4,0, "ONLY"); - gMC->Gspos("SFRR4",2, "SFRM4", xposrrib4, yposrrib4, -zposrrib4,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR4",1, "SFRM4", xposrrib4, yposrrib4, zposrrib4,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR4",2, "SFRM4", xposrrib4, yposrrib4, -zposrrib4,0, "ONLY"); @@ -494,8 +494,8 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() Float_t yposFr4 = -frame4[1] + 117.6; Float_t zposFr4 = 0.0; - gMC->Gspos("SFRM4",1, "SQM3", xposFr4, yposFr4, zposFr4,0, "MANY"); - gMC->Gspos("SFRM4",2, "SQM4", xposFr4, yposFr4, zposFr4,0, "MANY"); + TVirtualMC::GetMC()->Gspos("SFRM4",1, "SQM3", xposFr4, yposFr4, zposFr4,0, "MANY"); + TVirtualMC::GetMC()->Gspos("SFRM4",2, "SQM4", xposFr4, yposFr4, zposFr4,0, "MANY"); //...................................................................................... @@ -505,42 +505,42 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() frame5[1] = 101.0/2.; frame5[2] = 5.0/2.; - gMC->Gsvolu("SFRM5", "BOX", idPGF30, frame5, 3); //Frame - 1 + TVirtualMC::GetMC()->Gsvolu("SFRM5", "BOX", idPGF30, frame5, 3); //Frame - 1 Float_t arib5[3]; arib5[0] = 0.9/2.0; arib5[1] = frame5[1]; arib5[2] = (frame5[2]-0.95)/2.0; - gMC->Gsvolu("SFRA5", "BOX", idAir, arib5, 3); + TVirtualMC::GetMC()->Gsvolu("SFRA5", "BOX", idAir, arib5, 3); Float_t xposarib5 = -frame5[0] + arib5[0]; Float_t yposarib5 = 0.0; Float_t zposarib5 = frame5[2] - arib5[2]; - gMC->Gspos("SFRA5",1, "SFRM5", xposarib5, yposarib5, zposarib5,0, "ONLY"); - gMC->Gspos("SFRA5",2, "SFRM5", xposarib5, yposarib5, -zposarib5,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRA5",1, "SFRM5", xposarib5, yposarib5, zposarib5,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRA5",2, "SFRM5", xposarib5, yposarib5, -zposarib5,0, "ONLY"); Float_t rrib5[3]; rrib5[0] = 0.8/2.0; rrib5[1] = frame5[1]; rrib5[2] = (frame5[2]-0.95)/2.0; - gMC->Gsvolu("SFRR5", "BOX", idRoha, rrib5, 3); + TVirtualMC::GetMC()->Gsvolu("SFRR5", "BOX", idRoha, rrib5, 3); Float_t xposrrib5 = frame5[0] - rrib5[0]; Float_t yposrrib5 = 0.0; Float_t zposrrib5 = frame5[2] - rrib5[2]; - gMC->Gspos("SFRR5",1, "SFRM5", xposrrib5, yposrrib5, zposrrib5,0, "ONLY"); - gMC->Gspos("SFRR5",2, "SFRM5", xposrrib5, yposrrib5, -zposrrib5,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR5",1, "SFRM5", xposrrib5, yposrrib5, zposrrib5,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR5",2, "SFRM5", xposrrib5, yposrrib5, -zposrrib5,0, "ONLY"); Float_t xposFr5 = -3.7 + frame5[0]; Float_t yposFr5 = frame5[1] + 20.6; Float_t zposFr5 = 0.0; - gMC->Gspos("SFRM5",1, "SQM3", xposFr5, yposFr5, zposFr5,0, "ONLY"); - gMC->Gspos("SFRM5",2, "SQM4", xposFr5, yposFr5, zposFr5,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRM5",1, "SQM3", xposFr5, yposFr5, zposFr5,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRM5",2, "SQM4", xposFr5, yposFr5, zposFr5,0, "ONLY"); //...................................................................................... //Frame -6 @@ -550,21 +550,21 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() frame6[1] = 2.5/2.; frame6[2] = frame1[2]; - gMC->Gsvolu("SFRM6", "BOX", idPGF30, frame6, 3); + TVirtualMC::GetMC()->Gsvolu("SFRM6", "BOX", idPGF30, frame6, 3); Float_t rrib6[3]; rrib6[0] = frame6[0]; rrib6[1] = 1.5/2.; rrib6[2] =(frame2[2]-0.95)/2.0; - gMC->Gsvolu("SFRR6", "BOX", idRoha, rrib6, 3); + TVirtualMC::GetMC()->Gsvolu("SFRR6", "BOX", idRoha, rrib6, 3); Float_t xposrrib6 = 0.0; Float_t yposrrib6 = 1.0/2.0; Float_t zposrrib6 = frame6[2] - rrib6[2]; - gMC->Gspos("SFRR6",1, "SFRM6", xposrrib6, yposrrib6, zposrrib6,0, "ONLY"); - gMC->Gspos("SFRR6",2, "SFRM6", xposrrib6, yposrrib6, -zposrrib6,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR6",1, "SFRM6", xposrrib6, yposrrib6, zposrrib6,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR6",2, "SFRM6", xposrrib6, yposrrib6, -zposrrib6,0, "ONLY"); @@ -572,8 +572,8 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() Float_t yposFr6 = frame6[1] + 20.6; Float_t zposFr6 = 0.0; - gMC->Gspos("SFRM6",1, "SQM3", xposFr6, yposFr6, zposFr6,0, "ONLY"); - gMC->Gspos("SFRM6",2, "SQM4", xposFr6, yposFr6, zposFr6,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRM6",1, "SQM3", xposFr6, yposFr6, zposFr6,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRM6",2, "SQM4", xposFr6, yposFr6, zposFr6,0, "ONLY"); //...................................................................................... @@ -591,7 +591,7 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() pgparFr7[8] = pgparFr7[5]; pgparFr7[9] = pgparFr7[6]; - gMC->Gsvolu("SFRM7", "PGON", idPGF30, pgparFr7, 10); + TVirtualMC::GetMC()->Gsvolu("SFRM7", "PGON", idPGF30, pgparFr7, 10); Float_t pgparRrib7[10]; pgparRrib7[0] = 0.; @@ -605,24 +605,24 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() pgparRrib7[8] = pgparRrib7[5]; pgparRrib7[9] = pgparRrib7[6]; - gMC->Gsvolu("SFRR7", "PGON", idRoha, pgparRrib7, 10); + TVirtualMC::GetMC()->Gsvolu("SFRR7", "PGON", idRoha, pgparRrib7, 10); Float_t xposrrib7 = 0.0; Float_t yposrrib7 = 0.0; Float_t zposrrib7 = 0.0; - gMC->Gspos("SFRR7",1, "SFRM7", xposrrib7, yposrrib7, zposrrib7,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR7",1, "SFRM7", xposrrib7, yposrrib7, zposrrib7,0, "ONLY"); zposrrib7 = 3.45; - gMC->Gspos("SFRR7",2, "SFRM7", xposrrib7, yposrrib7, zposrrib7,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR7",2, "SFRM7", xposrrib7, yposrrib7, zposrrib7,0, "ONLY"); Float_t xposFr7 = 0.0; Float_t yposFr7 = 0.0; Float_t zposFr7 = -frame1[2]; - gMC->Gspos("SFRM7",1, "SQM3", xposFr7, yposFr7, zposFr7,0, "ONLY"); - gMC->Gspos("SFRM7",2, "SQM4", xposFr7, yposFr7, zposFr7,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRM7",1, "SQM3", xposFr7, yposFr7, zposFr7,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRM7",2, "SQM4", xposFr7, yposFr7, zposFr7,0, "ONLY"); //...................................................................................... @@ -634,21 +634,21 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() frame8[1] = 1.2/2.0; frame8[2] = frame1[2]; - gMC->Gsvolu("SFRM8", "BOX", idPGF30, frame8, 3); //Frame - 2 + TVirtualMC::GetMC()->Gsvolu("SFRM8", "BOX", idPGF30, frame8, 3); //Frame - 2 Float_t rrib8[3]; rrib8[0] = frame8[0]-1.0/2; rrib8[1] = frame8[1]; rrib8[2] =(frame8[2]-0.95)/2.0; - gMC->Gsvolu("SFRR8", "BOX", idRoha, rrib8, 3); + TVirtualMC::GetMC()->Gsvolu("SFRR8", "BOX", idRoha, rrib8, 3); Float_t xposrrib8 = -1.0/2; Float_t yposrrib8 = 0.0; Float_t zposrrib8 = frame8[2] - rrib8[2]; - gMC->Gspos("SFRR8",1, "SFRM8", xposrrib8, yposrrib8, zposrrib8,0, "ONLY"); - gMC->Gspos("SFRR8",2, "SFRM8", xposrrib8, yposrrib8, -zposrrib8,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR8",1, "SFRM8", xposrrib8, yposrrib8, zposrrib8,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRR8",2, "SFRM8", xposrrib8, yposrrib8, -zposrrib8,0, "ONLY"); @@ -656,8 +656,8 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() Float_t yposFr8 = -frame8[1]; Float_t zposFr8 = 0.0; - gMC->Gspos("SFRM8",1, "SQM3", xposFr8, yposFr8, zposFr8,0, "ONLY"); - gMC->Gspos("SFRM8",2, "SQM4", xposFr8, yposFr8, zposFr8,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRM8",1, "SQM3", xposFr8, yposFr8, zposFr8,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SFRM8",2, "SQM4", xposFr8, yposFr8, zposFr8,0, "ONLY"); @@ -670,8 +670,8 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() bparH[0] = 94.5/2.; bparH[1] = 1.2/2.; bparH[2] = zsenv/2.; - gMC->Gsvolu("SC3G0", "BOX", idGas, bparH, 3); - gMC->Gsvolu("SC4G0", "BOX", idGas, bparH, 3); + TVirtualMC::GetMC()->Gsvolu("SC3G0", "BOX", idGas, bparH, 3); + TVirtualMC::GetMC()->Gsvolu("SC4G0", "BOX", idGas, bparH, 3); //Segment-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pgpar[0] = 0.; @@ -684,8 +684,8 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() pgpar[7] = zsenv/2.; pgpar[8] = pgpar[5]; pgpar[9] = pgpar[6]; - gMC->Gsvolu("SC3G1", "PGON", idGas, pgpar, 10); - gMC->Gsvolu("SC4G1", "PGON", idGas, pgpar, 10); + TVirtualMC::GetMC()->Gsvolu("SC3G1", "PGON", idGas, pgpar, 10); + TVirtualMC::GetMC()->Gsvolu("SC4G1", "PGON", idGas, pgpar, 10); //Segment-2 - vertical box ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -693,8 +693,8 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() bparV[0] = 1.0/2.; bparV[1] = 95.5/2.; bparV[2] = zsenv/2.; - gMC->Gsvolu("SC3G2", "BOX", idGas, bparV, 3); - gMC->Gsvolu("SC4G2", "BOX", idGas, bparV, 3); + TVirtualMC::GetMC()->Gsvolu("SC3G2", "BOX", idGas, bparV, 3); + TVirtualMC::GetMC()->Gsvolu("SC4G2", "BOX", idGas, bparV, 3); //........................................................................................... @@ -704,14 +704,14 @@ void AliMUONSt2GeometryBuilderV2::CreateGeometry() xposVerBox = -bparV[0]; yposVerBox = bparV[1] + 23.1; - gMC->Gspos("SC3G0",1, "SQM3", xposHorBox,yposHorBox,0.,0, "ONLY"); - gMC->Gspos("SC3G1",1, "SQM3", 0.,0.,0.,0, "ONLY"); - gMC->Gspos("SC3G2",1, "SQM3", xposVerBox,yposVerBox,0.,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SC3G0",1, "SQM3", xposHorBox,yposHorBox,0.,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SC3G1",1, "SQM3", 0.,0.,0.,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SC3G2",1, "SQM3", xposVerBox,yposVerBox,0.,0, "ONLY"); - gMC->Gspos("SC4G0",1, "SQM4", xposHorBox,yposHorBox,0.,0, "ONLY"); - gMC->Gspos("SC4G1",1, "SQM4", 0.,0.,0.,0, "ONLY"); - gMC->Gspos("SC4G2",1, "SQM4", xposVerBox,yposVerBox,0.,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SC4G0",1, "SQM4", xposHorBox,yposHorBox,0.,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SC4G1",1, "SQM4", 0.,0.,0.,0, "ONLY"); + TVirtualMC::GetMC()->Gspos("SC4G2",1, "SQM4", xposVerBox,yposVerBox,0.,0, "ONLY"); //^^^^^^^^^^^^^^^^^^^^^^^^^ Sensitive volumes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/MUON/AliMUONTrackHitPattern.cxx b/MUON/AliMUONTrackHitPattern.cxx index 7c9d97d0125..b6614030785 100644 --- a/MUON/AliMUONTrackHitPattern.cxx +++ b/MUON/AliMUONTrackHitPattern.cxx @@ -929,7 +929,7 @@ Bool_t AliMUONTrackHitPattern::IsCloseToAccEdge(TObjArray& pads, Int_t detElemId AliMpArea* deArea = fkTransformer.GetDEArea(detElemId); Float_t dpx = ((AliMpPad*)pads.At(1))->GetDimensionX(); Float_t dpy = ((AliMpPad*)pads.At(0))->GetDimensionY(); - Float_t resolution[2] = { 0.75*dpx, 0.75*dpy }; + Float_t resolution[2] = { static_cast(0.75*dpx), static_cast(0.75*dpy) }; Float_t sign[3] = {0., 1., -1.}; for ( Int_t ineighx=0; ineighx<3; ineighx++ ) { for ( Int_t ineighy=0; ineighy<3; ineighy++ ) { @@ -960,9 +960,9 @@ Bool_t AliMUONTrackHitPattern::IsMasked(const AliMpPad& pad, Int_t detElemId, In TVector3 localCoor; PosInDetElemIdLocal(localCoor, vec11, vec21, detElemId); - Float_t padPos[2] = { pad.GetPositionX(), pad.GetPositionY()}; - Float_t padDim[2] = { pad.GetDimensionX(), pad.GetDimensionY()}; - Float_t inpactPos[2] = { localCoor.X(), localCoor.Y()}; + Float_t padPos[2] = { static_cast(pad.GetPositionX()), static_cast(pad.GetPositionY())}; + Float_t padDim[2] = { static_cast(pad.GetDimensionX()), static_cast(pad.GetDimensionY())}; + Float_t inpactPos[2] = { static_cast(localCoor.X()), static_cast(localCoor.Y())}; Float_t sign[2] = {-1., 1.}; Int_t icoor = 1-cathode; Int_t addSlatSign[3] = {0,1,-1}; diff --git a/MUON/AliMUONTriggerGeometryBuilder.cxx b/MUON/AliMUONTriggerGeometryBuilder.cxx index d34aa8af53a..de8ac7a6ae3 100644 --- a/MUON/AliMUONTriggerGeometryBuilder.cxx +++ b/MUON/AliMUONTriggerGeometryBuilder.cxx @@ -235,15 +235,15 @@ void AliMUONTriggerGeometryBuilder::BuildChamberPrototype(Int_t icount) const char volGaz[5]; // Gas streamer snprintf(volBak,5,"SB%dA",icount+1); snprintf(volGaz,5,"S%dG",icount+11); - gMC->Gsvolu(GetVolumeName("volAlu", icount),"BOX",fIdAlu1,tpar,0); // Al - gMC->Gsvolu(volBak,"BOX",fIdtmed[1107],tpar,0); // Bakelite - gMC->Gsvolu(volGaz,"BOX",fIdtmed[1106],tpar,0); // Gas streamer + TVirtualMC::GetMC()->Gsvolu(GetVolumeName("volAlu", icount),"BOX",fIdAlu1,tpar,0); // Al + TVirtualMC::GetMC()->Gsvolu(volBak,"BOX",fIdtmed[1107],tpar,0); // Bakelite + TVirtualMC::GetMC()->Gsvolu(volGaz,"BOX",fIdtmed[1106],tpar,0); // Gas streamer tpar[0] = -1.; tpar[1] = -1.; tpar[2] = 0.1; - gMC->Gsposp(volGaz,1,volBak,0.,0.,0.,0,"ONLY",tpar,3); + TVirtualMC::GetMC()->Gsposp(volGaz,1,volBak,0.,0.,0.,0,"ONLY",tpar,3); tpar[2] = 0.3; - gMC->Gsposp(volBak,1,GetVolumeName("volAlu", icount),0.,0.,0.,0,"ONLY",tpar,3); + TVirtualMC::GetMC()->Gsposp(volBak,1,GetVolumeName("volAlu", icount),0.,0.,0.,0,"ONLY",tpar,3); } //______________________________________________________________________________ @@ -263,12 +263,12 @@ void AliMUONTriggerGeometryBuilder::BuildRPCSupportsVertical(Int_t& iVolNum, Int tpar[0]= 0.; tpar[1]= 0.; tpar[2]= 0.; - gMC->Gsvolu(volAluSupport,"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(volAirSupport,"BOX",fIdAir,tpar,0); + TVirtualMC::GetMC()->Gsvolu(volAluSupport,"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(volAirSupport,"BOX",fIdAir,tpar,0); tpar[0]=fgkSizeVSupInt[0]; tpar[1]=fgkSizeVSupInt[1]; tpar[2]=-1.; - gMC->Gsposp(volAirSupport,1,volAluSupport,0.,0.,0.,0,"ONLY",tpar,3); + TVirtualMC::GetMC()->Gsposp(volAirSupport,1,volAluSupport,0.,0.,0.,0,"ONLY",tpar,3); TGeoRotation rsupportv; rsupportv.SetAngles(0.,90.,0.); @@ -305,12 +305,12 @@ void AliMUONTriggerGeometryBuilder::BuildRPCSupportsHorizontal(Int_t icount) con tpar[2]= 0.; TString volAluSupportH = GetVolumeName("volAluSupportH", icount); TString volAirSupportH = GetVolumeName("volAirSupportH", icount); - gMC->Gsvolu(volAluSupportH,"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(volAirSupportH,"BOX",fIdAir,tpar,0); + TVirtualMC::GetMC()->Gsvolu(volAluSupportH,"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(volAirSupportH,"BOX",fIdAir,tpar,0); tpar[0]=-1.; tpar[1]=1.9; tpar[2]=2.8; - gMC->Gsposp(volAirSupportH,1,volAluSupportH,0.,0.,0.,0,"ONLY",tpar,3); + TVirtualMC::GetMC()->Gsposp(volAirSupportH,1,volAluSupportH,0.,0.,0.,0,"ONLY",tpar,3); } //______________________________________________________________________________ @@ -322,16 +322,16 @@ void AliMUONTriggerGeometryBuilder::BuildAngularSupportForChambers(Int_t icount) tpar[0]= 0.; tpar[1]= 0.; tpar[2]= 0.; - gMC->Gsvolu(GetVolAluAngSuppName("1","V",icount),"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(GetVolAluAngSuppName("1","H",icount),"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(GetVolAluAngSuppName("2","V",icount),"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(GetVolAluAngSuppName("2","H",icount),"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(GetVolAluAngSuppName("3","V",icount),"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(GetVolAluAngSuppName("3","H",icount),"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(GetVolAluAngSuppName("4","V",icount),"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(GetVolAluAngSuppName("4","H",icount),"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(GetVolAluAngSuppName("X","V",icount),"BOX",fIdAlu1,tpar,0); - gMC->Gsvolu(GetVolAluAngSuppName("X","H",icount),"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(GetVolAluAngSuppName("1","V",icount),"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(GetVolAluAngSuppName("1","H",icount),"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(GetVolAluAngSuppName("2","V",icount),"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(GetVolAluAngSuppName("2","H",icount),"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(GetVolAluAngSuppName("3","V",icount),"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(GetVolAluAngSuppName("3","H",icount),"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(GetVolAluAngSuppName("4","V",icount),"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(GetVolAluAngSuppName("4","H",icount),"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(GetVolAluAngSuppName("X","V",icount),"BOX",fIdAlu1,tpar,0); + TVirtualMC::GetMC()->Gsvolu(GetVolAluAngSuppName("X","H",icount),"BOX",fIdAlu1,tpar,0); } //______________________________________________________________________________ @@ -343,7 +343,7 @@ void AliMUONTriggerGeometryBuilder::BuildGasPipes(Int_t icount) const tpar[0]= 0.; tpar[1]= 0.; tpar[2]= 0.; - gMC->Gsvolu(volInoxGasPipe,"TUBE",fIdInox,tpar,0); + TVirtualMC::GetMC()->Gsvolu(volInoxGasPipe,"TUBE",fIdInox,tpar,0); } //______________________________________________________________________________ @@ -2476,7 +2476,7 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry() par[1] = AliMUONConstants::Rmax(5+istation); Char_t volName[6]; snprintf(volName,6,"%s%d", "SC",11+icount); - gMC->Gsvolu(volName,"TUBE", fIdAir, par, 3); + TVirtualMC::GetMC()->Gsvolu(volName,"TUBE", fIdAir, par, 3); // chamber prototype BuildChamberPrototype(icount); diff --git a/MUON/AliMUONTriggerQAChecker.cxx b/MUON/AliMUONTriggerQAChecker.cxx index 5ff45df18fc..526da141d97 100644 --- a/MUON/AliMUONTriggerQAChecker.cxx +++ b/MUON/AliMUONTriggerQAChecker.cxx @@ -84,16 +84,16 @@ AliMUONTriggerQAChecker::CheckRaws(TObjArray** list, const AliMUONRecoParam* ) // BEGIN OF LIMITS // Fixme: Move me to reference histos Float_t safeFactor = 5.; - Float_t warningPercentTrigAlgo[AliMUONQAIndices::kNtrigAlgoErrorBins] = {safeFactor*1., safeFactor*1., safeFactor*1., 100., 100., 100., 100., safeFactor*1., safeFactor*1., safeFactor*1.}; - Float_t warningPercentCalib[AliMUONQAIndices::kNtrigCalibSummaryBins] = {safeFactor*0.4, safeFactor*1., 3.1, 0.0001, safeFactor*0.4}; - Float_t warningPercentReadout[AliMUONQAIndices::kNtrigStructErrorBins] = {safeFactor*1., safeFactor*1., safeFactor*1., safeFactor*1.}; + Float_t warningPercentTrigAlgo[AliMUONQAIndices::kNtrigAlgoErrorBins] = {static_cast(safeFactor*1.), static_cast(safeFactor*1.), static_cast(safeFactor*1.), 100., 100., 100., 100., static_cast(safeFactor*1.), static_cast(safeFactor*1.), static_cast(safeFactor*1.)}; + Float_t warningPercentCalib[AliMUONQAIndices::kNtrigCalibSummaryBins] = {static_cast(safeFactor*0.4), static_cast(safeFactor*1.), 3.1, 0.0001, static_cast(safeFactor*0.4)}; + Float_t warningPercentReadout[AliMUONQAIndices::kNtrigStructErrorBins] = {static_cast(safeFactor*1.), static_cast(safeFactor*1.), static_cast(safeFactor*1.), static_cast(safeFactor*1.)}; Float_t* warningPercent[kNrawsHistos] = {warningPercentTrigAlgo, warningPercentCalib, warningPercentReadout}; Float_t errorFactor = 30.; - Float_t errorPercentTrigAlgo[AliMUONQAIndices::kNtrigAlgoErrorBins] = {errorFactor*1., errorFactor*1., errorFactor*1., 100., 100., 100., 100., errorFactor*1., errorFactor*1., errorFactor*1.}; - Float_t errorPercentCalib[AliMUONQAIndices::kNtrigCalibSummaryBins] = {errorFactor*0.4, errorFactor*1., 6.2, 3.*0.0001, errorFactor*0.4}; - Float_t errorPercentReadout[AliMUONQAIndices::kNtrigStructErrorBins] = {errorFactor*1., errorFactor*1., errorFactor*1., errorFactor*1.}; + Float_t errorPercentTrigAlgo[AliMUONQAIndices::kNtrigAlgoErrorBins] = {static_cast(errorFactor*1.), static_cast(errorFactor*1.), static_cast(errorFactor*1.), 100., 100., 100., 100., static_cast(errorFactor*1.), static_cast(errorFactor*1.), static_cast(errorFactor*1.)}; + Float_t errorPercentCalib[AliMUONQAIndices::kNtrigCalibSummaryBins] = {static_cast(errorFactor*0.4), static_cast(errorFactor*1.), 6.2, 3.*0.0001, static_cast(errorFactor*0.4)}; + Float_t errorPercentReadout[AliMUONQAIndices::kNtrigStructErrorBins] = {static_cast(errorFactor*1.), static_cast(errorFactor*1.), static_cast(errorFactor*1.), static_cast(errorFactor*1.)}; // END OF LIMTS Float_t* errorPercent[kNrawsHistos] = {errorPercentTrigAlgo, errorPercentCalib, errorPercentReadout}; diff --git a/MUON/AliMUONTriggerQADataMakerRec.cxx b/MUON/AliMUONTriggerQADataMakerRec.cxx index 79e7d7b4d2f..454e9d6b3fd 100644 --- a/MUON/AliMUONTriggerQADataMakerRec.cxx +++ b/MUON/AliMUONTriggerQADataMakerRec.cxx @@ -789,9 +789,9 @@ void AliMUONTriggerQADataMakerRec::MakeRaws(AliRawReader* rawReader) Float_t readoutErrors[AliMUONQAIndices::kNtrigStructErrorBins] = { countAllBoards>0?((Float_t)rawStreamTrig.GetLocalEoWErrors())/((Float_t)countAllBoards):0, - ((Float_t)rawStreamTrig.GetRegEoWErrors())/16., - ((Float_t)rawStreamTrig.GetGlobalEoWErrors())/6., - ((Float_t)rawStreamTrig.GetDarcEoWErrors())/2. + static_cast(((Float_t)rawStreamTrig.GetRegEoWErrors())/16.), + static_cast(((Float_t)rawStreamTrig.GetGlobalEoWErrors())/6.), + static_cast(((Float_t)rawStreamTrig.GetDarcEoWErrors())/2.) }; for (Int_t ibin=0; ibin((Float_t)nDeadRegional / 16.), + static_cast((Float_t)nDeadGlobal / 6.), // Number of bits of global response (Float_t)nNoisyStrips / ((Float_t)nStripsTot), }; diff --git a/MUON/AliMUONVGeometryBuilder.cxx b/MUON/AliMUONVGeometryBuilder.cxx index 74f3538b363..138b4eab837 100644 --- a/MUON/AliMUONVGeometryBuilder.cxx +++ b/MUON/AliMUONVGeometryBuilder.cxx @@ -143,7 +143,7 @@ void AliMUONVGeometryBuilder::MapSV(const TString& path0, Int_t moduleId = AliMpDEManager::GetGeomModuleId(detElemId); AliMUONStringIntMap* svMap = GetSVMap(moduleId); - Int_t nofDaughters = gMC->NofVolDaughters(volName); + Int_t nofDaughters = TVirtualMC::GetMC()->NofVolDaughters(volName); if (nofDaughters == 0) { // Get the name of the last volume in the path @@ -165,8 +165,8 @@ void AliMUONVGeometryBuilder::MapSV(const TString& path0, } for (Int_t i=0; iVolDaughterCopyNo(volName, i); - TString newName = gMC->VolDaughterName(volName, i); + Int_t copyNo = TVirtualMC::GetMC()->VolDaughterCopyNo(volName, i); + TString newName = TVirtualMC::GetMC()->VolDaughterName(volName, i); TString path = path0; path += ComposePath(newName, copyNo); diff --git a/MUON/AliMUONv1.cxx b/MUON/AliMUONv1.cxx index d25249e1714..d63983d8e1e 100644 --- a/MUON/AliMUONv1.cxx +++ b/MUON/AliMUONv1.cxx @@ -234,15 +234,15 @@ Int_t AliMUONv1::GetGeomModuleId(Int_t volId) const TString AliMUONv1::CurrentVolumePath() const { /// Return current volume path -/// (Could be removed when this function is available via gMC) +/// (Could be removed when this function is available via TVirtualMC::GetMC()) TString path = ""; TString name; Int_t copyNo; Int_t imother = 0; do { - name = gMC->CurrentVolOffName(imother); - gMC->CurrentVolOffID(imother++, copyNo); + name = TVirtualMC::GetMC()->CurrentVolOffName(imother); + TVirtualMC::GetMC()->CurrentVolOffID(imother++, copyNo); TString add = "/"; add += name; add += "_"; @@ -260,7 +260,7 @@ void AliMUONv1::StepManager() /// Step manager for the chambers // Only charged tracks - if( !(gMC->TrackCharge()) ) return; + if( !(TVirtualMC::GetMC()->TrackCharge()) ) return; // Only charged tracks // Only gas gap inside chamber @@ -273,7 +273,7 @@ void AliMUONv1::StepManager() // // Only gas gap inside chamber // Tag chambers and record hits when track enters - Int_t id=gMC->CurrentVolID(copy); + Int_t id=TVirtualMC::GetMC()->CurrentVolID(copy); Int_t iGeomModule = GetGeomModuleId(id); if (iGeomModule == -1) return; @@ -304,7 +304,7 @@ void AliMUONv1::StepManager() << setw(5) << detElemId << endl; Double_t x, y, z; - gMC->TrackPosition(x, y, z); + TVirtualMC::GetMC()->TrackPosition(x, y, z); AliErrorStream() << " global position: " << x << ", " << y << ", " << z @@ -316,54 +316,54 @@ void AliMUONv1::StepManager() idvol = iChamber -1; // Filling TrackRefs file for MUON. Our Track references are the active volume of the chambers - if ( (gMC->IsTrackEntering() || gMC->IsTrackExiting() ) ) { + if ( (TVirtualMC::GetMC()->IsTrackEntering() || TVirtualMC::GetMC()->IsTrackExiting() ) ) { AliTrackReference* trackReference = AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kMUON); trackReference->SetUserId(detElemId); } - if( gMC->IsTrackEntering() ) { + if( TVirtualMC::GetMC()->IsTrackEntering() ) { Float_t theta = fTrackMomentum.Theta(); if ( fIsMaxStep && (TMath::Pi()-theta)*kRaddeg>=15. ) { - gMC->SetMaxStep(fStepMaxInActiveGas); // We use Pi-theta because z is negative + TVirtualMC::GetMC()->SetMaxStep(fStepMaxInActiveGas); // We use Pi-theta because z is negative } iEnter = 1; - gMC->TrackPosition(xyzEnter[0], xyzEnter[1], xyzEnter[2]); // save coordinates of entrance point + TVirtualMC::GetMC()->TrackPosition(xyzEnter[0], xyzEnter[1], xyzEnter[2]); // save coordinates of entrance point } // AliDebug(1, // Form("Active volume found %d chamber %d Z chamber is %f ",idvol,iChamber, // ( (AliMUONChamber*)(*fChambers)[idvol])->Z())) ; // Particule id and mass, - Int_t ipart = gMC->TrackPid(); - Float_t mass = gMC->TrackMass(); + Int_t ipart = TVirtualMC::GetMC()->TrackPid(); + Float_t mass = TVirtualMC::GetMC()->TrackMass(); - fDestepSum[idvol]+=gMC->Edep(); + fDestepSum[idvol]+=TVirtualMC::GetMC()->Edep(); // Get current particle id (ipart), track position (pos) and momentum (mom) - if ( fStepSum[idvol]==0.0 ) gMC->TrackMomentum(fTrackMomentum); - fStepSum[idvol]+=gMC->TrackStep(); + if ( fStepSum[idvol]==0.0 ) TVirtualMC::GetMC()->TrackMomentum(fTrackMomentum); + fStepSum[idvol]+=TVirtualMC::GetMC()->TrackStep(); // if (AliDebugLevel()) { // AliDebug(1,Form("Step, iChamber %d, Particle %d, theta %f phi %f mass %f StepSum %f eloss %g", // iChamber,ipart, fTrackMomentum.Theta()*kRaddeg, fTrackMomentum.Phi()*kRaddeg, - // mass, fStepSum[idvol], gMC->Edep())); + // mass, fStepSum[idvol], TVirtualMC::GetMC()->Edep())); // AliDebug(1,Form("Step:Track Momentum %f %f %f", fTrackMomentum.X(), fTrackMomentum.Y(), // fTrackMomentum.Z())); - // gMC->TrackPosition(fTrackPosition); + // TVirtualMC::GetMC()->TrackPosition(fTrackPosition); // AliDebug(1,Form("Step: Track Position %f %f %f",fTrackPosition.X(), // fTrackPosition.Y(),fTrackPosition.Z())) ; //} // Track left chamber or StepSum larger than fStepMaxInActiveGas - if ( gMC->IsTrackExiting() || - gMC->IsTrackStop() || - gMC->IsTrackDisappeared()|| + if ( TVirtualMC::GetMC()->IsTrackExiting() || + TVirtualMC::GetMC()->IsTrackStop() || + TVirtualMC::GetMC()->IsTrackDisappeared()|| (fStepSum[idvol]>fStepMaxInActiveGas) ) { if ( fIsMaxStep && - ( gMC->IsTrackExiting() || - gMC->IsTrackStop() || - gMC->IsTrackDisappeared() ) ) gMC->SetMaxStep(kBig); + ( TVirtualMC::GetMC()->IsTrackExiting() || + TVirtualMC::GetMC()->IsTrackStop() || + TVirtualMC::GetMC()->IsTrackDisappeared() ) ) TVirtualMC::GetMC()->SetMaxStep(kBig); if (fDestepSum[idvol] == 0) { // AZ - no energy release fStepSum[idvol] = 0; // Reset for the next event @@ -371,13 +371,13 @@ void AliMUONv1::StepManager() return; } - gMC->TrackPosition(fTrackPosition); + TVirtualMC::GetMC()->TrackPosition(fTrackPosition); Float_t theta = fTrackMomentum.Theta(); Float_t phi = fTrackMomentum.Phi(); Int_t merge = 0; Double_t xyz0[3]={0}, xyz1[3]={0}, tmp[3]={0}; - if (gMC->IsTrackExiting() && iEnter != 0) { + if (TVirtualMC::GetMC()->IsTrackExiting() && iEnter != 0) { // AZ - this code is to avoid artificial hit splitting at the // "fake" boundary inside the same chamber. It will still produce // 2 hits but with the same coordinates (at the wire) to allow @@ -385,10 +385,10 @@ void AliMUONv1::StepManager() // Only for a track going from the entrance to the exit from the volume // Get local coordinates - gMC->Gmtod(xyzEnter, xyz0, 1); // local coord. at the entrance + TVirtualMC::GetMC()->Gmtod(xyzEnter, xyz0, 1); // local coord. at the entrance fTrackPosition.Vect().GetXYZ(tmp); - gMC->Gmtod(tmp, xyz1, 1); // local coord. at the exit + TVirtualMC::GetMC()->Gmtod(tmp, xyz1, 1); // local coord. at the exit Float_t dx = xyz0[0] - xyz1[0]; Float_t dy = xyz0[1] - xyz1[1]; Float_t thLoc = TMath::ATan2 (TMath::Sqrt(dx*dx+dy*dy), TMath::Abs(xyz0[2]-xyz1[2])); @@ -401,14 +401,14 @@ void AliMUONv1::StepManager() tmp[0] = xyz0[0] - (xyz1[0] - xyz0[0]) * dz; // local coord. at the wire tmp[1] = xyz0[1] - (xyz1[1] - xyz0[1]) * dz; tmp[2] = xyz0[2] - (xyz1[2] - xyz0[2]) * dz; - gMC->Gdtom(tmp, xyz1, 1); // global coord. at the wire + TVirtualMC::GetMC()->Gdtom(tmp, xyz1, 1); // global coord. at the wire fTrackPosition.SetXYZT(xyz1[0], xyz1[1], xyz1[2], fTrackPosition.T()); } else { TLorentzVector backToWire( fStepSum[idvol]/2.*sin(theta)*cos(phi), fStepSum[idvol]/2.*sin(theta)*sin(phi), fStepSum[idvol]/2.*cos(theta),0.0 ); fTrackPosition-=backToWire; - //printf(" %d %d %d %f %d \n", gMC->IsTrackExiting(), gMC->IsTrackStop(), gMC->IsTrackDisappeared(), fStepSum[idvol], iEnter); + //printf(" %d %d %d %f %d \n", TVirtualMC::GetMC()->IsTrackExiting(), TVirtualMC::GetMC()->IsTrackStop(), TVirtualMC::GetMC()->IsTrackDisappeared(), fStepSum[idvol], iEnter); // AliDebug(1, // Form("Track Position %f %f %f",fTrackPosition.X(),fTrackPosition.Y(),fTrackPosition.Z())); // AliDebug(1, @@ -462,7 +462,7 @@ void AliMUONv1::StepManager() fTrackPosition.X(), fTrackPosition.Y()+yAngleEffect, fTrackPosition.Z(), - gMC->TrackTime(), + TVirtualMC::GetMC()->TrackTime(), fTrackMomentum.P(), theta, phi, diff --git a/PHOS/AliPHOSDebug.cxx b/PHOS/AliPHOSDebug.cxx index 1737a6c6f2e..eeb4c6de49d 100644 --- a/PHOS/AliPHOSDebug.cxx +++ b/PHOS/AliPHOSDebug.cxx @@ -510,30 +510,30 @@ void AliPHOSv1::StepManager(void) TString name = GetGeometry()->GetName() ; Int_t trackpid = 0 ; - if( gMC->IsTrackEntering() ){ // create hit with position and momentum of new particle, + if( TVirtualMC::GetMC()->IsTrackEntering() ){ // create hit with position and momentum of new particle, // but may be without energy deposition // Current position of the hit in the local ref. system - 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 xyd[0] = xyzd[0]; xyd[1] =-xyzd[1]; xyd[2] =-xyzd[2]; // Current momentum of the hit's track in the local ref. system - 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]; - trackpid = gMC->TrackPid(); + trackpid = TVirtualMC::GetMC()->TrackPid(); entered = kTRUE ; // Mark to create hit even withou energy deposition } @@ -543,17 +543,17 @@ void AliPHOSv1::StepManager(void) // Yuri Kharlov, 28 September 2000 - static Int_t idPCPQ = gMC->VolId("PCPQ"); - if( gMC->CurrentVolID(copy) == idPCPQ && + static Int_t idPCPQ = TVirtualMC::GetMC()->VolId("PCPQ"); + if( TVirtualMC::GetMC()->CurrentVolID(copy) == idPCPQ && entered && - gMC->TrackCharge() != 0) { + TVirtualMC::GetMC()->TrackCharge() != 0) { // Digitize the current CPV hit: // 1. find pad response and Int_t moduleNumber; - gMC->CurrentVolOffID(3,moduleNumber); + TVirtualMC::GetMC()->CurrentVolOffID(3,moduleNumber); moduleNumber--; @@ -617,21 +617,21 @@ void AliPHOSv1::StepManager(void) } // end of IHEP configuration - if(gMC->CurrentVolID(copy) == gMC->VolId("PXTL") ) { // We are inside a PBWO crystal - gMC->TrackPosition(pos) ; + if(TVirtualMC::GetMC()->CurrentVolID(copy) == TVirtualMC::GetMC()->VolId("PXTL") ) { // We are inside a PBWO crystal + TVirtualMC::GetMC()->TrackPosition(pos) ; xyze[0] = pos[0] ; xyze[1] = pos[1] ; xyze[2] = pos[2] ; - xyze[3] = gMC->Edep() ; + xyze[3] = TVirtualMC::GetMC()->Edep() ; if ( (xyze[3] != 0) || entered ) { // Track is inside the crystal and deposits some energy or just entered - gMC->CurrentVolOffID(10, relid[0]) ; // get the PHOS module number ; + TVirtualMC::GetMC()->CurrentVolOffID(10, relid[0]) ; // get the PHOS module number ; relid[1] = 0 ; // means PBW04 - gMC->CurrentVolOffID(4, relid[2]) ; // get the row number inside the module - gMC->CurrentVolOffID(3, relid[3]) ; // get the cell number inside the module + TVirtualMC::GetMC()->CurrentVolOffID(4, relid[2]) ; // get the row number inside the module + TVirtualMC::GetMC()->CurrentVolOffID(3, relid[3]) ; // get the cell number inside the module // get the absolute Id number GetGeometry()->RelToAbsNumbering(relid, absid) ; diff --git a/PHOS/AliPHOSv0.cxx b/PHOS/AliPHOSv0.cxx index b7b491d1183..2341f1f6993 100644 --- a/PHOS/AliPHOSv0.cxx +++ b/PHOS/AliPHOSv0.cxx @@ -135,7 +135,7 @@ void AliPHOSv0::CreateGeometry() // Create a PHOS module. - gMC->Gsvolu("PHOS", "TRD1", idtmed[798], geom->GetPHOSParams(), 4) ; + TVirtualMC::GetMC()->Gsvolu("PHOS", "TRD1", idtmed[798], geom->GetPHOSParams(), 4) ; this->CreateGeometryforEMC() ; @@ -166,7 +166,7 @@ void AliPHOSv0::CreateGeometry() Float_t pos[3]; for (iXYZ=0; iXYZ<3; iXYZ++) pos[iXYZ] = geom->GetModuleCenter(iModule,iXYZ); - gMC->Gspos("PHOS", iModule+1, "ALIC", pos[0], pos[1], pos[2], + TVirtualMC::GetMC()->Gspos("PHOS", iModule+1, "ALIC", pos[0], pos[1], pos[2], idrotm[iModule], "ONLY") ; } if(!anyModuleCreated) @@ -205,37 +205,37 @@ void AliPHOSv0::CreateGeometryforEMC() // ======= Define the strip =============== for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetStripHalfSize() + ipar); - gMC->Gsvolu("PSTR", "BOX ", idtmed[716], par, 3) ; //Made of steel + TVirtualMC::GetMC()->Gsvolu("PSTR", "BOX ", idtmed[716], par, 3) ; //Made of steel // --- define steel volume (cell of the strip unit) for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetAirCellHalfSize() + ipar); - gMC->Gsvolu("PCEL", "BOX ", idtmed[798], par, 3); + TVirtualMC::GetMC()->Gsvolu("PCEL", "BOX ", idtmed[798], par, 3); // --- define wrapped crystal and put it into steel cell for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetWrappedHalfSize() + ipar); - gMC->Gsvolu("PWRA", "BOX ", idtmed[702], par, 3); + TVirtualMC::GetMC()->Gsvolu("PWRA", "BOX ", idtmed[702], par, 3); const Float_t * pin = emcg->GetAPDHalfSize() ; const Float_t * preamp = emcg->GetPreampHalfSize() ; Float_t y = (emcg->GetAirGapLed()-2*pin[1]-2*preamp[1])/2; - gMC->Gspos("PWRA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PWRA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; // --- Define crystal and put it into wrapped crystall --- for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetCrystalHalfSize() + ipar); - gMC->Gsvolu("PXTL", "BOX ", idtmed[699], par, 3) ; - gMC->Gspos("PXTL", 1, "PWRA", 0.0, 0.0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gsvolu("PXTL", "BOX ", idtmed[699], par, 3) ; + TVirtualMC::GetMC()->Gspos("PXTL", 1, "PWRA", 0.0, 0.0, 0.0, 0, "ONLY") ; // --- define APD/PIN preamp and put it into AirCell for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetAPDHalfSize() + ipar); - gMC->Gsvolu("PPIN", "BOX ", idtmed[705], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PPIN", "BOX ", idtmed[705], par, 3) ; const Float_t * crystal = emcg->GetCrystalHalfSize() ; y = crystal[1] + emcg->GetAirGapLed() /2 - preamp[1]; - gMC->Gspos("PPIN", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PPIN", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetPreampHalfSize() + ipar); - gMC->Gsvolu("PREA", "BOX ", idtmed[711], par, 3) ; // Here I assumed preamp as a printed Circuit + TVirtualMC::GetMC()->Gsvolu("PREA", "BOX ", idtmed[711], par, 3) ; // Here I assumed preamp as a printed Circuit y = crystal[1] + emcg->GetAirGapLed() /2 + pin[1] ; // May it should be changed - gMC->Gspos("PREA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; // to ceramics? + TVirtualMC::GetMC()->Gspos("PREA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY") ; // to ceramics? // --- Fill strip with wrapped cristals in steel cells @@ -249,26 +249,26 @@ void AliPHOSv0::CreateGeometryforEMC() icel += 2, lev += 2) { Float_t x = (2*(lev / 2) - 1 - emcg->GetNCellsXInStrip())* acel[0] ; Float_t z = acel[2]; - gMC->Gspos("PCEL", icel, "PSTR", x, y, +z, 0, "ONLY") ; - gMC->Gspos("PCEL", icel + 1, "PSTR", x, y, -z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PCEL", icel, "PSTR", x, y, +z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PCEL", icel + 1, "PSTR", x, y, -z, 0, "ONLY") ; } // --- define the support plate, hole in it and position it in strip ---- for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetSupportPlateHalfSize() + ipar); - gMC->Gsvolu("PSUP", "BOX ", idtmed[701], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PSUP", "BOX ", idtmed[701], par, 3) ; for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetSupportPlateInHalfSize() + ipar); - gMC->Gsvolu("PSHO", "BOX ", idtmed[798], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PSHO", "BOX ", idtmed[798], par, 3) ; Float_t z = emcg->GetSupportPlateThickness()/2 ; - gMC->Gspos("PSHO", 1, "PSUP", 0.0, 0.0, z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PSHO", 1, "PSUP", 0.0, 0.0, z, 0, "ONLY") ; y = acel[1] ; - gMC->Gspos("PSUP", 1, "PSTR", 0.0, y, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PSUP", 1, "PSTR", 0.0, y, 0.0, 0, "ONLY") ; // ========== Fill module with strips and put them into inner thermoinsulation============= for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetInnerThermoHalfSize() + ipar); - gMC->Gsvolu("PTII", "BOX ", idtmed[706], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PTII", "BOX ", idtmed[706], par, 3) ; const Float_t * inthermo = emcg->GetInnerThermoHalfSize() ; const Float_t * strip = emcg->GetStripHalfSize() ; @@ -281,7 +281,7 @@ void AliPHOSv0::CreateGeometryforEMC() Float_t x = (2*irow + 1 - emcg->GetNStripX())* strip[0] ; for(icol = 0; icol < emcg->GetNStripZ(); icol ++){ z = (2*icol + 1 - emcg->GetNStripZ()) * strip[2] ; - gMC->Gspos("PSTR", nr, "PTII", x, y, z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PSTR", nr, "PTII", x, y, z, 0, "ONLY") ; nr++ ; } } @@ -289,24 +289,24 @@ void AliPHOSv0::CreateGeometryforEMC() // ------- define the air gap between thermoinsulation and cooler for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetAirGapHalfSize() + ipar); - gMC->Gsvolu("PAGA", "BOX ", idtmed[798], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PAGA", "BOX ", idtmed[798], par, 3) ; const Float_t * agap = emcg->GetAirGapHalfSize() ; y = agap[1] - inthermo[1] ; - gMC->Gspos("PTII", 1, "PAGA", 0.0, y, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PTII", 1, "PAGA", 0.0, y, 0.0, 0, "ONLY") ; // ------- define the Al passive cooler for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetCoolerHalfSize() + ipar); - gMC->Gsvolu("PCOR", "BOX ", idtmed[701], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PCOR", "BOX ", idtmed[701], par, 3) ; const Float_t * cooler = emcg->GetCoolerHalfSize() ; y = cooler[1] - agap[1] ; - gMC->Gspos("PAGA", 1, "PCOR", 0.0, y, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PAGA", 1, "PCOR", 0.0, y, 0.0, 0, "ONLY") ; // ------- define the outer thermoinsulating cover for (ipar=0; ipar<4; ipar++) par[ipar] = *(emcg->GetOuterThermoParams() + ipar); - gMC->Gsvolu("PTIO", "TRD1", idtmed[706], par, 4) ; + TVirtualMC::GetMC()->Gsvolu("PTIO", "TRD1", idtmed[706], par, 4) ; const Float_t * outparams = emcg->GetOuterThermoParams() ; Int_t idrotm[99] ; @@ -314,128 +314,128 @@ void AliPHOSv0::CreateGeometryforEMC() // Frame in outer thermoinsulation and so on: z out of beam, y along beam, x across beam z = outparams[3] - cooler[1] ; - gMC->Gspos("PCOR", 1, "PTIO", 0., 0.0, z, idrotm[1], "ONLY") ; + TVirtualMC::GetMC()->Gspos("PCOR", 1, "PTIO", 0., 0.0, z, idrotm[1], "ONLY") ; // -------- Define the outer Aluminium cover ----- for (ipar=0; ipar<4; ipar++) par[ipar] = *(emcg->GetAlCoverParams() + ipar); - gMC->Gsvolu("PCOL", "TRD1", idtmed[701], par, 4) ; + TVirtualMC::GetMC()->Gsvolu("PCOL", "TRD1", idtmed[701], par, 4) ; const Float_t * covparams = emcg->GetAlCoverParams() ; z = covparams[3] - outparams[3] ; - gMC->Gspos("PTIO", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PTIO", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ; // --------- Define front fiberglass cover ----------- for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetFiberGlassHalfSize() + ipar); - gMC->Gsvolu("PFGC", "BOX ", idtmed[717], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PFGC", "BOX ", idtmed[717], par, 3) ; z = - outparams[3] ; - gMC->Gspos("PFGC", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFGC", 1, "PCOL", 0., 0.0, z, 0, "ONLY") ; //=============This is all with cold section============== //------ Warm Section -------------- for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetWarmAlCoverHalfSize() + ipar); - gMC->Gsvolu("PWAR", "BOX ", idtmed[701], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PWAR", "BOX ", idtmed[701], par, 3) ; const Float_t * warmcov = emcg->GetWarmAlCoverHalfSize() ; // --- Define the outer thermoinsulation --- for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetWarmThermoHalfSize() + ipar); - gMC->Gsvolu("PWTI", "BOX ", idtmed[706], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PWTI", "BOX ", idtmed[706], par, 3) ; const Float_t * warmthermo = emcg->GetWarmThermoHalfSize() ; z = -warmcov[2] + warmthermo[2] ; - gMC->Gspos("PWTI", 1, "PWAR", 0., 0.0, z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PWTI", 1, "PWAR", 0., 0.0, z, 0, "ONLY") ; // --- Define cables area and put in it T-supports ---- for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetTCables1HalfSize() + ipar); - gMC->Gsvolu("PCA1", "BOX ", idtmed[718], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PCA1", "BOX ", idtmed[718], par, 3) ; const Float_t * cbox = emcg->GetTCables1HalfSize() ; for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetTSupport1HalfSize() + ipar); - gMC->Gsvolu("PBE1", "BOX ", idtmed[701], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PBE1", "BOX ", idtmed[701], par, 3) ; const Float_t * beams = emcg->GetTSupport1HalfSize() ; Int_t isup ; for(isup = 0; isup < emcg->GetNTSuppots(); isup++){ Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ; - gMC->Gspos("PBE1", isup, "PCA1", x, 0.0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PBE1", isup, "PCA1", x, 0.0, 0.0, 0, "ONLY") ; } z = -warmthermo[2] + cbox[2]; - gMC->Gspos("PCA1", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PCA1", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ; for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetTCables2HalfSize() + ipar); - gMC->Gsvolu("PCA2", "BOX ", idtmed[718], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PCA2", "BOX ", idtmed[718], par, 3) ; const Float_t * cbox2 = emcg->GetTCables2HalfSize() ; for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetTSupport2HalfSize() + ipar); - gMC->Gsvolu("PBE2", "BOX ", idtmed[701], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PBE2", "BOX ", idtmed[701], par, 3) ; for(isup = 0; isup < emcg->GetNTSuppots(); isup++){ Float_t x = -cbox[0] + beams[0] + (2*beams[0]+emcg->GetTSupportDist())*isup ; - gMC->Gspos("PBE2", isup, "PCA2", x, 0.0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PBE2", isup, "PCA2", x, 0.0, 0.0, 0, "ONLY") ; } z = -warmthermo[2] + 2*cbox[2] + cbox2[2]; - gMC->Gspos("PCA2", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PCA2", 1, "PWTI", 0.0, 0.0, z, 0, "ONLY") ; // --- Define frame --- for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetFrameXHalfSize() + ipar); - gMC->Gsvolu("PFRX", "BOX ", idtmed[716], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PFRX", "BOX ", idtmed[716], par, 3) ; const Float_t * posit1 = emcg->GetFrameXPosition() ; - gMC->Gspos("PFRX", 1, "PWTI", posit1[0], posit1[1], posit1[2], 0, "ONLY") ; - gMC->Gspos("PFRX", 2, "PWTI", posit1[0], -posit1[1], posit1[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFRX", 1, "PWTI", posit1[0], posit1[1], posit1[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFRX", 2, "PWTI", posit1[0], -posit1[1], posit1[2], 0, "ONLY") ; for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetFrameZHalfSize() + ipar); - gMC->Gsvolu("PFRZ", "BOX ", idtmed[716], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PFRZ", "BOX ", idtmed[716], par, 3) ; const Float_t * posit2 = emcg->GetFrameZPosition() ; - gMC->Gspos("PFRZ", 1, "PWTI", posit2[0], posit2[1], posit2[2], 0, "ONLY") ; - gMC->Gspos("PFRZ", 2, "PWTI", -posit2[0], posit2[1], posit2[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFRZ", 1, "PWTI", posit2[0], posit2[1], posit2[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFRZ", 2, "PWTI", -posit2[0], posit2[1], posit2[2], 0, "ONLY") ; // --- Define Fiber Glass support --- for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetFGupXHalfSize() + ipar); - gMC->Gsvolu("PFG1", "BOX ", idtmed[717], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PFG1", "BOX ", idtmed[717], par, 3) ; const Float_t * posit3 = emcg->GetFGupXPosition() ; - gMC->Gspos("PFG1", 1, "PWTI", posit3[0], posit3[1], posit3[2], 0, "ONLY") ; - gMC->Gspos("PFG1", 2, "PWTI", posit3[0], -posit3[1], posit3[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFG1", 1, "PWTI", posit3[0], posit3[1], posit3[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFG1", 2, "PWTI", posit3[0], -posit3[1], posit3[2], 0, "ONLY") ; for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetFGupZHalfSize() + ipar); - gMC->Gsvolu("PFG2", "BOX ", idtmed[717], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PFG2", "BOX ", idtmed[717], par, 3) ; const Float_t * posit4 = emcg->GetFGupZPosition(); - gMC->Gspos("PFG2", 1, "PWTI", posit4[0], posit4[1], posit4[2], 0, "ONLY") ; - gMC->Gspos("PFG2", 2, "PWTI", -posit4[0], posit4[1], posit4[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFG2", 1, "PWTI", posit4[0], posit4[1], posit4[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFG2", 2, "PWTI", -posit4[0], posit4[1], posit4[2], 0, "ONLY") ; for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetFGlowXHalfSize() + ipar); - gMC->Gsvolu("PFG3", "BOX ", idtmed[717], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PFG3", "BOX ", idtmed[717], par, 3) ; const Float_t * posit5 = emcg->GetFGlowXPosition() ; - gMC->Gspos("PFG3", 1, "PWTI", posit5[0], posit5[1], posit5[2], 0, "ONLY") ; - gMC->Gspos("PFG3", 2, "PWTI", posit5[0], -posit5[1], posit5[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFG3", 1, "PWTI", posit5[0], posit5[1], posit5[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFG3", 2, "PWTI", posit5[0], -posit5[1], posit5[2], 0, "ONLY") ; for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetFGlowZHalfSize() + ipar); - gMC->Gsvolu("PFG4", "BOX ", idtmed[717], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PFG4", "BOX ", idtmed[717], par, 3) ; const Float_t * posit6 = emcg->GetFGlowZPosition() ; - gMC->Gspos("PFG4", 1, "PWTI", posit6[0], posit6[1], posit6[2], 0, "ONLY") ; - gMC->Gspos("PFG4", 2, "PWTI", -posit6[0], posit6[1], posit6[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFG4", 1, "PWTI", posit6[0], posit6[1], posit6[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PFG4", 2, "PWTI", -posit6[0], posit6[1], posit6[2], 0, "ONLY") ; // --- Define Air Gap for FEE electronics ----- for (ipar=0; ipar<3; ipar++) par[ipar] = *(emcg->GetFEEAirHalfSize() + ipar); - gMC->Gsvolu("PAFE", "BOX ", idtmed[798], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PAFE", "BOX ", idtmed[798], par, 3) ; const Float_t * posit7 = emcg->GetFEEAirPosition() ; - gMC->Gspos("PAFE", 1, "PWTI", posit7[0], posit7[1], posit7[2], 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PAFE", 1, "PWTI", posit7[0], posit7[1], posit7[2], 0, "ONLY") ; // Define the EMC module volume and combine Cool and Warm sections for (ipar=0; ipar<4; ipar++) par[ipar] = *(emcg->GetEMCParams() + ipar); - gMC->Gsvolu("PEMC", "TRD1", idtmed[798], par, 4) ; + TVirtualMC::GetMC()->Gsvolu("PEMC", "TRD1", idtmed[798], par, 4) ; z = - warmcov[2] ; - gMC->Gspos("PCOL", 1, "PEMC", 0., 0., z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PCOL", 1, "PEMC", 0., 0., z, 0, "ONLY") ; z = covparams[3] ; - gMC->Gspos("PWAR", 1, "PEMC", 0., 0., z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PWAR", 1, "PEMC", 0., 0., z, 0, "ONLY") ; // Put created EMC geometry into PHOS volume z = geom->GetCPVBoxSize(1) / 2. ; - gMC->Gspos("PEMC", 1, "PHOS", 0., 0., z, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PEMC", 1, "PHOS", 0., 0., z, 0, "ONLY") ; } @@ -493,28 +493,28 @@ void AliPHOSv0::CreateGeometryforCPV() par[0] = geom->GetCPVBoxSize(0) / 2.0 ; par[1] = geom->GetCPVBoxSize(1) / 2.0 ; par[2] = geom->GetCPVBoxSize(2) / 2.0 ; - gMC->Gsvolu("PCPV", "BOX ", idtmed[798], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PCPV", "BOX ", idtmed[798], par, 3) ; const Float_t * emcParams = geom->GetEMCAGeometry()->GetEMCParams() ; z = - emcParams[3] ; Int_t rotm ; AliMatrix(rotm, 90.,0., 0., 0., 90., 90.) ; - gMC->Gspos("PCPV", 1, "PHOS", 0.0, 0.0, z, rotm, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PCPV", 1, "PHOS", 0.0, 0.0, z, rotm, "ONLY") ; // Gassiplex board par[0] = geom->GetGassiplexChipSize(0)/2.; par[1] = geom->GetGassiplexChipSize(1)/2.; par[2] = geom->GetGassiplexChipSize(2)/2.; - gMC->Gsvolu("PCPC","BOX ",idtmed[707],par,3); + TVirtualMC::GetMC()->Gsvolu("PCPC","BOX ",idtmed[707],par,3); // Cu+Ni foil covers Gassiplex board par[1] = geom->GetCPVCuNiFoilThickness()/2; - gMC->Gsvolu("PCPD","BOX ",idtmed[710],par,3); + TVirtualMC::GetMC()->Gsvolu("PCPD","BOX ",idtmed[710],par,3); y = -(geom->GetGassiplexChipSize(1)/2 - par[1]); - gMC->Gspos("PCPD",1,"PCPC",0,y,0,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("PCPD",1,"PCPC",0,y,0,0,"ONLY"); // Position of the chip inside CPV @@ -528,7 +528,7 @@ void AliPHOSv0::CreateGeometryforCPV() for (Int_t iz=0; izGetNumberOfCPVChipsZ(); iz++) { copy++; z = zStep * (iz+1) - geom->GetCPVActiveSize(1)/2; - gMC->Gspos("PCPC",copy,"PCPV",x,y,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("PCPC",copy,"PCPV",x,y,z,0,"ONLY"); } } @@ -537,52 +537,52 @@ void AliPHOSv0::CreateGeometryforCPV() par[0] = geom->GetCPVActiveSize(0) / 2; par[1] = geom->GetCPVTextoliteThickness() / 2; par[2] = geom->GetCPVActiveSize(1) / 2; - gMC->Gsvolu("PCPF","BOX ",idtmed[707],par,3); + TVirtualMC::GetMC()->Gsvolu("PCPF","BOX ",idtmed[707],par,3); // Argon gas volume par[1] = (geom->GetFTPosition(2) - geom->GetFTPosition(1) - geom->GetCPVTextoliteThickness()) / 2; - gMC->Gsvolu("PCPG","BOX ",idtmed[715],par,3); + TVirtualMC::GetMC()->Gsvolu("PCPG","BOX ",idtmed[715],par,3); for (Int_t i=0; i<4; i++) { y = geom->GetCPVFrameSize(1) / 2 - geom->GetFTPosition(i) + geom->GetCPVTextoliteThickness()/2; - gMC->Gspos("PCPF",i+1,"PCPV",0,y,0,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("PCPF",i+1,"PCPV",0,y,0,0,"ONLY"); if(i==1){ y-= (geom->GetFTPosition(2) - geom->GetFTPosition(1)) / 2; - gMC->Gspos("PCPG",1,"PCPV ",0,y,0,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("PCPG",1,"PCPV ",0,y,0,0,"ONLY"); } } // Dummy sensitive plane in the middle of argone gas volume par[1]=0.001; - gMC->Gsvolu("PCPQ","BOX ",idtmed[715],par,3); - gMC->Gspos ("PCPQ",1,"PCPG",0,0,0,0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("PCPQ","BOX ",idtmed[715],par,3); + TVirtualMC::GetMC()->Gspos ("PCPQ",1,"PCPG",0,0,0,0,"ONLY"); // Cu+Ni foil covers textolite par[1] = geom->GetCPVCuNiFoilThickness() / 2; - gMC->Gsvolu("PCP1","BOX ",idtmed[710],par,3); + TVirtualMC::GetMC()->Gsvolu("PCP1","BOX ",idtmed[710],par,3); y = geom->GetCPVTextoliteThickness()/2 - par[1]; - gMC->Gspos ("PCP1",1,"PCPF",0,y,0,0,"ONLY"); + TVirtualMC::GetMC()->Gspos ("PCP1",1,"PCPF",0,y,0,0,"ONLY"); // Aluminum frame around CPV par[0] = geom->GetCPVFrameSize(0)/2; par[1] = geom->GetCPVFrameSize(1)/2; par[2] = geom->GetCPVBoxSize(2) /2; - gMC->Gsvolu("PCF1","BOX ",idtmed[701],par,3); + TVirtualMC::GetMC()->Gsvolu("PCF1","BOX ",idtmed[701],par,3); par[0] = geom->GetCPVBoxSize(0)/2 - geom->GetCPVFrameSize(0); par[1] = geom->GetCPVFrameSize(1)/2; par[2] = geom->GetCPVFrameSize(2)/2; - gMC->Gsvolu("PCF2","BOX ",idtmed[701],par,3); + TVirtualMC::GetMC()->Gsvolu("PCF2","BOX ",idtmed[701],par,3); for (Int_t j=0; j<=1; j++) { x = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(0) - geom->GetCPVFrameSize(0)) / 2; - gMC->Gspos("PCF1",j+1,"PCPV", x,0,0,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("PCF1",j+1,"PCPV", x,0,0,0,"ONLY"); z = TMath::Sign(1,2*j-1) * (geom->GetCPVBoxSize(2) - geom->GetCPVFrameSize(2)) / 2; - gMC->Gspos("PCF2",j+1,"PCPV",0, 0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("PCF2",j+1,"PCPV",0, 0,z,0,"ONLY"); } } @@ -617,21 +617,21 @@ void AliPHOSv0::CreateGeometryforSupport() par[0] = geom->GetRailRoadSize(0) / 2.0 ; par[1] = geom->GetRailRoadSize(1) / 2.0 ; par[2] = geom->GetRailRoadSize(2) / 2.0 ; - gMC->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PRRD", "BOX ", idtmed[798], par, 3) ; y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) / 2.0) ; - gMC->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PRRD", 1, "ALIC", 0.0, y0, 0.0, 0, "ONLY") ; // --- Dummy box containing one rail par[0] = geom->GetRailOuterSize(0) / 2.0 ; par[1] = geom->GetRailOuterSize(1) / 2.0 ; par[2] = geom->GetRailOuterSize(2) / 2.0 ; - gMC->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PRAI", "BOX ", idtmed[798], par, 3) ; for (i=0; i<2; i++) { x0 = (2*i-1) * geom->GetDistanceBetwRails() / 2.0 ; - gMC->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PRAI", i, "PRRD", x0, 0.0, 0.0, 0, "ONLY") ; } // --- Upper and bottom steel parts of the rail @@ -639,32 +639,32 @@ void AliPHOSv0::CreateGeometryforSupport() par[0] = geom->GetRailPart1(0) / 2.0 ; par[1] = geom->GetRailPart1(1) / 2.0 ; par[2] = geom->GetRailPart1(2) / 2.0 ; - gMC->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PRP1", "BOX ", idtmed[716], par, 3) ; y0 = - (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 ; - gMC->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PRP1", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart1(1)) / 2.0 - geom->GetRailPart3(1); - gMC->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PRP1", 2, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; // --- The middle vertical steel parts of the rail par[0] = geom->GetRailPart2(0) / 2.0 ; par[1] = geom->GetRailPart2(1) / 2.0 ; par[2] = geom->GetRailPart2(2) / 2.0 ; - gMC->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PRP2", "BOX ", idtmed[716], par, 3) ; y0 = - geom->GetRailPart3(1) / 2.0 ; - gMC->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PRP2", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; // --- The most upper steel parts of the rail par[0] = geom->GetRailPart3(0) / 2.0 ; par[1] = geom->GetRailPart3(1) / 2.0 ; par[2] = geom->GetRailPart3(2) / 2.0 ; - gMC->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PRP3", "BOX ", idtmed[716], par, 3) ; y0 = (geom->GetRailOuterSize(1) - geom->GetRailPart3(1)) / 2.0 ; - gMC->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PRP3", 1, "PRAI", 0.0, y0, 0.0, 0, "ONLY") ; // --- The wall of the cradle // --- The wall is empty: steel thin walls and air inside @@ -675,17 +675,17 @@ void AliPHOSv0::CreateGeometryforSupport() par[2] = geom->GetCradleWall(2) / 2.0 ; par[3] = geom->GetCradleWall(3) ; par[4] = geom->GetCradleWall(4) ; - gMC->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ; + TVirtualMC::GetMC()->Gsvolu("PCRA", "TUBS", idtmed[716], par, 5) ; par[0] += geom->GetCradleWallThickness() ; par[1] -= geom->GetCradleWallThickness() ; par[2] -= geom->GetCradleWallThickness() ; - gMC->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ; - gMC->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gsvolu("PCRE", "TUBS", idtmed[798], par, 5) ; + TVirtualMC::GetMC()->Gspos ("PCRE", 1, "PCRA", 0.0, 0.0, 0.0, 0, "ONLY") ; for (i=0; i<2; i++) { z0 = (2*i-1) * (geom->GetOuterBoxSize(2) + geom->GetCradleWall(2) )/ 2.0 ; - gMC->Gspos("PCRA", i, "ALIC", 0.0, 0.0, z0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PCRA", i, "ALIC", 0.0, 0.0, z0, 0, "ONLY") ; } // --- The "wheels" of the cradle @@ -693,7 +693,7 @@ void AliPHOSv0::CreateGeometryforSupport() par[0] = geom->GetCradleWheel(0) / 2; par[1] = geom->GetCradleWheel(1) / 2; par[2] = geom->GetCradleWheel(2) / 2; - gMC->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ; + TVirtualMC::GetMC()->Gsvolu("PWHE", "BOX ", idtmed[716], par, 3) ; y0 = -(geom->GetRailsDistanceFromIP() - geom->GetRailRoadSize(1) - geom->GetCradleWheel(1)/2) ; @@ -703,7 +703,7 @@ void AliPHOSv0::CreateGeometryforSupport() for (j=0; j<2; j++) { copy = 2*i + j; x0 = (2*j-1) * geom->GetDistanceBetwRails() / 2.0 ; - gMC->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ; + TVirtualMC::GetMC()->Gspos("PWHE", copy, "ALIC", x0, y0, z0, 0, "ONLY") ; } } diff --git a/PHOS/AliPHOSv1.cxx b/PHOS/AliPHOSv1.cxx index 40af90f0478..a7b1d29b5f8 100644 --- a/PHOS/AliPHOSv1.cxx +++ b/PHOS/AliPHOSv1.cxx @@ -188,18 +188,18 @@ void AliPHOSv1::StepManager(void) 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 @@ -209,12 +209,12 @@ void AliPHOSv1::StepManager(void) // 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]; @@ -222,7 +222,7 @@ void AliPHOSv1::StepManager(void) // 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 @@ -268,7 +268,7 @@ void AliPHOSv1::StepManager(void) // 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() ); @@ -284,20 +284,20 @@ void AliPHOSv1::StepManager(void) } - 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) ; @@ -305,7 +305,7 @@ void AliPHOSv1::StepManager(void) 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); @@ -318,14 +318,14 @@ void AliPHOSv1::StepManager(void) } } 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) diff --git a/PHOS/AliPHOSvFast.cxx b/PHOS/AliPHOSvFast.cxx index 32ae66feac0..ad524ca2552 100644 --- a/PHOS/AliPHOSvFast.cxx +++ b/PHOS/AliPHOSvFast.cxx @@ -140,7 +140,7 @@ void AliPHOSvFast::CreateGeometry() bigbox[1] = GetBigBox(1) / 2.0 ; bigbox[2] = GetBigBox(2) / 2.0 ; - gMC->Gsvolu("PHOS", "BOX ", idtmed[798], bigbox, 3) ; + TVirtualMC::GetMC()->Gsvolu("PHOS", "BOX ", idtmed[798], bigbox, 3) ; // --- Position PHOS mdules in ALICE setup --- @@ -156,7 +156,7 @@ void AliPHOSvFast::CreateGeometry() Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ; Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ; - gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ; + TVirtualMC::GetMC()->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ; } // for GetNModules @@ -422,23 +422,23 @@ void AliPHOSvFast::StepManager(void) // Only verifies if the particle reaches PHOS and stops the tracking TLorentzVector lv ; - gMC->TrackPosition(lv) ; + TVirtualMC::GetMC()->TrackPosition(lv) ; TVector3 pos = lv.Vect() ; Int_t modid ; - gMC->CurrentVolID(modid); + TVirtualMC::GetMC()->CurrentVolID(modid); - Float_t energy = gMC->Etot() ; //Total energy of current track + Float_t energy = TVirtualMC::GetMC()->Etot() ; //Total energy of current track //Calculating mass of current particle TDatabasePDG * pdg = TDatabasePDG::Instance() ; - TParticlePDG * partPDG = pdg->GetParticle(gMC->TrackPid()) ; + TParticlePDG * partPDG = pdg->GetParticle(TVirtualMC::GetMC()->TrackPid()) ; Float_t mass = partPDG->Mass() ; if(energy > mass){ pos.SetMag(TMath::Sqrt(energy*energy-mass*mass)) ; TLorentzVector pTrack(pos, energy) ; - TParticle * part = new TParticle(gMC->TrackPid(), 0,-1,-1,-1,-1, pTrack, lv) ; + TParticle * part = new TParticle(TVirtualMC::GetMC()->TrackPid(), 0,-1,-1,-1,-1, pTrack, lv) ; AliPHOSFastRecParticle rp(*part) ; @@ -453,7 +453,7 @@ void AliPHOSvFast::StepManager(void) } // stop the track as soon PHOS is reached - gMC->StopTrack() ; + TVirtualMC::GetMC()->StopTrack() ; } diff --git a/PHOS/AliPHOSvImpacts.cxx b/PHOS/AliPHOSvImpacts.cxx index 56ffb673c4e..a9451d62d0b 100644 --- a/PHOS/AliPHOSvImpacts.cxx +++ b/PHOS/AliPHOSvImpacts.cxx @@ -226,11 +226,11 @@ void AliPHOSvImpacts::StepManager(void) // Add impact to EMC - static Int_t idPXTL = gMC->VolId("PXTL"); - if( gMC->CurrentVolID(copy) == idPXTL && - gMC->IsTrackEntering() ) { - gMC->TrackMomentum(pmom); - gMC->TrackPosition(pos) ; + static Int_t idPXTL = TVirtualMC::GetMC()->VolId("PXTL"); + if( TVirtualMC::GetMC()->CurrentVolID(copy) == idPXTL && + TVirtualMC::GetMC()->IsTrackEntering() ) { + TVirtualMC::GetMC()->TrackMomentum(pmom); + TVirtualMC::GetMC()->TrackPosition(pos) ; Int_t i; for (i=0; i<3; i++) xyzm[i] = pos[i]; @@ -239,16 +239,16 @@ void AliPHOSvImpacts::StepManager(void) xyzm[i] = pos[i] ; pm[i] = pmom[i]; } - gMC -> Gmtod (xyzm, xyzd, 1); // transform coordinate from master to daughter system - gMC -> Gmtod (pm, pd, 2); // transform 3-momentum from master to daughter system + TVirtualMC::GetMC() -> Gmtod (xyzm, xyzd, 1); // transform coordinate from master to daughter system + TVirtualMC::GetMC() -> Gmtod (pm, pd, 2); // transform 3-momentum from master to daughter system // Select tracks coming to the crystal from up or down sides if ((pd[1]<0 && xyzd[1] > GetGeometry()->GetCrystalSize(1)/2-0.1) || (pd[1]>0 && xyzd[1] < -GetGeometry()->GetCrystalSize(1)/2+0.1)) { // Select tracks coming to the crystal from up or down sides - Int_t pid = gMC->TrackPid(); + Int_t pid = TVirtualMC::GetMC()->TrackPid(); Int_t module; - gMC->CurrentVolOffID(10,module); + TVirtualMC::GetMC()->CurrentVolOffID(10,module); module--; AddImpact("EMC ",fIshunt, primary,tracknumber, module, pid, pmom, xyzm); } @@ -256,11 +256,11 @@ void AliPHOSvImpacts::StepManager(void) // Add impact to CPV - static Int_t idPCPQ = gMC->VolId("PCPQ"); - if( gMC->CurrentVolID(copy) == idPCPQ && - gMC->IsTrackEntering() ) { - gMC->TrackMomentum(pmom); - gMC->TrackPosition(pos) ; + static Int_t idPCPQ = TVirtualMC::GetMC()->VolId("PCPQ"); + if( TVirtualMC::GetMC()->CurrentVolID(copy) == idPCPQ && + TVirtualMC::GetMC()->IsTrackEntering() ) { + TVirtualMC::GetMC()->TrackMomentum(pmom); + TVirtualMC::GetMC()->TrackPosition(pos) ; Int_t i; for (i=0; i<3; i++) xyzm[i] = pos[i]; @@ -269,9 +269,9 @@ void AliPHOSvImpacts::StepManager(void) xyzm[i] = pos[i] ; pm[i] = pmom[i]; } - Int_t pid = gMC->TrackPid(); + Int_t pid = TVirtualMC::GetMC()->TrackPid(); Int_t module; - gMC->CurrentVolOffID(3,module); + TVirtualMC::GetMC()->CurrentVolOffID(3,module); module--; AddImpact("CPV ",fIshunt, primary,tracknumber, module, pid, pmom, xyzm); } diff --git a/PMD/AliPMDv0.cxx b/PMD/AliPMDv0.cxx index b1d0c14231e..167a578db59 100644 --- a/PMD/AliPMDv0.cxx +++ b/PMD/AliPMDv0.cxx @@ -200,7 +200,7 @@ void AliPMDv0::CreateSupermodule() // Gas replaced by vacuum for v0(insensitive) version of PMD. - gMC->Gsvolu("ECAR", "PGON", idtmed[697], hexd2,10); + TVirtualMC::GetMC()->Gsvolu("ECAR", "PGON", idtmed[697], hexd2,10); gGeoManager->SetVolumeAttribute("ECAR", "SEEN", 0); // Outer hexagon made of Copper @@ -212,12 +212,12 @@ void AliPMDv0::CreateSupermodule() hexd1[6]= fgkCellRadius; hexd1[9]= fgkCellRadius; - gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10); + TVirtualMC::GetMC()->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10); gGeoManager->SetVolumeAttribute("ECCU", "SEEN", 1); // --- place inner hex inside outer hex - gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY"); // Rhombus shaped supermodules (defined by PARA) @@ -229,10 +229,10 @@ void AliPMDv0::CreateSupermodule() dparasm1[2] = fSMthick/2.; // - gMC->Gsvolu("ESMA","PARA", idtmed[607], dparasm1, 6); + TVirtualMC::GetMC()->Gsvolu("ESMA","PARA", idtmed[607], dparasm1, 6); gGeoManager->SetVolumeAttribute("ESMA", "SEEN", 0); // - gMC->Gsvolu("ESMB","PARA", idtmed[607], dparasm1, 6); + TVirtualMC::GetMC()->Gsvolu("ESMB","PARA", idtmed[607], dparasm1, 6); gGeoManager->SetVolumeAttribute("ESMB", "SEEN", 0); // Air residing between the PCB and the base @@ -242,7 +242,7 @@ void AliPMDv0::CreateSupermodule() dparaair[1]= dparasm1[1]; dparaair[2]= fgkThAir/2.; - gMC->Gsvolu("EAIR","PARA", idtmed[698], dparaair, 6); + TVirtualMC::GetMC()->Gsvolu("EAIR","PARA", idtmed[698], dparaair, 6); gGeoManager->SetVolumeAttribute("EAIR", "SEEN", 0); // volume for honeycomb chamber EHC1 @@ -252,7 +252,7 @@ void AliPMDv0::CreateSupermodule() dpara1[1] = dparasm1[1]; dpara1[2] = fgkCellDepth/2.; - gMC->Gsvolu("EHC1","PARA", idtmed[698], dpara1, 6); + TVirtualMC::GetMC()->Gsvolu("EHC1","PARA", idtmed[698], dpara1, 6); gGeoManager->SetVolumeAttribute("EHC1", "SEEN", 1); // Place hexagonal cells ECCU cells inside EHC1 (72 X 72) @@ -269,7 +269,7 @@ void AliPMDv0::CreateSupermodule() } for (i = 1; i <= fNcellSM; ++i) { number = i+(j-1)*fNcellSM; - gMC->Gspos("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY"); xb += (hexd1[6]*2.); } xrow = xrow+1; @@ -283,22 +283,22 @@ void AliPMDv0::CreateSupermodule() //ESMA is normal supermodule with base at bottom, with EHC1 zAir1= -dparasm1[2] + fgkThBase + dparaair[2]; - gMC->Gspos("EAIR", 1, "ESMA", 0., 0., zAir1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIR", 1, "ESMA", 0., 0., zAir1, 0, "ONLY"); zGas=zAir1+dparaair[2]+ fgkThPCB + dpara1[2]; //Line below Commented for version 0 of PMD routine - // gMC->Gspos("EHC1", 1, "ESMA", 0., 0., zGas, 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EHC1", 1, "ESMA", 0., 0., zGas, 0, "ONLY"); zAir2=zGas+dpara1[2]+ fgkThPCB + dparaair[2]; - gMC->Gspos("EAIR", 2, "ESMA", 0., 0., zAir2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIR", 2, "ESMA", 0., 0., zAir2, 0, "ONLY"); // ESMB is mirror image of ESMA, with base at top, with EHC1 zAir1= -dparasm1[2] + fgkThPCB + dparaair[2]; - gMC->Gspos("EAIR", 3, "ESMB", 0., 0., zAir1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIR", 3, "ESMB", 0., 0., zAir1, 0, "ONLY"); zGas=zAir1+dparaair[2]+ fgkThPCB + dpara1[2]; //Line below Commented for version 0 of PMD routine - // gMC->Gspos("EHC1", 2, "ESMB", 0., 0., zGas, 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EHC1", 2, "ESMB", 0., 0., zGas, 0, "ONLY"); zAir2=zGas+dpara1[2]+ fgkThPCB + dparaair[2]; - gMC->Gspos("EAIR", 4, "ESMB", 0., 0., zAir2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIR", 4, "ESMB", 0., 0., zAir2, 0, "ONLY"); // special supermodule EMM2(GEANT only) containing 6 unit modules @@ -309,10 +309,10 @@ void AliPMDv0::CreateSupermodule() dparasm2[1] = (fNcellSM - fgkNcellHole + 0.25) * fgkSqroot3by2 * hexd1[6]; dparasm2[2] = fSMthick/2.; - gMC->Gsvolu("ESMX","PARA", idtmed[607], dparasm2, 6); + TVirtualMC::GetMC()->Gsvolu("ESMX","PARA", idtmed[607], dparasm2, 6); gGeoManager->SetVolumeAttribute("ESMX", "SEEN", 0); // - gMC->Gsvolu("ESMY","PARA", idtmed[607], dparasm2, 6); + TVirtualMC::GetMC()->Gsvolu("ESMY","PARA", idtmed[607], dparasm2, 6); gGeoManager->SetVolumeAttribute("ESMY", "SEEN", 0); Float_t dpara2[6] = {12.5,12.5,0.4,30.,0.,0.}; @@ -320,7 +320,7 @@ void AliPMDv0::CreateSupermodule() dpara2[1] = dparasm2[1]; dpara2[2] = fgkCellDepth/2.; - gMC->Gsvolu("EHC2","PARA", idtmed[698], dpara2, 6); + TVirtualMC::GetMC()->Gsvolu("EHC2","PARA", idtmed[698], dpara2, 6); gGeoManager->SetVolumeAttribute("EHC2", "SEEN", 1); @@ -331,7 +331,7 @@ void AliPMDv0::CreateSupermodule() dpara2Air[1]= dparasm2[1]; dpara2Air[2]= fgkThAir/2.; - gMC->Gsvolu("EAIX","PARA", idtmed[698], dpara2Air, 6); + TVirtualMC::GetMC()->Gsvolu("EAIX","PARA", idtmed[698], dpara2Air, 6); gGeoManager->SetVolumeAttribute("EAIX", "SEEN", 0); // Place hexagonal single cells ECCU inside EHC2 @@ -347,7 +347,7 @@ void AliPMDv0::CreateSupermodule() } for (i = 1; i <= fNcellSM; ++i) { number = i+(j-1)*fNcellSM; - gMC->Gspos("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY"); xb += (hexd1[6]*2.); } xrow = xrow+1; @@ -358,22 +358,22 @@ void AliPMDv0::CreateSupermodule() // ESMX is normal supermodule with base at bottom, with EHC2 zAir1= -dparasm2[2] + fgkThBase + dpara2Air[2]; - gMC->Gspos("EAIX", 1, "ESMX", 0., 0., zAir1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIX", 1, "ESMX", 0., 0., zAir1, 0, "ONLY"); zGas=zAir1+dpara2Air[2]+ fgkThPCB + dpara2[2]; //Line below Commented for version 0 of PMD routine - // gMC->Gspos("EHC2", 1, "ESMX", 0., 0., zGas, 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EHC2", 1, "ESMX", 0., 0., zGas, 0, "ONLY"); zAir2=zGas+dpara2[2]+ fgkThPCB + dpara2Air[2]; - gMC->Gspos("EAIX", 2, "ESMX", 0., 0., zAir2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIX", 2, "ESMX", 0., 0., zAir2, 0, "ONLY"); // ESMY is mirror image of ESMX with base at bottom, with EHC2 zAir1= -dparasm2[2] + fgkThPCB + dpara2Air[2]; - gMC->Gspos("EAIX", 3, "ESMY", 0., 0., zAir1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIX", 3, "ESMY", 0., 0., zAir1, 0, "ONLY"); zGas=zAir1+dpara2Air[2]+ fgkThPCB + dpara2[2]; //Line below Commented for version 0 of PMD routine - // gMC->Gspos("EHC2", 2, "ESMY", 0., 0., zGas, 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EHC2", 2, "ESMY", 0., 0., zGas, 0, "ONLY"); zAir2=zGas+dpara2[2]+ fgkThPCB + dpara2Air[2]; - gMC->Gspos("EAIX", 4, "ESMY", 0., 0., zAir2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIX", 4, "ESMY", 0., 0., zAir2, 0, "ONLY"); // // special supermodule EMM3 (GEANT only) containing 2 unit modules @@ -384,10 +384,10 @@ void AliPMDv0::CreateSupermodule() dparaSM3[1] = (fgkNcellHole + 0.25) * hexd1[6] * fgkSqroot3by2; dparaSM3[2] = fSMthick/2.; - gMC->Gsvolu("ESMP","PARA", idtmed[607], dparaSM3, 6); + TVirtualMC::GetMC()->Gsvolu("ESMP","PARA", idtmed[607], dparaSM3, 6); gGeoManager->SetVolumeAttribute("ESMP", "SEEN", 0); // - gMC->Gsvolu("ESMQ","PARA", idtmed[607], dparaSM3, 6); + TVirtualMC::GetMC()->Gsvolu("ESMQ","PARA", idtmed[607], dparaSM3, 6); gGeoManager->SetVolumeAttribute("ESMQ", "SEEN", 0); Float_t dpara3[6] = {12.5,12.5,0.4,30.,0.,0.}; @@ -395,7 +395,7 @@ void AliPMDv0::CreateSupermodule() dpara3[1] = dparaSM3[1]; dpara3[2] = fgkCellDepth/2.; - gMC->Gsvolu("EHC3","PARA", idtmed[698], dpara3, 6); + TVirtualMC::GetMC()->Gsvolu("EHC3","PARA", idtmed[698], dpara3, 6); gGeoManager->SetVolumeAttribute("EHC3", "SEEN", 1); // Air residing between the PCB and the base @@ -405,7 +405,7 @@ void AliPMDv0::CreateSupermodule() dpara3Air[1]= dparaSM3[1]; dpara3Air[2]= fgkThAir/2.; - gMC->Gsvolu("EAIP","PARA", idtmed[698], dpara3Air, 6); + TVirtualMC::GetMC()->Gsvolu("EAIP","PARA", idtmed[698], dpara3Air, 6); gGeoManager->SetVolumeAttribute("EAIP", "SEEN", 0); @@ -422,7 +422,7 @@ void AliPMDv0::CreateSupermodule() } for (i = 1; i <= (fNcellSM - fgkNcellHole); ++i) { number = i+(j-1)*(fNcellSM - fgkNcellHole); - gMC->Gspos("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY"); xb += (hexd1[6]*2.); } xrow = xrow+1; @@ -432,22 +432,22 @@ void AliPMDv0::CreateSupermodule() // ESMP is normal supermodule with base at bottom, with EHC3 zAir1= -dparaSM3[2] + fgkThBase + dpara3Air[2]; - gMC->Gspos("EAIP", 1, "ESMP", 0., 0., zAir1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIP", 1, "ESMP", 0., 0., zAir1, 0, "ONLY"); zGas=zAir1+dpara3Air[2]+ fgkThPCB + dpara3[2]; //Line below Commented for version 0 of PMD routine - // gMC->Gspos("EHC3", 1, "ESMP", 0., 0., zGas, 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EHC3", 1, "ESMP", 0., 0., zGas, 0, "ONLY"); zAir2=zGas+dpara3[2]+ fgkThPCB + dpara3Air[2]; - gMC->Gspos("EAIP", 2, "ESMP", 0., 0., zAir2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIP", 2, "ESMP", 0., 0., zAir2, 0, "ONLY"); // ESMQ is mirror image of ESMP with base at bottom, with EHC3 zAir1= -dparaSM3[2] + fgkThPCB + dpara3Air[2]; - gMC->Gspos("EAIP", 3, "ESMQ", 0., 0., zAir1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIP", 3, "ESMQ", 0., 0., zAir1, 0, "ONLY"); zGas=zAir1+dpara3Air[2]+ fgkThPCB + dpara3[2]; //Line below Commented for version 0 of PMD routine - // gMC->Gspos("EHC3", 2, "ESMQ", 0., 0., zGas, 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EHC3", 2, "ESMQ", 0., 0., zGas, 0, "ONLY"); zAir2=zGas+dpara3[2]+ fgkThPCB + dpara3Air[2]; - gMC->Gspos("EAIP", 4, "ESMQ", 0., 0., zAir2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIP", 4, "ESMQ", 0., 0., zAir2, 0, "ONLY"); } @@ -483,7 +483,7 @@ void AliPMDv0::CreatePMD() gaspmd[5] = fgkNcellHole * fgkCellRadius * 2. * fgkSqroot3by2; gaspmd[8] = gaspmd[5]; - gMC->Gsvolu("EPMD", "PGON", idtmed[698], gaspmd, 10); + TVirtualMC::GetMC()->Gsvolu("EPMD", "PGON", idtmed[698], gaspmd, 10); gGeoManager->SetVolumeAttribute("EPMD", "SEEN", 0); AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.); @@ -504,7 +504,7 @@ void AliPMDv0::CreatePMD() dparaemm1[1] = dparaemm1[0] *fgkSqroot3by2; dparaemm1[2] = dmthick/2.; - gMC->Gsvolu("EMM1","PARA", idtmed[698], dparaemm1, 6); + TVirtualMC::GetMC()->Gsvolu("EMM1","PARA", idtmed[698], dparaemm1, 6); gGeoManager->SetVolumeAttribute("EMM1", "SEEN", 1); // @@ -516,7 +516,7 @@ void AliPMDv0::CreatePMD() dparapb1[1] = dparapb1[0] * fgkSqroot3by2; dparapb1[2] = fgkThLead/2.; - gMC->Gsvolu("EPB1","PARA", idtmed[600], dparapb1, 6); + TVirtualMC::GetMC()->Gsvolu("EPB1","PARA", idtmed[600], dparapb1, 6); gGeoManager->SetVolumeAttribute ("EPB1", "SEEN", 0); // Fe Support for EMM1 @@ -525,7 +525,7 @@ void AliPMDv0::CreatePMD() dparafe1[1] = dparapb1[1]; dparafe1[2] = fgkThSteel/2.; - gMC->Gsvolu("EFE1","PARA", idtmed[618], dparafe1, 6); + TVirtualMC::GetMC()->Gsvolu("EFE1","PARA", idtmed[618], dparafe1, 6); gGeoManager->SetVolumeAttribute ("EFE1", "SEEN", 0); // @@ -534,13 +534,13 @@ void AliPMDv0::CreatePMD() Float_t zps,zpb,zfe,zcv; zps = -dparaemm1[2] + fSMthick/2.; - gMC->Gspos("ESMB", 1, "EMM1", 0., 0., zps, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESMB", 1, "EMM1", 0., 0., zps, 0, "ONLY"); zpb = zps+fSMthick/2.+dparapb1[2]; - gMC->Gspos("EPB1", 1, "EMM1", 0., 0., zpb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB1", 1, "EMM1", 0., 0., zpb, 0, "ONLY"); zfe = zpb+dparapb1[2]+dparafe1[2]; - gMC->Gspos("EFE1", 1, "EMM1", 0., 0., zfe, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFE1", 1, "EMM1", 0., 0., zfe, 0, "ONLY"); zcv = zfe+dparafe1[2]+fSMthick/2.; - gMC->Gspos("ESMA", 1, "EMM1", 0., 0., zcv, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESMA", 1, "EMM1", 0., 0., zcv, 0, "ONLY"); // EMM2 : special master module having full row of cells but the number // of rows limited by hole. @@ -550,7 +550,7 @@ void AliPMDv0::CreatePMD() dparaemm2[1] = (fNcellSM - fgkNcellHole + 0.25)*fgkCellRadius*fgkSqroot3by2; dparaemm2[2] = dmthick/2.; - gMC->Gsvolu("EMM2","PARA", idtmed[698], dparaemm2, 6); + TVirtualMC::GetMC()->Gsvolu("EMM2","PARA", idtmed[698], dparaemm2, 6); gGeoManager->SetVolumeAttribute("EMM2", "SEEN", 1); // Pb Convertor for EMM2 @@ -559,7 +559,7 @@ void AliPMDv0::CreatePMD() dparapb2[1] = dparaemm2[1]; dparapb2[2] = fgkThLead/2.; - gMC->Gsvolu("EPB2","PARA", idtmed[600], dparapb2, 6); + TVirtualMC::GetMC()->Gsvolu("EPB2","PARA", idtmed[600], dparapb2, 6); gGeoManager->SetVolumeAttribute ("EPB2", "SEEN", 0); // Fe Support for EMM2 @@ -568,19 +568,19 @@ void AliPMDv0::CreatePMD() dparafe2[1] = dparapb2[1]; dparafe2[2] = fgkThSteel/2.; - gMC->Gsvolu("EFE2","PARA", idtmed[618], dparafe2, 6); + TVirtualMC::GetMC()->Gsvolu("EFE2","PARA", idtmed[618], dparafe2, 6); gGeoManager->SetVolumeAttribute ("EFE2", "SEEN", 0); // position supermodule ESMX, ESMY inside EMM2 zps = -dparaemm2[2] + fSMthick/2.; - gMC->Gspos("ESMY", 1, "EMM2", 0., 0., zps, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESMY", 1, "EMM2", 0., 0., zps, 0, "ONLY"); zpb = zps + fSMthick/2.+dparapb2[2]; - gMC->Gspos("EPB2", 1, "EMM2", 0., 0., zpb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB2", 1, "EMM2", 0., 0., zpb, 0, "ONLY"); zfe = zpb + dparapb2[2]+dparafe2[2]; - gMC->Gspos("EFE2", 1, "EMM2", 0., 0., zfe, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFE2", 1, "EMM2", 0., 0., zfe, 0, "ONLY"); zcv = zfe + dparafe2[2]+fSMthick/2.; - gMC->Gspos("ESMX", 1, "EMM2", 0., 0., zcv, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESMX", 1, "EMM2", 0., 0., zcv, 0, "ONLY"); // // EMM3 : special master module having truncated rows and columns of cells // limited by hole. @@ -590,7 +590,7 @@ void AliPMDv0::CreatePMD() dparaemm3[1] = (fgkNcellHole + 0.25) * fgkCellRadius *fgkSqroot3by2; dparaemm3[2] = dmthick/2.; - gMC->Gsvolu("EMM3","PARA", idtmed[698], dparaemm3, 6); + TVirtualMC::GetMC()->Gsvolu("EMM3","PARA", idtmed[698], dparaemm3, 6); gGeoManager->SetVolumeAttribute("EMM3", "SEEN", 1); // Pb Convertor for EMM3 @@ -599,7 +599,7 @@ void AliPMDv0::CreatePMD() dparapb3[1] = dparaemm3[1]; dparapb3[2] = fgkThLead/2.; - gMC->Gsvolu("EPB3","PARA", idtmed[600], dparapb3, 6); + TVirtualMC::GetMC()->Gsvolu("EPB3","PARA", idtmed[600], dparapb3, 6); gGeoManager->SetVolumeAttribute ("EPB3", "SEEN", 0); // Fe Support for EMM3 @@ -608,19 +608,19 @@ void AliPMDv0::CreatePMD() dparafe3[1] = dparapb3[1]; dparafe3[2] = fgkThSteel/2.; - gMC->Gsvolu("EFE3","PARA", idtmed[618], dparafe3, 6); + TVirtualMC::GetMC()->Gsvolu("EFE3","PARA", idtmed[618], dparafe3, 6); gGeoManager->SetVolumeAttribute ("EFE3", "SEEN", 0); // position supermodule ESMP, ESMQ inside EMM3 zps = -dparaemm3[2] + fSMthick/2.; - gMC->Gspos("ESMQ", 1, "EMM3", 0., 0., zps, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESMQ", 1, "EMM3", 0., 0., zps, 0, "ONLY"); zpb = zps + fSMthick/2.+dparapb3[2]; - gMC->Gspos("EPB3", 1, "EMM3", 0., 0., zpb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB3", 1, "EMM3", 0., 0., zpb, 0, "ONLY"); zfe = zpb + dparapb3[2]+dparafe3[2]; - gMC->Gspos("EFE3", 1, "EMM3", 0., 0., zfe, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFE3", 1, "EMM3", 0., 0., zfe, 0, "ONLY"); zcv = zfe + dparafe3[2] + fSMthick/2.; - gMC->Gspos("ESMP", 1, "EMM3", 0., 0., zcv, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESMP", 1, "EMM3", 0., 0., zcv, 0, "ONLY"); // // EHOL is a tube structure made of air @@ -630,7 +630,7 @@ void AliPMDv0::CreatePMD() //d_hole[1] = fgkNcellHole * fgkCellRadius *2. * fgkSqroot3by2 + boundary; //d_hole[2] = dmthick/2.; // - //gMC->Gsvolu("EHOL", "TUBE", idtmed[698], d_hole, 3); + //TVirtualMC::GetMC()->Gsvolu("EHOL", "TUBE", idtmed[698], d_hole, 3); //gGeoManager->SetVolumeAttribute("EHOL", "SEEN", 1); //Al-rod as boundary of the supermodules @@ -640,7 +640,7 @@ void AliPMDv0::CreatePMD() alRod[1] = fgkBoundary; alRod[2] = dmthick/2.; - gMC->Gsvolu("EALM","BOX ", idtmed[698], alRod, 3); + TVirtualMC::GetMC()->Gsvolu("EALM","BOX ", idtmed[698], alRod, 3); gGeoManager->SetVolumeAttribute ("EALM", "SEEN", 1); Float_t xalm[3]; xalm[0]=alRod[0] + gaspmd[5] + 3.0*fgkBoundary; @@ -661,9 +661,9 @@ void AliPMDv0::CreatePMD() Float_t dx = fSMLength; Float_t dy = dx * fgkSqroot3by2; - Float_t xsup[9] = {-dx/2., dx/2., 3.*dx/2., + Float_t xsup[9] = {static_cast(-dx/2.), static_cast(dx/2.), static_cast(3.*dx/2.), -dx, 0., dx, - -3.*dx/2., -dx/2., dx/2.}; + static_cast(-3.*dx/2.), static_cast(-dx/2.), static_cast(dx/2.)}; Float_t ysup[9] = {dy, dy, dy, 0., 0., 0., @@ -672,7 +672,7 @@ void AliPMDv0::CreatePMD() // xpos and ypos are the x & y coordinates of the centres of EMM1 volumes Float_t xoff = fgkBoundary * TMath::Tan(fgkPi/6.); - Float_t xmod[3]={x4 + xoff , x4 + xoff, -2.*x4-fgkBoundary/fgkSqroot3by2}; + Float_t xmod[3]={x4 + xoff , x4 + xoff, static_cast(-2.*x4-fgkBoundary/fgkSqroot3by2)}; Float_t ymod[3] = {-x1 - fgkBoundary, x1 + fgkBoundary, 0.}; Float_t xpos[9], ypos[9], x2, y2, x3, y3; @@ -687,21 +687,21 @@ void AliPMDv0::CreatePMD() Float_t yemm3 = - (fgkNcellHole - 0.25) * fgkCellRadius * fgkSqroot3by2 - fgkBoundary; - Float_t theta[3] = {0., 2.*fgkPi/3., 4.*fgkPi/3.}; + Float_t theta[3] = {0., static_cast(2.*fgkPi/3.), static_cast(4.*fgkPi/3.)}; Int_t irotate[3] = {0, jhrot12, jhrot13}; nummod=0; for (j=0; j<3; ++j) { - gMC->Gspos("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY"); + TVirtualMC::GetMC()->Gspos("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY"); x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]); y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]); - gMC->Gspos("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY"); + TVirtualMC::GetMC()->Gspos("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY"); x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]); y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]); - gMC->Gspos("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY"); + TVirtualMC::GetMC()->Gspos("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY"); for (i=1; i<9; ++i) { xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) - @@ -715,21 +715,21 @@ void AliPMDv0::CreatePMD() AliDebugClass(1,Form("nummod %d",nummod)); - gMC->Gspos("EMM1", nummod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY"); + TVirtualMC::GetMC()->Gspos("EMM1", nummod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY"); } } // place EHOL in the centre of EPMD - // gMC->Gspos("EHOL", 1, "EPMD", 0.,0.,0., 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EHOL", 1, "EPMD", 0.,0.,0., 0, "ONLY"); // --- Place the EPMD in ALICE xp = 0.; yp = 0.; zp = fgkZdist; - gMC->Gspos("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY"); } @@ -859,26 +859,26 @@ void AliPMDv0::StepManager() Int_t vol[6]; //char *namep; - if(gMC->CurrentMedium() == fMedSens && (destep = gMC->Edep())) { + if(TVirtualMC::GetMC()->CurrentMedium() == fMedSens && (destep = TVirtualMC::GetMC()->Edep())) { - gMC->CurrentVolID(copy); + TVirtualMC::GetMC()->CurrentVolID(copy); vol[0] = copy; - gMC->CurrentVolOffID(1,copy); + TVirtualMC::GetMC()->CurrentVolOffID(1,copy); vol[1] = copy; - gMC->CurrentVolOffID(2,copy); + TVirtualMC::GetMC()->CurrentVolOffID(2,copy); vol[2] = copy; - gMC->CurrentVolOffID(3,copy); + TVirtualMC::GetMC()->CurrentVolOffID(3,copy); vol[3] = copy; - gMC->CurrentVolOffID(4,copy); + TVirtualMC::GetMC()->CurrentVolOffID(4,copy); vol[4] = copy; - gMC->CurrentVolOffID(5,copy); + TVirtualMC::GetMC()->CurrentVolOffID(5,copy); vol[5] = copy; - gMC->Gdtom(center,hits,1); + TVirtualMC::GetMC()->Gdtom(center,hits,1); hits[3] = destep*1e9; //Number in eV // this is for pile-up events - hits[4] = gMC->TrackTime(); + hits[4] = TVirtualMC::GetMC()->TrackTime(); AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); } diff --git a/PMD/AliPMDv1.cxx b/PMD/AliPMDv1.cxx index 0f9e2fb640d..f454848d021 100644 --- a/PMD/AliPMDv1.cxx +++ b/PMD/AliPMDv1.cxx @@ -200,7 +200,7 @@ void AliPMDv1::CreateSupermodule() hexd2[6] = fgkCellRadius - fgkCellWall; hexd2[9] = fgkCellRadius - fgkCellWall; - gMC->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10); + TVirtualMC::GetMC()->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10); //******************************************************// // STEP - II // @@ -215,11 +215,11 @@ void AliPMDv1::CreateSupermodule() hexd1[6] = fgkCellRadius; hexd1[9] = fgkCellRadius; - gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10); + TVirtualMC::GetMC()->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10); // Place inner hex (sensitive volume) inside outer hex (copper) - gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY"); //******************************************************// // STEP - III // @@ -236,7 +236,7 @@ void AliPMDv1::CreateSupermodule() dbox1[1] = fgkNrowUM1*fgkCellRadius; dbox1[2] = fgkCellDepth/2.; - gMC->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3); + TVirtualMC::GetMC()->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3); // volume for second strip EST2 @@ -247,7 +247,7 @@ void AliPMDv1::CreateSupermodule() dbox2[0] = dbox1[0]; dbox2[2] = dbox1[2]; - gMC->Gsvolu("EST2","BOX", idtmed[698], dbox2, 3); + TVirtualMC::GetMC()->Gsvolu("EST2","BOX", idtmed[698], dbox2, 3); // Place hexagonal cells ECCU placed inside EST1 @@ -257,7 +257,7 @@ void AliPMDv1::CreateSupermodule() for (i = 1; i <= fgkNrowUM1; ++i) { number = i; - gMC->Gspos("ECCU", number, "EST1", xb,yb,zb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECCU", number, "EST1", xb,yb,zb, 0, "ONLY"); yb -= (fgkCellRadius*2.); } @@ -268,7 +268,7 @@ void AliPMDv1::CreateSupermodule() for (i = 1; i <= fgkNrowUM2; ++i) { number = i; - gMC->Gspos("ECCU", number, "EST2", xb,yb,zb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECCU", number, "EST2", xb,yb,zb, 0, "ONLY"); yb -= (fgkCellRadius*2.); } @@ -300,7 +300,7 @@ void AliPMDv1::CreateSupermodule() dbox3[2] = fgkCellDepth/2.; //Create a BOX, Material AIR - gMC->Gsvolu("EHC1","BOX", idtmed[698], dbox3, 3); + TVirtualMC::GetMC()->Gsvolu("EHC1","BOX", idtmed[698], dbox3, 3); // Place rectangular strips EST1 inside EHC1 unit module xb = dbox3[0]-dbox1[0]; @@ -315,7 +315,7 @@ void AliPMDv1::CreateSupermodule() yb = fgkCellRadius/2.0; } number = j; - gMC->Gspos("EST1",number, "EHC1", xb - 0.25, yb , 0. , 0, "MANY"); + TVirtualMC::GetMC()->Gspos("EST1",number, "EHC1", xb - 0.25, yb , 0. , 0, "MANY"); //The strips are being placed from top towards bottom of the module //This is because the first cell in a module in hardware is the top @@ -351,7 +351,7 @@ void AliPMDv1::CreateSupermodule() dbox4[2] = dbox3[2]; //Create a BOX of AIR - gMC->Gsvolu("EHC2","BOX", idtmed[698], dbox4, 3); + TVirtualMC::GetMC()->Gsvolu("EHC2","BOX", idtmed[698], dbox4, 3); // Place rectangular strips EST2 inside EHC2 unit module xb = dbox4[0]-dbox2[0]; @@ -367,7 +367,7 @@ void AliPMDv1::CreateSupermodule() yb = +fgkCellRadius/2.0; } number = j; - gMC->Gspos("EST2",number, "EHC2", xb - 0.25, yb , 0. ,0, "MANY"); + TVirtualMC::GetMC()->Gspos("EST2",number, "EHC2", xb - 0.25, yb , 0. ,0, "MANY"); xb = (dbox4[0]-dbox2[0])-j*fgkCellRadius*fgkSqroot3; } @@ -417,7 +417,7 @@ void AliPMDv1::CreateSupermodule() dboxCGA[2] = fgkThBotG10/2.; //Create a G10 BOX - gMC->Gsvolu("EDGA","BOX", idtmed[607], dboxCGA, 3); + TVirtualMC::GetMC()->Gsvolu("EDGA","BOX", idtmed[607], dboxCGA, 3); //-------------------------------------------------// // 3.3mm G10 Box : Top PCB + Air GAp + Back Plane @@ -434,7 +434,7 @@ void AliPMDv1::CreateSupermodule() dboxEEGA[2] = fgkThTopG10/2.; //Create a G10 BOX - gMC->Gsvolu("EEGA","BOX", idtmed[607], dboxEEGA, 3); + TVirtualMC::GetMC()->Gsvolu("EEGA","BOX", idtmed[607], dboxEEGA, 3); //----------------------------------------------------------// @@ -458,11 +458,11 @@ void AliPMDv1::CreateSupermodule() //FOR PRESHOWER //Stainless Steel boundary - Material Stainless Steel - gMC->Gsvolu("EUM1","BOX", idtmed[618], dboxSS1, 3); + TVirtualMC::GetMC()->Gsvolu("EUM1","BOX", idtmed[618], dboxSS1, 3); //FOR VETO //Stainless Steel boundary - Material Stainless Steel - gMC->Gsvolu("EUV1","BOX", idtmed[618], dboxSS1, 3); + TVirtualMC::GetMC()->Gsvolu("EUV1","BOX", idtmed[618], dboxSS1, 3); //--------------------------------------------------------------------// @@ -481,7 +481,7 @@ void AliPMDv1::CreateSupermodule() dboxFEE[1] = 7.0/2.; dboxFEE[2] = 2.4/2.; - gMC->Gsvolu("EFEE","BOX", idtmed[607], dboxFEE, 3); + TVirtualMC::GetMC()->Gsvolu("EFEE","BOX", idtmed[607], dboxFEE, 3); // Now to create the Mother volume to accomodate FEE boards // It should have the dimension few mm smaller than the back plane @@ -496,7 +496,7 @@ void AliPMDv1::CreateSupermodule() dboxFEEBPlaneA[2] = 2.4/2.; //Volume of same dimension as EUM1 or EUV1 of Material AIR - gMC->Gsvolu("EFBA","BOX", idtmed[698], dboxFEEBPlaneA, 3); + TVirtualMC::GetMC()->Gsvolu("EFBA","BOX", idtmed[698], dboxFEEBPlaneA, 3); //Placing the FEE boards in the Mother volume of AIR @@ -525,7 +525,7 @@ void AliPMDv1::CreateSupermodule() // First we place the translator board xFee = -dboxFEEBPlaneA[0] + xA + 0.1 +0.3; - gMC->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY"); // The first FEE board is 11mm from the translator board xFee += 1.1; @@ -533,7 +533,7 @@ void AliPMDv1::CreateSupermodule() for (j = 1; j <= 12; ++j) { - gMC->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY"); xFee += xSepa; number += 1; } @@ -549,38 +549,38 @@ void AliPMDv1::CreateSupermodule() //(1) FIRST PUT the 4mm G10 Box : EDGA Float_t zedga = -dboxSS1[2] + fgkThBotG10/2.; - gMC->Gspos("EDGA", 1, "EUM1", 0., 0., zedga, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EDGA", 1, "EUM1", 0., 0., zedga, 0, "ONLY"); //(2) NEXT PLACING the Honeycomb EHC1 Float_t zehc1 = zedga + fgkThBotG10/2. + fgkCellDepth/2.; - gMC->Gspos("EHC1", 1, "EUM1", 0., 0., zehc1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EHC1", 1, "EUM1", 0., 0., zehc1, 0, "ONLY"); //(3) NEXT PLACING the 3.3mm G10 Box : EEGA Float_t zeega = zehc1 + fgkCellDepth/2. + fgkThTopG10/2.; - gMC->Gspos("EEGA", 1, "EUM1", 0., 0., zeega, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EEGA", 1, "EUM1", 0., 0., zeega, 0, "ONLY"); //(4) NEXT PLACING the FEE BOARD : EFBA Float_t zfeeboardA = zeega + fgkThTopG10/2. +1.2; - gMC->Gspos("EFBA", 1, "EUM1", 0., 0., zfeeboardA, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBA", 1, "EUM1", 0., 0., zfeeboardA, 0, "ONLY"); // FOR VETO // // Placing of all components of UM in AIR BOX EUV1 // //(1) FIRST PUT the FEE BOARD : EFBA zfeeboardA = -dboxSS1[2] + 1.2; - gMC->Gspos("EFBA", 1, "EUV1", 0., 0., zfeeboardA, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBA", 1, "EUV1", 0., 0., zfeeboardA, 0, "ONLY"); //(2) FIRST PLACING the 3.3mm G10 Box : EEGA zeega = zfeeboardA + 1.2 + fgkThTopG10/2.; - gMC->Gspos("EEGA", 1, "EUV1", 0., 0., zeega, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EEGA", 1, "EUV1", 0., 0., zeega, 0, "ONLY"); //(3) NEXT PLACING the Honeycomb EHC1 zehc1 = zeega + fgkThTopG10/2 + fgkCellDepth/2.; - gMC->Gspos("EHC1", 1, "EUV1", 0., 0., zehc1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EHC1", 1, "EUV1", 0., 0., zehc1, 0, "ONLY"); //(4) NEXT PUT THE 4mm G10 Box : EDGA zedga = zehc1 + fgkCellDepth/2.+ fgkThBotG10/2.; - gMC->Gspos("EDGA", 1, "EUV1", 0., 0., zedga, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EDGA", 1, "EUV1", 0., 0., zedga, 0, "ONLY"); //=================== LONG TYPE COMPLETED =========================// @@ -600,7 +600,7 @@ void AliPMDv1::CreateSupermodule() dboxCGB[2] = 0.4/2.; //Create a G10 BOX - gMC->Gsvolu("EDGB","BOX", idtmed[607], dboxCGB, 3); + TVirtualMC::GetMC()->Gsvolu("EDGB","BOX", idtmed[607], dboxCGB, 3); //-------------------------------------------------// // 3.3mm G10 Box : PCB + Air Gap + Back Plane @@ -617,7 +617,7 @@ void AliPMDv1::CreateSupermodule() dboxEEGB[2] = 0.33/2.; // Create a G10 BOX - gMC->Gsvolu("EEGB","BOX", idtmed[607], dboxEEGB, 3); + TVirtualMC::GetMC()->Gsvolu("EEGB","BOX", idtmed[607], dboxEEGB, 3); //Stainless Steel Bounadry : EUM2 & EUV2 @@ -641,11 +641,11 @@ void AliPMDv1::CreateSupermodule() //PRESHOWER //Stainless Steel boundary - Material Stainless Steel - gMC->Gsvolu("EUM2","BOX", idtmed[618], dboxSS2, 3); + TVirtualMC::GetMC()->Gsvolu("EUM2","BOX", idtmed[618], dboxSS2, 3); //VETO //Stainless Steel boundary - Material Stainless Steel - gMC->Gsvolu("EUV2","BOX", idtmed[618], dboxSS2, 3); + TVirtualMC::GetMC()->Gsvolu("EUV2","BOX", idtmed[618], dboxSS2, 3); //----------------------------------------------------------------// //NOW THE FEE BOARD IMPLEMENTATION @@ -665,7 +665,7 @@ void AliPMDv1::CreateSupermodule() dboxFEEBPlaneB[2] = 2.4/2.; //Volume of same dimension as EUM2 or EUV2 of Material AIR - gMC->Gsvolu("EFBB","BOX", idtmed[698], dboxFEEBPlaneB, 3); + TVirtualMC::GetMC()->Gsvolu("EFBB","BOX", idtmed[698], dboxFEEBPlaneB, 3); // FEE Boards EFEE placed inside EFBB @@ -680,14 +680,14 @@ void AliPMDv1::CreateSupermodule() xFee = -dboxFEEBPlaneB[0] + xA + 0.1 +0.3; //First we place the translator board - gMC->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY"); // The first FEE board is 11mm from the translator board xFee+=1.1; number+=1; for (j = 1; j <= 12; ++j) { - gMC->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY"); xFee += xSepa; number += 1; } @@ -695,14 +695,14 @@ void AliPMDv1::CreateSupermodule() //Now we place Bridge Board xFee = xFee - xSepa + 0.8 ; //Bridge Board is at a distance 8mm from FEE board - gMC->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY"); number+=1; xFee+=0.8; for (j = 1; j <= 12; ++j) { - gMC->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY"); xFee += xSepa; number += 1; } @@ -717,38 +717,38 @@ void AliPMDv1::CreateSupermodule() //- Placing of all components of UM in AIR BOX EUM2--// //(1) FIRST PUT the G10 Box : EDGB Float_t zedgb = -dboxSS2[2] + 0.4/2.; - gMC->Gspos("EDGB", 1, "EUM2", 0., 0., zedgb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EDGB", 1, "EUM2", 0., 0., zedgb, 0, "ONLY"); //(2) NEXT PLACING the Honeycomb EHC2 Float_t zehc2 = zedgb + 0.4/2. + fgkCellDepth/2.; - gMC->Gspos("EHC2", 1, "EUM2", 0., 0., zehc2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EHC2", 1, "EUM2", 0., 0., zehc2, 0, "ONLY"); //(3) NEXT PLACING the G10 Box : EEGB Float_t zeegb = zehc2 + fgkCellDepth/2. + 0.33/2.; - gMC->Gspos("EEGB", 1, "EUM2", 0., 0., zeegb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EEGB", 1, "EUM2", 0., 0., zeegb, 0, "ONLY"); //(4) NEXT PLACING FEE BOARDS : EFBB Float_t zfeeboardB = zeegb + 0.33/2.+1.2; - gMC->Gspos("EFBB", 1, "EUM2", 0., 0., zfeeboardB, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBB", 1, "EUM2", 0., 0., zfeeboardB, 0, "ONLY"); // FOR VETO // Placing of all components of UM in AIR BOX EUV2 // //(1) FIRST PUT the FEE BOARD : EUV2 zfeeboardB = -dboxSS2[2] + 1.2; - gMC->Gspos("EFBB", 1, "EUV2", 0., 0., zfeeboardB, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBB", 1, "EUV2", 0., 0., zfeeboardB, 0, "ONLY"); //(2) FIRST PLACING the G10 Box : EEGB zeegb = zfeeboardB + 1.2 + 0.33/2.; - gMC->Gspos("EEGB", 1, "EUV2", 0., 0., zeegb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EEGB", 1, "EUV2", 0., 0., zeegb, 0, "ONLY"); //(3) NEXT PLACING the Honeycomb EHC2 zehc2 = zeegb + 0.33/2. + fgkCellDepth/2.; - gMC->Gspos("EHC2", 1, "EUV2", 0., 0., zehc2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EHC2", 1, "EUV2", 0., 0., zehc2, 0, "ONLY"); //(4) NEXT PUT THE G10 Box : EDGB zedgb = zehc2 + fgkCellDepth/2.+ 0.4/2.; - gMC->Gspos("EDGB", 1, "EUV2", 0., 0., zedgb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EDGB", 1, "EUV2", 0., 0., zedgb, 0, "ONLY"); //===================================================================// @@ -871,7 +871,7 @@ void AliPMDv1::CreatePMD() dboxLeadA[1] = fSMLengthay; dboxLeadA[2] = fgkThLead/2.; - gMC->Gsvolu("ELDA","BOX", idtmed[600], dboxLeadA, 3); + TVirtualMC::GetMC()->Gsvolu("ELDA","BOX", idtmed[600], dboxLeadA, 3); //LEAD Plate For SHORT TYPE // X-dimension of Lead Plate = 2*(X-dimension of EUM2 or EUV2) + gap provided between unit modules @@ -885,7 +885,7 @@ void AliPMDv1::CreatePMD() dboxLeadB[1] = fSMLengthby; dboxLeadB[2] = fgkThLead/2.; - gMC->Gsvolu("ELDB","BOX", idtmed[600], dboxLeadB, 3); + TVirtualMC::GetMC()->Gsvolu("ELDB","BOX", idtmed[600], dboxLeadB, 3); //=========== CREATE MOTHER VOLUMES FOR PMD ===========================/ @@ -913,7 +913,7 @@ void AliPMDv1::CreatePMD() gaspmd1[1] = fSMLengthay + serviceYa/2.; //SS-plate for cooling encloser gaspmd1[2] = fSMthick/2.; - gMC->Gsvolu("EPM1", "BOX", idtmed[698], gaspmd1, 3); + TVirtualMC::GetMC()->Gsvolu("EPM1", "BOX", idtmed[698], gaspmd1, 3); // Create Volume FOR EPM2 @@ -929,7 +929,7 @@ void AliPMDv1::CreatePMD() gaspmd2[1] = fSMLengthay + serviceYb/2.; //SS-plate for cooling encloser gaspmd2[2] = fSMthick/2.; - gMC->Gsvolu("EPM2", "BOX", idtmed[698], gaspmd2, 3); + TVirtualMC::GetMC()->Gsvolu("EPM2", "BOX", idtmed[698], gaspmd2, 3); // Create Volume FOR EPM3 @@ -945,7 +945,7 @@ void AliPMDv1::CreatePMD() gaspmd3[1] = fSMLengthby + serviceYa/2.; //SS-plate for cooling encloser gaspmd3[2] = fSMthick/2.; - gMC->Gsvolu("EPM3", "BOX", idtmed[698], gaspmd3, 3); + TVirtualMC::GetMC()->Gsvolu("EPM3", "BOX", idtmed[698], gaspmd3, 3); // Create Volume FOR EPM4 @@ -960,7 +960,7 @@ void AliPMDv1::CreatePMD() gaspmd4[1] = fSMLengthby + serviceYb/2.; //SS-plate for cooling encloser gaspmd4[2] = fSMthick/2.; - gMC->Gsvolu("EPM4", "BOX", idtmed[698], gaspmd4, 3); + TVirtualMC::GetMC()->Gsvolu("EPM4", "BOX", idtmed[698], gaspmd4, 3); // Create the Fifth Mother Volume of Girders and its Carriage //-------------------------------------------------------------// @@ -977,7 +977,7 @@ void AliPMDv1::CreatePMD() grdr[1] = 12.0/2.; grdr[2] = 7.0/2.; - gMC->Gsvolu("EGDR", "BOX", idtmed[618], grdr, 3); + TVirtualMC::GetMC()->Gsvolu("EGDR", "BOX", idtmed[618], grdr, 3); // Create Air Strip for Girders as the Girders are hollow // Girders are 1cm thick in Y and Z on both sides @@ -987,10 +987,10 @@ void AliPMDv1::CreatePMD() airgrdr[1] = grdr[1] - 1.0; airgrdr[2] = grdr[2] - 1.0; - gMC->Gsvolu("EAIR", "BOX", idtmed[698], airgrdr, 3); + TVirtualMC::GetMC()->Gsvolu("EAIR", "BOX", idtmed[698], airgrdr, 3); // Positioning the air strip EAIR in girder EGDR - gMC->Gspos("EAIR", 1, "EGDR", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EAIR", 1, "EGDR", 0., 0., 0., 0, "ONLY"); // Create the Carriage for Girders // Originally, Carriage is divided in two parts @@ -1006,7 +1006,7 @@ void AliPMDv1::CreatePMD() xgrdr[1] = 4.7/2.; xgrdr[2] = 18.5/2.; - gMC->Gsvolu("EXGD", "BOX", idtmed[618], xgrdr, 3); + TVirtualMC::GetMC()->Gsvolu("EXGD", "BOX", idtmed[618], xgrdr, 3); // Create Air Strip for the Carriage EXGD as it is hollow // Carriage is 1cm thick in Y on one side and in Z on both sides @@ -1016,10 +1016,10 @@ void AliPMDv1::CreatePMD() xairgrdr[1] = xgrdr[1] - 0.5; xairgrdr[2] = xgrdr[2] - 1.0; - gMC->Gsvolu("EXIR", "BOX", idtmed[698], xairgrdr, 3); + TVirtualMC::GetMC()->Gsvolu("EXIR", "BOX", idtmed[698], xairgrdr, 3); // Positioning the air strip EXIR in CArriage EXGD - gMC->Gspos("EXIR", 1, "EXGD", 0., -0.05, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EXIR", 1, "EXGD", 0., -0.05, 0., 0, "ONLY"); // Now Create the master volume of air containing Girders & Carriage @@ -1033,13 +1033,13 @@ void AliPMDv1::CreatePMD() fulgrdr[1] = 17.5/2.; fulgrdr[2] = 18.5/2.; - gMC->Gsvolu("EFGD", "BOX", idtmed[698], fulgrdr, 3); + TVirtualMC::GetMC()->Gsvolu("EFGD", "BOX", idtmed[698], fulgrdr, 3); // Positioning the EGDR and EXGD in EFGD - gMC->Gspos("EXGD", 1, "EFGD", 0., 6.4, 0., 0, "ONLY"); - gMC->Gspos("EGDR", 1, "EFGD", 0., -2.75, -5.75, 0, "ONLY"); - gMC->Gspos("EGDR", 2, "EFGD", 0., -2.75, 5.75, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EXGD", 1, "EFGD", 0., 6.4, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EGDR", 1, "EFGD", 0., -2.75, -5.75, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EGDR", 2, "EFGD", 0., -2.75, 5.75, 0, "ONLY"); //=========== Mother Volumes are Created ============================// @@ -1062,10 +1062,10 @@ void AliPMDv1::CreatePMD() sscoolencl1[1] = gaspmd1[1]; sscoolencl1[2] = gaspmd1[2] - 0.2/2.; - gMC->Gsvolu("ESC1", "BOX", idtmed[618], sscoolencl1, 3); + TVirtualMC::GetMC()->Gsvolu("ESC1", "BOX", idtmed[618], sscoolencl1, 3); // Placement of ESC1 in EPM1 - gMC->Gspos("ESC1", 1, "EPM1", -gaspmd1[0] + 0.05, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESC1", 1, "EPM1", -gaspmd1[0] + 0.05, 0., 0., 0, "ONLY"); // For EPM2 @@ -1080,10 +1080,10 @@ void AliPMDv1::CreatePMD() sscoolencl2[1] = gaspmd2[1]; sscoolencl2[2] = gaspmd2[2] - 0.2/2.; - gMC->Gsvolu("ESC2", "BOX", idtmed[618], sscoolencl2, 3); + TVirtualMC::GetMC()->Gsvolu("ESC2", "BOX", idtmed[618], sscoolencl2, 3); // Placement of ESC2 in EPM2 - gMC->Gspos("ESC2", 1, "EPM2", gaspmd2[0] - 0.05 , 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESC2", 1, "EPM2", gaspmd2[0] - 0.05 , 0., 0., 0, "ONLY"); // For SHORT TYPE @@ -1099,10 +1099,10 @@ void AliPMDv1::CreatePMD() sscoolencl3[1] = gaspmd3[1]; sscoolencl3[2] = gaspmd3[2] - 0.2/2.; - gMC->Gsvolu("ESC3", "BOX", idtmed[618], sscoolencl3, 3); + TVirtualMC::GetMC()->Gsvolu("ESC3", "BOX", idtmed[618], sscoolencl3, 3); // Placement of ESC3 in EPM3 - gMC->Gspos("ESC3", 1, "EPM3", gaspmd3[0] - 0.05 , 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESC3", 1, "EPM3", gaspmd3[0] - 0.05 , 0., 0., 0, "ONLY"); // For EPM4 @@ -1117,10 +1117,10 @@ void AliPMDv1::CreatePMD() sscoolencl4[1] = gaspmd4[1]; sscoolencl4[2] = gaspmd4[2] - 0.2/2.; - gMC->Gsvolu("ESC4", "BOX", idtmed[618], sscoolencl4, 3); + TVirtualMC::GetMC()->Gsvolu("ESC4", "BOX", idtmed[618], sscoolencl4, 3); // Placement of ESC4 in EPM4 - gMC->Gspos("ESC4", 1, "EPM4", -gaspmd4[0] + 0.05 , 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESC4", 1, "EPM4", -gaspmd4[0] + 0.05 , 0., 0., 0, "ONLY"); //======== CREATE SS SUPPORTS FOR EPM1, EPM2, EPM3 & EPM4 =========// // --- DEFINE SS volumes for EPM1 & EPM2 --- @@ -1138,7 +1138,7 @@ void AliPMDv1::CreatePMD() dboxFea1[1] = fSMLengthay + serviceYa/2.; dboxFea1[2] = fgkThSteel/2.; - gMC->Gsvolu("EFE1","BOX", idtmed[618], dboxFea1, 3); + TVirtualMC::GetMC()->Gsvolu("EFE1","BOX", idtmed[618], dboxFea1, 3); // Create SS Support For EPM2 @@ -1154,7 +1154,7 @@ void AliPMDv1::CreatePMD() dboxFea2[1] = fSMLengthay + serviceYb/2.; dboxFea2[2] = fgkThSteel/2.; - gMC->Gsvolu("EFE2","BOX", idtmed[618], dboxFea2, 3); + TVirtualMC::GetMC()->Gsvolu("EFE2","BOX", idtmed[618], dboxFea2, 3); // Create SS Support For EPM3 @@ -1169,7 +1169,7 @@ void AliPMDv1::CreatePMD() dboxFea3[1] = fSMLengthby + serviceYa/2.; dboxFea3[2] = fgkThSteel/2.; - gMC->Gsvolu("EFE3","BOX", idtmed[618], dboxFea3, 3); + TVirtualMC::GetMC()->Gsvolu("EFE3","BOX", idtmed[618], dboxFea3, 3); // Create SS Support For EPM4 @@ -1184,7 +1184,7 @@ void AliPMDv1::CreatePMD() dboxFea4[1] = fSMLengthby + serviceYb/2.; dboxFea4[2] = fgkThSteel/2.; - gMC->Gsvolu("EFE4","BOX", idtmed[618], dboxFea4, 3); + TVirtualMC::GetMC()->Gsvolu("EFE4","BOX", idtmed[618], dboxFea4, 3); //=============== Volumes for SS support are Completed =============// @@ -1206,7 +1206,7 @@ void AliPMDv1::CreatePMD() enclos1[1] = dboxFea1[1]; enclos1[2] = 0.05; - gMC->Gsvolu("ECC1", "BOX", idtmed[607], enclos1, 3); + TVirtualMC::GetMC()->Gsvolu("ECC1", "BOX", idtmed[607], enclos1, 3); // Create FR4 sheet ECC2 // X-dimension = same as EFE2 @@ -1218,7 +1218,7 @@ void AliPMDv1::CreatePMD() enclos2[1] = dboxFea2[1]; enclos2[2] = 0.05; - gMC->Gsvolu("ECC2", "BOX", idtmed[607], enclos2, 3); + TVirtualMC::GetMC()->Gsvolu("ECC2", "BOX", idtmed[607], enclos2, 3); // Create FR4 sheet ECC3 // X-dimension = same as EFE3 @@ -1230,7 +1230,7 @@ void AliPMDv1::CreatePMD() enclos3[1] = dboxFea3[1]; enclos3[2] = 0.05; - gMC->Gsvolu("ECC3", "BOX", idtmed[607], enclos3, 3); + TVirtualMC::GetMC()->Gsvolu("ECC3", "BOX", idtmed[607], enclos3, 3); // Create FR4 sheet ECC4 // X-dimension = same as EFE4 @@ -1242,7 +1242,7 @@ void AliPMDv1::CreatePMD() enclos4[1] = dboxFea4[1]; enclos4[2] = 0.05; - gMC->Gsvolu("ECC4", "BOX", idtmed[607], enclos4, 3); + TVirtualMC::GetMC()->Gsvolu("ECC4", "BOX", idtmed[607], enclos4, 3); //--------------- FR4 SHEETS COMPLETED ---------------------------// @@ -1263,7 +1263,7 @@ void AliPMDv1::CreatePMD() channel12[1] = 0.05; channel12[2] = 2.0/2.; - gMC->Gsvolu("ECHA", "BOX", idtmed[618], channel12, 3); + TVirtualMC::GetMC()->Gsvolu("ECHA", "BOX", idtmed[618], channel12, 3); // Create SS-channel for Short Type // X-dimension = same as Lead Plate ELDB @@ -1276,7 +1276,7 @@ void AliPMDv1::CreatePMD() channel34[1] = 0.05; channel34[2] = 2.0/2.; - gMC->Gsvolu("ECHB", "BOX", idtmed[618], channel34, 3); + TVirtualMC::GetMC()->Gsvolu("ECHB", "BOX", idtmed[618], channel34, 3); //----------------- SS-Channels are Copmleted --------------------// @@ -1319,10 +1319,10 @@ void AliPMDv1::CreatePMD() yLead2 = 9.8/2.; zLead2 = zpba; - gMC->Gspos("EFE1", 1, "EPM1", xIron1, yIron1, zfea, 0, "ONLY"); - gMC->Gspos("ELDA", 1, "EPM1", xLead1, yLead1, zpba, 0, "ONLY"); - gMC->Gspos("EFE2", 1, "EPM2", xIron2, yIron2, zfea, 0, "ONLY"); - gMC->Gspos("ELDA", 1, "EPM2", xLead2, yLead2, zpba, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFE1", 1, "EPM1", xIron1, yIron1, zfea, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELDA", 1, "EPM1", xLead1, yLead1, zpba, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFE2", 1, "EPM2", xIron2, yIron2, zfea, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELDA", 1, "EPM2", xLead2, yLead2, zpba, jhrot12, "ONLY"); // FOR SHORT TYPE @@ -1346,23 +1346,23 @@ void AliPMDv1::CreatePMD() yLead4 = 9.8/2.; zLead4 = zpba; - gMC->Gspos("EFE3", 1, "EPM3", xIron3, yIron3, zfea, 0, "ONLY"); - gMC->Gspos("ELDB", 1, "EPM3", xLead3, yLead3, zpba, 0, "ONLY"); - gMC->Gspos("EFE4", 1, "EPM4", xIron4, yIron4, zfea, 0, "ONLY"); - gMC->Gspos("ELDB", 1, "EPM4", xLead4, yLead4, zpba, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFE3", 1, "EPM3", xIron3, yIron3, zfea, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELDB", 1, "EPM3", xLead3, yLead3, zpba, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFE4", 1, "EPM4", xIron4, yIron4, zfea, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELDB", 1, "EPM4", xLead4, yLead4, zpba, jhrot12, "ONLY"); //===================================================================// // Placement of FR4 sheets as encloser of full profile of PMD - gMC->Gspos("ECC1", 1, "EPM1", xIron1, yIron1, -8.45, 0, "ONLY"); - gMC->Gspos("ECC2", 1, "EPM2", xIron2, yIron2, -8.45, 0,"ONLY"); - gMC->Gspos("ECC3", 1, "EPM3", xIron3, yIron3, -8.45, 0,"ONLY"); - gMC->Gspos("ECC4", 1, "EPM4", xIron4, yIron4, -8.45, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("ECC1", 1, "EPM1", xIron1, yIron1, -8.45, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECC2", 1, "EPM2", xIron2, yIron2, -8.45, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("ECC3", 1, "EPM3", xIron3, yIron3, -8.45, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("ECC4", 1, "EPM4", xIron4, yIron4, -8.45, 0,"ONLY"); - gMC->Gspos("ECC1", 2, "EPM1", xIron1, yIron1, 8.45, 0, "ONLY"); - gMC->Gspos("ECC2", 2, "EPM2", xIron2, yIron2, 8.45, 0,"ONLY"); - gMC->Gspos("ECC3", 2, "EPM3", xIron3, yIron3, 8.45, 0,"ONLY"); - gMC->Gspos("ECC4", 2, "EPM4", xIron4, yIron4, 8.45, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("ECC1", 2, "EPM1", xIron1, yIron1, 8.45, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECC2", 2, "EPM2", xIron2, yIron2, 8.45, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("ECC3", 2, "EPM3", xIron3, yIron3, 8.45, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("ECC4", 2, "EPM4", xIron4, yIron4, 8.45, 0,"ONLY"); //----------------- NOW TO PLACE SS-CHANNELS -----------------------// @@ -1379,14 +1379,14 @@ void AliPMDv1::CreatePMD() ychanepm21 = -ya1 + yLead2 - dboxSS1[1] - 0.1 - 0.1/2.; ychanepm22 = -ya1 + yLead2 + dboxSS1[1] + 0.1 + 0.1/2.; - gMC->Gspos("ECHA", 1, "EPM1", xchanepm11, ychanepm11, zchanPS, 0, "ONLY"); - gMC->Gspos("ECHA", 2, "EPM1", xchanepm11, ychanepm12, zchanPS, 0, "ONLY"); - gMC->Gspos("ECHA", 3, "EPM1", xchanepm11, ychanepm11, zchanVeto, 0, "ONLY"); - gMC->Gspos("ECHA", 4, "EPM1", xchanepm11, ychanepm12, zchanVeto, 0, "ONLY"); - gMC->Gspos("ECHA", 1, "EPM2", xchanepm21, ychanepm21, zchanPS, 0, "ONLY"); - gMC->Gspos("ECHA", 2, "EPM2", xchanepm21, ychanepm22, zchanPS, 0, "ONLY"); - gMC->Gspos("ECHA", 3, "EPM2", xchanepm21, ychanepm21, zchanVeto, 0, "ONLY"); - gMC->Gspos("ECHA", 4, "EPM2", xchanepm21, ychanepm22, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHA", 1, "EPM1", xchanepm11, ychanepm11, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHA", 2, "EPM1", xchanepm11, ychanepm12, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHA", 3, "EPM1", xchanepm11, ychanepm11, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHA", 4, "EPM1", xchanepm11, ychanepm12, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHA", 1, "EPM2", xchanepm21, ychanepm21, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHA", 2, "EPM2", xchanepm21, ychanepm22, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHA", 3, "EPM2", xchanepm21, ychanepm21, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHA", 4, "EPM2", xchanepm21, ychanepm22, zchanVeto, 0, "ONLY"); xchanepm31 = xLead3; ychanepm31 = yb1 + yLead3 + dboxSS2[1] + 0.1 + 0.1/2.; @@ -1401,28 +1401,28 @@ void AliPMDv1::CreatePMD() ychanepm44 = -yb3 + yLead4 + dboxSS2[1] + 0.1 + 0.1/2.; - gMC->Gspos("ECHB", 1, "EPM3", xchanepm31, ychanepm31, zchanPS, 0, "ONLY"); - gMC->Gspos("ECHB", 2, "EPM3", xchanepm31, ychanepm32, zchanPS, 0, "ONLY"); - gMC->Gspos("ECHB", 3, "EPM3", xchanepm31, ychanepm33, zchanPS, 0, "ONLY"); - gMC->Gspos("ECHB", 4, "EPM3", xchanepm31, ychanepm34 + 0.200005, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 1, "EPM3", xchanepm31, ychanepm31, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 2, "EPM3", xchanepm31, ychanepm32, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 3, "EPM3", xchanepm31, ychanepm33, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 4, "EPM3", xchanepm31, ychanepm34 + 0.200005, zchanPS, 0, "ONLY"); // Because of overlaping a factor 0.200005 is added in ychanepm34 - gMC->Gspos("ECHB", 5, "EPM3", xchanepm31, ychanepm31, zchanVeto, 0, "ONLY"); - gMC->Gspos("ECHB", 6, "EPM3", xchanepm31, ychanepm32, zchanVeto, 0, "ONLY"); - gMC->Gspos("ECHB", 7, "EPM3", xchanepm31, ychanepm33, zchanVeto, 0, "ONLY"); - gMC->Gspos("ECHB", 8, "EPM3", xchanepm31, ychanepm34 + 0.200005, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 5, "EPM3", xchanepm31, ychanepm31, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 6, "EPM3", xchanepm31, ychanepm32, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 7, "EPM3", xchanepm31, ychanepm33, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 8, "EPM3", xchanepm31, ychanepm34 + 0.200005, zchanVeto, 0, "ONLY"); // Because of overlaping a factor 0.200005 is added in ychanepm34 - gMC->Gspos("ECHB", 1, "EPM4", xchanepm41, ychanepm41, zchanPS, 0, "ONLY"); - gMC->Gspos("ECHB", 2, "EPM4", xchanepm41, ychanepm42, zchanPS, 0, "ONLY"); - gMC->Gspos("ECHB", 3, "EPM4", xchanepm41, ychanepm43, zchanPS, 0, "ONLY"); - gMC->Gspos("ECHB", 4, "EPM4", xchanepm41, ychanepm44 - 0.200002, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 1, "EPM4", xchanepm41, ychanepm41, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 2, "EPM4", xchanepm41, ychanepm42, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 3, "EPM4", xchanepm41, ychanepm43, zchanPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 4, "EPM4", xchanepm41, ychanepm44 - 0.200002, zchanPS, 0, "ONLY"); // Because of overlaping a factor 0.200002 is subtracted in ychanepm44 - gMC->Gspos("ECHB", 5, "EPM4", xchanepm41, ychanepm41, zchanVeto, 0, "ONLY"); - gMC->Gspos("ECHB", 6, "EPM4", xchanepm41, ychanepm42, zchanVeto, 0, "ONLY"); - gMC->Gspos("ECHB", 7, "EPM4", xchanepm41, ychanepm43, zchanVeto, 0, "ONLY"); - gMC->Gspos("ECHB", 8, "EPM4", xchanepm41, ychanepm44 -0.200002, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 5, "EPM4", xchanepm41, ychanepm41, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 6, "EPM4", xchanepm41, ychanepm42, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 7, "EPM4", xchanepm41, ychanepm43, zchanVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECHB", 8, "EPM4", xchanepm41, ychanepm44 -0.200002, zchanVeto, 0, "ONLY"); // Because of overlaping a factor 0.200002 is subtracted in ychanepm44 //================= Channel Placement Completed ======================// @@ -1449,8 +1449,8 @@ void AliPMDv1::CreatePMD() esvdA1[1]= dboxFea1[1]; esvdA1[2]= 7.4/2.; - gMC->Gsvolu("ESV1", "BOX", idtmed[603], esvdA1, 3); - gMC->Gsvolu("ESV2", "BOX", idtmed[603], esvdA1, 3); + TVirtualMC::GetMC()->Gsvolu("ESV1", "BOX", idtmed[603], esvdA1, 3); + TVirtualMC::GetMC()->Gsvolu("ESV2", "BOX", idtmed[603], esvdA1, 3); // Create Air strip for Al Boxes type-A // Al boxes are 3mm thick In X and Z on both sides @@ -1463,12 +1463,12 @@ void AliPMDv1::CreatePMD() eairA1[1]= esvdA1[1]; eairA1[2]= esvdA1[2] - 0.3; - gMC->Gsvolu("EIR1", "BOX", idtmed[698], eairA1, 3); - gMC->Gsvolu("EIR2", "BOX", idtmed[698], eairA1, 3); + TVirtualMC::GetMC()->Gsvolu("EIR1", "BOX", idtmed[698], eairA1, 3); + TVirtualMC::GetMC()->Gsvolu("EIR2", "BOX", idtmed[698], eairA1, 3); // Put air strips EIR1 & EIR2 inside ESV1 & ESV2 respectively - gMC->Gspos("EIR1", 1, "ESV1", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("EIR2", 1, "ESV2", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EIR1", 1, "ESV1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EIR2", 1, "ESV2", 0., 0., 0., 0, "ONLY"); // For Short Type @@ -1481,8 +1481,8 @@ void AliPMDv1::CreatePMD() esvdA2[1]= dboxFea3[1]; esvdA2[2]= esvdA1[2]; - gMC->Gsvolu("ESV3", "BOX", idtmed[603], esvdA2, 3); - gMC->Gsvolu("ESV4", "BOX", idtmed[603], esvdA2, 3); + TVirtualMC::GetMC()->Gsvolu("ESV3", "BOX", idtmed[603], esvdA2, 3); + TVirtualMC::GetMC()->Gsvolu("ESV4", "BOX", idtmed[603], esvdA2, 3); // Create Air strip for Al Boxes type-B // Al boxes are 3mm thick In X and Z on both sides @@ -1495,12 +1495,12 @@ void AliPMDv1::CreatePMD() eairA2[1]= esvdA2[1]; eairA2[2]= esvdA2[2] - 0.3; - gMC->Gsvolu("EIR3", "BOX", idtmed[698], eairA2, 3); - gMC->Gsvolu("EIR4", "BOX", idtmed[698], eairA2, 3); + TVirtualMC::GetMC()->Gsvolu("EIR3", "BOX", idtmed[698], eairA2, 3); + TVirtualMC::GetMC()->Gsvolu("EIR4", "BOX", idtmed[698], eairA2, 3); // Put air strips EIR3 & EIR4 inside ESV3 & ESV4 respectively - gMC->Gspos("EIR3", 1, "ESV3", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("EIR4", 1, "ESV4", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EIR3", 1, "ESV3", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EIR4", 1, "ESV4", 0., 0., 0., 0, "ONLY"); // FOR VETO @@ -1520,8 +1520,8 @@ void AliPMDv1::CreatePMD() esvdB1[1]= dboxFea1[1]; esvdB1[2]= 8.9/2.; - gMC->Gsvolu("EVV1", "BOX", idtmed[603], esvdB1, 3); - gMC->Gsvolu("EVV2", "BOX", idtmed[603], esvdB1, 3); + TVirtualMC::GetMC()->Gsvolu("EVV1", "BOX", idtmed[603], esvdB1, 3); + TVirtualMC::GetMC()->Gsvolu("EVV2", "BOX", idtmed[603], esvdB1, 3); // Create Air strip for Al Boxes long type // Al boxes are 3mm thick In X and Z on both sides @@ -1534,12 +1534,12 @@ void AliPMDv1::CreatePMD() eairB1[1]= esvdB1[1]; eairB1[2]= esvdB1[2] - 0.3; - gMC->Gsvolu("EIR5", "BOX", idtmed[698], eairB1, 3); - gMC->Gsvolu("EIR6", "BOX", idtmed[698], eairB1, 3); + TVirtualMC::GetMC()->Gsvolu("EIR5", "BOX", idtmed[698], eairB1, 3); + TVirtualMC::GetMC()->Gsvolu("EIR6", "BOX", idtmed[698], eairB1, 3); // Put air strips EIR5 & EIR6 inside EVV1 & EVV2 respectively - gMC->Gspos("EIR5", 1, "EVV1", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("EIR6", 1, "EVV2", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EIR5", 1, "EVV1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EIR6", 1, "EVV2", 0., 0., 0., 0, "ONLY"); // For Short Type @@ -1553,8 +1553,8 @@ void AliPMDv1::CreatePMD() esvdB2[1]= dboxFea3[1]; esvdB2[2]= esvdB1[2]; - gMC->Gsvolu("EVV3", "BOX", idtmed[603], esvdB2, 3); - gMC->Gsvolu("EVV4", "BOX", idtmed[603], esvdB2, 3); + TVirtualMC::GetMC()->Gsvolu("EVV3", "BOX", idtmed[603], esvdB2, 3); + TVirtualMC::GetMC()->Gsvolu("EVV4", "BOX", idtmed[603], esvdB2, 3); // Create Air strip for Al Boxes short type @@ -1568,12 +1568,12 @@ void AliPMDv1::CreatePMD() eairB2[1]= esvdB2[1]; eairB2[2]= esvdB2[2] - 0.3; - gMC->Gsvolu("EIR7", "BOX", idtmed[698], eairB2, 3); - gMC->Gsvolu("EIR8", "BOX", idtmed[698], eairB2, 3); + TVirtualMC::GetMC()->Gsvolu("EIR7", "BOX", idtmed[698], eairB2, 3); + TVirtualMC::GetMC()->Gsvolu("EIR8", "BOX", idtmed[698], eairB2, 3); // Put air strips EIR7 & EIR8 inside EVV3 & EVV4 respectively - gMC->Gspos("EIR7", 1, "EVV3", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("EIR8", 1, "EVV4", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EIR7", 1, "EVV3", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EIR8", 1, "EVV4", 0., 0., 0., 0, "ONLY"); //------------ Al Boxes Completed ----------------------/ @@ -1590,7 +1590,7 @@ void AliPMDv1::CreatePMD() elvdb[1]= 8.0/2.; elvdb[2]= 0.2/2.; - gMC->Gsvolu("ELVD", "BOX", idtmed[607], elvdb, 3); + TVirtualMC::GetMC()->Gsvolu("ELVD", "BOX", idtmed[607], elvdb, 3); // Put the LVDBs inside Air Boxes @@ -1598,8 +1598,8 @@ void AliPMDv1::CreatePMD() for(Int_t jj =1; jj<=6; jj++){ - gMC->Gspos("ELVD", jj, "EIR1", 0., yesvd, 0., 0, "ONLY"); - gMC->Gspos("ELVD", jj, "EIR2", 0., yesvd, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELVD", jj, "EIR1", 0., yesvd, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELVD", jj, "EIR2", 0., yesvd, 0., 0, "ONLY"); yesvd = yesvd - 4.0 - 0.5 - 4.0; @@ -1609,8 +1609,8 @@ void AliPMDv1::CreatePMD() for(Int_t jj =1; jj<=6; jj++){ - gMC->Gspos("ELVD", jj, "EIR3", 0., yesvd, 0., 0, "ONLY"); - gMC->Gspos("ELVD", jj, "EIR4", 0., yesvd, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELVD", jj, "EIR3", 0., yesvd, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELVD", jj, "EIR4", 0., yesvd, 0., 0, "ONLY"); yesvd = yesvd - 4.0 - 0.5 - 4.0; } @@ -1619,8 +1619,8 @@ void AliPMDv1::CreatePMD() for(Int_t jj =1; jj<=6; jj++){ - gMC->Gspos("ELVD", jj, "EIR5", 0., yesvd, 0., 0, "ONLY"); - gMC->Gspos("ELVD", jj, "EIR6", 0., yesvd, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELVD", jj, "EIR5", 0., yesvd, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELVD", jj, "EIR6", 0., yesvd, 0., 0, "ONLY"); yesvd = yesvd - 4.0 - 0.5 - 4.0; } @@ -1629,8 +1629,8 @@ void AliPMDv1::CreatePMD() for(Int_t jj =1; jj<=6; jj++){ - gMC->Gspos("ELVD", jj, "EIR7", 0., yesvd, 0., 0, "ONLY"); - gMC->Gspos("ELVD", jj, "EIR8", 0., yesvd, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELVD", jj, "EIR7", 0., yesvd, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELVD", jj, "EIR8", 0., yesvd, 0., 0, "ONLY"); yesvd = yesvd - 4.0 - 0.5 - 4.0; } @@ -1654,28 +1654,28 @@ void AliPMDv1::CreatePMD() cable1[1] = dboxFea1[1]; cable1[2] = 2.4/2.; - gMC->Gsvolu("ECB1", "BOX", idtmed[631], cable1, 3); + TVirtualMC::GetMC()->Gsvolu("ECB1", "BOX", idtmed[631], cable1, 3); Float_t cable2[3]; cable2[0] = 2.5/2.; cable2[1] = dboxFea3[1]; cable2[2] = 2.4/2.; - gMC->Gsvolu("ECB2", "BOX", idtmed[631], cable2, 3); + TVirtualMC::GetMC()->Gsvolu("ECB2", "BOX", idtmed[631], cable2, 3); Float_t cable3[3]; cable3[0] = 2.5/2.; cable3[1] = dboxFea3[1] - dboxUM2[1]; cable3[2] = 2.4/2.; - gMC->Gsvolu("ECB3", "BOX", idtmed[631], cable3, 3); + TVirtualMC::GetMC()->Gsvolu("ECB3", "BOX", idtmed[631], cable3, 3); Float_t cable4[3]; cable4[0] = 2.5/2.; cable4[1] = dboxUM2[1]; cable4[2] = 2.4/2.; - gMC->Gsvolu("ECB4", "BOX", idtmed[631], cable4, 3); + TVirtualMC::GetMC()->Gsvolu("ECB4", "BOX", idtmed[631], cable4, 3); // Calculation of the co-ordinates of Cables @@ -1717,46 +1717,46 @@ void AliPMDv1::CreatePMD() // Placement of Cables in Air Boxes - gMC->Gspos("ECB2", 1, "EIR1", xcable2pm1, ycable2pm1, zcablePS, 0, "ONLY"); - gMC->Gspos("ECB3", 1, "EIR1", xcable3pm1, ycable3pm1, zcablePS, 0, "ONLY"); - gMC->Gspos("ECB2", 1, "EIR5", xcable2pm1, ycable2pm1, zcableVeto, 0, "ONLY"); - gMC->Gspos("ECB3", 1, "EIR5", xcable3pm1, ycable3pm1, zcableVeto, 0, "ONLY"); - - gMC->Gspos("ECB1", 1, "EIR2", xcable11pm2, 0., zcablePS, 0, "ONLY"); - gMC->Gspos("ECB1", 2, "EIR2", xcable12pm2, 0., zcablePS, 0, "ONLY"); - gMC->Gspos("ECB2", 1, "EIR2", xcable2pm2, ycable2pm2, zcablePS, 0, "ONLY"); - gMC->Gspos("ECB1", 1, "EIR6", xcable11pm2, 0., zcableVeto, 0, "ONLY"); - gMC->Gspos("ECB1", 2, "EIR6", xcable12pm2, 0., zcableVeto, 0, "ONLY"); - gMC->Gspos("ECB2", 1, "EIR6", xcable2pm2, ycable2pm2, zcableVeto, 0, "ONLY"); - - gMC->Gspos("ECB3", 1, "EIR3", xcable3pm3, ycable3pm3, zcablePS, 0, "ONLY"); - gMC->Gspos("ECB4", 1, "EIR3", xcable4pm3, ycable4pm3, zcablePS, 0, "ONLY"); - gMC->Gspos("ECB3", 1, "EIR7", xcable3pm3, ycable3pm3, zcableVeto, 0, "ONLY"); - gMC->Gspos("ECB4", 1, "EIR7", xcable4pm3, ycable4pm3, zcableVeto, 0, "ONLY"); - - gMC->Gspos("ECB2", 1, "EIR4", xcable21pm4, 0., zcablePS, 0, "ONLY"); - gMC->Gspos("ECB2", 2, "EIR4", xcable22pm4, 0., zcablePS, 0, "ONLY"); - gMC->Gspos("ECB3", 1, "EIR4", xcable3pm4, ycable3pm4, zcablePS, 0, "ONLY"); - gMC->Gspos("ECB2", 1, "EIR8", xcable21pm4, 0., zcableVeto, 0, "ONLY"); - gMC->Gspos("ECB2", 2, "EIR8", xcable22pm4, 0., zcableVeto, 0, "ONLY"); - gMC->Gspos("ECB3", 1, "EIR8", xcable3pm4, ycable3pm4, zcableVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB2", 1, "EIR1", xcable2pm1, ycable2pm1, zcablePS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB3", 1, "EIR1", xcable3pm1, ycable3pm1, zcablePS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB2", 1, "EIR5", xcable2pm1, ycable2pm1, zcableVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB3", 1, "EIR5", xcable3pm1, ycable3pm1, zcableVeto, 0, "ONLY"); + + TVirtualMC::GetMC()->Gspos("ECB1", 1, "EIR2", xcable11pm2, 0., zcablePS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB1", 2, "EIR2", xcable12pm2, 0., zcablePS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB2", 1, "EIR2", xcable2pm2, ycable2pm2, zcablePS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB1", 1, "EIR6", xcable11pm2, 0., zcableVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB1", 2, "EIR6", xcable12pm2, 0., zcableVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB2", 1, "EIR6", xcable2pm2, ycable2pm2, zcableVeto, 0, "ONLY"); + + TVirtualMC::GetMC()->Gspos("ECB3", 1, "EIR3", xcable3pm3, ycable3pm3, zcablePS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB4", 1, "EIR3", xcable4pm3, ycable4pm3, zcablePS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB3", 1, "EIR7", xcable3pm3, ycable3pm3, zcableVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB4", 1, "EIR7", xcable4pm3, ycable4pm3, zcableVeto, 0, "ONLY"); + + TVirtualMC::GetMC()->Gspos("ECB2", 1, "EIR4", xcable21pm4, 0., zcablePS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB2", 2, "EIR4", xcable22pm4, 0., zcablePS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB3", 1, "EIR4", xcable3pm4, ycable3pm4, zcablePS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB2", 1, "EIR8", xcable21pm4, 0., zcableVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB2", 2, "EIR8", xcable22pm4, 0., zcableVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECB3", 1, "EIR8", xcable3pm4, ycable3pm4, zcableVeto, 0, "ONLY"); //=============== NOW POSITIONING THE Al Boxes IN EPM'S================// - gMC->Gspos("ESV1", 1, "EPM1", dboxFea1[0] - esvdA1[0] - 8.0, 0., zelvdbPS, 0, "ONLY"); - gMC->Gspos("EVV1", 1, "EPM1", dboxFea1[0] - esvdB1[0] - 8.0, 0., zelvdbVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESV1", 1, "EPM1", dboxFea1[0] - esvdA1[0] - 8.0, 0., zelvdbPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EVV1", 1, "EPM1", dboxFea1[0] - esvdB1[0] - 8.0, 0., zelvdbVeto, 0, "ONLY"); - gMC->Gspos("ESV2", 1, "EPM2", -dboxFea2[0] + esvdA1[0] + 8.0, 2.3, zelvdbPS, 0, "ONLY"); - gMC->Gspos("EVV2", 1, "EPM2", -dboxFea2[0] + esvdB1[0] + 8.0, 2.3, zelvdbVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESV2", 1, "EPM2", -dboxFea2[0] + esvdA1[0] + 8.0, 2.3, zelvdbPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EVV2", 1, "EPM2", -dboxFea2[0] + esvdB1[0] + 8.0, 2.3, zelvdbVeto, 0, "ONLY"); - gMC->Gspos("ESV3", 1, "EPM3", -dboxFea3[0] + esvdA1[0] + 8.0, 0., zelvdbPS, 0, "ONLY"); - gMC->Gspos("EVV3", 1, "EPM3", -dboxFea3[0] + esvdB1[0] + 8.0, 0., zelvdbVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESV3", 1, "EPM3", -dboxFea3[0] + esvdA1[0] + 8.0, 0., zelvdbPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EVV3", 1, "EPM3", -dboxFea3[0] + esvdB1[0] + 8.0, 0., zelvdbVeto, 0, "ONLY"); - gMC->Gspos("ESV4", 1, "EPM4", dboxFea4[0] - esvdA1[0] - 8.0, 2.3, zelvdbPS, 0, "ONLY"); - gMC->Gspos("EVV4", 1, "EPM4", dboxFea4[0] - esvdB1[0] - 8.0, 2.3, zelvdbVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESV4", 1, "EPM4", dboxFea4[0] - esvdA1[0] - 8.0, 2.3, zelvdbPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EVV4", 1, "EPM4", dboxFea4[0] - esvdB1[0] - 8.0, 2.3, zelvdbVeto, 0, "ONLY"); //==================================================================// //====================== LAST THING IS TO INSTALL ELMB ================// @@ -1769,7 +1769,7 @@ void AliPMDv1::CreatePMD() xelmb[1] = 4.0; xelmb[2] = 0.5; - gMC->Gsvolu("ELMB", "BOX", idtmed[698], xelmb, 3); + TVirtualMC::GetMC()->Gsvolu("ELMB", "BOX", idtmed[698], xelmb, 3); // There are more G10 Volumes // But in approximation, we reduced them to two @@ -1780,19 +1780,19 @@ void AliPMDv1::CreatePMD() xelmb1[1] = 3.6; xelmb1[2] = 0.1; - gMC->Gsvolu("ELM1", "BOX", idtmed[607], xelmb1, 3); + TVirtualMC::GetMC()->Gsvolu("ELM1", "BOX", idtmed[607], xelmb1, 3); Float_t xelmb2[3]; xelmb2[0] = 6.0; xelmb2[1] = 3.0; xelmb2[2] = 0.1; - gMC->Gsvolu("ELM2", "BOX", idtmed[607], xelmb2, 3); + TVirtualMC::GetMC()->Gsvolu("ELM2", "BOX", idtmed[607], xelmb2, 3); /******** NOW POSITIONING THE G10 VOLUMES ELM1 & ELM2 IN ELMB **********/ - gMC->Gspos("ELM1", 1, "ELMB", 0., 0., -0.3, 0, "ONLY"); - gMC->Gspos("ELM2", 1, "ELMB", 0., 0., 0.3, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELM1", 1, "ELMB", 0., 0., -0.3, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELM2", 1, "ELMB", 0., 0., 0.3, 0, "ONLY"); // Position co-ordinates of ELMBs in EPM2 & EPM4 @@ -1817,26 +1817,26 @@ void AliPMDv1::CreatePMD() // Placement of ELMBs on EPM2 for(Int_t kk=1;kk<=3;kk++){ - gMC->Gspos("ELMB", kk, "EPM2", xelmbepm2, yelmbepm2, zelmbPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELMB", kk, "EPM2", xelmbepm2, yelmbepm2, zelmbPS, 0, "ONLY"); xelmbepm2 = xelmbepm2 + xelmb[0] + 0.5 + xelmb[0]; } xelmbepm2 = -gaspmd2[0] + 16.0 +23.2 + 2.5 + xelmb[0]; for(Int_t kk=4;kk<=6;kk++){ - gMC->Gspos("ELMB", kk, "EPM2", xelmbepm2, yelmbepm2, zelmbVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELMB", kk, "EPM2", xelmbepm2, yelmbepm2, zelmbVeto, 0, "ONLY"); xelmbepm2 = xelmbepm2 + xelmb[0] + 0.5 + xelmb[0]; } // Placement of ELMBs on EPM4 for(Int_t kk=1;kk<=4;kk++){ - gMC->Gspos("ELMB", kk, "EPM4", xelmbepm4, yelmbepm4, zelmbPS, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELMB", kk, "EPM4", xelmbepm4, yelmbepm4, zelmbPS, 0, "ONLY"); xelmbepm4 = xelmbepm4 - xelmb[0] - 0.5 - xelmb[0]; } xelmbepm4 = gaspmd4[0] - 16.0 -23.2 - 2.5 - xelmb[0]; for(Int_t kk=5;kk<=8;kk++){ - gMC->Gspos("ELMB", kk, "EPM4", xelmbepm4, yelmbepm4, zelmbVeto, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ELMB", kk, "EPM4", xelmbepm4, yelmbepm4, zelmbVeto, 0, "ONLY"); xelmbepm4 = xelmbepm4 - xelmb[0] - 0.5 - xelmb[0]; } @@ -1907,49 +1907,49 @@ void AliPMDv1::CreatePMD() for(Int_t ii=0;ii<=5;ii++){ if(fModStatus[ii]){ - gMC->Gspos("EUM1", ii, "EPM1", xcord[ii]+xLead1,ycord[ii]+yLead1, zpsa, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM1", ii, "EPM1", xcord[ii]+xLead1,ycord[ii]+yLead1, zpsa, 0, "ONLY"); } } for(Int_t ii=6;ii<=11;ii++){ if(fModStatus[ii]) { - gMC->Gspos("EUM1", ii, "EPM2", xcord[ii]+xLead2, ycord[ii]+yLead2, zpsa, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM1", ii, "EPM2", xcord[ii]+xLead2, ycord[ii]+yLead2, zpsa, jhrot12, "ONLY"); } } for(Int_t ii=12;ii<=17;ii++){ if(fModStatus[ii]) { - gMC->Gspos("EUM2", ii, "EPM3", xcord[ii]+xLead3, ycord[ii]+yLead3, zpsa, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM2", ii, "EPM3", xcord[ii]+xLead3, ycord[ii]+yLead3, zpsa, 0, "ONLY"); } } for(Int_t ii=18;ii<=23;ii++){ if(fModStatus[ii]) { - gMC->Gspos("EUM2", ii, "EPM4", xcord[ii]+xLead4, ycord[ii]+yLead4, zpsa, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM2", ii, "EPM4", xcord[ii]+xLead4, ycord[ii]+yLead4, zpsa, jhrot12, "ONLY"); } } for(Int_t ii=24;ii<=29;ii++){ if(fModStatus[ii]) { - gMC->Gspos("EUV1", ii, "EPM1", xcord[ii-24]+xLead1, ycord[ii-24]+yLead1, zcva, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV1", ii, "EPM1", xcord[ii-24]+xLead1, ycord[ii-24]+yLead1, zcva, 0, "ONLY"); } } for(Int_t ii=30;ii<=35;ii++){ if(fModStatus[ii]) { - gMC->Gspos("EUV1", ii, "EPM2", xcord[ii-24]+xLead2, ycord[ii-24]+yLead2, zcva, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV1", ii, "EPM2", xcord[ii-24]+xLead2, ycord[ii-24]+yLead2, zcva, jhrot12, "ONLY"); } } for(Int_t ii=36;ii<=41;ii++){ if(fModStatus[ii]) { - gMC->Gspos("EUV2", ii, "EPM3", xcord[ii-24]+xLead3, ycord[ii-24]+yLead3, zcva, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV2", ii, "EPM3", xcord[ii-24]+xLead3, ycord[ii-24]+yLead3, zcva, 0, "ONLY"); } } for(Int_t ii=42;ii<=47;ii++){ if(fModStatus[ii]) { - gMC->Gspos("EUV2", ii, "EPM4", xcord[ii-24]+xLead4, ycord[ii-24]+yLead4, zcva, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV2", ii, "EPM4", xcord[ii-24]+xLead4, ycord[ii-24]+yLead4, zcva, jhrot12, "ONLY"); } } @@ -2002,13 +2002,13 @@ void AliPMDv1::CreatePMD() // EFGD // (Girders and its Carriage) - gMC->Gspos("EPM1", 1, "ALIC", xsm1,ysm1,zp, 0, "ONLY"); - gMC->Gspos("EPM2", 1, "ALIC", xsm2,ysm2,zp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPM1", 1, "ALIC", xsm1,ysm1,zp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPM2", 1, "ALIC", xsm2,ysm2,zp, 0, "ONLY"); - gMC->Gspos("EPM3", 1, "ALIC", xsm3,ysm3,zp, 0, "ONLY"); - gMC->Gspos("EPM4", 1, "ALIC", xsm4,ysm4,zp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPM3", 1, "ALIC", xsm3,ysm3,zp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPM4", 1, "ALIC", xsm4,ysm4,zp, 0, "ONLY"); - gMC->Gspos("EFGD", 1, "ALIC", 0., yfinal + fulgrdr[1], zp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFGD", 1, "ALIC", 0., yfinal + fulgrdr[1], zp, 0, "ONLY"); } //_____________________________________________________________________________ @@ -2135,8 +2135,8 @@ void AliPMDv1::Init() // Gstpar is removed from this place and // the energy cut offs in the medium moved to galice.cuts - //gMC->Gstpar(idtmed[605], "LOSS", 3.); - //gMC->Gstpar(idtmed[605], "DRAY", 1.); + //TVirtualMC::GetMC()->Gstpar(idtmed[605], "LOSS", 3.); + //TVirtualMC::GetMC()->Gstpar(idtmed[605], "DRAY", 1.); // Visualization of volumes gGeoManager->SetVolumeAttribute("ECAR", "SEEN", 0); @@ -2224,35 +2224,35 @@ void AliPMDv1::StepManager() Int_t vol[6]; //const char *namep; // printf("Current vol is ******** %s \n",namep); - if(gMC->CurrentMedium() == fMedSens && (destep = gMC->Edep())) { + if(TVirtualMC::GetMC()->CurrentMedium() == fMedSens && (destep = TVirtualMC::GetMC()->Edep())) { - gMC->CurrentVolID(copy); - //namep=gMC->CurrentVolName(); + TVirtualMC::GetMC()->CurrentVolID(copy); + //namep=TVirtualMC::GetMC()->CurrentVolName(); // printf("Current vol is %s \n",namep); vol[0]=copy; - gMC->CurrentVolOffID(1,copy); - //namep=gMC->CurrentVolOffName(1); + TVirtualMC::GetMC()->CurrentVolOffID(1,copy); + //namep=TVirtualMC::GetMC()->CurrentVolOffName(1); // printf("Current vol 11 is %s \n",namep); vol[1]=copy; - gMC->CurrentVolOffID(2,copy); - //namep=gMC->CurrentVolOffName(2); + TVirtualMC::GetMC()->CurrentVolOffID(2,copy); + //namep=TVirtualMC::GetMC()->CurrentVolOffName(2); // printf("Current vol 22 is %s \n",namep); vol[2]=copy; - gMC->CurrentVolOffID(3,copy); - //namep=gMC->CurrentVolOffName(3); + TVirtualMC::GetMC()->CurrentVolOffID(3,copy); + //namep=TVirtualMC::GetMC()->CurrentVolOffName(3); // printf("Current vol 33 is %s \n",namep); vol[3]=copy; - gMC->CurrentVolOffID(4,copy); - //namep=gMC->CurrentVolOffName(4); + TVirtualMC::GetMC()->CurrentVolOffID(4,copy); + //namep=TVirtualMC::GetMC()->CurrentVolOffName(4); // printf("Current vol 44 is %s \n",namep); vol[4]=copy; - gMC->CurrentVolOffID(5,copy); - //namep=gMC->CurrentVolOffName(5); + TVirtualMC::GetMC()->CurrentVolOffID(5,copy); + //namep=TVirtualMC::GetMC()->CurrentVolOffName(5); //printf("Current vol 55 is %s \n",namep); vol[5]=copy; @@ -2260,11 +2260,11 @@ void AliPMDv1::StepManager() // printf("volume number %4d %4d %4d %4d %4d %4d %10.3f \n",vol[0],vol[1],vol[2],vol[3],vol[4],vol[5],destep*1000000);// edep in MeV - gMC->Gdtom(center,hits,1); + TVirtualMC::GetMC()->Gdtom(center,hits,1); hits[3] = destep*1e9; //Number in eV // this is for pile-up events - hits[4] = gMC->TrackTime(); + hits[4] = TVirtualMC::GetMC()->TrackTime(); AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); diff --git a/PMD/AliPMDv2008.cxx b/PMD/AliPMDv2008.cxx index b365f4fa980..47b24c6dfac 100644 --- a/PMD/AliPMDv2008.cxx +++ b/PMD/AliPMDv2008.cxx @@ -159,7 +159,7 @@ void AliPMDv2008::CreateSupermodule() hexd2[6] = fgkCellRadius - fgkCellWall; hexd2[9] = fgkCellRadius - fgkCellWall; - gMC->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10); + TVirtualMC::GetMC()->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10); //******************************************************// // STEP - II @@ -173,11 +173,11 @@ void AliPMDv2008::CreateSupermodule() hexd1[6] = fgkCellRadius; hexd1[9] = fgkCellRadius; - gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10); + TVirtualMC::GetMC()->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10); // Place inner hex (sensitive volume) inside outer hex (copper) - gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY"); //******************************************************// // STEP - III @@ -192,7 +192,7 @@ void AliPMDv2008::CreateSupermodule() dbox1[1] = fgkNrowUM1*fgkCellRadius; dbox1[2] = fgkCellDepth/2.; - gMC->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3); + TVirtualMC::GetMC()->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3); // volume for second strip EST2 @@ -202,7 +202,7 @@ void AliPMDv2008::CreateSupermodule() dbox2[0] = dbox1[0]; dbox2[2] = dbox1[2]; - gMC->Gsvolu("EST2","BOX", idtmed[698], dbox2, 3); + TVirtualMC::GetMC()->Gsvolu("EST2","BOX", idtmed[698], dbox2, 3); // Place hexagonal cells ECCU placed inside EST1 xb = 0.; @@ -211,7 +211,7 @@ void AliPMDv2008::CreateSupermodule() for (i = 1; i <= fgkNrowUM1; ++i) { number = i; - gMC->Gspos("ECCU", number, "EST1", xb,yb,zb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECCU", number, "EST1", xb,yb,zb, 0, "ONLY"); yb -= (fgkCellRadius*2.); } @@ -222,7 +222,7 @@ void AliPMDv2008::CreateSupermodule() for (i = 1; i <= fgkNrowUM2; ++i) { number = i; - gMC->Gspos("ECCU", number, "EST2", xb,yb,zb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECCU", number, "EST2", xb,yb,zb, 0, "ONLY"); //PH cout << "ECCU in EST2 ==> " << number << "\t"<Gsvolu("EHC1","BOX", idtmed[698], dbox3, 3); + TVirtualMC::GetMC()->Gsvolu("EHC1","BOX", idtmed[698], dbox3, 3); // Place rectangular strips EST1 inside EHC1 unit module xb = dbox3[0]-dbox1[0]; @@ -266,7 +266,7 @@ void AliPMDv2008::CreateSupermodule() yb = fgkCellRadius/2.0; } number = j; - gMC->Gspos("EST1",number, "EHC1", xb, yb , 0. , 0, "MANY"); + TVirtualMC::GetMC()->Gspos("EST1",number, "EHC1", xb, yb , 0. , 0, "MANY"); //The strips are being placed from top towards bottom of the module //This is because the first cell in a module in hardware is the top //left corner cell @@ -298,7 +298,7 @@ void AliPMDv2008::CreateSupermodule() dbox4[2] = dbox3[2]; //Create a BOX of AIR - gMC->Gsvolu("EHC2","BOX", idtmed[698], dbox4, 3); + TVirtualMC::GetMC()->Gsvolu("EHC2","BOX", idtmed[698], dbox4, 3); // Place rectangular strips EST2 inside EHC2 unit module xb = dbox4[0]-dbox2[0]; @@ -313,7 +313,7 @@ void AliPMDv2008::CreateSupermodule() yb = +fgkCellRadius/2.0; } number = j; - gMC->Gspos("EST2",number, "EHC2", xb, yb , 0. ,0, "MANY"); + TVirtualMC::GetMC()->Gspos("EST2",number, "EHC2", xb, yb , 0. ,0, "MANY"); xb = (dbox4[0]-dbox2[0])-j*fgkCellRadius*fgkSqroot3; } @@ -352,7 +352,7 @@ void AliPMDv2008::CreateSupermodule() dboxPcbA[2] = fgkThPCB/2.; //Top and Bottom PCB is a BOX of Material G10 - gMC->Gsvolu("EPCA","BOX", idtmed[607], dboxPcbA, 3); + TVirtualMC::GetMC()->Gsvolu("EPCA","BOX", idtmed[607], dboxPcbA, 3); //--------------------------------------------------------// //Back Plane : EBKA //================== @@ -367,7 +367,7 @@ void AliPMDv2008::CreateSupermodule() dboxBPlaneA[2] = fgkThBKP/2.; //Back PLane PCB of MAterial G10 - gMC->Gsvolu("EBKA","BOX", idtmed[607], dboxBPlaneA, 3); + TVirtualMC::GetMC()->Gsvolu("EBKA","BOX", idtmed[607], dboxBPlaneA, 3); //-------------------------------------------------------------// //---------- That was all in the Z -direction of Unit Module A----// @@ -394,11 +394,11 @@ void AliPMDv2008::CreateSupermodule() //FOR PRESHOWER //Air gap is a BOX of Material Air - gMC->Gsvolu("ECGA","BOX", idtmed[698], dboxAir3A, 3); + TVirtualMC::GetMC()->Gsvolu("ECGA","BOX", idtmed[698], dboxAir3A, 3); //FOR VETO //Air gap is a BOX of Material Air - gMC->Gsvolu("ECVA","BOX", idtmed[698], dboxAir3A, 3); + TVirtualMC::GetMC()->Gsvolu("ECVA","BOX", idtmed[698], dboxAir3A, 3); //-------------------------------------------------// //-------------------------------------------------// @@ -415,11 +415,11 @@ void AliPMDv2008::CreateSupermodule() //FOR PRESHOWER //G10 BOX - gMC->Gsvolu("EDGA","BOX", idtmed[607], dboxGGA, 3); + TVirtualMC::GetMC()->Gsvolu("EDGA","BOX", idtmed[607], dboxGGA, 3); //FOR VETO //G10 BOX - gMC->Gsvolu("EDVA","BOX", idtmed[607], dboxGGA, 3); + TVirtualMC::GetMC()->Gsvolu("EDVA","BOX", idtmed[607], dboxGGA, 3); //-------------------------------------------------// //----------------------------------------------------------// @@ -440,11 +440,11 @@ void AliPMDv2008::CreateSupermodule() //FOR PRESHOWER //Stainless Steel boundary - Material Stainless Steel - gMC->Gsvolu("ESSA","BOX", idtmed[618], dboxSS1, 3); + TVirtualMC::GetMC()->Gsvolu("ESSA","BOX", idtmed[618], dboxSS1, 3); //FOR VETO //Stainless Steel boundary - Material Stainless Steel - gMC->Gsvolu("ESVA","BOX", idtmed[618], dboxSS1, 3); + TVirtualMC::GetMC()->Gsvolu("ESVA","BOX", idtmed[618], dboxSS1, 3); //----------------------------------------------------------------// @@ -482,12 +482,12 @@ void AliPMDv2008::CreateSupermodule() //FOR VETO //Creating the side channels // SS boundary channel, followed by G10 and Air Gap - gMC->Gspos("EDVA", 1, "ESVA", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ECVA", 1, "EDVA", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EDVA", 1, "ESVA", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECVA", 1, "EDVA", 0., 0., 0., 0, "ONLY"); //FOR PRESHOWER - gMC->Gspos("EDGA", 1, "ESSA", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ECGA", 1, "EDGA", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EDGA", 1, "ESSA", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECGA", 1, "EDGA", 0., 0., 0., 0, "ONLY"); // now other components, using Bedanga's code, but changing the values. //Positioning Bottom PCB, Honey Comb abd Top PCB in AIR @@ -495,25 +495,25 @@ void AliPMDv2008::CreateSupermodule() //For veto plane //Positioning the Bottom 0.16 cm PCB Float_t zbpcb = -dboxAir3A[2] + (2.0*fgkGap) + fgkThPCB/2.; - gMC->Gspos("EPCA", 1, "ECVA", 0., 0., zbpcb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPCA", 1, "ECVA", 0., 0., zbpcb, 0, "ONLY"); //Positioning the Honey Comb 0.5 cm Float_t zhc = zbpcb + fgkThPCB/2. + fgkCellDepth/2.; - gMC->Gspos("EHC1", 1, "ECVA", 0., 0., zhc, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EHC1", 1, "ECVA", 0., 0., zhc, 0, "ONLY"); //Positioning the Top PCB 0.16 cm Float_t ztpcb = zhc + fgkCellDepth/2 + fgkThPCB/2.; - gMC->Gspos("EPCA", 2, "ECVA", 0., 0., ztpcb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPCA", 2, "ECVA", 0., 0., ztpcb, 0, "ONLY"); //For Preshower plane the ordering is reversed //Positioning the Bottom 0.16 cm PCB zbpcb = -dboxAir3A[2] + fgkThPCB + fgkThPCB/2.; - gMC->Gspos("EPCA", 1, "ECGA", 0., 0., zbpcb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPCA", 1, "ECGA", 0., 0., zbpcb, 0, "ONLY"); //Positioning the Honey Comb 0.5 cm zhc = zbpcb + fgkThPCB/2. + fgkCellDepth/2.; - gMC->Gspos("EHC1", 1, "ECGA", 0., 0., zhc, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EHC1", 1, "ECGA", 0., 0., zhc, 0, "ONLY"); //Positioning the Top PCB 0.16 cm ztpcb = zhc + fgkCellDepth/2 + fgkThPCB/2.; - gMC->Gspos("EPCA", 2, "ECGA", 0., 0., ztpcb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPCA", 2, "ECGA", 0., 0., ztpcb, 0, "ONLY"); @@ -535,9 +535,9 @@ void AliPMDv2008::CreateSupermodule() //FOR PRESHOWER //Create a Unit module of above dimensions Material : AIR - gMC->Gsvolu("EUM1","BOX", idtmed[698], dboxUM1, 3); + TVirtualMC::GetMC()->Gsvolu("EUM1","BOX", idtmed[698], dboxUM1, 3); //FOR VETO - gMC->Gsvolu("EUV1","BOX", idtmed[698], dboxUM1, 3); + TVirtualMC::GetMC()->Gsvolu("EUV1","BOX", idtmed[698], dboxUM1, 3); //----------------------------------------------------------------// @@ -552,35 +552,35 @@ void AliPMDv2008::CreateSupermodule() dboxBaseA[2] = fgkThBase/2.; //Base Blate is a G10 BOX - gMC->Gsvolu("EBPA","BOX", idtmed[607], dboxBaseA, 3); + TVirtualMC::GetMC()->Gsvolu("EBPA","BOX", idtmed[607], dboxBaseA, 3); //----------------------------------------------------// //FOR VETO //- Placing of all components of UM in AIR BOX EUM1--// //(1) FIRST PUT THE BASE PLATE Float_t zbaseplate = -dboxUM1[2] + fgkThBase/2.; - gMC->Gspos("EBPA", 1, "EUV1", 0., 0., zbaseplate, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EBPA", 1, "EUV1", 0., 0., zbaseplate, 0, "ONLY"); //(2) NEXT PLACING the SS BOX Float_t zss = zbaseplate + fgkThBase/2. + fgkThSS/2.; - gMC->Gspos("ESVA", 1, "EUV1", 0., 0., zss, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESVA", 1, "EUV1", 0., 0., zss, 0, "ONLY"); // (3) Positioning the Backplane PCB 0.1 cm Float_t zbkp = zss + fgkThSS/2. + fgkThBKP/2.; - gMC->Gspos("EBKA", 1, "EUV1", 0., 0., zbkp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EBKA", 1, "EUV1", 0., 0., zbkp, 0, "ONLY"); //FOR PRESHOWER // (3) Positioning the Backplane PCB 0.1 cm zbkp = -dboxUM1[2] + fgkThBKP/2.; - gMC->Gspos("EBKA", 1, "EUM1", 0., 0., zbkp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EBKA", 1, "EUM1", 0., 0., zbkp, 0, "ONLY"); //(2) NEXT PLACING the SS BOX zss = zbkp + fgkThBKP/2. + fgkThSS/2.; - gMC->Gspos("ESSA", 1, "EUM1", 0., 0., zss, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESSA", 1, "EUM1", 0., 0., zss, 0, "ONLY"); //(1) FIRST PUT THE BASE PLATE zbaseplate = zss + fgkThSS/2 + fgkThBase/2.; - gMC->Gspos("EBPA", 1, "EUM1", 0., 0., zbaseplate, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EBPA", 1, "EUM1", 0., 0., zbaseplate, 0, "ONLY"); //-------------------- UM Type A completed ------------------------// @@ -600,7 +600,7 @@ void AliPMDv2008::CreateSupermodule() dboxPcbB[2] = fgkThPCB/2.; //Top and Bottom PCB is a BOX of Material G10 - gMC->Gsvolu("EPCB","BOX", idtmed[607], dboxPcbB, 3); + TVirtualMC::GetMC()->Gsvolu("EPCB","BOX", idtmed[607], dboxPcbB, 3); //--------------------------------------------------------// //Back Plane : EBKB //================== @@ -615,7 +615,7 @@ void AliPMDv2008::CreateSupermodule() dboxBPlaneB[2] = fgkThBKP/2.; //Back PLane PCB of MAterial G10 - gMC->Gsvolu("EBKB","BOX", idtmed[607], dboxBPlaneB, 3); + TVirtualMC::GetMC()->Gsvolu("EBKB","BOX", idtmed[607], dboxBPlaneB, 3); //-------------------------------------------------------------// //---------- That was all in the Z -direction of Unit Module B----// @@ -640,9 +640,9 @@ void AliPMDv2008::CreateSupermodule() //PRESHOWER //Air gap is a BOX of Material Air - gMC->Gsvolu("ECGB","BOX", idtmed[698], dboxAir3B, 3); + TVirtualMC::GetMC()->Gsvolu("ECGB","BOX", idtmed[698], dboxAir3B, 3); //VETO - gMC->Gsvolu("ECVB","BOX", idtmed[698], dboxAir3B, 3); + TVirtualMC::GetMC()->Gsvolu("ECVB","BOX", idtmed[698], dboxAir3B, 3); //-------------------------------------------------// @@ -660,9 +660,9 @@ void AliPMDv2008::CreateSupermodule() //PRESHOWER //G10 BOX - gMC->Gsvolu("EDGB","BOX", idtmed[607], dboxGGB, 3); + TVirtualMC::GetMC()->Gsvolu("EDGB","BOX", idtmed[607], dboxGGB, 3); //VETO - gMC->Gsvolu("EDVB","BOX", idtmed[607], dboxGGB, 3); + TVirtualMC::GetMC()->Gsvolu("EDVB","BOX", idtmed[607], dboxGGB, 3); //-------------------------------------------------// //----------------------------------------------------------// //Stainless Steel Bounadry : ESSB @@ -681,9 +681,9 @@ void AliPMDv2008::CreateSupermodule() //PRESHOWER //Stainless Steel boundary - Material Stainless Steel - gMC->Gsvolu("ESSB","BOX", idtmed[618], dboxSS2, 3); + TVirtualMC::GetMC()->Gsvolu("ESSB","BOX", idtmed[618], dboxSS2, 3); //VETO - gMC->Gsvolu("ESVB","BOX", idtmed[618], dboxSS2, 3); + TVirtualMC::GetMC()->Gsvolu("ESVB","BOX", idtmed[618], dboxSS2, 3); //----------------------------------------------------------------// //----------------------------------------------------------------// @@ -719,11 +719,11 @@ void AliPMDv2008::CreateSupermodule() //PRESHOWER //Creating the side channels // SS boundary channel, followed by G10 and Air Gap - gMC->Gspos("EDGB", 1, "ESSB", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ECGB", 1, "EDGB", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EDGB", 1, "ESSB", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECGB", 1, "EDGB", 0., 0., 0., 0, "ONLY"); //VETO - gMC->Gspos("EDVB", 1, "ESVB", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ECVB", 1, "EDVB", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EDVB", 1, "ESVB", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ECVB", 1, "EDVB", 0., 0., 0., 0, "ONLY"); // now other components, using Bedang's code, but changing the values. //Positioning Bottom PCB, Honey Comb abd Top PCB in AIR @@ -731,25 +731,25 @@ void AliPMDv2008::CreateSupermodule() //VETO //Positioning the Bottom 0.16 cm PCB Float_t zbpcb2 = -dboxAir3B[2] + (2.0*fgkGap) + fgkThPCB/2.; - gMC->Gspos("EPCB", 1, "ECVB", 0., 0., zbpcb2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPCB", 1, "ECVB", 0., 0., zbpcb2, 0, "ONLY"); //Positioning the Honey Comb 0.5 cm Float_t zhc2 = zbpcb2 + fgkThPCB/2. + fgkCellDepth/2.; - gMC->Gspos("EHC2", 1, "ECVB", 0., 0., zhc2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EHC2", 1, "ECVB", 0., 0., zhc2, 0, "ONLY"); //Positioning the Top PCB 0.16 cm Float_t ztpcb2 = zhc2 + fgkCellDepth/2 + fgkThPCB/2.; - gMC->Gspos("EPCB", 2, "ECVB", 0., 0., ztpcb2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPCB", 2, "ECVB", 0., 0., ztpcb2, 0, "ONLY"); //PRESHOWER //For preshower plane the ordering is reversed //Positioning the Bottom 0.16 cm PCB zbpcb2 = -dboxAir3B[2] + fgkThPCB + fgkThPCB/2.; - gMC->Gspos("EPCB", 1, "ECGB", 0., 0., zbpcb2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPCB", 1, "ECGB", 0., 0., zbpcb2, 0, "ONLY"); //Positioning the Honey Comb 0.5 cm zhc2 = zbpcb2 + fgkThPCB/2. + fgkCellDepth/2.; - gMC->Gspos("EHC2", 1, "ECGB", 0., 0., zhc2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EHC2", 1, "ECGB", 0., 0., zhc2, 0, "ONLY"); //Positioning the Top PCB 0.16 cm ztpcb2 = zhc2 + fgkCellDepth/2 + fgkThPCB/2.; - gMC->Gspos("EPCB", 2, "ECGB", 0., 0., ztpcb2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPCB", 2, "ECGB", 0., 0., ztpcb2, 0, "ONLY"); @@ -771,10 +771,10 @@ void AliPMDv2008::CreateSupermodule() //PRESHOWER //Create a Unit module of above dimensions Material : AIR - gMC->Gsvolu("EUM2","BOX", idtmed[698], dboxUM2, 3); + TVirtualMC::GetMC()->Gsvolu("EUM2","BOX", idtmed[698], dboxUM2, 3); //VETO - gMC->Gsvolu("EUV2","BOX", idtmed[698], dboxUM2, 3); + TVirtualMC::GetMC()->Gsvolu("EUV2","BOX", idtmed[698], dboxUM2, 3); //----------------------------------------------------------------// //BASE PLATE : EBPB @@ -788,37 +788,37 @@ void AliPMDv2008::CreateSupermodule() dboxBaseB[2] = fgkThBase/2.; //Base Blate is a G10 BOX - gMC->Gsvolu("EBPB","BOX", idtmed[607], dboxBaseB, 3); + TVirtualMC::GetMC()->Gsvolu("EBPB","BOX", idtmed[607], dboxBaseB, 3); //----------------------------------------------------// //VETO //- Placing of all components of UM in AIR BOX EUM2--// //(1) FIRST PUT THE BASE PLATE Float_t zbaseplate2 = -dboxUM2[2] + fgkThBase/2.; - gMC->Gspos("EBPB", 1, "EUV2", 0., 0., zbaseplate2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EBPB", 1, "EUV2", 0., 0., zbaseplate2, 0, "ONLY"); //(2) NEXT PLACING the SS BOX Float_t zss2 = zbaseplate2 + fgkThBase/2. + fgkThSS/2.; - gMC->Gspos("ESVB", 1, "EUV2", 0., 0., zss2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESVB", 1, "EUV2", 0., 0., zss2, 0, "ONLY"); // (3) Positioning the Backplane PCB 0.1 cm Float_t zbkp2 = zss2 + fgkThSS/2. + fgkThBKP/2.; - gMC->Gspos("EBKB", 1, "EUV2", 0., 0., zbkp2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EBKB", 1, "EUV2", 0., 0., zbkp2, 0, "ONLY"); //FOR PRESHOWER // (3) Positioning the Backplane PCB 0.1 cm zbkp2 = -dboxUM2[2] + fgkThBKP/2.; - gMC->Gspos("EBKB", 1, "EUM2", 0., 0., zbkp2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EBKB", 1, "EUM2", 0., 0., zbkp2, 0, "ONLY"); //(2) NEXT PLACING the SS BOX zss2 = zbkp2 + fgkThBKP/2. + fgkThSS/2.; - gMC->Gspos("ESSB", 1, "EUM2", 0., 0., zss2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESSB", 1, "EUM2", 0., 0., zss2, 0, "ONLY"); //(1) FIRST PUT THE BASE PLATE zbaseplate2 = zss2 + fgkThSS/2 + fgkThBase/2.; - gMC->Gspos("EBPB", 1, "EUM2", 0., 0., zbaseplate2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EBPB", 1, "EUM2", 0., 0., zbaseplate2, 0, "ONLY"); //-------------------- UM Type B completed ------------------------// @@ -834,14 +834,14 @@ void AliPMDv2008::CreateSupermodule() dboxPba[1] = dboxUM1[1]; dboxPba[2] = fgkThLead/2.; // Lead of UM dimension - gMC->Gsvolu("EPB1","BOX", idtmed[600], dboxPba, 3); + TVirtualMC::GetMC()->Gsvolu("EPB1","BOX", idtmed[600], dboxPba, 3); Float_t dboxPbb[3]; dboxPbb[0] = dboxUM2[0]; dboxPbb[1] = dboxUM2[1]; dboxPbb[2] = fgkThLead/2.; // Lead of UM dimension - gMC->Gsvolu("EPB2","BOX", idtmed[600], dboxPbb, 3); + TVirtualMC::GetMC()->Gsvolu("EPB2","BOX", idtmed[600], dboxPbb, 3); //----------------------------------------------------------------// @@ -859,10 +859,10 @@ void AliPMDv2008::CreateSupermodule() dboxSM1[2] = dboxUM1[2]; //FOR PRESHOWER - gMC->Gsvolu("ESMA","BOX", idtmed[698], dboxSM1, 3); + TVirtualMC::GetMC()->Gsvolu("ESMA","BOX", idtmed[698], dboxSM1, 3); //FOR VETO - gMC->Gsvolu("EMVA","BOX", idtmed[698], dboxSM1, 3); + TVirtualMC::GetMC()->Gsvolu("EMVA","BOX", idtmed[698], dboxSM1, 3); //Position the 6 unit modules in EMSA Float_t xa1,xa2,xa3,ya1,ya2; @@ -873,20 +873,20 @@ void AliPMDv2008::CreateSupermodule() ya2 = ya1 - dboxUM1[1] - 0.1 - dboxUM1[1]; //PRESHOWER - // gMC->Gspos("EUM1", 1, "ESMA", xa1, ya1, 0., 0, "ONLY"); // BKN - gMC->Gspos("EUM1", 2, "ESMA", xa2, ya1, 0., 0, "ONLY"); - gMC->Gspos("EUM1", 3, "ESMA", xa3, ya1, 0., 0, "ONLY"); - gMC->Gspos("EUM1", 4, "ESMA", xa1, ya2, 0., 0, "ONLY"); - gMC->Gspos("EUM1", 5, "ESMA", xa2, ya2, 0., 0, "ONLY"); - gMC->Gspos("EUM1", 6, "ESMA", xa3, ya2, 0., 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EUM1", 1, "ESMA", xa1, ya1, 0., 0, "ONLY"); // BKN + TVirtualMC::GetMC()->Gspos("EUM1", 2, "ESMA", xa2, ya1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM1", 3, "ESMA", xa3, ya1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM1", 4, "ESMA", xa1, ya2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM1", 5, "ESMA", xa2, ya2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM1", 6, "ESMA", xa3, ya2, 0., 0, "ONLY"); //VETO - gMC->Gspos("EUV1", 1, "EMVA", xa1, ya1, 0., 0, "ONLY"); - gMC->Gspos("EUV1", 2, "EMVA", xa2, ya1, 0., 0, "ONLY"); - gMC->Gspos("EUV1", 3, "EMVA", xa3, ya1, 0., 0, "ONLY"); - gMC->Gspos("EUV1", 4, "EMVA", xa1, ya2, 0., 0, "ONLY"); - gMC->Gspos("EUV1", 5, "EMVA", xa2, ya2, 0., 0, "ONLY"); - gMC->Gspos("EUV1", 6, "EMVA", xa3, ya2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV1", 1, "EMVA", xa1, ya1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV1", 2, "EMVA", xa2, ya1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV1", 3, "EMVA", xa3, ya1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV1", 4, "EMVA", xa1, ya2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV1", 5, "EMVA", xa2, ya2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV1", 6, "EMVA", xa3, ya2, 0., 0, "ONLY"); // volume for SUPERMODULE ESMB @@ -897,9 +897,9 @@ void AliPMDv2008::CreateSupermodule() dboxSM2[2] = dboxUM2[2]; //PRESHOWER - gMC->Gsvolu("ESMB","BOX", idtmed[698], dboxSM2, 3); + TVirtualMC::GetMC()->Gsvolu("ESMB","BOX", idtmed[698], dboxSM2, 3); //VETO - gMC->Gsvolu("EMVB","BOX", idtmed[698], dboxSM2, 3); + TVirtualMC::GetMC()->Gsvolu("EMVB","BOX", idtmed[698], dboxSM2, 3); //Position the 6 unit modules in EMSB Float_t xb1,xb2,yb1,yb2,yb3; @@ -911,20 +911,20 @@ void AliPMDv2008::CreateSupermodule() //PRESHOWER - // gMC->Gspos("EUM2", 1, "ESMB", xb1, yb1, 0., 0, "ONLY"); // BKN - // gMC->Gspos("EUM2", 2, "ESMB", xb2, yb1, 0., 0, "ONLY"); - gMC->Gspos("EUM2", 3, "ESMB", xb1, yb2, 0., 0, "ONLY"); - gMC->Gspos("EUM2", 4, "ESMB", xb2, yb2, 0., 0, "ONLY"); - gMC->Gspos("EUM2", 5, "ESMB", xb1, yb3, 0., 0, "ONLY"); - gMC->Gspos("EUM2", 6, "ESMB", xb2, yb3, 0., 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EUM2", 1, "ESMB", xb1, yb1, 0., 0, "ONLY"); // BKN + // TVirtualMC::GetMC()->Gspos("EUM2", 2, "ESMB", xb2, yb1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM2", 3, "ESMB", xb1, yb2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM2", 4, "ESMB", xb2, yb2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM2", 5, "ESMB", xb1, yb3, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUM2", 6, "ESMB", xb2, yb3, 0., 0, "ONLY"); //VETO - gMC->Gspos("EUV2", 1, "EMVB", xb1, yb1, 0., 0, "ONLY"); - gMC->Gspos("EUV2", 2, "EMVB", xb2, yb1, 0., 0, "ONLY"); - gMC->Gspos("EUV2", 3, "EMVB", xb1, yb2, 0., 0, "ONLY"); - gMC->Gspos("EUV2", 4, "EMVB", xb2, yb2, 0., 0, "ONLY"); - gMC->Gspos("EUV2", 5, "EMVB", xb1, yb3, 0., 0, "ONLY"); - gMC->Gspos("EUV2", 6, "EMVB", xb2, yb3, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV2", 1, "EMVB", xb1, yb1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV2", 2, "EMVB", xb2, yb1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV2", 3, "EMVB", xb1, yb2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV2", 4, "EMVB", xb2, yb2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV2", 5, "EMVB", xb1, yb3, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EUV2", 6, "EMVB", xb2, yb3, 0., 0, "ONLY"); // Make smiliar stucture for lead as for PMD plane //================================================ @@ -940,7 +940,7 @@ void AliPMDv2008::CreateSupermodule() dboxSMPb1[1] = 2.0*dboxUM1[1] + 0.05; dboxSMPb1[2] = fgkThLead/2.; - gMC->Gsvolu("ESPA","BOX", idtmed[698], dboxSMPb1, 3); + TVirtualMC::GetMC()->Gsvolu("ESPA","BOX", idtmed[698], dboxSMPb1, 3); //Position the 6 unit modules in ESMPbA @@ -952,12 +952,12 @@ void AliPMDv2008::CreateSupermodule() ypa2 = ypa1 - dboxUM1[1] - 0.1 - dboxUM1[1]; - gMC->Gspos("EPB1", 1, "ESPA", xpa1, ypa1, 0., 0, "ONLY"); - gMC->Gspos("EPB1", 2, "ESPA", xpa2, ypa1, 0., 0, "ONLY"); - gMC->Gspos("EPB1", 3, "ESPA", xpa3, ypa1, 0., 0, "ONLY"); - gMC->Gspos("EPB1", 4, "ESPA", xpa1, ypa2, 0., 0, "ONLY"); - gMC->Gspos("EPB1", 5, "ESPA", xpa2, ypa2, 0., 0, "ONLY"); - gMC->Gspos("EPB1", 6, "ESPA", xpa3, ypa2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB1", 1, "ESPA", xpa1, ypa1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB1", 2, "ESPA", xpa2, ypa1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB1", 3, "ESPA", xpa3, ypa1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB1", 4, "ESPA", xpa1, ypa2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB1", 5, "ESPA", xpa2, ypa2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB1", 6, "ESPA", xpa3, ypa2, 0., 0, "ONLY"); // volume for SUPERMODULE ESMPbB @@ -967,7 +967,7 @@ void AliPMDv2008::CreateSupermodule() dboxSMPb2[1] = 3.0*dboxUM2[1] + (2.0*0.05); dboxSMPb2[2] = fgkThLead/2.; - gMC->Gsvolu("ESPB","BOX", idtmed[698], dboxSMPb2, 3); + TVirtualMC::GetMC()->Gsvolu("ESPB","BOX", idtmed[698], dboxSMPb2, 3); //Position the 6 unit modules in ESMPbB Float_t xpb1,xpb2,ypb1,ypb2,ypb3; @@ -978,12 +978,12 @@ void AliPMDv2008::CreateSupermodule() ypb3 = ypb2 - dboxUM2[1] - 0.1 - dboxUM2[1]; - gMC->Gspos("EPB2", 1, "ESPB", xpb1, ypb1, 0., 0, "ONLY"); - gMC->Gspos("EPB2", 2, "ESPB", xpb2, ypb1, 0., 0, "ONLY"); - gMC->Gspos("EPB2", 3, "ESPB", xpb1, ypb2, 0., 0, "ONLY"); - gMC->Gspos("EPB2", 4, "ESPB", xpb2, ypb2, 0., 0, "ONLY"); - gMC->Gspos("EPB2", 5, "ESPB", xpb1, ypb3, 0., 0, "ONLY"); - gMC->Gspos("EPB2", 6, "ESPB", xpb2, ypb3, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB2", 1, "ESPB", xpb1, ypb1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB2", 2, "ESPB", xpb2, ypb1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB2", 3, "ESPB", xpb1, ypb2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB2", 4, "ESPB", xpb2, ypb2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB2", 5, "ESPB", xpb1, ypb3, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPB2", 6, "ESPB", xpb2, ypb3, 0., 0, "ONLY"); //--------------------------------------------------- @@ -1000,7 +1000,7 @@ void AliPMDv2008::CreateSupermodule() dboxFEE[1] = 3.50; dboxFEE[2] = 1.20; - gMC->Gsvolu("EFEE","BOX", idtmed[607], dboxFEE, 3); + TVirtualMC::GetMC()->Gsvolu("EFEE","BOX", idtmed[607], dboxFEE, 3); //Mother volume to accomodate FEE boards // It should have the dimension @@ -1015,7 +1015,7 @@ void AliPMDv2008::CreateSupermodule() dboxFEEBPlaneA[2] = 1.2; //Volume of same dimension as Back PLane of Material AIR - gMC->Gsvolu("EFBA","BOX", idtmed[698], dboxFEEBPlaneA, 3); + TVirtualMC::GetMC()->Gsvolu("EFBA","BOX", idtmed[698], dboxFEEBPlaneA, 3); //TYPE B Float_t dboxFEEBPlaneB[3]; @@ -1024,7 +1024,7 @@ void AliPMDv2008::CreateSupermodule() dboxFEEBPlaneB[2] = 1.2; //Back PLane PCB of MAterial G10 - gMC->Gsvolu("EFBB","BOX", idtmed[698], dboxFEEBPlaneB, 3); + TVirtualMC::GetMC()->Gsvolu("EFBB","BOX", idtmed[698], dboxFEEBPlaneB, 3); //Placing the FEE boards in the Mother volume of AIR @@ -1048,7 +1048,7 @@ void AliPMDv2008::CreateSupermodule() xFee = -dboxFEEBPlaneA[0] + xA; for (j = 1; j <= 12; ++j) { - gMC->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY"); xFee += xSepa; number += 1; } @@ -1062,7 +1062,7 @@ void AliPMDv2008::CreateSupermodule() xFee = -dboxFEEBPlaneB[0] + xA; for (j = 1; j <= 24; ++j) { - gMC->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY"); xFee += xSepa; number += 1; } @@ -1078,7 +1078,7 @@ void AliPMDv2008::CreateSupermodule() dboxEFSA[2] = dboxFEEBPlaneA[2]; //Type A - gMC->Gsvolu("EFSA","BOX", idtmed[698],dboxEFSA, 3); + TVirtualMC::GetMC()->Gsvolu("EFSA","BOX", idtmed[698],dboxEFSA, 3); //Distance between the two backplanes of two UMs //in x-direction is 0.92 and ydirection is 0.95 @@ -1088,7 +1088,7 @@ void AliPMDv2008::CreateSupermodule() dboxEFSB[2] = dboxFEEBPlaneB[2]; //Type A - gMC->Gsvolu("EFSB","BOX", idtmed[698],dboxEFSB, 3); + TVirtualMC::GetMC()->Gsvolu("EFSB","BOX", idtmed[698],dboxEFSB, 3); Float_t xfs1,xfs2,xfs3,yfs1,yfs2,yfs3; @@ -1100,12 +1100,12 @@ void AliPMDv2008::CreateSupermodule() - // gMC->Gspos("EFBA", 1, "EFSA", xfs1, yfs1, 0., 0, "ONLY"); // BKN - gMC->Gspos("EFBA", 2, "EFSA", xfs2, yfs1, 0., 0, "ONLY"); - gMC->Gspos("EFBA", 3, "EFSA", xfs3, yfs1, 0., 0, "ONLY"); - gMC->Gspos("EFBA", 4, "EFSA", xfs1, yfs2, 0., 0, "ONLY"); - gMC->Gspos("EFBA", 5, "EFSA", xfs2, yfs2, 0., 0, "ONLY"); - gMC->Gspos("EFBA", 6, "EFSA", xfs3, yfs2, 0., 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EFBA", 1, "EFSA", xfs1, yfs1, 0., 0, "ONLY"); // BKN + TVirtualMC::GetMC()->Gspos("EFBA", 2, "EFSA", xfs2, yfs1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBA", 3, "EFSA", xfs3, yfs1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBA", 4, "EFSA", xfs1, yfs2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBA", 5, "EFSA", xfs2, yfs2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBA", 6, "EFSA", xfs3, yfs2, 0., 0, "ONLY"); //Type B positioning @@ -1118,12 +1118,12 @@ void AliPMDv2008::CreateSupermodule() - // gMC->Gspos("EFBB", 1, "EFSB", xfs1, yfs1, 0., 0, "ONLY"); // BKN - // gMC->Gspos("EFBB", 2, "EFSB", xfs2, yfs1, 0., 0, "ONLY"); // BKN - gMC->Gspos("EFBB", 3, "EFSB", xfs1, yfs2, 0., 0, "ONLY"); - gMC->Gspos("EFBB", 4, "EFSB", xfs2, yfs2, 0., 0, "ONLY"); - gMC->Gspos("EFBB", 5, "EFSB", xfs1, yfs3, 0., 0, "ONLY"); - gMC->Gspos("EFBB", 6, "EFSB", xfs2, yfs3, 0., 0, "ONLY"); + // TVirtualMC::GetMC()->Gspos("EFBB", 1, "EFSB", xfs1, yfs1, 0., 0, "ONLY"); // BKN + // TVirtualMC::GetMC()->Gspos("EFBB", 2, "EFSB", xfs2, yfs1, 0., 0, "ONLY"); // BKN + TVirtualMC::GetMC()->Gspos("EFBB", 3, "EFSB", xfs1, yfs2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBB", 4, "EFSB", xfs2, yfs2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBB", 5, "EFSB", xfs1, yfs3, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFBB", 6, "EFSB", xfs2, yfs3, 0., 0, "ONLY"); } @@ -1149,7 +1149,7 @@ void AliPMDv2008::CreatePMD() dboxFea[1] = fSMLengthay; dboxFea[2] = fgkThSteel/2.; - gMC->Gsvolu("EFEA","BOX", idtmed[618], dboxFea, 3); + TVirtualMC::GetMC()->Gsvolu("EFEA","BOX", idtmed[618], dboxFea, 3); // --- DEFINE Iron volumes for SM B @@ -1159,7 +1159,7 @@ void AliPMDv2008::CreatePMD() dboxFeb[1] = fSMLengthby; dboxFeb[2] = fgkThSteel/2.; - gMC->Gsvolu("EFEB","BOX", idtmed[618], dboxFeb, 3); + TVirtualMC::GetMC()->Gsvolu("EFEB","BOX", idtmed[618], dboxFeb, 3); AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.); AliMatrix(jhrot12, 90., 180., 90., 270., 0., 0.); @@ -1175,8 +1175,8 @@ void AliPMDv2008::CreatePMD() gaspmd[1] = fSMLengthay; gaspmd[2] = fSMthick; - gMC->Gsvolu("EPM1", "BOX", idtmed[698], gaspmd, 3); - gMC->Gsvolu("EPM2", "BOX", idtmed[698], gaspmd, 3); + TVirtualMC::GetMC()->Gsvolu("EPM1", "BOX", idtmed[698], gaspmd, 3); + TVirtualMC::GetMC()->Gsvolu("EPM2", "BOX", idtmed[698], gaspmd, 3); //Complete detector for Type A //Position Super modules type A for both CPV and PMD in EPMD @@ -1195,8 +1195,8 @@ void AliPMDv2008::CreatePMD() zfee=-gaspmd[2] + 1.2; /* - gMC->Gspos("EFSA", 1, "EPM1", 0., 0., zfee, 0, "ONLY"); - gMC->Gspos("EFSA", 2, "EPM2", 0., 0., zfee, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFSA", 1, "EPM1", 0., 0., zfee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFSA", 2, "EPM2", 0., 0., zfee, jhrot12, "ONLY"); */ //VETO @@ -1204,28 +1204,28 @@ void AliPMDv2008::CreatePMD() zcva = zfee + 1.2 + fDthick; /* - gMC->Gspos("EMVA", 1, "EPM1", 0., 0., zcva, 0, "ONLY"); - gMC->Gspos("EMVA", 2, "EPM2", 0., 0., zcva, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EMVA", 1, "EPM1", 0., 0., zcva, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EMVA", 2, "EPM2", 0., 0., zcva, jhrot12, "ONLY"); */ //Iron support zfea = zcva + fDthick + fgkThSteel/2.; - gMC->Gspos("EFEA", 1, "EPM1", 0., 0., zfea, 0, "ONLY"); - //gMC->Gspos("EFEA", 2, "EPM2", 0., 0., zfea, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFEA", 1, "EPM1", 0., 0., zfea, 0, "ONLY"); + //TVirtualMC::GetMC()->Gspos("EFEA", 2, "EPM2", 0., 0., zfea, 0, "ONLY"); //Lead zpba=zfea+fgkThSteel/2.+ fgkThLead/2.; - gMC->Gspos("ESPA", 1, "EPM1", 0., 0., zpba, 0, "ONLY"); - //gMC->Gspos("ESPA", 2, "EPM2", 0., 0., zpba, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESPA", 1, "EPM1", 0., 0., zpba, 0, "ONLY"); + //TVirtualMC::GetMC()->Gspos("ESPA", 2, "EPM2", 0., 0., zpba, 0, "ONLY"); //Preshower zpsa = zpba + fgkThLead/2. + fDthick; - gMC->Gspos("ESMA", 1, "EPM1", 0., 0., zpsa, 0, "ONLY"); - //gMC->Gspos("ESMA", 2, "EPM2", 0., 0., zpsa, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESMA", 1, "EPM1", 0., 0., zpsa, 0, "ONLY"); + //TVirtualMC::GetMC()->Gspos("ESMA", 2, "EPM2", 0., 0., zpsa, jhrot12, "ONLY"); //FEE boards zfee=zpsa + fDthick + 1.2; - gMC->Gspos("EFSA", 3, "EPM1", 0., 0., zfee, 0, "ONLY"); - //gMC->Gspos("EFSA", 4, "EPM2", 0., 0., zfee, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFSA", 3, "EPM1", 0., 0., zfee, 0, "ONLY"); + //TVirtualMC::GetMC()->Gspos("EFSA", 4, "EPM2", 0., 0., zfee, jhrot12, "ONLY"); //TYPE - B @@ -1233,8 +1233,8 @@ void AliPMDv2008::CreatePMD() gaspmd[1] = fSMLengthby; gaspmd[2] = fSMthick; - gMC->Gsvolu("EPM3", "BOX", idtmed[698], gaspmd, 3); - gMC->Gsvolu("EPM4", "BOX", idtmed[698], gaspmd, 3); + TVirtualMC::GetMC()->Gsvolu("EPM3", "BOX", idtmed[698], gaspmd, 3); + TVirtualMC::GetMC()->Gsvolu("EPM4", "BOX", idtmed[698], gaspmd, 3); //Complete detector for Type B //Position Super modules type B for both CPV and PMD in EPMD @@ -1249,34 +1249,34 @@ void AliPMDv2008::CreatePMD() zfee=-gaspmd[2] + 1.2; /* - gMC->Gspos("EFSB", 5, "EPM3", 0., 0., zfee, 0, "ONLY"); - gMC->Gspos("EFSB", 6, "EPM4", 0., 0., zfee, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFSB", 5, "EPM3", 0., 0., zfee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFSB", 6, "EPM4", 0., 0., zfee, jhrot12, "ONLY"); */ zcvb= zfee + 1.2 + fDthick; //VETO /* - gMC->Gspos("EMVB", 3, "EPM3", 0., 0., zcvb, 0, "ONLY"); - gMC->Gspos("EMVB", 4, "EPM4", 0., 0., zcvb, jhrot12, "ONLY"); + TVirtualMC::GetMC()->Gspos("EMVB", 3, "EPM3", 0., 0., zcvb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EMVB", 4, "EPM4", 0., 0., zcvb, jhrot12, "ONLY"); */ //IRON SUPPORT zfeb= zcvb + fDthick + fgkThSteel/2.; - //gMC->Gspos("EFEB", 3, "EPM3", 0., 0., zfeb, 0, "ONLY"); - gMC->Gspos("EFEB", 4, "EPM4", 0., 0., zfeb, 0, "ONLY"); + //TVirtualMC::GetMC()->Gspos("EFEB", 3, "EPM3", 0., 0., zfeb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFEB", 4, "EPM4", 0., 0., zfeb, 0, "ONLY"); //LEAD zpbb= zfeb + fgkThSteel/2.+ fgkThLead/2.; - //gMC->Gspos("ESPB", 3, "EPM3", 0., 0., zpbb, 0, "ONLY"); - gMC->Gspos("ESPB", 4, "EPM4", 0., 0., zpbb, 0, "ONLY"); + //TVirtualMC::GetMC()->Gspos("ESPB", 3, "EPM3", 0., 0., zpbb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESPB", 4, "EPM4", 0., 0., zpbb, 0, "ONLY"); //PRESHOWER zpsb = zpbb + fgkThLead/2.+ fDthick; - //gMC->Gspos("ESMB", 3, "EPM3", 0., 0., zpsb, 0, "ONLY"); - gMC->Gspos("ESMB", 4, "EPM4", 0., 0., zpsb, jhrot12, "ONLY"); + //TVirtualMC::GetMC()->Gspos("ESMB", 3, "EPM3", 0., 0., zpsb, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ESMB", 4, "EPM4", 0., 0., zpsb, jhrot12, "ONLY"); //FEE boards zfee=zpsb + fDthick + 1.2; - //gMC->Gspos("EFSB", 7, "EPM3", 0., 0., zfee, 0, "ONLY"); - gMC->Gspos("EFSB", 8, "EPM4", 0., 0., zfee, jhrot12, "ONLY"); + //TVirtualMC::GetMC()->Gspos("EFSB", 7, "EPM3", 0., 0., zfee, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EFSB", 8, "EPM4", 0., 0., zfee, jhrot12, "ONLY"); // --- Place the EPMD in ALICE @@ -1306,10 +1306,10 @@ void AliPMDv2008::CreatePMD() // (rotated (rotated EPM1) // EPM3) // - gMC->Gspos("EPM1", 1, "ALIC", xsma,ysma,zp, 0, "ONLY"); - gMC->Gspos("EPM2", 1, "ALIC", -xsma,-ysma,zp, 0, "ONLY"); - gMC->Gspos("EPM3", 1, "ALIC", xsmb,ysmb,zp, 0, "ONLY"); - gMC->Gspos("EPM4", 1, "ALIC", -xsmb,-ysmb,zp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPM1", 1, "ALIC", xsma,ysma,zp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPM2", 1, "ALIC", -xsma,-ysma,zp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPM3", 1, "ALIC", xsmb,ysmb,zp, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("EPM4", 1, "ALIC", -xsmb,-ysmb,zp, 0, "ONLY"); } @@ -1477,32 +1477,32 @@ void AliPMDv2008::StepManager() Float_t center[3] = {0,0,0}; Int_t vol[6]; - if(gMC->CurrentMedium() == fMedSens && (destep = gMC->Edep())) { + if(TVirtualMC::GetMC()->CurrentMedium() == fMedSens && (destep = TVirtualMC::GetMC()->Edep())) { - gMC->CurrentVolID(copy); + TVirtualMC::GetMC()->CurrentVolID(copy); vol[0] = copy; - gMC->CurrentVolOffID(1,copy); + TVirtualMC::GetMC()->CurrentVolOffID(1,copy); vol[1] = copy; - gMC->CurrentVolOffID(2,copy); + TVirtualMC::GetMC()->CurrentVolOffID(2,copy); vol[2] = copy; - gMC->CurrentVolOffID(3,copy); + TVirtualMC::GetMC()->CurrentVolOffID(3,copy); vol[3] = copy; - gMC->CurrentVolOffID(4,copy); + TVirtualMC::GetMC()->CurrentVolOffID(4,copy); vol[4] = copy; - gMC->CurrentVolOffID(5,copy); + TVirtualMC::GetMC()->CurrentVolOffID(5,copy); vol[5] = copy; - gMC->Gdtom(center,hits,1); + TVirtualMC::GetMC()->Gdtom(center,hits,1); hits[3] = destep*1e9; //Number in eV // this is for pile-up events - hits[4] = gMC->TrackTime(); + hits[4] = TVirtualMC::GetMC()->TrackTime(); AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); diff --git a/PWG/FLOW/Tasks/AliAnalysisTaskVnV0.cxx b/PWG/FLOW/Tasks/AliAnalysisTaskVnV0.cxx index 8fed3c307d2..711b9bc9265 100644 --- a/PWG/FLOW/Tasks/AliAnalysisTaskVnV0.cxx +++ b/PWG/FLOW/Tasks/AliAnalysisTaskVnV0.cxx @@ -1000,10 +1000,10 @@ void AliAnalysisTaskVnV0::Analyze(AliAODEvent* aodEvent, Float_t v0Centr) } // flow A and C side - Float_t xMCepAv2[5] = {iC,0/*charge*/,1,EvPlaneMCV2[0],1}; - Float_t xMCepCv2[5] = {iC,0/*charge*/,1,EvPlaneMCV2[1],1}; - Float_t xMCepAv3[5] = {iC,0/*charge*/,1,EvPlaneMCV3[0],1}; - Float_t xMCepCv3[5] = {iC,0/*charge*/,1,EvPlaneMCV3[1],1}; + Float_t xMCepAv2[5] = {static_cast(iC),0/*charge*/,1,EvPlaneMCV2[0],1}; + Float_t xMCepCv2[5] = {static_cast(iC),0/*charge*/,1,EvPlaneMCV2[1],1}; + Float_t xMCepAv3[5] = {static_cast(iC),0/*charge*/,1,EvPlaneMCV3[0],1}; + Float_t xMCepCv3[5] = {static_cast(iC),0/*charge*/,1,EvPlaneMCV3[1],1}; for(Int_t iT=0;iT < nMCtrack;iT++){ AliAODMCParticle *mctr = (AliAODMCParticle*) mcArray->At(iT); @@ -1248,7 +1248,7 @@ void AliAnalysisTaskVnV0::Analyze(AliAODEvent* aodEvent, Float_t v0Centr) fPID->ComputeProb(aodTrack,fOutputAOD); // compute Bayesian probabilities Float_t tofMismProbMC = fPID->GetTOFMismProb(); // TOF mismatch probability requested to be lower than 50% for TOF analysis - Float_t xMC[5] = {iC,aodTrack->Charge(),1,evplaneMC,fPID->GetCurrentMask(1)&&tofMismProbMC < 0.5}; // to fill analysis v2 container + Float_t xMC[5] = {static_cast(iC),static_cast(aodTrack->Charge()),1,static_cast(evplaneMC),static_cast(fPID->GetCurrentMask(1)&&tofMismProbMC < 0.5)}; // to fill analysis v2 container Float_t v2mc = TMath::Cos(2*(aodTrack->Phi() - evplaneMC)); @@ -1284,8 +1284,8 @@ void AliAnalysisTaskVnV0::Analyze(AliAODEvent* aodEvent, Float_t v0Centr) Float_t *probRead = fPID->GetProb(); Float_t prob[8] = {probRead[0],probRead[1],probRead[2],probRead[3],probRead[4],probRead[5],probRead[6],probRead[7]}; Float_t tofMismProb = fPID->GetTOFMismProb(); // TOF mismatch probability requested to be lower than 50% for TOF analysis - Float_t x[6] = {iC,aodTrack->Charge(),1,evPlAngV0[iV0],fPID->GetCurrentMask(1)&&tofMismProb < 0.5,0}; // to fill analysis v2 container - Float_t x3[6] = {iC,aodTrack->Charge(),1,evPlAngV0v3[iV0],fPID->GetCurrentMask(1)&&tofMismProb < 0.5,0}; // to fill analysis v3 container + Float_t x[6] = {static_cast(iC),static_cast(aodTrack->Charge()),1,static_cast(evPlAngV0[iV0]),static_cast(fPID->GetCurrentMask(1)&&tofMismProb < 0.5),0}; // to fill analysis v2 container + Float_t x3[6] = {static_cast(iC),static_cast(aodTrack->Charge()),1,static_cast(evPlAngV0v3[iV0]),static_cast(fPID->GetCurrentMask(1)&&tofMismProb < 0.5),0}; // to fill analysis v3 container // in case fill DCA info if(fFillDCA){ @@ -1354,12 +1354,12 @@ void AliAnalysisTaskVnV0::Analyze(AliAODEvent* aodEvent, Float_t v0Centr) else if(deltaPhiV0v3 < -TMath::Pi()) deltaPhiV0v3 += 2*TMath::Pi(); // variable to fill QA container - Float_t xQA[5] = {iC,aodTrack->Pt(), 0.0,deltaPhiV0,x[4]}; // v2 - Float_t xQA3[5] = {iC,aodTrack->Pt(), 0.0,deltaPhiV0v3,x[4]}; // v3 + Float_t xQA[5] = {static_cast(iC),static_cast(aodTrack->Pt()), 0.0,deltaPhiV0,x[4]}; // v2 + Float_t xQA3[5] = {static_cast(iC),static_cast(aodTrack->Pt()), 0.0,deltaPhiV0v3,x[4]}; // v3 // extra QA TProfiles if(iV0==1 && aodTrack->Pt() < 20 && fPID->GetCurrentMask(0) && fPID->GetCurrentMask(1)){ - Float_t xQApid[2] = {iC,aodTrack->Pt()}; + Float_t xQApid[2] = {static_cast(iC),static_cast(aodTrack->Pt())}; fContQApid->Fill(0,nsigmaTPC[2],v2V0,xQApid); // v2 TPC (V0C) w.r.t pions fContQApid->Fill(1,nsigmaTOF[2],v2V0,xQApid); // v2 TOF (V0C) w.r.t. pions fContQApid->Fill(2,nsigmaTPC[3],v2V0,xQApid); // v2 TPC (V0C) w.r.t kaons @@ -1587,8 +1587,8 @@ void AliAnalysisTaskVnV0::Analyze(AliAODEvent* aodEvent, Float_t v0Centr) AliFlowVZEROResults *contV0v3[2] = {fContAllChargesV0Av3,fContAllChargesV0Cv3}; for(Int_t iV0=0;iV0<2;iV0++){ // loop on A and C side - Float_t x[6] = {iC,-1/*my K0s are negative for convention*/,1,evPlAngV0[iV0],1,0}; // to fill analysis v2 container - Float_t x3[6] = {iC,-1,1,evPlAngV0v3[iV0],1,0}; // to fill analysis v3 container + Float_t x[6] = {static_cast(iC),-1/*my K0s are negative for convention*/,1,evPlAngV0[iV0],1,0}; // to fill analysis v2 container + Float_t x3[6] = {static_cast(iC),-1,1,evPlAngV0v3[iV0],1,0}; // to fill analysis v3 container Float_t v2V0 = TMath::Cos(2*(fPhiK0s[imy] - evPlAngV0[iV0])); Float_t v3V0 = TMath::Cos(3*(fPhiK0s[imy] - evPlAngV0v3[iV0])); @@ -1675,8 +1675,8 @@ void AliAnalysisTaskVnV0::Analyze(AliAODEvent* aodEvent, Float_t v0Centr) if(deltaphi > TMath::Pi()) deltaphi -= 2*TMath::Pi(); if(deltaphi < -TMath::Pi()) deltaphi += 2*TMath::Pi(); - Float_t x[6] = {iC,1,1,evPlAngV0[iV0],1,0}; // to fill analysis v2 container - Float_t x3[6] = {iC,1,1,evPlAngV0v3[iV0],1,0}; // to fill analysis v3 container + Float_t x[6] = {static_cast(iC),1,1,evPlAngV0[iV0],1,0}; // to fill analysis v2 container + Float_t x3[6] = {static_cast(iC),1,1,evPlAngV0v3[iV0],1,0}; // to fill analysis v3 container Float_t decaylength = myV0->DecayLengthXY(fOutputAOD->GetPrimaryVertex()); // printf("decay length = %f\n",decaylength); @@ -1732,8 +1732,8 @@ void AliAnalysisTaskVnV0::Analyze(AliAODEvent* aodEvent, Float_t v0Centr) if(prob[4] < 0.61) prob[4] = 0.61; - Float_t xdec[6] = {iC,aodTrack->Charge(),prob[4],evPlAngV0[iV0],fPID->GetCurrentMask(1)&&tofMismProb < 0.5,0}; // to fill analysis v2 container - Float_t xdec3[6] = {iC,aodTrack->Charge(),prob[4],evPlAngV0v3[iV0],fPID->GetCurrentMask(1)&&tofMismProb < 0.5,0}; // to fill analysis v3 container + Float_t xdec[6] = {static_cast(iC),static_cast(aodTrack->Charge()),prob[4],evPlAngV0[iV0],static_cast(fPID->GetCurrentMask(1)&&tofMismProb < 0.5),0}; // to fill analysis v2 container + Float_t xdec3[6] = {static_cast(iC),static_cast(aodTrack->Charge()),prob[4],evPlAngV0v3[iV0],static_cast(fPID->GetCurrentMask(1)&&tofMismProb < 0.5),0}; // to fill analysis v3 container // Fill Container for (anti)proton from lambda if(nsigma < 2 && xdec[2] > 0.6 && TMath::Abs(aodTrack->Eta()) < 0.8){ @@ -1754,8 +1754,8 @@ void AliAnalysisTaskVnV0::Analyze(AliAODEvent* aodEvent, Float_t v0Centr) if(prob[2] < 0.61) prob[2] = 0.61; - Float_t xdec[6] = {iC,aodTrack->Charge(),prob[2],evPlAngV0[iV0],fPID->GetCurrentMask(1)&&tofMismProb < 0.5,0}; // to - Float_t xdec3[6] = {iC,aodTrack->Charge(),prob[2],evPlAngV0v3[iV0],fPID->GetCurrentMask(1)&&tofMismProb < 0.5,0}; // to + Float_t xdec[6] = {static_cast(iC),static_cast(aodTrack->Charge()),prob[2],evPlAngV0[iV0],static_cast(fPID->GetCurrentMask(1)&&tofMismProb < 0.5),0}; // to + Float_t xdec3[6] = {static_cast(iC),static_cast(aodTrack->Charge()),prob[2],evPlAngV0v3[iV0],static_cast(fPID->GetCurrentMask(1)&&tofMismProb < 0.5),0}; // to if(nsigma < 2 && xdec[2] > 0.6 && TMath::Abs(aodTrack->Eta()) < 0.8){ if(fV2) contV0[iV0]->Fill(12,aodTrack->Pt(),v2V0,xdec); @@ -1773,8 +1773,8 @@ void AliAnalysisTaskVnV0::Analyze(AliAODEvent* aodEvent, Float_t v0Centr) if(prob2[2] < 0.61) prob2[2] = 0.61; - Float_t xdecB[6] = {iC,aodTrack->Charge(),prob2[2],evPlAngV0[iV0],fPID->GetCurrentMask(1)&&tofMismProb2 < 0.5,0}; // to - Float_t xdecB3[6] = {iC,aodTrack->Charge(),prob2[2],evPlAngV0v3[iV0],fPID->GetCurrentMask(1)&&tofMismProb2 < 0.5,0}; // to + Float_t xdecB[6] = {static_cast(iC),static_cast(aodTrack->Charge()),prob2[2],evPlAngV0[iV0],static_cast(fPID->GetCurrentMask(1)&&tofMismProb2 < 0.5),0}; // to + Float_t xdecB3[6] = {static_cast(iC),static_cast(aodTrack->Charge()),prob2[2],evPlAngV0v3[iV0],static_cast(fPID->GetCurrentMask(1)&&tofMismProb2 < 0.5),0}; // to if(nsigma < 2 && xdecB[2] > 0.6 && TMath::Abs(aodTrack->Eta()) < 0.8){ if(fV2) contV0[iV0]->Fill(12,aodTrack->Pt(),v2V0,xdecB); diff --git a/PWG/muon/AliAnalysisTaskMuonCollisionMultiplicity.cxx b/PWG/muon/AliAnalysisTaskMuonCollisionMultiplicity.cxx index 52b91a2c8de..6474768c9f8 100644 --- a/PWG/muon/AliAnalysisTaskMuonCollisionMultiplicity.cxx +++ b/PWG/muon/AliAnalysisTaskMuonCollisionMultiplicity.cxx @@ -276,7 +276,7 @@ void AliAnalysisTaskMuonCollisionMultiplicity::FillHistosAOD(Int_t triggerClass) Double_t vertexPosition = fAOD->GetPrimaryVertex()->GetZ(); Double_t pileUp = !(fAOD->IsPileupFromSPD()); - Double_t valuesTrigger[3] = {fTrackletMultiplicity, vertexPosition, pileUp}; + Double_t valuesTrigger[3] = {static_cast(fTrackletMultiplicity), vertexPosition, pileUp}; ((THnSparseD *)fTriggerList->At(triggerClass))->Fill(valuesTrigger); @@ -305,7 +305,7 @@ void AliAnalysisTaskMuonCollisionMultiplicity::FillHistosAOD(Int_t triggerClass) if (3.0 < thetaAbs && thetaAbs < 10.0) pDCA = (p-2.4/2.0) * fAOD->GetTrack(ii)->DCA(); - Double_t valuesMuon[9] = {fTrackletMultiplicity, vertexPosition, pileUp, matchTrigger, thetaAbs, eta, pDCA, p, pT}; + Double_t valuesMuon[9] = {static_cast(fTrackletMultiplicity), vertexPosition, pileUp, matchTrigger, thetaAbs, eta, pDCA, static_cast(p), static_cast(pT)}; ((THnSparseD *)fSingleMuonList->At(triggerClass))->Fill(valuesMuon); } @@ -348,8 +348,8 @@ void AliAnalysisTaskMuonCollisionMultiplicity::FillHistosAOD(Int_t triggerClass) Double_t pT = fAOD->GetDimuon(ii)->Pt(); Double_t M = fAOD->GetDimuon(ii)->M(); - Double_t valuesDimuon[18] = {fTrackletMultiplicity, vertexPosition, pileUp, matchTrigger1, matchTrigger2, nMatchTrigger, thetaAbs1, thetaAbs2, - eta1, eta2, pDCA1, pDCA2, p1, p2, y, p, pT, M}; + Double_t valuesDimuon[18] = {static_cast(fTrackletMultiplicity), vertexPosition, pileUp, matchTrigger1, matchTrigger2, static_cast(nMatchTrigger), thetaAbs1, thetaAbs2, + eta1, eta2, pDCA1, pDCA2, static_cast(p1), p2, y, p, pT, M}; ((THnSparseD *)fDimuonList->At(triggerClass))->Fill(valuesDimuon); } } @@ -364,7 +364,7 @@ void AliAnalysisTaskMuonCollisionMultiplicity::FillHistosESD(Int_t triggerClass) Double_t vertexPosition = fESD->GetPrimaryVertex()->GetZ(); Double_t pileUp = !(fESD->IsPileupFromSPD()); - Double_t valuesTrigger[3] = {fTrackletMultiplicity, vertexPosition, pileUp}; + Double_t valuesTrigger[3] = {static_cast(fTrackletMultiplicity), vertexPosition, pileUp}; ((THnSparseD *)fTriggerList->At(triggerClass))->Fill(valuesTrigger); @@ -386,7 +386,7 @@ void AliAnalysisTaskMuonCollisionMultiplicity::FillHistosESD(Int_t triggerClass) Double_t pUncor1 = fESD->GetMuonTrack(ii)->PUncorrected(); Double_t pDCA1 = (p1+pUncor1) * fESD->GetMuonTrack(ii)->GetDCA() / 2.0; - Double_t valuesMuon[9] = {fTrackletMultiplicity, vertexPosition, pileUp, matchTrigger1, thetaAbs1, eta1, pDCA1, p1, pT1}; + Double_t valuesMuon[9] = {static_cast(fTrackletMultiplicity), vertexPosition, pileUp, matchTrigger1, thetaAbs1, eta1, pDCA1, p1, pT1}; ((THnSparseD *)fSingleMuonList->At(triggerClass))->Fill(valuesMuon); // Second loop on muons, to fill the dimuons histos @@ -422,7 +422,7 @@ void AliAnalysisTaskMuonCollisionMultiplicity::FillHistosESD(Int_t triggerClass) Double_t pT = TMath::Sqrt(pX*pX + pY*pY); Double_t M = dimuonVector->M(); - Double_t valuesDimuon[18] = {fTrackletMultiplicity, vertexPosition, pileUp, matchTrigger1, matchTrigger2, nMatchTrigger, thetaAbs1, thetaAbs2, + Double_t valuesDimuon[18] = {static_cast(fTrackletMultiplicity), vertexPosition, pileUp, matchTrigger1, matchTrigger2, static_cast(nMatchTrigger), thetaAbs1, thetaAbs2, eta1, eta2, pDCA1, pDCA2, p1, p2, y, p, pT, M}; ((THnSparseD *)fDimuonList->At(triggerClass))->Fill(valuesDimuon); delete dimuonVector; diff --git a/PWG/muon/AliMuonsHFHeader.cxx b/PWG/muon/AliMuonsHFHeader.cxx index e2bec8bcf46..396a4cf34ac 100644 --- a/PWG/muon/AliMuonsHFHeader.cxx +++ b/PWG/muon/AliMuonsHFHeader.cxx @@ -291,7 +291,7 @@ void AliMuonsHFHeader::FillHistosEvnH(TList *list) const Int_t nhs = 3; TString tName[nhs] = { "Vz", "Vt", "VtxNcontr" }; - Double_t dist[nhs] = { this->Vz(), this->Vt(), this->VtxContrsN() }; + Double_t dist[nhs] = { this->Vz(), this->Vt(), static_cast(this->VtxContrsN()) }; if (fgIsMC && (fSelMask & AliVEvent::kAny)) { for (Int_t i=nhs; i--;) ((TH1D*)list->FindObject(Form("h_%s",tName[i].Data())))->Fill(dist[i]); } else { @@ -316,8 +316,8 @@ void AliMuonsHFHeader::FillHistosMuon(TList *list, AliMuonInfoStoreRD* const inf infoStore->MomentumAtVtx().Pt(), infoStore->MomentumAtVtx().Eta(), infoStore->DCA(), - infoStore->MatchTrigger(), - infoStore->Charge(), + static_cast(infoStore->MatchTrigger()), + static_cast(infoStore->Charge()), infoStore->RabsEnd() }; if (fgIsMC && (fSelMask & AliVEvent::kAny)) { diff --git a/PWGCF/Correlations/DPhi/AliAnalysisTaskLongRangeCorrelations.cxx b/PWGCF/Correlations/DPhi/AliAnalysisTaskLongRangeCorrelations.cxx index dc47ebda378..bf875b67189 100644 --- a/PWGCF/Correlations/DPhi/AliAnalysisTaskLongRangeCorrelations.cxx +++ b/PWGCF/Correlations/DPhi/AliAnalysisTaskLongRangeCorrelations.cxx @@ -254,8 +254,8 @@ void AliAnalysisTaskLongRangeCorrelations::UserExec(Option_t* ) { if (isMC) { TObjArray* tracksMC(GetAcceptedTracks(arrayMC, centrality)); const Double_t x[2] = { - arrayMC->GetEntriesFast(), - tracksMC->GetEntriesFast() + static_cast(arrayMC->GetEntriesFast()), + static_cast(tracksMC->GetEntriesFast()) }; Fill("MC_histQAMultiplicity", x); Fill("MC_histEventStats", 4.); // analyzed MC events diff --git a/PWGCF/Correlations/DPhi/AliAnalysisTaskMinijet.cxx b/PWGCF/Correlations/DPhi/AliAnalysisTaskMinijet.cxx index cf99e8dc55b..f417829a5c1 100644 --- a/PWGCF/Correlations/DPhi/AliAnalysisTaskMinijet.cxx +++ b/PWGCF/Correlations/DPhi/AliAnalysisTaskMinijet.cxx @@ -1794,7 +1794,7 @@ void AliAnalysisTaskMinijet::Analyse(const vector &pt, Bool_t isLikeSign = CheckLikeSign(chargeEventAxis, chargeOthers); - Double_t prop6[6] = {ptEventAxis,ptOthers,dEta,dPhi,ntracksCharged, isLikeSign }; + Double_t prop6[6] = {ptEventAxis,ptOthers,dEta,dPhi,ntracksCharged, static_cast(isLikeSign) }; fMapPair[step]->Fill(prop6, strangeWeightEventAxis*strangeWeightOthers); //thrid track loop (Andreas: three particle auto-correlations) diff --git a/PWGCF/Correlations/DPhi/AliLeadingV0Correlation.cxx b/PWGCF/Correlations/DPhi/AliLeadingV0Correlation.cxx index 7d4a6aeabfb..1fdc1c75ee4 100644 --- a/PWGCF/Correlations/DPhi/AliLeadingV0Correlation.cxx +++ b/PWGCF/Correlations/DPhi/AliLeadingV0Correlation.cxx @@ -506,9 +506,9 @@ void AliLeadingV0Correlation::UserExec(Option_t *) Bool_t V0EtaMax = TMath::Abs(mcTrackEta)M(); - Double_t mcK0[3] = {mcMass,mcTrackPt,nMCTracks}; - Double_t mcLa[3] = {mcMass,mcTrackPt,nMCTracks}; - Double_t mcAl[3] = {mcMass,mcTrackPt,nMCTracks}; + Double_t mcK0[3] = {mcMass,mcTrackPt,static_cast(nMCTracks)}; + Double_t mcLa[3] = {mcMass,mcTrackPt,static_cast(nMCTracks)}; + Double_t mcAl[3] = {mcMass,mcTrackPt,static_cast(nMCTracks)}; Int_t myTrackMotherLabel = mcTrack->GetMother(); diff --git a/PWGCF/Correlations/DPhi/PhiEffMC/AliAnalysisTaskPhiEffMc.cxx b/PWGCF/Correlations/DPhi/PhiEffMC/AliAnalysisTaskPhiEffMc.cxx index c2ad8cc1095..a9c74e8dad0 100644 --- a/PWGCF/Correlations/DPhi/PhiEffMC/AliAnalysisTaskPhiEffMc.cxx +++ b/PWGCF/Correlations/DPhi/PhiEffMC/AliAnalysisTaskPhiEffMc.cxx @@ -309,7 +309,7 @@ void AliAnalysisTaskPhiEffMc::UserExec(Option_t *) Int_t mcID = fHelperPID->GetParticleSpecies(partMC); if(fDoPID && (mcID>3 || mcID < -3)) continue; // PID ID, pt, y, eta, phi - Double_t varfill2[6] = {(partMC->Charge() > 0 ? mcID+1 : -1*(mcID+1)), partMC->Pt(), partMC->Y(), cent, partMC->Eta(), partMC->Phi()}; + Double_t varfill2[6] = {static_cast((partMC->Charge() > 0 ? mcID+1 : -1*(mcID+1))), partMC->Pt(), partMC->Y(), cent, partMC->Eta(), partMC->Phi()}; hTrackMc->Fill(varfill2); if(!fDoPID || mcID == 1) @@ -339,7 +339,7 @@ void AliAnalysisTaskPhiEffMc::UserExec(Option_t *) if(fDoPID && (dataID>3 || dataID < -3)) continue; // PID ID, pt, y, eta, phi - Double_t varfill3[6] = {(track->Charge() > 0 ? dataID+1 : -1*(dataID+1)), track->Pt(), track->Y(), cent, track->Eta(), track->Phi()}; + Double_t varfill3[6] = {static_cast((track->Charge() > 0 ? dataID+1 : -1*(dataID+1))), track->Pt(), track->Y(), cent, track->Eta(), track->Phi()}; hTrackReco->Fill(varfill3); if(!fDoPID || dataID==1) @@ -363,7 +363,7 @@ void AliAnalysisTaskPhiEffMc::UserExec(Option_t *) if(fDoPID && (genID>3 || genID < -3)) continue; // PID ID, pt, y, eta, phi - Double_t varfill4[6] = {(track->Charge() > 0 ? genID+1 : -1*(genID+1)), track->Pt(), track->Y(), cent, track->Eta(), track->Phi()}; + Double_t varfill4[6] = {static_cast((track->Charge() > 0 ? genID+1 : -1*(genID+1))), track->Pt(), track->Y(), cent, track->Eta(), track->Phi()}; hTrackMatch->Fill(varfill4); if(genID==1) @@ -424,7 +424,7 @@ void AliAnalysisTaskPhiEffMc::UserExec(Option_t *) UnlikeSign(kaonsPosData,kaonsNegData,hPairReco,cent); LikeSign(kaonsPosData,kaonsNegData,hPairReco,cent); - Double_t varfill5[4] = {cent, fAOD->GetPrimaryVertex()->GetZ(), nMc, nReco}; + Double_t varfill5[4] = {cent, fAOD->GetPrimaryVertex()->GetZ(), static_cast(nMc), static_cast(nReco)}; hEvent->Fill(varfill5); kaonsPosMc->Clear(); diff --git a/PWGCF/Correlations/DPhi/PidPid/AliAnalysisTaskPidPidCorrelations.cxx b/PWGCF/Correlations/DPhi/PidPid/AliAnalysisTaskPidPidCorrelations.cxx index b13b3d5424b..ac477f6751b 100644 --- a/PWGCF/Correlations/DPhi/PidPid/AliAnalysisTaskPidPidCorrelations.cxx +++ b/PWGCF/Correlations/DPhi/PidPid/AliAnalysisTaskPidPidCorrelations.cxx @@ -2134,8 +2134,8 @@ void AliAnalysisTaskPidPidCorrelations::UserCreateOutputObjects() Int_t binsHistoPair[kTrackVariablesPair] = { iBinPair[0] , iBinPair[1] , iBinPair[2] , iBinPair[3] , iBinPair[4] }; - Double_t minHistoPair[kTrackVariablesPair] = { ptMin , ptMin , -0.5*TMath::Pi() , -fDeltaEtaMax , zvtxMin }; - Double_t maxHistoPair[kTrackVariablesPair] = { ptMax , ptMax , 1.5*TMath::Pi() , fDeltaEtaMax , zvtxMax }; + Double_t minHistoPair[kTrackVariablesPair] = { static_cast(ptMin) , static_cast(ptMin) , -0.5*TMath::Pi() , static_cast(-fDeltaEtaMax) , static_cast(zvtxMin) }; + Double_t maxHistoPair[kTrackVariablesPair] = { static_cast(ptMax) , static_cast(ptMax) , 1.5*TMath::Pi() , static_cast(fDeltaEtaMax) , static_cast(zvtxMax) }; /* diff --git a/PWGCF/Correlations/JCORRAN/AliJBaseTrack.h b/PWGCF/Correlations/JCORRAN/AliJBaseTrack.h index 05e0c55ef77..286f5ff0678 100755 --- a/PWGCF/Correlations/JCORRAN/AliJBaseTrack.h +++ b/PWGCF/Correlations/JCORRAN/AliJBaseTrack.h @@ -30,7 +30,7 @@ class AliJBaseTrack : public TLorentzVector { AliJBaseTrack(const TLorentzVector & a); virtual ~AliJBaseTrack(){;} //destructor - float GetTwoPiPhi() const {return Phi()>-kJPi/3 ? Phi() : kJTwoPi+Phi();} + float GetTwoPiPhi() const {return Phi()>-AliJConst::kJPi/3 ? Phi() : AliJConst::kJTwoPi+Phi();} TLorentzVector GetLorentzVector(){ return TLorentzVector( *this);} Int_t GetID() const { return fID;} diff --git a/PWGCF/Correlations/JCORRAN/AliJCORRANTask.cxx b/PWGCF/Correlations/JCORRAN/AliJCORRANTask.cxx index 50d530627a2..3a55a6903f1 100755 --- a/PWGCF/Correlations/JCORRAN/AliJCORRANTask.cxx +++ b/PWGCF/Correlations/JCORRAN/AliJCORRANTask.cxx @@ -113,8 +113,8 @@ AliJCORRANTask::AliJCORRANTask() : fPHOSGeom(0x0) { //Default constructor - for(Int_t i=0;i 5) cout << "---- AliJCORRANTask Constructor ----"< +Bz) //Create internal JCorran trigger mask. Mapping between trigger and trigger bit - fTriggerTableJCorran[kMinBiasTriggerBitJCorran]="Minimum Bias";//minimum bias occupies first trigger bit - fTriggerTableJCorran[kHighMultTriggerBitJCorran]="High Multiplicity";//high multiplicity trigger => second trigger bit + fTriggerTableJCorran[AliJConst::kMinBiasTriggerBitJCorran]="Minimum Bias";//minimum bias occupies first trigger bit + fTriggerTableJCorran[AliJConst::kHighMultTriggerBitJCorran]="High Multiplicity";//high multiplicity trigger => second trigger bit //=========== Fill Run header object =============== fAliRunHeader->SetRunNumber(runId); - fAliRunHeader->SetActiveTriggersJCorran(fTriggerTableJCorran,kRangeTriggerTableJCorran); + fAliRunHeader->SetActiveTriggersJCorran(fTriggerTableJCorran,AliJConst::kRangeTriggerTableJCorran); SetAliceTriggerDef(fAliRunHeader);//TODO for AOD SetAliceFilterMapDef(fAliRunHeader);// TODO for AOD //FOR ESD @@ -342,7 +342,7 @@ void AliJCORRANTask::UserExec(Option_t* /*option*/) if(esd->GetCurrentL3() <0) l3MgFieldPolarity = -1; fAliRunHeader->SetL3Field(l3MgFieldPolarity, esd->GetMagneticField()); const AliESDRun* esdRun = esd->GetESDRun(); - for(Int_t triggerBit=0; triggerBitGetTriggerClass(triggerBit); } fAliRunHeader->SetActiveTriggersAlice(fActiveTriggers); @@ -452,7 +452,7 @@ void AliJCORRANTask::ReadESDTracks(AliESDEvent * esd) ctrack->SetTPCTrack( tpcTrack->Px(), tpcTrack->Py(), tpcTrack->Pz()); } ReadESDPID( track, ctrack ); - ctrack->SetParticleType(kNone); + ctrack->SetParticleType(AliJConst::kNone); ctrack->SetCharge(track->Charge()); ctrack->SetFilterMap( filterMap ); @@ -549,7 +549,7 @@ void AliJCORRANTask::ReadAODTracks(const AliAODEvent * aod) AliJTrack * ctrack = new( (*fTrackList)[fTrackList->GetEntriesFast()] ) AliJTrack; ctrack->SetPxPyPzE(track->Px(), track->Py(), track->Pz(), 0 ); //TODO if( fStoreTPCTrack ) - ctrack->SetParticleType(kNone); + ctrack->SetParticleType(AliJConst::kNone); ctrack->SetCharge(track->Charge()); ctrack->SetStatus(track->GetStatus());// ctrack->SetFlags( track->GetFlags() ); @@ -621,7 +621,7 @@ void AliJCORRANTask::ReadESDCaloClusters(const AliESDEvent* esd) //fRecoUtils->GetMaxEnergyCell(fEMCALGeo, emCells, c1, absID1, iSM, ieta1, iphi1, shared); AliJPhoton *pht = new( (*fPhotonList)[nPhotons++] ) AliJPhoton; - pht->SetParticleType(kNone);//kPhoton); + pht->SetParticleType(AliJConst::kNone);//kPhoton); pht->SetChi2(c1->Chi2()); pht->SetPID(c1->GetPID()); Float_t pos[3]; @@ -770,13 +770,13 @@ UInt_t AliJCORRANTask::ConvertTriggerMask(){ if(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler())) ->IsEventSelected() & AliVEvent::kMB){ // minimum bias TBit 0 - triggerMaskJC += (1<GetInputEventHandler())) ->IsEventSelected() & AliVEvent::kHighMult){ //high multiplicity trigger TBit 1 - triggerMaskJC += (1< fIsRealOrMC; //flags if the input are real (0) ESDs or MonteCarlo ESDs (1) TString fAODName; //output delta AOD name - TString fActiveTriggers[kRangeTriggerTableAlice];//alice table mapping trigger bit to trigger name - TString fTriggerTableJCorran[kRangeTriggerTableJCorran];//JCorran trigger table TBit 0 =MinBias + TString fActiveTriggers[AliJConst::kRangeTriggerTableAlice];//alice table mapping trigger bit to trigger name + TString fTriggerTableJCorran[AliJConst::kRangeTriggerTableJCorran];//JCorran trigger table TBit 0 =MinBias bool fStoreEventPlaneSource; bool fStoreTPCTrack; TString fOADBPath; diff --git a/PWGCF/Correlations/JCORRAN/AliJConst.h b/PWGCF/Correlations/JCORRAN/AliJConst.h index 970540273eb..167d46b9b85 100755 --- a/PWGCF/Correlations/JCORRAN/AliJConst.h +++ b/PWGCF/Correlations/JCORRAN/AliJConst.h @@ -24,7 +24,7 @@ #define kPtDim 20 // #define kMaxNoRuns 100 // Maximum no of runs in a nanoDST file - +namespace AliJConst { const double kJPi = 3.14159265358979; //TMath::Pi(); const double kJTwoPi = 2*kJPi; const double kJToRadian = kJPi/180.; @@ -73,5 +73,5 @@ char const * const kJetAlgStrName[NJetAlg] = // PHENIX constants enum TEMC {kPbSc, kPbGl}; - +} #endif diff --git a/PWGCF/Correlations/JCORRAN/AliJPhoton.cxx b/PWGCF/Correlations/JCORRAN/AliJPhoton.cxx index 924c893b339..4b6b036cb7d 100644 --- a/PWGCF/Correlations/JCORRAN/AliJPhoton.cxx +++ b/PWGCF/Correlations/JCORRAN/AliJPhoton.cxx @@ -141,7 +141,7 @@ void AliJPhoton::SetPID(const Double_t *pid) { //______________________________________________________________________________ -particleType AliJPhoton::GetParticleType() { +AliJConst::particleType AliJPhoton::GetParticleType() { // return the most problable particle type // Note: following the AliCaloPID implementation @@ -176,12 +176,12 @@ particleType AliJPhoton::GetParticleType() { } - particleType pdg = kHadron; + AliJConst::particleType pdg = AliJConst::kHadron; //Select most probable ID if(fCaloType == kPHOSCalo){ - if(fCaloPID[kPhotonAli] > wPhoton) pdg = kPhoton ; - else if(fCaloPID[kPi0Ali] > wPi0) pdg = kPizero ; + if(fCaloPID[kPhotonAli] > wPhoton) pdg = AliJConst::kPhoton ; + else if(fCaloPID[kPi0Ali] > wPi0) pdg = AliJConst::kPizero ; //else if(fCaloPID[kElectronAli] > wElectron) pdg = electron ; //else if(fCaloPID[kEleConAli] > wElectron) pdg = electronCon ; //else if(chargedHadronWeight > wCharged) pdg = chargedHadron ; @@ -193,8 +193,8 @@ particleType AliJPhoton::GetParticleType() { } else{//EMCAL //Temporal solution, electrons and photons not differenciated - if(fCaloPID[kPhotonAli] + fCaloPID[kElectronAli] > wPhoton) pdg = kPhoton ; - else if(fCaloPID[kPi0Ali] > wPi0) pdg = kPizero ; + if(fCaloPID[kPhotonAli] + fCaloPID[kElectronAli] > wPhoton) pdg = AliJConst::kPhoton ; + else if(fCaloPID[kPi0Ali] > wPi0) pdg = AliJConst::kPizero ; //else if(chargedHadronWeight + neutralHadronWeight > wCharged) pdg = chargedHadron ; //else if(neutralHadronWeight + chargedHadronWeight > wNeutral) pdg = neutralHadron ; //else pdg = neutralUnknown ; diff --git a/PWGCF/Correlations/JCORRAN/AliJPhoton.h b/PWGCF/Correlations/JCORRAN/AliJPhoton.h index dd808d34ebc..be56dbadc30 100644 --- a/PWGCF/Correlations/JCORRAN/AliJPhoton.h +++ b/PWGCF/Correlations/JCORRAN/AliJPhoton.h @@ -89,7 +89,7 @@ class AliJPhoton : public AliJBaseTrack { Double_t GetCellAmplitudeFraction(Int_t i) const { if (fCellsAmpFraction && i >=0 && i < fNCells ) return fCellsAmpFraction[i]; else return -1;} - particleType GetParticleType(); + AliJConst::particleType GetParticleType(); Int_t GetSuperModuleID() const { return fSuperModuleId; } void SetSuperModuleID(Int_t id) { fSuperModuleId = id; } Double32_t GetTrackDx() const {return fTrackDx;} diff --git a/PWGCF/Correlations/JCORRAN/AliJRunHeader.cxx b/PWGCF/Correlations/JCORRAN/AliJRunHeader.cxx index 073baeb3a57..27f8b136d13 100755 --- a/PWGCF/Correlations/JCORRAN/AliJRunHeader.cxx +++ b/PWGCF/Correlations/JCORRAN/AliJRunHeader.cxx @@ -48,7 +48,7 @@ AliJRunHeader::AliJRunHeader(): fAliceFilterMapDef() { //constructor - for(Int_t i=0;iSetString(triggers[t].Data()); } @@ -103,7 +103,7 @@ void AliJRunHeader::SetActiveTriggersJCorran(const TString *triggers, Int_t rang Int_t AliJRunHeader::GetActiveTriggerBitAlice(TString TriggerName){ //get trigger bit corresponding to trigger name Int_t tbit=-1; - for(Int_t t=0;tGetString())){ tbit = t; break; @@ -117,7 +117,7 @@ void AliJRunHeader::PrintOut(){ //print object std::cout<<"RUN "<(fCentrality), nPlusCharge, nMinusCharge}; + Double_t fContainerPid[3] = { static_cast(fCentrality), nPartile, nAntiParticle}; if( fUsePid ){ @@ -803,8 +803,8 @@ void AliEbyEHigherMomentsEffContTask::doMCAODEvent(){ //cout << "nCentrality "<< fCentrality <<", nParticle="<< nPartile << ", nMinusParticle=" << nAntiParticle << endl; - Double_t fContainerCh[3] = { fCentrality, nPlusCharge, nMinusCharge}; - Double_t fContainerPid[3] = { fCentrality, nPartile, nAntiParticle}; + Double_t fContainerCh[3] = { static_cast(fCentrality), nPlusCharge, nMinusCharge}; + Double_t fContainerPid[3] = { static_cast(fCentrality), nPartile, nAntiParticle}; if( fUsePid ){ @@ -957,7 +957,7 @@ void AliEbyEHigherMomentsEffContTask::FillEffSparse(){ //Fill ThnSparse---- - Double_t EffContainer[15] = {fCentrality, partMC->Eta(), partMC->Y(), partMC->Phi(), partMC->Pt(), sign,findable, recStatus, recPid, etaRec, phiRec, ptRec, partMC->Eta()-etaRec, partMC->Phi()-phiRec, partMC->Pt()-ptRec}; + Double_t EffContainer[15] = {static_cast(fCentrality), partMC->Eta(), partMC->Y(), partMC->Phi(), partMC->Pt(), static_cast(sign),static_cast(findable), static_cast(recStatus), static_cast(recPid), static_cast(etaRec), static_cast(phiRec), static_cast(ptRec), partMC->Eta()-etaRec, partMC->Phi()-phiRec, partMC->Pt()-ptRec}; fTHnEff->Fill(EffContainer); @@ -1038,7 +1038,7 @@ void AliEbyEHigherMomentsEffContTask::CheckContTrackAOD(Int_t label, Float_t sig } // -- Fill THnSparse - Double_t ContContainer[14] = { fCentrality, particle->Eta(), particle->Y(), particle->Phi(), particle->Pt(), sign, contPart, contSign, etaRec, phiRec, ptRec, particle->Eta()-etaRec, particle->Phi()-phiRec, particle->Pt()-ptRec }; + Double_t ContContainer[14] = { static_cast(fCentrality), particle->Eta(), particle->Y(), particle->Phi(), particle->Pt(), static_cast(sign), static_cast(contPart), static_cast(contSign), static_cast(etaRec), static_cast(phiRec), static_cast(ptRec), particle->Eta()-etaRec, particle->Phi()-phiRec, particle->Pt()-ptRec }; fTHnCont->Fill(ContContainer); diff --git a/PWGCF/EBYE/Fluctuations/AliEbyEHigherMomentsTask.cxx b/PWGCF/EBYE/Fluctuations/AliEbyEHigherMomentsTask.cxx index ccf6e861156..472e620d834 100644 --- a/PWGCF/EBYE/Fluctuations/AliEbyEHigherMomentsTask.cxx +++ b/PWGCF/EBYE/Fluctuations/AliEbyEHigherMomentsTask.cxx @@ -277,7 +277,7 @@ void AliEbyEHigherMomentsTask::doAODEvent(){ }//--------- Track Loop to select with filterbit - Double_t fContainerCh[3] = { fCentrality, positiveSum, negativeSum}; + Double_t fContainerCh[3] = { static_cast(fCentrality), positiveSum, negativeSum}; fTHnCentNplusNminusCh->Fill(fContainerCh); @@ -435,8 +435,8 @@ void AliEbyEHigherMomentsTask::doMCAODEvent(){ }//MC-Truth Track loop-- - Double_t fContainerCh[3] = { fCentrality, positiveSumMCRec, negativeSumMCRec};//Reco. values ch. hadrons - Double_t fContainerChTruth[3] = { fCentrality, positiveSumMCTruth, negativeSumMCTruth}; + Double_t fContainerCh[3] = { static_cast(fCentrality), positiveSumMCRec, negativeSumMCRec};//Reco. values ch. hadrons + Double_t fContainerChTruth[3] = { static_cast(fCentrality), positiveSumMCTruth, negativeSumMCTruth}; fTHnCentNplusNminusCh->Fill(fContainerCh);//Fill the rec. ch. particles--- fTHnCentNplusNminusChTruth->Fill(fContainerChTruth);//MC -Truth ch. particles diff --git a/PWGCF/EBYE/Fluctuations/AliEbyEHigherMomentsTaskPID.cxx b/PWGCF/EBYE/Fluctuations/AliEbyEHigherMomentsTaskPID.cxx index eb3854ab522..fc21036ac30 100644 --- a/PWGCF/EBYE/Fluctuations/AliEbyEHigherMomentsTaskPID.cxx +++ b/PWGCF/EBYE/Fluctuations/AliEbyEHigherMomentsTaskPID.cxx @@ -365,7 +365,7 @@ void AliEbyEHigherMomentsTaskPID::doAODEvent(){ }//--------- Track Loop to select with filterbit - Double_t fContainerPid[3] = { fCentrality, posPidSum, negPidSum}; + Double_t fContainerPid[3] = { static_cast(fCentrality), posPidSum, negPidSum}; fTHnCentNplusNminusPid->Fill(fContainerPid); //cout << fCentrality <<" "<< posPidSum <<" " << negPidSum << endl; @@ -554,8 +554,8 @@ void AliEbyEHigherMomentsTaskPID::doMCAODEvent(){ //cout <(fCentrality), posPidSumMCRec, negPidSumMCRec};//Reco. + Double_t fContainerPidTruth[3] = { static_cast(fCentrality), posPidSumMCTruth, negPidSumMCTruth}; fTHnCentNplusNminusPid->Fill(fContainerPid);//Fill the rec. pid tracks fTHnCentNplusNminusPidTruth->Fill(fContainerPidTruth);//MC-Truth pid diff --git a/PWGCF/EBYE/Fluctuations/AliHigherMomentsToyModel.cxx b/PWGCF/EBYE/Fluctuations/AliHigherMomentsToyModel.cxx index b0c2adc9184..d0fbffc3f70 100644 --- a/PWGCF/EBYE/Fluctuations/AliHigherMomentsToyModel.cxx +++ b/PWGCF/EBYE/Fluctuations/AliHigherMomentsToyModel.cxx @@ -486,8 +486,8 @@ void AliHigherMomentsToyModel::doAODEvent(){ - Double_t fContainerCh[3] = { fCentrality, nPlusCharge, nMinusCharge}; - Double_t fContainerPid[3] = { fCentrality, nPartile, nAntiParticle}; + Double_t fContainerCh[3] = { static_cast(fCentrality), nPlusCharge, nMinusCharge}; + Double_t fContainerPid[3] = { static_cast(fCentrality), nPartile, nAntiParticle}; fTHnCentNplusNminusCh->Fill(fContainerCh); @@ -722,8 +722,8 @@ void AliHigherMomentsToyModel::doMCAODEvent(){ //cout << "nCentrality "<< fCentrality <<", nParticle="<< nPartile << ", nMinusParticle=" << nAntiParticle << endl; - Double_t fContainerCh[3] = { fCentrality, nPlusCharge, nMinusCharge}; - Double_t fContainerPid[3] = { fCentrality, nPartile, nAntiParticle}; + Double_t fContainerCh[3] = { static_cast(fCentrality), nPlusCharge, nMinusCharge}; + Double_t fContainerPid[3] = { static_cast(fCentrality), nPartile, nAntiParticle}; fTHnCentNplusNminusCh->Fill(fContainerCh); @@ -775,8 +775,8 @@ void AliHigherMomentsToyModel::doMCAODEvent(){ }//MC-Truth Track loop-- - Double_t fContainerChTruth[3] = { fCentrality, nPlusChargeTruth, nMinusChargeTruth }; - Double_t fContainerPidTruth[3] = { fCentrality, nPartileTruth, nAntiParticleTruth }; + Double_t fContainerChTruth[3] = { static_cast(fCentrality), nPlusChargeTruth, nMinusChargeTruth }; + Double_t fContainerPidTruth[3] = { static_cast(fCentrality), nPartileTruth, nAntiParticleTruth }; //cout << "Cent=" << fCentrality << " MC-PlusChrgT=" << nPlusChargeTruth << " MC-MinusChrgT=" << nMinusChargeTruth << endl; diff --git a/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleDistribution.cxx b/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleDistribution.cxx index 8d5f308166e..69d3f8fca44 100644 --- a/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleDistribution.cxx +++ b/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleDistribution.cxx @@ -385,7 +385,7 @@ Int_t AliAnalysisNetParticleDistribution::ProcessTracks() { yP, // 2 rapidity track->Phi(), // 3 phi track->Pt(), // 4 pt - track->Charge() // 5 sign + static_cast(track->Charge()) // 5 sign }; fHnTrackUnCorr->Fill(aTrack); diff --git a/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleHelper.cxx b/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleHelper.cxx index 2d7e047f0c4..17588f62ebd 100644 --- a/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleHelper.cxx +++ b/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleHelper.cxx @@ -130,7 +130,7 @@ const Int_t AliAnalysisNetParticleHelper::fgkfHistNBinsRap = Int_t((AliAna AliAnalysisNetParticleHelper::fgkfHistRangeRap[0]) / AliAnalysisNetParticleHelper::fgkfHistBinWitdthRap) +1; -const Float_t AliAnalysisNetParticleHelper::fgkfHistRangePhi[] = {0.0, TMath::TwoPi()}; +const Float_t AliAnalysisNetParticleHelper::fgkfHistRangePhi[] = {0.0, static_cast(TMath::TwoPi())}; const Int_t AliAnalysisNetParticleHelper::fgkfHistNBinsPhi = 42 ; const Float_t AliAnalysisNetParticleHelper::fgkfHistRangePt[] = {0.1, 3.0}; diff --git a/PWGCF/FEMTOSCOPY/PLamAnalysis/AliAnalysisTaskProtonLambda.cxx b/PWGCF/FEMTOSCOPY/PLamAnalysis/AliAnalysisTaskProtonLambda.cxx index 796bcd34315..5c39b1258b0 100644 --- a/PWGCF/FEMTOSCOPY/PLamAnalysis/AliAnalysisTaskProtonLambda.cxx +++ b/PWGCF/FEMTOSCOPY/PLamAnalysis/AliAnalysisTaskProtonLambda.cxx @@ -5585,7 +5585,7 @@ void AliAnalysisTaskProtonLambda::FemtoBufferTrack::GetShiftedPositionAtShiftedR //________________________________________________________________________ void AliAnalysisTaskProtonLambda::FemtoBufferTrack::Set(const AliAODTrack *track,const Float_t bfield,const Double_t priVtx[3]){ // Overloaded function - Float_t priVtxPos[3]={priVtx[0],priVtx[1],priVtx[2]}; + Float_t priVtxPos[3]={static_cast(priVtx[0]),static_cast(priVtx[1]),static_cast(priVtx[2])}; Set(track,bfield,priVtxPos); } //________________________________________________________________________ diff --git a/PWGGA/EMCALTasks/AliAnalysisTaskEMCALMesonGGSDM.cxx b/PWGGA/EMCALTasks/AliAnalysisTaskEMCALMesonGGSDM.cxx index 9a7aa274128..b0073d02c04 100644 --- a/PWGGA/EMCALTasks/AliAnalysisTaskEMCALMesonGGSDM.cxx +++ b/PWGGA/EMCALTasks/AliAnalysisTaskEMCALMesonGGSDM.cxx @@ -65,6 +65,9 @@ #include "AliGenCocktailEventHeader.h" +using std::cout; +using std::endl; + ClassImp(AliAnalysisTaskEMCALMesonGGSDM) //________________________________________________________________________ diff --git a/PWGGA/EMCALTasks/AliAnalysisTaskEMCALMesonGGSDMpPb.cxx b/PWGGA/EMCALTasks/AliAnalysisTaskEMCALMesonGGSDMpPb.cxx index efef542dc18..e81a10c4982 100644 --- a/PWGGA/EMCALTasks/AliAnalysisTaskEMCALMesonGGSDMpPb.cxx +++ b/PWGGA/EMCALTasks/AliAnalysisTaskEMCALMesonGGSDMpPb.cxx @@ -56,7 +56,8 @@ #include "AliCentrality.h" - +using std::cout; +using std::endl; ClassImp(AliAnalysisTaskEMCALMesonGGSDMpPb) diff --git a/PWGGA/EMCALTasks/AliAnalysisTaskSDMGammaMC.cxx b/PWGGA/EMCALTasks/AliAnalysisTaskSDMGammaMC.cxx index dc703d65f5d..00d34452d58 100644 --- a/PWGGA/EMCALTasks/AliAnalysisTaskSDMGammaMC.cxx +++ b/PWGGA/EMCALTasks/AliAnalysisTaskSDMGammaMC.cxx @@ -63,6 +63,8 @@ #include "AliEMCALCalibTimeDepCorrection.h" // Run dependent #include "AliEMCALPIDUtils.h" +using std::cout; +using std::endl; ClassImp(AliAnalysisTaskSDMGammaMC) diff --git a/PWGGA/PHOSTasks/PHOS_embedding/AliPHOSEmbedding.cxx b/PWGGA/PHOSTasks/PHOS_embedding/AliPHOSEmbedding.cxx index ff69fc63cdf..e7acd7af0d5 100644 --- a/PWGGA/PHOSTasks/PHOS_embedding/AliPHOSEmbedding.cxx +++ b/PWGGA/PHOSTasks/PHOS_embedding/AliPHOSEmbedding.cxx @@ -644,7 +644,7 @@ void AliPHOSEmbedding::ConvertHeader(AliESDEvent & esd){ header->SetTPConlyRefMultiplicity(-1); // - Float_t diamxy[2]={esd.GetDiamondX(),esd.GetDiamondY()}; + Float_t diamxy[2]={static_cast(esd.GetDiamondX()),static_cast(esd.GetDiamondY())}; Float_t diamcov[3]; esd.GetDiamondCovXY(diamcov); header->SetDiamond(diamxy,diamcov); diff --git a/PWGHF/correlationHF/AliAnalysisTaskSEHFCJqa.cxx b/PWGHF/correlationHF/AliAnalysisTaskSEHFCJqa.cxx index e76c1306e2c..459f43c0256 100644 --- a/PWGHF/correlationHF/AliAnalysisTaskSEHFCJqa.cxx +++ b/PWGHF/correlationHF/AliAnalysisTaskSEHFCJqa.cxx @@ -449,7 +449,7 @@ void AliAnalysisTaskSEHFCJqa::UserExec(Option_t */*option*/){ Double_t pointET[6]={p,eta,clsE,nEoverP,emcTrackDx,emcTrackDz}; fhTrackEMCal->Fill(pointET); - Double_t pointEmShSh[7]={aodtrack->Pt(),nsigmaEleTPC,nEoverP,cluster->GetM02(),cluster->GetM20(),cluster->GetDispersion(),cluster->GetNCells()}; + Double_t pointEmShSh[7]={aodtrack->Pt(), static_cast(nsigmaEleTPC), static_cast(nEoverP),cluster->GetM02(),cluster->GetM20(),cluster->GetDispersion(), static_cast(cluster->GetNCells())}; fhSparseShowShapeEleTPC->Fill(pointEmShSh); @@ -703,7 +703,7 @@ AliAODMCParticle *AliAnalysisTaskSEHFCJqa::GetMCPartonOrigin(TClonesArray *array //_____________________________________________________________ void AliAnalysisTaskSEHFCJqa::FillJetRecoHisto(const AliAODJet *jet,Int_t partonnat,Double_t contribution,Double_t ptpart){ //FIll sparse with reco jets properties - Double_t point[8]={jet->Pt(),jet->Eta(),jet->Phi()-TMath::Pi(),jet->GetRefTracks()->GetEntriesFast(),0,partonnat,contribution,ptpart}; + Double_t point[8]={jet->Pt(),jet->Eta(),jet->Phi()-TMath::Pi(), static_cast(jet->GetRefTracks()->GetEntriesFast()),0, static_cast(partonnat),contribution,ptpart}; fSparseRecoJets->Fill(point); } diff --git a/PWGHF/correlationHF/AliAnalysisTaskSEmcCorr.cxx b/PWGHF/correlationHF/AliAnalysisTaskSEmcCorr.cxx index 80142923fcc..0e6e0bf6ccb 100644 --- a/PWGHF/correlationHF/AliAnalysisTaskSEmcCorr.cxx +++ b/PWGHF/correlationHF/AliAnalysisTaskSEmcCorr.cxx @@ -172,23 +172,23 @@ void AliAnalysisTaskSEmcCorr::UserCreateOutputObjects(){ fhNprongsD0chargedRef=new TH1F("fhNprongsD0chargedRef","fhNprongsD0chargedRef",20,-0.5,19.5); - Int_t nbinsCorrMC[8]={15,20.,20,20,50,63,20,11}; + Int_t nbinsCorrMC[8]={15,20,20,20,50,63,20,11}; Double_t binlowCorrMC[8]={-7.5,0.,-1.,0.,-5.,-0.5*TMath::Pi(),-2,-1.5}; Double_t binupCorrMC[8]={7.5,20.,1.,2.,5.,1.5*TMath::Pi(),2.,9.5}; fhMCcorrel=new THnSparseF("fhMCcorrel","fhMCcorrel;pdg;ptTrig;etaTrig;ptAss;etaAss;deltaPhi;deltaEta;pdgAss;",8,nbinsCorrMC,binlowCorrMC,binupCorrMC); - Int_t nbinsTrigMC[3]={15,20.,20}; + Int_t nbinsTrigMC[3]={15,20,20}; Double_t binlowTrigMC[3]={-7.5,0.,-1.}; Double_t binupTrigMC[3]={7.5,20.,1.}; fhMCtrigPart=new THnSparseF("fhMCtrigPart","fhMCcorrel;pdg;ptTrig;etaTrig;",3,nbinsTrigMC,binlowTrigMC,binupTrigMC); - Int_t nbinsCorrMChadron[8]={6,20.,20,20,50,63,20,7}; + Int_t nbinsCorrMChadron[8]={6,20,20,20,50,63,20,7}; Double_t binlowCorrMChadron[8]={-1.5,0.,-1.,0.,-5.,-0.5*TMath::Pi(),-2,-1.5}; Double_t binupCorrMChadron[8]={4.5,20.,1.,2.,5.,1.5*TMath::Pi(),2.,5.5}; fhMChadroncorrel=new THnSparseF("fhMChadroncorrel","fhMChadroncorrel;pdg;ptTrig;etaTrig;ptAss;etaAss;deltaPhi;deltaEta;pdgAss;",8,nbinsCorrMChadron,binlowCorrMChadron,binupCorrMChadron); - Int_t nbinsTrigMChadron[3]={6,20.,20}; + Int_t nbinsTrigMChadron[3]={6,20,20}; Double_t binlowTrigMChadron[3]={-1.5,0.,-1.}; Double_t binupTrigMChadron[3]={4.5,20.,1.}; fhMChadrontrigPart=new THnSparseF("fhMChadrontrigPart","fhMChadroncorrel;pdg;ptTrig;etaTrig;",3,nbinsTrigMChadron,binlowTrigMChadron,binupTrigMChadron); @@ -538,7 +538,7 @@ void AliAnalysisTaskSEmcCorr::FillCorrelationPlots(AliAODMCParticle *part,TClone Double_t phiTrig=part->Phi(); Double_t etaTrig=part->Eta(); Double_t deltaPhi; - Double_t point[8]={pdgTrig,part->Pt(),etaTrig,0,0,0,0,0};//pdg,ptTrig,etaTrig,ptAss,etaAss,deltaPhi,deltaEta,pdgAss + Double_t point[8]={ static_cast(pdgTrig),part->Pt(),etaTrig,0,0,0,0,0};//pdg,ptTrig,etaTrig,ptAss,etaAss,deltaPhi,deltaEta,pdgAss fhMCtrigPart->Fill(point); for(Int_t jAss=0;jAssAt(jAss); @@ -629,7 +629,7 @@ void AliAnalysisTaskSEmcCorr::FillCorrelationPlotsHadrons(AliAODMCParticle *part Double_t phiTrig=part->Phi(); Double_t etaTrig=part->Eta(); Double_t deltaPhi; - Double_t point[8]={pdgTrig,part->Pt(),etaTrig,0,0,0,0,0};//pdg,ptTrig,etaTrig,ptAss,etaAss,deltaPhi,deltaEta,pdgAss + Double_t point[8]={ static_cast(pdgTrig),part->Pt(),etaTrig,0,0,0,0,0};//pdg,ptTrig,etaTrig,ptAss,etaAss,deltaPhi,deltaEta,pdgAss fhMChadrontrigPart->Fill(point); for(Int_t jAss=0;jAssAt(jAss); diff --git a/PWGHF/hfe/AliAnalysisTaskFlowTPCEMCalEP.cxx b/PWGHF/hfe/AliAnalysisTaskFlowTPCEMCalEP.cxx index c4faf71150c..079d2a3ec5c 100644 --- a/PWGHF/hfe/AliAnalysisTaskFlowTPCEMCalEP.cxx +++ b/PWGHF/hfe/AliAnalysisTaskFlowTPCEMCalEP.cxx @@ -451,7 +451,7 @@ void AliAnalysisTaskFlowTPCEMCalEP::UserExec(Option_t*) SelectPhotonicElectron(iTracks,track, fFlagPhotonicElec, fFlagPhotonicElecBCG); - Double_t corr[12]={phi,fTPCnSigma,cent,pt,EovP,GetDeltaPhi(phi,evPlaneCorrTPC),GetDeltaPhi(phi,evPlaneV0A),GetDeltaPhi(phi,evPlaneV0C),fFlagPhotonicElec,fFlagPhotonicElecBCG,m02,m20}; + Double_t corr[12]={phi,fTPCnSigma,cent,pt,EovP,GetDeltaPhi(phi,evPlaneCorrTPC),GetDeltaPhi(phi,evPlaneV0A),GetDeltaPhi(phi,evPlaneV0C), static_cast(fFlagPhotonicElec), static_cast(fFlagPhotonicElecBCG),m02,m20}; fCorr->Fill(corr); @@ -502,7 +502,7 @@ void AliAnalysisTaskFlowTPCEMCalEP::UserExec(Option_t*) phiD = mother->Phi(); ptD = mother->Pt(); - Double_t cocktail[9]={phiD,phie,phieRec,ptD,pte,pteRec,evPlaneV0A,iHijing,kCent}; + Double_t cocktail[9]={phiD,phie,phieRec,ptD,pte,pteRec,evPlaneV0A, static_cast(iHijing), static_cast(kCent)}; fCocktail->Fill(cocktail); } //************************************************************* @@ -631,7 +631,7 @@ void AliAnalysisTaskFlowTPCEMCalEP::UserExec(Option_t*) } - Double_t mc[15]={EovP,fTPCnSigma,partPt,fFlagPhotonicElec,fFlagPhotonicElecBCG,whichPart,cent,pt,whichFirstMother,whichSecondMother,whichThirdMother,iHijing,motherPt,secondMotherPt,thirdMotherPt}; + Double_t mc[15]={EovP,fTPCnSigma,partPt, static_cast(fFlagPhotonicElec), static_cast(fFlagPhotonicElecBCG), static_cast(whichPart),cent,pt, static_cast(whichFirstMother), static_cast(whichSecondMother), static_cast(whichThirdMother), static_cast(iHijing),motherPt,secondMotherPt,thirdMotherPt}; // fMCphotoElecPt->Fill(mc); if (motherPDG==22 || motherPDG==111 || motherPDG==221) fMCphotoElecPt->Fill(mc);// mother = gamma, pi0, eta diff --git a/PWGHF/hfe/AliHFENonPhotonicElectron.cxx b/PWGHF/hfe/AliHFENonPhotonicElectron.cxx index 877f743e7ff..c95a7b1e75b 100644 --- a/PWGHF/hfe/AliHFENonPhotonicElectron.cxx +++ b/PWGHF/hfe/AliHFENonPhotonicElectron.cxx @@ -556,7 +556,7 @@ Int_t AliHFENonPhotonicElectron::CountPoolAssociated(AliVEvent *inputEvent, Int_ if(fnumberfound > 0) //!count only events with an inclusive electron { - Double_t valueAssElectron[4] = { binct, -1, -1}; //Centrality Pt Source + Double_t valueAssElectron[4] = { static_cast(binct), -1, -1}; //Centrality Pt Source Int_t iTrack2 = 0; Int_t indexmother2 = -1; AliVTrack *track2 = 0x0; @@ -626,10 +626,10 @@ Int_t AliHFENonPhotonicElectron::LookAtNonHFE(Int_t iTrack1, AliVTrack *track1, fkPIDRespons = fPIDBackground->GetPIDResponse(); //Set Fill-Arrays for THnSparse - Double_t valueIncElectron[4] = { binct, track1->Pt(), source, track1->Eta()}; //Centrality Pt Source P - Double_t valueSign[9] = { deltaphi, binct, track1->Pt(), -1, source, -1, -1, track1->Eta(), -1}; //DeltaPhi Centrality Pt InvariantMass Source Angle Pt + Double_t valueIncElectron[4] = { static_cast(binct), track1->Pt(), static_cast(source), track1->Eta()}; //Centrality Pt Source P + Double_t valueSign[9] = { deltaphi, static_cast(binct), track1->Pt(), -1, static_cast(source), -1, -1, track1->Eta(), -1}; //DeltaPhi Centrality Pt InvariantMass Source Angle Pt //Double_t valueAngle[3] = { -1, binct, source}; - Double_t valueradius[3] = { binct, track1->Pt(), 0.}; //Angle Centrality Source + Double_t valueradius[3] = { static_cast(binct), track1->Pt(), 0.}; //Angle Centrality Source Int_t pdg1 = CheckPdg(TMath::Abs(track1->GetLabel())); Double_t radius = Radius(TMath::Abs(track1->GetLabel())); @@ -759,8 +759,8 @@ Int_t AliHFENonPhotonicElectron::LookAtNonHFE(Int_t iTrack1, AliVTrack *track1, } // Fill counted - Double_t valCountsLS[3] = {binct, track1->Pt(), countsMatchLikesign}, - valCountsUS[3] = {binct, track1->Pt(), countsMatchUnlikesign}; + Double_t valCountsLS[3] = { static_cast(binct), track1->Pt(), static_cast(countsMatchLikesign)}, + valCountsUS[3] = { static_cast(binct), track1->Pt(), static_cast(countsMatchUnlikesign)}; fUSmatches->Fill(valCountsUS); fLSmatches->Fill(valCountsLS); diff --git a/PWGHF/hfe/AliHFEV0cuts.cxx b/PWGHF/hfe/AliHFEV0cuts.cxx index b35a361f688..65b28a848e5 100644 --- a/PWGHF/hfe/AliHFEV0cuts.cxx +++ b/PWGHF/hfe/AliHFEV0cuts.cxx @@ -442,7 +442,7 @@ Bool_t AliHFEV0cuts::GammaCuts(AliESDv0 *v0){ Float_t iMass = v0->GetEffMass(0, 0); Float_t iP = v0->P(); - Float_t p[2] = {d[0]->GetP(), d[1]->GetP()}; + Float_t p[2] = {static_cast(d[0]->GetP()), static_cast(d[1]->GetP())}; // Cut values const Double_t cutChi2NDF = 1.5; // ORG [7.] @@ -798,7 +798,7 @@ Bool_t AliHFEV0cuts::K0Cuts(AliESDv0 *v0){ Float_t iMass = v0->GetEffMass(2, 2); Float_t iP = v0->P(); - Float_t p[2] = {d[0]->GetP(), d[1]->GetP()}; + Float_t p[2] = {static_cast(d[0]->GetP()), static_cast(d[1]->GetP())}; Double_t theta = v0->Theta(); Double_t phi = v0->Phi(); Double_t pt = v0->Pt(); @@ -1065,14 +1065,14 @@ Bool_t AliHFEV0cuts::LambdaCuts(AliESDv0 *v0, Bool_t &isLambda ){ // production vertex is set in the 'CreateMotherParticle' function //kfMother[1]->SetMassConstraint(cL0mass, 0.); - Float_t dMass[2] = {TMath::Abs(mMass[0] - cL0mass), TMath::Abs(mMass[1] - cL0mass)}; + Float_t dMass[2] = {static_cast(TMath::Abs(mMass[0] - cL0mass)), static_cast(TMath::Abs(mMass[1] - cL0mass))}; AliESDtrack* d[2]; d[0] = dynamic_cast(fInputEvent->GetTrack(pIndex)); d[1] = dynamic_cast(fInputEvent->GetTrack(nIndex)); if(!d[0] || !d[1]) return kFALSE; - Float_t p[2] = {d[0]->GetP(), d[1]->GetP()}; + Float_t p[2] = {static_cast(d[0]->GetP()), static_cast(d[1]->GetP())}; // check the 3 lambda - antilambda variables Int_t check[2] = {-1, -1}; // 0 : lambda, 1 : antilambda diff --git a/PWGHF/vertexingHF/AliAnalysisTaskSEDplus.cxx b/PWGHF/vertexingHF/AliAnalysisTaskSEDplus.cxx index bcd01f0adbb..43be4f5e36d 100644 --- a/PWGHF/vertexingHF/AliAnalysisTaskSEDplus.cxx +++ b/PWGHF/vertexingHF/AliAnalysisTaskSEDplus.cxx @@ -902,8 +902,8 @@ void AliAnalysisTaskSEDplus::UserExec(Option_t */*option*/) cxy=d->CosPointingAngleXY(); } Double_t impparXY=d->ImpParXY()*10000.; - Double_t arrayForSparse[6]={invMass,ptCand,impparXY,cosp,dlen,tracklets}; - Double_t arrayForSparseTrue[6]={invMass,ptCand,trueImpParXY,cosp,dlen,tracklets}; + Double_t arrayForSparse[6]={invMass,ptCand,impparXY,cosp,dlen,static_cast(tracklets)}; + Double_t arrayForSparseTrue[6]={invMass,ptCand,trueImpParXY,cosp,dlen,static_cast(tracklets)}; //Ntuple Float_t tmp[31]; diff --git a/PWGHF/vertexingHF/AliAnalysisVertexingHF.cxx b/PWGHF/vertexingHF/AliAnalysisVertexingHF.cxx index ee537d1065f..0651216d94c 100644 --- a/PWGHF/vertexingHF/AliAnalysisVertexingHF.cxx +++ b/PWGHF/vertexingHF/AliAnalysisVertexingHF.cxx @@ -2136,7 +2136,7 @@ AliAODVertex* AliAnalysisVertexingHF::PrimaryVertex(const TObjArray *trkArray, rmId[i]=9999; } } - Float_t diamondxy[2]={event->GetDiamondX(),event->GetDiamondY()}; + Float_t diamondxy[2]={static_cast(event->GetDiamondX()),static_cast(event->GetDiamondY())}; vertexESD = vertexer->RemoveTracksFromVertex(fV1,&rmArray,rmId,diamondxy); delete [] rmId; rmId=NULL; rmArray.Delete(); diff --git a/PWGJE/AliAnalysisTaskJetCore.cxx b/PWGJE/AliAnalysisTaskJetCore.cxx index bcba48aed17..a9f92cb8650 100644 --- a/PWGJE/AliAnalysisTaskJetCore.cxx +++ b/PWGJE/AliAnalysisTaskJetCore.cxx @@ -511,7 +511,7 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects() const Int_t dimSpec = 5; const Int_t nBinsSpec[dimSpec] = {100,6, 140, 50, fNRPBins}; const Double_t lowBinSpec[dimSpec] = {0,0,-80, 0, 0}; - const Double_t hiBinSpec[dimSpec] = {100,1, 200, 50, fNRPBins}; + const Double_t hiBinSpec[dimSpec] = {100,1, 200, 50, static_cast(fNRPBins)}; fHJetSpec = new THnSparseF("fHJetSpec","Recoil jet spectrum",dimSpec,nBinsSpec,lowBinSpec,hiBinSpec); //change binning in jet area @@ -851,7 +851,7 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *) if(phitt<0)phitt+=TMath::Pi()*2.; Int_t phiBintt = GetPhiBin(phitt-fRPAngle); - Double_t fillspec[] = {centValue,jetbig->EffectiveAreaCharged(),ptcorr,partback->Pt(),phiBintt}; + Double_t fillspec[] = {centValue,jetbig->EffectiveAreaCharged(),ptcorr,partback->Pt(), static_cast(phiBintt)}; fHJetSpec->Fill(fillspec); diff --git a/PWGJE/AliAnalysisTaskJetSpectrum2.cxx b/PWGJE/AliAnalysisTaskJetSpectrum2.cxx index 14a9819993e..fc28f6fc845 100644 --- a/PWGJE/AliAnalysisTaskJetSpectrum2.cxx +++ b/PWGJE/AliAnalysisTaskJetSpectrum2.cxx @@ -572,7 +572,7 @@ void AliAnalysisTaskJetSpectrum2::UserCreateOutputObjects() nBins1[1] = 600; nBins1[5] = 1; } - const Double_t xmin1[nBinsSparse1] = { -0.5,nbinr5min, 0, 0, -0.5, 0., -0.5, 0., -0.5,}; + const Double_t xmin1[nBinsSparse1] = { -0.5, static_cast(nbinr5min), 0, 0, -0.5, 0., -0.5, 0., -0.5,}; const Double_t xmax1[nBinsSparse1] = {kMaxJets+0.5,250,100,4000,fNRPBins-0.5,1.0,fNTrigger-0.5,200.,fNAcceptance+0.5}; const Double_t binArrayArea[nBinsArea+1] = {xmin1[5],0.07,0.1,0.15,0.2,0.25,0.3,0.4,0.5,0.6,xmax1[5]}; diff --git a/PWGJE/AliFragmentationFunctionCorrections.cxx b/PWGJE/AliFragmentationFunctionCorrections.cxx index 23773068489..7d3a577ad3b 100644 --- a/PWGJE/AliFragmentationFunctionCorrections.cxx +++ b/PWGJE/AliFragmentationFunctionCorrections.cxx @@ -4196,8 +4196,8 @@ void AliFragmentationFunctionCorrections::WriteJetSpecResponse(TString strInfile Int_t nBinsResponse[4] = {nBinsRecPt,nBinsTrackPt,nBinsGenPt,nBinsTrackPt}; - Double_t binMinResponse[4] = {loLimRecPt,loLimTrackPt,loLimGenPt,loLimTrackPt}; - Double_t binMaxResponse[4] = {upLimRecPt,upLimTrackPt,upLimGenPt,upLimTrackPt}; + Double_t binMinResponse[4] = { static_cast(loLimRecPt), static_cast(loLimTrackPt), static_cast(loLimGenPt), static_cast(loLimTrackPt)}; + Double_t binMaxResponse[4] = { static_cast(upLimRecPt), static_cast(upLimTrackPt), static_cast(upLimGenPt), static_cast(upLimTrackPt)}; const char* labelsResponseSinglePt[4] = {"rec jet p_{T} (GeV/c)", "rec track p_{T} (GeV/c)", "gen jet p_{T} (GeV/c)", "gen track p_{T} (GeV/c)"}; diff --git a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskHJetEmbed.cxx b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskHJetEmbed.cxx index a74933c06d3..6ecc29fd4d0 100644 --- a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskHJetEmbed.cxx +++ b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskHJetEmbed.cxx @@ -610,7 +610,7 @@ void AliAnalysisTaskHJetEmbed::FillHJetCor(const TClonesArray *tracks, const In AliVParticle *tt = (AliVParticle*) tracks->At(leadingIndex); Double_t triggerPt = tt->Pt(); - Double_t fill1[] = {triggerPt, fCentrality, fPtHardBin }; + Double_t fill1[] = {triggerPt, fCentrality, static_cast(fPtHardBin) }; hTT->Fill(fill1); AliDebug(2,Form("Found a trigger with pt = %2.2f",triggerPt)); @@ -626,7 +626,7 @@ void AliAnalysisTaskHJetEmbed::FillHJetCor(const TClonesArray *tracks, const In Double_t jetPt = jet->Pt(); Double_t jetArea = jet->Area(); Double_t dPhi = CalculateDPhi(triggerPhi,jetPhi); - Double_t fill[] = {triggerPt,jetPt-jetArea*fRhoValue,dPhi,jetArea,fCentrality,fPtHardBin}; + Double_t fill[] = {triggerPt,jetPt-jetArea*fRhoValue,dPhi,jetArea,fCentrality,static_cast(fPtHardBin)}; if(!isBkg) fill[1] = jetPt; AliDebug(10,"Fill the histograms"); hn->Fill(fill); @@ -662,7 +662,7 @@ void AliAnalysisTaskHJetEmbed::RunMatch(const TClonesArray *tracks, const Int_t AliEmcalJet* jetMthEn = dynamic_cast(fJetArray->At(mthJetIndexEn)); if(jetMthEn) { - Double_t fill[] = {tt->Pt(),jetPt,CalculateDPhi(tt->Phi(),jet->Phi()),CalculateDPhi(jetMthEn->Phi(),jet->Phi()),dR,fCentrality,fPtHardBin}; + Double_t fill[] = {tt->Pt(),jetPt,CalculateDPhi(tt->Phi(),jet->Phi()),CalculateDPhi(jetMthEn->Phi(),jet->Phi()),dR,fCentrality,static_cast(fPtHardBin)}; fhJetPhiEnMatch[fTriggerType]->Fill(fill); } } @@ -791,7 +791,7 @@ void AliAnalysisTaskHJetEmbed::RunQA() if(!jet) continue; if(!IsGoodJet(jet)) continue; // eta cut Double_t jetPt = jet->Pt(); - Double_t fill[] = {jetPt, fCentrality, fPtHardBin}; + Double_t fill[] = {jetPt, fCentrality, static_cast(fPtHardBin)}; fhPLJetPtVsCent[fTriggerType]->Fill(fill); AliDebug(5, Form("PL jet %d has (pt,eta,phi) = (%2.2f,%2.2f,%2.2f)",ij,jetPt,jet->Eta(),jet->Phi())); } @@ -810,7 +810,7 @@ void AliAnalysisTaskHJetEmbed::RunQA() if(!jet) continue; if(!IsGoodJet(jet)) continue; // eta cut Double_t jetPt = jet->Pt(); - Double_t fill[] = {jetPt, fCentrality, fPtHardBin}; + Double_t fill[] = {jetPt, fCentrality, static_cast(fPtHardBin)}; fhDLJetPtVsCent[fTriggerType]->Fill(fill); AliDebug(5, Form("DL jet %d has pt = %2.2f",ij,jetPt)); } diff --git a/PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourJetCorrelations.cxx b/PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourJetCorrelations.cxx index 09169b017b5..113cb32e02c 100644 --- a/PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourJetCorrelations.cxx +++ b/PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourJetCorrelations.cxx @@ -789,9 +789,9 @@ Bool_t AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){ //thnsparse for jets const Int_t nAxis=6; const Int_t nbinsSparse[nAxis]={nbinsphi,nbinseta, nbinsptjet, nbinsptjet,nbinsContrib, nbinsA}; - const Double_t minSparse[nAxis]={philims[0],etalims[0],ptjetlims[0],ptjetlims[0],nContriblims[0],arealims[0]}; + const Double_t minSparse[nAxis]={philims[0],etalims[0],ptjetlims[0],ptjetlims[0],static_cast(nContriblims[0]),arealims[0]}; const Double_t - maxSparse[nAxis]={philims[1],etalims[1],ptjetlims[1],ptjetlims[1],nContriblims[1],arealims[1]}; + maxSparse[nAxis]={philims[1],etalims[1],ptjetlims[1],ptjetlims[1],static_cast(nContriblims[1]),arealims[1]}; THnSparseF *hsJet=new THnSparseF("hsJet","#phi, #eta, p_{T}^{jet}, E^{jet}, N contrib, Area", nAxis, nbinsSparse, minSparse, maxSparse); hsJet->Sumw2(); @@ -1020,7 +1020,7 @@ void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsD0JetCorr(AliAODRecoDe TH3F* hPtJetWithD=(TH3F*)fOutput->FindObject("hPtJetWithD"); THnSparseF* hsDphiz=(THnSparseF*)fOutput->FindObject("hsDphiz"); - Double_t point[8]={z,dPhi,ptj,ptD,masses[0],0, fIsDInJet ? 1 : 0,phiD}; + Double_t point[8]={z,dPhi,ptj,ptD,masses[0],0, static_cast(fIsDInJet ? 1 : 0),phiD}; Printf("Candidate in FillHistogramsD0JetCorr IsA %s", (candidate->IsA())->GetName()); Int_t isselected=fCuts->IsSelected(candidate,AliRDHFCuts::kAll,aodEvent); if(isselected==1 || isselected==3) { @@ -1057,7 +1057,7 @@ void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsDstarJetCorr(AliAODRec THnSparseF* hsDphiz=(THnSparseF*)fOutput->FindObject("hsDphiz"); Int_t isSB=0;//IsDzeroSideBand(dstar); - Double_t point[8]={z,dPhi,ptj,ptD,deltamass,isSB, fIsDInJet ? 1 : 0,phiD}; + Double_t point[8]={z,dPhi,ptj,ptD,deltamass,static_cast(isSB), static_cast(fIsDInJet ? 1 : 0),phiD}; if(fIsDInJet) hPtJetWithD->Fill(ptj,deltamass,ptD); @@ -1073,7 +1073,7 @@ void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsMCGenDJetCorr(Double_t Double_t pdgmass=0; TH3F* hPtJetWithD=(TH3F*)fOutput->FindObject("hPtJetWithD"); THnSparseF* hsDphiz=(THnSparseF*)fOutput->FindObject("hsDphiz"); - Double_t point[8]={z,dPhi,ptjet,ptD,pdgmass,0, fIsDInJet ? 1 : 0,phiD}; + Double_t point[8]={z,dPhi,ptjet,ptD,pdgmass,0, static_cast(fIsDInJet ? 1 : 0),phiD}; if(fCandidateType==kD0toKpi) pdgmass=TDatabasePDG::Instance()->GetParticle(421)->Mass(); if(fCandidateType==kDstartoKpipi) pdgmass=TDatabasePDG::Instance()->GetParticle(413)->Mass()-TDatabasePDG::Instance()->GetParticle(421)->Mass(); @@ -1129,7 +1129,7 @@ void AliAnalysisTaskFlavourJetCorrelations::SideBandBackground(AliAODRecoCascade if(dPhi>(3*(TMath::Pi()))/2) dPhi = dPhi-2*(TMath::Pi()); Int_t isSideBand=1;//IsDzeroSideBand(candDstar); - Double_t point[7]={z,dPhi,fPtJet,ptD,deltaM,isSideBand, fIsDInJet ? 1 : 0}; + Double_t point[7]={z,dPhi,fPtJet,ptD,deltaM,static_cast(isSideBand), static_cast(fIsDInJet ? 1 : 0)}; //fill the background histogram with the side bands or when looking at MC with the real background if(isSideBand==1){ hDiffSideBand->Fill(deltaM,ptD); // M(Kpipi)-M(Kpi) side band background diff --git a/PWGJE/UserTasks/AliAnalysisTaskIDFragmentationFunction.cxx b/PWGJE/UserTasks/AliAnalysisTaskIDFragmentationFunction.cxx index 677d4c0d1af..259402fa65a 100644 --- a/PWGJE/UserTasks/AliAnalysisTaskIDFragmentationFunction.cxx +++ b/PWGJE/UserTasks/AliAnalysisTaskIDFragmentationFunction.cxx @@ -2767,7 +2767,7 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) if (TMath::Abs(chargeMC) < 0.01) continue; // Reject neutral particles (only relevant, if mcID is not used) - Double_t valuesGenYield[AliAnalysisTaskPID::kGenYieldNumAxes] = { mcID, pT, centPercent, -1, -1, -1, -1 }; + Double_t valuesGenYield[AliAnalysisTaskPID::kGenYieldNumAxes] = { static_cast(mcID), pT, centPercent, -1, -1, -1, -1 }; for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) { if (fInclusivePIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(part->Eta()))) { @@ -2776,7 +2776,7 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) } } - Double_t valuesEff[AliAnalysisTaskPID::kEffNumAxes] = { mcID, pT, part->Eta(), chargeMC, + Double_t valuesEff[AliAnalysisTaskPID::kEffNumAxes] = { static_cast(mcID), pT, part->Eta(), chargeMC, centPercent, -1, -1, -1 };// no jet pT etc since inclusive spectrum for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) fInclusivePIDtask[i]->FillEfficiencyContainer(valuesEff, AliAnalysisTaskPID::kStepGenWithGenCuts); @@ -2832,7 +2832,7 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) continue; // AliAODMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3 - Double_t value[AliAnalysisTaskPID::kEffNumAxes] = { mcID, gentrack->Pt(), gentrack->Eta(), gentrack->Charge() / 3., + Double_t value[AliAnalysisTaskPID::kEffNumAxes] = { static_cast(mcID), gentrack->Pt(), gentrack->Eta(), gentrack->Charge() / 3., centPercent, -1, -1, -1 };// no jet pT etc since inclusive spectrum for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) { @@ -2842,8 +2842,8 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) fInclusivePIDtask[i]->FillEfficiencyContainer(value, AliAnalysisTaskPID::kStepRecWithGenCuts); } - Double_t valueMeas[AliAnalysisTaskPID::kEffNumAxes] = { mcID, inclusiveaod->Pt(), inclusiveaod->Eta(), - inclusiveaod->Charge(), centPercent, + Double_t valueMeas[AliAnalysisTaskPID::kEffNumAxes] = { static_cast(mcID), inclusiveaod->Pt(), inclusiveaod->Eta(), + static_cast(inclusiveaod->Charge()), centPercent, -1, -1, -1 };// no jet pT etc since inclusive spectrum for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) { if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) || @@ -2894,8 +2894,8 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) if (gentrack) { Int_t mcID = AliAnalysisTaskPID::PDGtoMCID(pdg); - Double_t valueRecAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { mcID, inclusiveaod->Pt(), inclusiveaod->Eta(), - inclusiveaod->Charge(), centPercent, + Double_t valueRecAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { static_cast(mcID), inclusiveaod->Pt(), inclusiveaod->Eta(), + static_cast(inclusiveaod->Charge()), centPercent, -1, -1, -1 }; for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) { if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) || @@ -2916,7 +2916,7 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) if (gentrack->IsPhysicalPrimary()) { // AliAODMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3 - Double_t valueGenAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { mcID, gentrack->Pt(), gentrack->Eta(), + Double_t valueGenAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { static_cast(mcID), gentrack->Pt(), gentrack->Eta(), gentrack->Charge() / 3., centPercent, -1, -1, -1 }; @@ -3062,7 +3062,7 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) if (TMath::Abs(chargeMC) < 0.01) continue; // Reject neutral particles (only relevant, if mcID is not used) - Double_t valuesGenYield[AliAnalysisTaskPID::kGenYieldNumAxes] = { mcID, trackPt, centPercent, jetPt, z, xi, chargeMC }; + Double_t valuesGenYield[AliAnalysisTaskPID::kGenYieldNumAxes] = { static_cast(mcID), trackPt, centPercent, jetPt, z, xi, chargeMC }; for (Int_t i = 0; i < fNumJetPIDtasks; i++) { if (fJetPIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(part->Eta()))) { @@ -3072,7 +3072,7 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) } - Double_t valuesEff[AliAnalysisTaskPID::kEffNumAxes] = { mcID, trackPt, part->Eta(), chargeMC, + Double_t valuesEff[AliAnalysisTaskPID::kEffNumAxes] = { static_cast(mcID), trackPt, part->Eta(), chargeMC, centPercent, jetPt, z, xi }; for (Int_t i = 0; i < fNumJetPIDtasks; i++) fJetPIDtask[i]->FillEfficiencyContainer(valuesEff, AliAnalysisTaskPID::kStepGenWithGenCuts); @@ -3216,7 +3216,7 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) Double_t z = -1., xi = -1.; AliAnalysisTaskPID::GetJetTrackObservables(pT, jetPt, z, xi); - Double_t valueRecAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { mcID, pT, aodtrack->Eta(), aodtrack->Charge(), + Double_t valueRecAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { static_cast(mcID), pT, aodtrack->Eta(), static_cast(aodtrack->Charge()), centPercent, jetPt, z, xi }; for (Int_t i = 0; i < fNumJetPIDtasks; i++) { if ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) || @@ -3240,7 +3240,7 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) Double_t genPt = gentrack->Pt(); Double_t genZ = -1., genXi = -1.; AliAnalysisTaskPID::GetJetTrackObservables(genPt, jetPt, genZ, genXi); - Double_t valueGenAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { mcID, genPt, gentrack->Eta(), + Double_t valueGenAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { static_cast(mcID), genPt, gentrack->Eta(), gentrack->Charge() / 3., centPercent, jetPt, genZ, genXi }; @@ -3317,7 +3317,7 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) // AliAODMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3 - Double_t value[AliAnalysisTaskPID::kEffNumAxes] = { mcID, genPt, gentrack->Eta(), gentrack->Charge() / 3., + Double_t value[AliAnalysisTaskPID::kEffNumAxes] = { static_cast(mcID), genPt, gentrack->Eta(), gentrack->Charge() / 3., centPercent, jetPt, genZ, genXi }; for (Int_t i = 0; i < fNumJetPIDtasks; i++) { if ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) || @@ -3326,7 +3326,7 @@ void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *) fJetPIDtask[i]->FillEfficiencyContainer(value, AliAnalysisTaskPID::kStepRecWithGenCuts); } - Double_t valueMeas[AliAnalysisTaskPID::kEffNumAxes] = { mcID, measPt, aodtrack->Eta(), aodtrack->Charge(), + Double_t valueMeas[AliAnalysisTaskPID::kEffNumAxes] = { static_cast(mcID), measPt, aodtrack->Eta(), static_cast(aodtrack->Charge()), centPercent, jetPt, measZ, measXi }; for (Int_t i = 0; i < fNumJetPIDtasks; i++) { if ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) || diff --git a/PWGJE/UserTasks/AliAnalysisTaskPID.cxx b/PWGJE/UserTasks/AliAnalysisTaskPID.cxx index 9d361bb7dc9..ec6218f12dc 100644 --- a/PWGJE/UserTasks/AliAnalysisTaskPID.cxx +++ b/PWGJE/UserTasks/AliAnalysisTaskPID.cxx @@ -1021,7 +1021,7 @@ void AliAnalysisTaskPID::UserExec(Option_t *) continue; if (fDoPID) { - Double_t valuesGenYield[kGenYieldNumAxes] = { mcID, mcPart->Pt(), centralityPercentile, -1, -1, -1, -1 }; + Double_t valuesGenYield[kGenYieldNumAxes] = { static_cast(mcID), mcPart->Pt(), centralityPercentile, -1, -1, -1, -1 }; valuesGenYield[GetIndexOfChargeAxisGenYield()] = chargeMC; fhMCgeneratedYieldsPrimaries->Fill(valuesGenYield); @@ -1029,7 +1029,7 @@ void AliAnalysisTaskPID::UserExec(Option_t *) if (fDoEfficiency) { - Double_t valueEff[kEffNumAxes] = { mcID, mcPart->Pt(), mcPart->Eta(), chargeMC, centralityPercentile, + Double_t valueEff[kEffNumAxes] = { static_cast(mcID), mcPart->Pt(), mcPart->Eta(), chargeMC, centralityPercentile, -1, -1, -1 }; fContainerEff->Fill(valueEff, kStepGenWithGenCuts); @@ -1098,11 +1098,11 @@ void AliAnalysisTaskPID::UserExec(Option_t *) IsInAcceptedEtaRange(TMath::Abs(mcTrack->Eta()))) { // AliMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3 - Double_t value[kEffNumAxes] = { mcID, mcTrack->Pt(), mcTrack->Eta(), mcTrack->Charge() / 3., centralityPercentile, + Double_t value[kEffNumAxes] = { static_cast(mcID), mcTrack->Pt(), mcTrack->Eta(), mcTrack->Charge() / 3., centralityPercentile, -1, -1, -1 }; fContainerEff->Fill(value, kStepRecWithGenCuts); - Double_t valueMeas[kEffNumAxes] = { mcID, track->Pt(), track->Eta(), track->Charge(), centralityPercentile, + Double_t valueMeas[kEffNumAxes] = { static_cast(mcID), track->Pt(), track->Eta(), static_cast(track->Charge()), centralityPercentile, -1, -1, -1 }; fContainerEff->Fill(valueMeas, kStepRecWithGenCutsMeasuredObs); } @@ -1125,7 +1125,7 @@ void AliAnalysisTaskPID::UserExec(Option_t *) if (fDoEfficiency) { if (mcTrack) { - Double_t valueRecAllCuts[kEffNumAxes] = { mcID, track->Pt(), track->Eta(), track->Charge(), centralityPercentile, + Double_t valueRecAllCuts[kEffNumAxes] = { static_cast(mcID), track->Pt(), track->Eta(), static_cast(track->Charge()), centralityPercentile, -1, -1, -1 }; fContainerEff->Fill(valueRecAllCuts, kStepRecWithRecCutsMeasuredObs); @@ -1134,7 +1134,7 @@ void AliAnalysisTaskPID::UserExec(Option_t *) fContainerEff->Fill(valueRecAllCuts, kStepRecWithRecCutsMeasuredObsStrangenessScaled, weight); // AliMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3 - Double_t valueGenAllCuts[kEffNumAxes] = { mcID, mcTrack->Pt(), mcTrack->Eta(), mcTrack->Charge() / 3., + Double_t valueGenAllCuts[kEffNumAxes] = { static_cast(mcID), mcTrack->Pt(), mcTrack->Eta(), mcTrack->Charge() / 3., centralityPercentile, -1, -1, -1 }; if (fMC->IsPhysicalPrimary(TMath::Abs(label))) { fContainerEff->Fill(valueRecAllCuts, kStepRecWithRecCutsMeasuredObsPrimaries); diff --git a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysis.cxx b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysis.cxx index 9eceb11b77e..1cf67322f67 100644 --- a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysis.cxx +++ b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysis.cxx @@ -1220,7 +1220,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc Bool_t isTrigAndVertex = isEventTriggered && isEventOK; - Double_t vEventCount[3] = { (isEventTriggered && kTRUE) , isTrigAndVertex, isTrigAndVertex && (TMath::Abs(vtxESD->GetZv()) < 10.)}; + Double_t vEventCount[3] = { static_cast((isEventTriggered && kTRUE)) , static_cast(isTrigAndVertex), static_cast(isTrigAndVertex && (TMath::Abs(vtxESD->GetZv()) < 10.))}; fEventCount->Fill(vEventCount); // vertex contributors @@ -1452,11 +1452,11 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc Double_t vRecEventHist1[3] = {vtxESD->GetXv(),vtxESD->GetYv(),vtxESD->GetZv()}; fRecEventHist1->Fill(vRecEventHist1); - Double_t vRecEventHist2[3] = {vtxESD->GetZv(),multMBTracks,multRecMult}; + Double_t vRecEventHist2[3] = {vtxESD->GetZv(),static_cast(multMBTracks),static_cast(multRecMult)}; fRecEventHist2->Fill(vRecEventHist2); // - Double_t vRecEventHist[2] = {vtxESD->GetZv(),multMBTracks}; + Double_t vRecEventHist[2] = {vtxESD->GetZv(),static_cast(multMBTracks)}; fRecEventHist->Fill(vRecEventHist); } @@ -1483,7 +1483,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc } } - Double_t vMultTrueEventMatrix[3] = { multRecMult, multMCTrueTracks, multMBTracks}; + Double_t vMultTrueEventMatrix[3] = { static_cast(multRecMult), static_cast(multMCTrueTracks), static_cast(multMBTracks)}; if(isEventOK && isEventTriggered) { if(TMath::Abs(vtxMC[2]) < 10.0) // both Rec. and corresponding MC events must be accepted fEventMultCorrelationMatrix->Fill(vMultTrueEventMatrix); @@ -1494,7 +1494,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc // // all inelastic - Double_t vEventMatrix[2] = {vtxMC[2],multMCTrueTracks}; + Double_t vEventMatrix[2] = {vtxMC[2],static_cast(multMCTrueTracks)}; fGenEventMatrix->Fill(vEventMatrix); if(isEventTriggered) fTriggerEventMatrix->Fill(vEventMatrix); if(isEventOK && isEventTriggered) fRecEventMatrix->Fill(vEventMatrix); @@ -1557,7 +1557,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc // checked accepted if(accCuts->AcceptTrack(particle)) { - Double_t vTrackEventMatrix[4] = {vtxMC[2], particle->Pt(), particle->Eta(),multMCTrueTracks}; + Double_t vTrackEventMatrix[4] = {vtxMC[2], particle->Pt(), particle->Eta(),static_cast(multMCTrueTracks)}; fGenTrackEventMatrix->Fill(vTrackEventMatrix); if(evtType == AliPWG0Helper::kSD) { @@ -1620,10 +1620,10 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc Double_t vRecMCEventHist1[3] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetYv()-vtxMC[1],vtxESD->GetZv()-vtxMC[2]}; fRecMCEventHist1->Fill(vRecMCEventHist1); - Double_t vRecMCEventHist2[3] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetZv()-vtxMC[2],multMBTracks}; + Double_t vRecMCEventHist2[3] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetZv()-vtxMC[2],static_cast(multMBTracks)}; fRecMCEventHist2->Fill(vRecMCEventHist2); - Double_t vRecMCEventHist3[2] = {multRecMult,evtType}; + Double_t vRecMCEventHist3[2] = {static_cast(multRecMult),evtType}; fRecMCEventHist3->Fill(vRecMCEventHist3); } @@ -1666,7 +1666,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc { if( AlidNdPtHelper::IsPrimaryParticle(stack, iMc, GetParticleMode()) ) { fGenPrimTrackMatrix->Fill(vTrackMatrix); - Double_t vMCPrimTrackHist[4] = {vtxMC[2],particle->Pt(),particle->Eta(),multMCTrueTracks}; + Double_t vMCPrimTrackHist[4] = {vtxMC[2],particle->Pt(),particle->Eta(),static_cast(multMCTrueTracks)}; fMCPrimTrackHist->Fill(vMCPrimTrackHist); } @@ -1688,7 +1688,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc // fill control histogram if(fHistogramsOn) { Int_t pid = AlidNdPtHelper::ConvertPdgToPid(particle); - Double_t vMCMultRecTrackHist1[3] = {particle->Pt(), particle->Eta(), pid}; + Double_t vMCMultRecTrackHist1[3] = {particle->Pt(), particle->Eta(), static_cast(pid)}; fMCMultRecTrackHist1->Fill(vMCMultRecTrackHist1); } } @@ -1756,19 +1756,19 @@ void AlidNdPtAnalysis::FillHistograms(TObjArray *const allChargedTracks,Int_t *c Int_t label = TMath::Abs(track->GetLabel()); for(Int_t iAll=0; iAllPt(), multAll}; + Double_t v1[2] = {track->Pt(), static_cast(multAll)}; fRecTrackMultHist1[AlidNdPtHelper::kAllTracks]->Fill(v1); } } for(Int_t iAcc=0; iAccPt(), multAcc}; + Double_t v2[2] = {track->Pt(), static_cast(multAcc)}; fRecTrackMultHist1[AlidNdPtHelper::kAccTracks]->Fill(v2); } } for(Int_t iRec=0; iRecPt(), multRec}; + Double_t v3[2] = {track->Pt(), static_cast(multRec)}; fRecTrackMultHist1[AlidNdPtHelper::kRecTracks]->Fill(v3); } } @@ -1803,7 +1803,7 @@ void AlidNdPtAnalysis::FillHistograms(AliESDtrack *const esdTrack, AliStack *con Double_t values1[3] = {pt,eta,phi}; fRecTrackHist1[trackObj]->Fill(values1); - Double_t values[4] = {zv, pt,eta, multRecMult}; + Double_t values[4] = {zv, pt,eta, static_cast(multRecMult)}; if(trackObj == AlidNdPtHelper::kRecTracks) { fRecTrackHist->Fill(values); } @@ -1908,8 +1908,8 @@ void AlidNdPtAnalysis::FillHistograms(AliStack *const stack, Int_t label, AlidNd Double_t vMCTrackHist1[3] = {gpt,geta,gphi}; fMCTrackHist1[trackObj]->Fill(vMCTrackHist1); - Double_t vMCPrimTrackHist1[5] = {gpt,geta,pid,mech,motherPdg}; - Double_t vMCPrimTrackHist2[5] = {TMath::Abs(particle->GetPdgCode()),mech,motherPdg}; + Double_t vMCPrimTrackHist1[5] = {gpt,geta,static_cast(pid),static_cast(mech),static_cast(motherPdg)}; + Double_t vMCPrimTrackHist2[5] = {static_cast(TMath::Abs(particle->GetPdgCode())),static_cast(mech),static_cast(motherPdg)}; //if(prim && AliPWG0Helper::IsPrimaryCharged(particle, label)) fMCPrimTrackHist1[trackObj]->Fill(vMCPrimTrackHist1); if(prim) { fMCPrimTrackHist1[trackObj]->Fill(vMCPrimTrackHist1); diff --git a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPb.cxx b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPb.cxx index daf8c9f4655..0b7d1b93444 100644 --- a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPb.cxx +++ b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPb.cxx @@ -913,7 +913,7 @@ void AlidNdPtAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent *cons Double_t vRecEventHist1[4] = {vtxESD->GetXv(),vtxESD->GetYv(),vtxESD->GetZv(),centralityF}; fRecEventHist1->Fill(vRecEventHist1); - Double_t vRecEventHist2[3] = {vtxESD->GetZv(),multMBTracks,centralityF}; + Double_t vRecEventHist2[3] = {vtxESD->GetZv(),static_cast(multMBTracks),centralityF}; fRecEventHist2->Fill(vRecEventHist2); } // triggered and event vertex @@ -924,7 +924,7 @@ void AlidNdPtAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent *cons // event level corrections (zv,N_MB) // // all inelastic - Double_t vEventMatrix[3] = {vtxMC[2],multMBTracks,centralityF}; + Double_t vEventMatrix[3] = {vtxMC[2],static_cast(multMBTracks),centralityF}; fGenEventMatrix->Fill(vEventMatrix); if(isEventTriggered) fTriggerEventMatrix->Fill(vEventMatrix); if(isEventOK && isEventTriggered) fRecEventMatrix->Fill(vEventMatrix); @@ -982,7 +982,7 @@ void AlidNdPtAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent *cons Double_t vRecMCEventHist1[4] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetYv()-vtxMC[1],vtxESD->GetZv()-vtxMC[2], centralityF}; fRecMCEventHist1->Fill(vRecMCEventHist1);// - Double_t vRecMCEventHist2[4] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetZv()-vtxMC[2],multMBTracks, centralityF}; + Double_t vRecMCEventHist2[4] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetZv()-vtxMC[2],static_cast(multMBTracks), centralityF}; fRecMCEventHist2->Fill(vRecMCEventHist2); }// @@ -1040,7 +1040,7 @@ void AlidNdPtAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent *cons // fill control histogram if(fHistogramsOn) { Int_t pid = AlidNdPtHelper::ConvertPdgToPid(particle); - Double_t vMCMultRecTrackHist1[4] = {particle->Pt(), particle->Eta(), pid, centralityF}; + Double_t vMCMultRecTrackHist1[4] = {particle->Pt(), particle->Eta(), static_cast(pid), centralityF}; fMCMultRecTrackHist1->Fill(vMCMultRecTrackHist1); } } @@ -1098,19 +1098,19 @@ void AlidNdPtAnalysisPbPb::FillHistograms(TObjArray *const allChargedTracks,Int_ Int_t label = TMath::Abs(track->GetLabel()); for(Int_t iAll=0; iAllPt(), multAll, centralityF}; + Double_t v1[3] = {track->Pt(), static_cast(multAll), centralityF}; fRecTrackMultHist1[AlidNdPtHelper::kAllTracks]->Fill(v1); } } for(Int_t iAcc=0; iAccPt(), multAcc, centralityF}; + Double_t v2[3] = {track->Pt(), static_cast(multAcc), centralityF}; fRecTrackMultHist1[AlidNdPtHelper::kAccTracks]->Fill(v2); } } for(Int_t iRec=0; iRecPt(), multRec, centralityF}; + Double_t v3[3] = {track->Pt(), static_cast(multRec), centralityF}; fRecTrackMultHist1[AlidNdPtHelper::kRecTracks]->Fill(v3); }//out } @@ -1232,8 +1232,8 @@ void AlidNdPtAnalysisPbPb::FillHistograms(AliStack *const stack, Int_t label, Al Double_t vMCTrackHist1[4] = {gpt,geta,gphi,centralityF}; fMCTrackHist1[trackObj]->Fill(vMCTrackHist1); - Double_t vMCPrimTrackHist1[6] = {gpt,geta,pid,mech,motherPdg,centralityF}; - Double_t vMCPrimTrackHist2[4] = {TMath::Abs(particle->GetPdgCode()),mech,motherPdg,centralityF}; + Double_t vMCPrimTrackHist1[6] = {gpt,geta,static_cast(pid),static_cast(mech),static_cast(motherPdg),centralityF}; + Double_t vMCPrimTrackHist2[4] = {static_cast(TMath::Abs(particle->GetPdgCode())),static_cast(mech),static_cast(motherPdg),centralityF}; //if(prim && AliPWG0Helper::IsPrimaryCharged(particle, label)) fMCPrimTrackHist1[trackObj]->Fill(vMCPrimTrackHist1); diff --git a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPbAOD.cxx b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPbAOD.cxx index a90cb1f9cd9..1093d3c1407 100644 --- a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPbAOD.cxx +++ b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysisPbPbAOD.cxx @@ -926,7 +926,7 @@ void AlidNdPtAnalysisPbPbAOD::UserExec(Option_t *option) if(bIsEventSelectedSemi) fEventStatisticsCentralityTrigger->Fill(dCentrality, 1); if(bIsEventSelectedCentral) fEventStatisticsCentralityTrigger->Fill(dCentrality, 2); - Double_t dEventZvMultCent[3] = {dEventZv, iAcceptedMultiplicity, dCentrality}; + Double_t dEventZvMultCent[3] = {dEventZv, static_cast(iAcceptedMultiplicity), dCentrality}; fZvMultCent->Fill(dEventZvMultCent); // store correlation between data and MC eventplane diff --git a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysispPb.cxx b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysispPb.cxx index 98650b12739..253771b5b90 100644 --- a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysispPb.cxx +++ b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtAnalysispPb.cxx @@ -1443,7 +1443,7 @@ void AlidNdPtAnalysispPb::Process(AliESDEvent *const esdEvent, AliMCEvent *const Bool_t isTrigAndVertex = isEventTriggered && isEventOK; - Double_t vEventCount[3] = { (isEventTriggered && kTRUE) , isTrigAndVertex, isTrigAndVertex && (TMath::Abs(vtxESD->GetZv()) < 10.)}; + Double_t vEventCount[3] = { static_cast((isEventTriggered && kTRUE)) , static_cast(isTrigAndVertex), static_cast( isTrigAndVertex && (TMath::Abs(vtxESD->GetZv()) < 10.))}; fEventCount->Fill(vEventCount); // vertex contributors @@ -1698,16 +1698,16 @@ void AlidNdPtAnalysispPb::Process(AliESDEvent *const esdEvent, AliMCEvent *const Double_t vRecEventHist1[3] = {vtxESD->GetXv(),vtxESD->GetYv(),vtxESD->GetZv()}; fRecEventHist1->Fill(vRecEventHist1); - Double_t vRecEventHist2[3] = {vtxESD->GetZv(),multMBTracks,multRecMult}; + Double_t vRecEventHist2[3] = {vtxESD->GetZv(),static_cast(multMBTracks),static_cast(multRecMult)}; fRecEventHist2->Fill(vRecEventHist2); // //Double_t vRecEventHist[2] = {vtxESD->GetZv(),multMBTracks}; - Double_t vRecEventHist[3] = {vtxESD->GetZv(),multMBTracks,centralityD}; + Double_t vRecEventHist[3] = {vtxESD->GetZv(),static_cast(multMBTracks),centralityD}; fRecEventHist->Fill(vRecEventHist); // fill fEventMultHist for cross checks - Double_t vEventMultHist[3] = {multMBTracks,multRecMult,multRec}; + Double_t vEventMultHist[3] = {static_cast(multMBTracks),static_cast(multRecMult),static_cast(multRec)}; fEventMultHist->Fill(vEventMultHist); } @@ -1734,7 +1734,7 @@ void AlidNdPtAnalysispPb::Process(AliESDEvent *const esdEvent, AliMCEvent *const } } - Double_t vMultTrueEventMatrix[3] = { multRecMult, multMCTrueTracks, multMBTracks}; + Double_t vMultTrueEventMatrix[3] = { static_cast(multRecMult), static_cast(multMCTrueTracks), static_cast(multMBTracks)}; if(isEventOK && isEventTriggered) { if(TMath::Abs(vtxMC[2]) < 10.0) // both Rec. and corresponding MC events must be accepted fEventMultCorrelationMatrix->Fill(vMultTrueEventMatrix); @@ -1746,7 +1746,7 @@ void AlidNdPtAnalysispPb::Process(AliESDEvent *const esdEvent, AliMCEvent *const // all inelastic //Double_t vEventMatrix[2] = {vtxMC[2],multMBTracks}; - Double_t vEventMatrix[3] = {vtxMC[2],multMCTrueTracks,centralityD}; + Double_t vEventMatrix[3] = {vtxMC[2],static_cast(multMCTrueTracks),centralityD}; fGenEventMatrix->Fill(vEventMatrix); if(isEventTriggered) fTriggerEventMatrix->Fill(vEventMatrix); if(isEventOK && isEventTriggered) fRecEventMatrix->Fill(vEventMatrix); @@ -1810,7 +1810,7 @@ void AlidNdPtAnalysispPb::Process(AliESDEvent *const esdEvent, AliMCEvent *const if(accCuts->AcceptTrack(particle)) { //Double_t vTrackEventMatrix[3] = {vtxMC[2], particle->Pt(), particle->Eta()}; - Double_t vTrackEventMatrix[4] = {vtxMC[2],particle->Pt(),particle->Eta(),multMCTrueTracks}; + Double_t vTrackEventMatrix[4] = {vtxMC[2],particle->Pt(),particle->Eta(),static_cast(multMCTrueTracks)}; fGenTrackEventMatrix->Fill(vTrackEventMatrix); if(evtType == AliPWG0Helper::kSD) { @@ -1873,10 +1873,10 @@ void AlidNdPtAnalysispPb::Process(AliESDEvent *const esdEvent, AliMCEvent *const Double_t vRecMCEventHist1[3] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetYv()-vtxMC[1],vtxESD->GetZv()-vtxMC[2]}; fRecMCEventHist1->Fill(vRecMCEventHist1); - Double_t vRecMCEventHist2[3] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetZv()-vtxMC[2],multMBTracks}; + Double_t vRecMCEventHist2[3] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetZv()-vtxMC[2],static_cast(multMBTracks)}; fRecMCEventHist2->Fill(vRecMCEventHist2); - Double_t vRecMCEventHist3[2] = {multRec,evtType}; + Double_t vRecMCEventHist3[2] = {static_cast(multRec),evtType}; fRecMCEventHist3->Fill(vRecMCEventHist3); } @@ -1921,7 +1921,7 @@ void AlidNdPtAnalysispPb::Process(AliESDEvent *const esdEvent, AliMCEvent *const if( AlidNdPtHelper::IsPrimaryParticle(stack, iMc, GetParticleMode()) ) { fGenPrimTrackMatrix->Fill(vTrackMatrix); - Double_t vMCPrimTrackHist[4] = {vtxMC[2],particle->Pt(),particle->Eta(),multMCTrueTracks}; + Double_t vMCPrimTrackHist[4] = {vtxMC[2],particle->Pt(),particle->Eta(),static_cast(multMCTrueTracks)}; fMCPrimTrackHist->Fill(vMCPrimTrackHist); } // fill control histograms @@ -1942,7 +1942,7 @@ void AlidNdPtAnalysispPb::Process(AliESDEvent *const esdEvent, AliMCEvent *const // fill control histogram if(fHistogramsOn) { Int_t pid = AlidNdPtHelper::ConvertPdgToPid(particle); - Double_t vMCMultRecTrackHist1[3] = {particle->Pt(), particle->Eta(), pid}; + Double_t vMCMultRecTrackHist1[3] = {particle->Pt(), particle->Eta(), static_cast(pid)}; fMCMultRecTrackHist1->Fill(vMCMultRecTrackHist1); } } @@ -2010,19 +2010,19 @@ void AlidNdPtAnalysispPb::FillHistograms(TObjArray *const allChargedTracks,Int_t Int_t label = TMath::Abs(track->GetLabel()); for(Int_t iAll=0; iAllPt(), multAll}; + Double_t v1[2] = {track->Pt(), static_cast(multAll)}; fRecTrackMultHist1[AlidNdPtHelper::kAllTracks]->Fill(v1); } } for(Int_t iAcc=0; iAccPt(), multAcc}; + Double_t v2[2] = {track->Pt(), static_cast(multAcc)}; fRecTrackMultHist1[AlidNdPtHelper::kAccTracks]->Fill(v2); } } for(Int_t iRec=0; iRecPt(), multRec}; + Double_t v3[2] = {track->Pt(), static_cast(multRec)}; fRecTrackMultHist1[AlidNdPtHelper::kRecTracks]->Fill(v3); } } @@ -2057,7 +2057,7 @@ void AlidNdPtAnalysispPb::FillHistograms(AliESDtrack *const esdTrack, AliStack * Double_t values1[3] = {pt,eta,phi}; fRecTrackHist1[trackObj]->Fill(values1); - Double_t values[4] = {zv, pt,eta, multRecMult}; + Double_t values[4] = {zv, pt,eta, static_cast(multRecMult)}; if(trackObj == AlidNdPtHelper::kRecTracks) { fRecTrackHist->Fill(values); } @@ -2171,8 +2171,8 @@ void AlidNdPtAnalysispPb::FillHistograms(AliStack *const stack, Int_t label, Ali Double_t vMCTrackHist1[3] = {gpt,geta,gphi}; fMCTrackHist1[trackObj]->Fill(vMCTrackHist1); - Double_t vMCPrimTrackHist1[5] = {gpt,geta,pid,mech,motherPdg}; - Double_t vMCPrimTrackHist2[5] = {TMath::Abs(particle->GetPdgCode()),mech,motherPdg}; + Double_t vMCPrimTrackHist1[5] = {gpt,geta,static_cast(pid),static_cast(mech),static_cast(motherPdg)}; + Double_t vMCPrimTrackHist2[5] = {static_cast(TMath::Abs(particle->GetPdgCode())),static_cast(mech),static_cast(motherPdg)}; //if(prim && AliPWG0Helper::IsPrimaryCharged(particle, label)) fMCPrimTrackHist1[trackObj]->Fill(vMCPrimTrackHist1); if(prim) { fMCPrimTrackHist1[trackObj]->Fill(vMCPrimTrackHist1); diff --git a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCorrection.cxx b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCorrection.cxx index 3987197ce60..3e7ebb63cb8 100644 --- a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCorrection.cxx +++ b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCorrection.cxx @@ -1270,7 +1270,7 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent) } Bool_t isTrigAndVertex = isEventTriggered && isEventOK; - Double_t vEventCount[3] = { isEventTriggered, isTrigAndVertex, isEventSelected }; + Double_t vEventCount[3] = { static_cast(isEventTriggered), static_cast(isTrigAndVertex), static_cast(isEventSelected) }; fEventCount->Fill(vEventCount); // @@ -1455,11 +1455,11 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent) TH1D *hp = (TH1D *)fCorrRecTrackPt1[i]->Projection(0); if(!hp) continue; meanPtMult[i] = hp->GetMean(); - Double_t vCorrRecTrackMeanPtMultHist1[2] = {meanPtMult[i],multRecTemp}; + Double_t vCorrRecTrackMeanPtMultHist1[2] = {meanPtMult[i],static_cast(multRecTemp)}; fCorrRecTrackMeanPtMultHist1[i]->Fill(vCorrRecTrackMeanPtMultHist1); if( IsUseMCInfo() ) { - Double_t vCorrRecTrackMeanPtTrueMultHist1[2] = {meanPtMult[i],multMCTrueTracks}; + Double_t vCorrRecTrackMeanPtTrueMultHist1[2] = {meanPtMult[i],static_cast(multMCTrueTracks)}; fCorrRecTrackMeanPtTrueMultHist1[i]->Fill(vCorrRecTrackMeanPtTrueMultHist1); } @@ -1473,7 +1473,7 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent) fRecEventHist1->Fill(vRecEventHist1); // correlation track multiplicity vs MB track multiplicity - Double_t vRecEventMultHist1[3] = {multRec, multMBTracks}; + Double_t vRecEventMultHist1[3] = {static_cast(multRec), static_cast(multMBTracks)}; fRecEventMultHist1->Fill(vRecEventMultHist1); } @@ -1512,7 +1512,7 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent) // // event histograms // - Double_t vMCEventMatrix[2] = {vtxMC[2],multMBTracks}; + Double_t vMCEventMatrix[2] = {vtxMC[2],static_cast(multMBTracks)}; fMCAllEventMultHist1->Fill(vMCEventMatrix); if(evtType == AliPWG0Helper::kND) { @@ -1570,9 +1570,9 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent) // sum up pt in the event sumPtMC +=gpt; - Double_t valMCAllTrackMultHist1[3] = {gpt,geta,multRecTemp}; - Double_t valMCAllTrackTrueMultHist1[3] = {gpt,geta,multMCTrueTracks}; - Double_t valMCAllTrackTrueMultHist2[3] = {gpt,multRecTemp,multMCTrueTracks}; + Double_t valMCAllTrackMultHist1[3] = {gpt,geta,static_cast(multRecTemp)}; + Double_t valMCAllTrackTrueMultHist1[3] = {gpt,geta,static_cast(multMCTrueTracks)}; + Double_t valMCAllTrackTrueMultHist2[3] = {gpt,static_cast(multRecTemp),static_cast(multMCTrueTracks)}; fMCAllPrimTrackMultHist1->Fill(valMCAllTrackMultHist1); fMCAllPrimTrackTrueMultHist1->Fill(valMCAllTrackTrueMultHist1); @@ -1612,8 +1612,8 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent) meanPtMCTrueMult = sumPtMC/multMCTrueTracks; } - Double_t valMCMeanPtMult[2] = {meanPtMCMult,multRecTemp}; - Double_t valMCMeanPtTrueMult[2] = {meanPtMCTrueMult,multMCTrueTracks}; + Double_t valMCMeanPtMult[2] = {static_cast(meanPtMCMult),static_cast(multRecTemp)}; + Double_t valMCMeanPtTrueMult[2] = {static_cast(meanPtMCTrueMult),static_cast(multMCTrueTracks)}; fMCAllPrimTrackMeanPtMult1->Fill(valMCMeanPtMult); fMCAllPrimTrackMeanPtTrueMult1->Fill(valMCMeanPtTrueMult); @@ -1650,7 +1650,7 @@ void AlidNdPtCorrection::FillHistograms(AlidNdPtHelper::EventObject eventObj, Do // Fill corrected histograms // - Double_t vEventMatrix[2] = {zv,multMBTracks}; + Double_t vEventMatrix[2] = {zv,static_cast(multMBTracks)}; // // Correct for efficiency // @@ -1763,15 +1763,15 @@ void AlidNdPtCorrection::FillHistograms(AliESDtrack * const esdTrack, AliStack * }; // Fill histograms - Double_t valCorrRecTrackMultHist1[3] = {pt,eta,mult}; + Double_t valCorrRecTrackMultHist1[3] = {pt,eta,static_cast(mult)}; Double_t valCorrRecTrackPt1[1] = {pt}; for(Int_t i=0; i<8; i++) { fCorrRecTrackMultHist1[i]->Fill(valCorrRecTrackMultHist1,corrF[i]); fCorrRecTrackPt1[i]->Fill(valCorrRecTrackPt1,corrF[i]); if( IsUseMCInfo() ) { - Double_t valCorrRecTrackTrueMultHist1[3] = {pt,eta,trueMult}; - Double_t valCorrRecTrackTrueMultHist2[3] = {pt,mult,trueMult}; + Double_t valCorrRecTrackTrueMultHist1[3] = {pt,eta,static_cast(trueMult)}; + Double_t valCorrRecTrackTrueMultHist2[3] = {pt,static_cast(mult),static_cast(trueMult)}; fCorrRecTrackTrueMultHist1[i]->Fill(valCorrRecTrackTrueMultHist1,corrF[i]); fCorrRecTrackTrueMultHist2[i]->Fill(valCorrRecTrackTrueMultHist2,corrF[i]); diff --git a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCutAnalysis.cxx b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCutAnalysis.cxx index 267ca3b40c5..4e1a3b7c880 100644 --- a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCutAnalysis.cxx +++ b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCutAnalysis.cxx @@ -318,7 +318,7 @@ void AlidNdPtCutAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent * cons //printf("isEventOK %d, isEventTriggered %d \n",isEventOK,isEventTriggered); Bool_t isTrigAndVertex = isEventTriggered && isEventOK; - Double_t vEventCount[2] = { isEventTriggered, isTrigAndVertex}; + Double_t vEventCount[2] = { static_cast(isEventTriggered), static_cast(isTrigAndVertex)}; fEventCount->Fill(vEventCount); // @@ -403,11 +403,11 @@ void AlidNdPtCutAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent * cons multAll++; } - Double_t vRecEventHist[5] = {vtxESD->GetXv(),vtxESD->GetYv(),vtxESD->GetZv(),vtxESD->GetZRes(),multAll}; + Double_t vRecEventHist[5] = {vtxESD->GetXv(),vtxESD->GetYv(),vtxESD->GetZv(),vtxESD->GetZRes(),static_cast(multAll)}; fRecEventHist->Fill(vRecEventHist); if(IsUseMCInfo()) { - Double_t vRecMCEventHist[5] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetYv()-vtxMC[1],vtxESD->GetZv()-vtxMC[2],multAll}; + Double_t vRecMCEventHist[5] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetYv()-vtxMC[1],vtxESD->GetZv()-vtxMC[2],static_cast(multAll)}; fRecMCEventHist->Fill(vRecMCEventHist); } } @@ -523,7 +523,7 @@ void AlidNdPtCutAnalysis::FillHistograms(AliESDtrack *const esdTrack, AliStack * //Double_t vRecMCTrackHist[11] = { nClust,chi2PerCluster,clustPerFindClust,b[0],b[1],eta,phi,pt,kinkIdx,isPrim, polarity }; //fRecMCTrackHist->Fill(vRecMCTrackHist); - Double_t vRecMCTrackHist[13] = { nCrossedRowsTPC, chi2PerCluster, ratioCrossedRowsOverFindableClustersTPC, fracClustersTPCShared , b[0], b[1], eta, phi, pt, hasStrangeMother, isFromMaterial, isPrim, charge }; + Double_t vRecMCTrackHist[13] = { static_cast(nCrossedRowsTPC), chi2PerCluster, ratioCrossedRowsOverFindableClustersTPC, fracClustersTPCShared , b[0], b[1], eta, phi, pt, static_cast(hasStrangeMother), static_cast(isFromMaterial), static_cast(isPrim), static_cast(charge) }; fRecMCTrackHist->Fill(vRecMCTrackHist); } diff --git a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCutAnalysisPbPb.cxx b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCutAnalysisPbPb.cxx index 355a86a7a20..71a33cae65a 100644 --- a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCutAnalysisPbPb.cxx +++ b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtCutAnalysisPbPb.cxx @@ -332,7 +332,7 @@ void AlidNdPtCutAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent * //printf("isEventOK %d, isEventTriggered %d \n",isEventOK,isEventTriggered); Bool_t isTrigAndVertex = isEventTriggered && isEventOK; - Double_t vEventCount[2] = { isEventTriggered, isTrigAndVertex}; + Double_t vEventCount[2] = { static_cast(isEventTriggered), static_cast(isTrigAndVertex)}; fEventCount->Fill(vEventCount); // check event cuts @@ -356,11 +356,11 @@ void AlidNdPtCutAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent * } - Double_t vRecEventHist[5] = {vtxESD->GetXv(),vtxESD->GetYv(),vtxESD->GetZv(),vtxESD->GetZRes(),multAll}; + Double_t vRecEventHist[5] = {vtxESD->GetXv(),vtxESD->GetYv(),vtxESD->GetZv(),vtxESD->GetZRes(),static_cast(multAll)}; fRecEventHist->Fill(vRecEventHist); if(IsUseMCInfo()) { - Double_t vRecMCEventHist[5] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetYv()-vtxMC[1],vtxESD->GetZv()-vtxMC[2],multAll}; + Double_t vRecMCEventHist[5] = {vtxESD->GetXv()-vtxMC[0],vtxESD->GetYv()-vtxMC[1],vtxESD->GetZv()-vtxMC[2],static_cast(multAll)}; fRecMCEventHist->Fill(vRecMCEventHist); } } @@ -534,7 +534,7 @@ void AlidNdPtCutAnalysisPbPb::FillHistograms(AliESDEvent *const esdEvent, AliESD // fill histo Int_t charge = esdTrack->Charge(); - Double_t vRecMCTrackHist[17] = { nCrossedRowsTPC, chi2PerCluster, chi2PerClusterITS,ratioCrossedRowsOverFindableClustersTPC, fracClustersTPCShared, b[0], b[1], eta, phi, pt, hasStrangeMother, isFromConversion, isFromMaterial, isPrim, charge, centralityF, chi2(0,0) }; + Double_t vRecMCTrackHist[17] = { static_cast(nCrossedRowsTPC), chi2PerCluster, chi2PerClusterITS,ratioCrossedRowsOverFindableClustersTPC, fracClustersTPCShared, b[0], b[1], eta, phi, pt, static_cast(hasStrangeMother), static_cast(isFromConversion), static_cast(isFromMaterial), static_cast(isPrim), static_cast(charge), centralityF, chi2(0,0) }; fRecMCTrackHist->Fill(vRecMCTrackHist); if(tpcInnerC) delete tpcInnerC; diff --git a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtEfficiency.cxx b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtEfficiency.cxx index 799cee608a6..e6e5c3e8da6 100644 --- a/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtEfficiency.cxx +++ b/PWGLF/SPECTRA/ChargedHadrons/dNdPt/AlidNdPtEfficiency.cxx @@ -347,8 +347,8 @@ void AlidNdPtEfficiency::FillHistograms(AliESDtrack *const esdTrack, AliStack *c } // fill histo - Double_t vRecMCTrackHist[6] = { eta,phi,pt,isPrim,charge,isMatch }; - Double_t vRecMCTrackHistTPCITS[7] = { eta,phi,pt,isPrim,charge,isMatch,isTPC }; + Double_t vRecMCTrackHist[6] = { eta,phi,pt,static_cast(isPrim),static_cast(charge),static_cast(isMatch) }; + Double_t vRecMCTrackHistTPCITS[7] = { eta,phi,pt,static_cast(isPrim),static_cast(charge),static_cast(isMatch),static_cast(isTPC) }; if(isITSTPC) { fRecMCTrackHistITSTPC->Fill(vRecMCTrackHist); diff --git a/PWGLF/SPECTRA/Nuclei/deuteronpA/AliAnalysisDeuteronpA.cxx b/PWGLF/SPECTRA/Nuclei/deuteronpA/AliAnalysisDeuteronpA.cxx index e0260569d46..ce877a946f9 100644 --- a/PWGLF/SPECTRA/Nuclei/deuteronpA/AliAnalysisDeuteronpA.cxx +++ b/PWGLF/SPECTRA/Nuclei/deuteronpA/AliAnalysisDeuteronpA.cxx @@ -217,7 +217,7 @@ void AliAnalysisDeuteronpA::UserCreateOutputObjects() // (9.) CODE -- only MC 0-generated, 1-true rec. primaries, 2-misident prim, 3-second weak, 4-second material, 5-misident sec // // 0, 1, 2, 3, 4, 5, 6, 7, 8 - Int_t binsHistReal[9] = { 3, kMultBins, kPtBins, 2, kYBins , 50, 2, 100, kDcaBins}; + Int_t binsHistReal[9] = { 3, kMultBins, kPtBins, 2, static_cast(kYBins) , 50, 2, 100, kDcaBins}; Double_t xminHistReal[9] = {-0.5, -0.5, 0, -2, kYlowBorder , -5,- 0.5, -2.5, -3}; Double_t xmaxHistReal[9] = { 2.5, 10.5, 3, 2, kYhighBorder, 5, 1.5, 2.5, 3}; fHistRealTracks = new THnSparseF("fHistRealTracks","real tracks",9,binsHistReal,xminHistReal,xmaxHistReal); @@ -234,7 +234,7 @@ void AliAnalysisDeuteronpA::UserCreateOutputObjects() fHistTofQA = new TH2F("fHistTofQA","TOF-QA",200,-4.,4.,400,0,1.1); fListHist->Add(fHistTofQA); // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 - Int_t binsHistMC[10] = { 3, kMultBins, kPtBins, 2, kYBins , 50, 2, 100, kDcaBins, 6}; + Int_t binsHistMC[10] = { 3, kMultBins, kPtBins, 2, static_cast(kYBins) , 50, 2, 100, kDcaBins, 6}; Double_t xminHistMC[10] = {-0.5, -0.5, 0, -2, kYlowBorder , -5,- 0.5, -2.5, -3, -0.5}; Double_t xmaxHistMC[10] = { 2.5, 10.5, 3, 2, kYhighBorder, 5, 1.5, 2.5, 3, 5.5}; // @@ -460,7 +460,7 @@ void AliAnalysisDeuteronpA::UserExec(Option_t *) if (TMath::Abs(pdg) == 1000020030) iPart = 2; // select He+/He- only if (iPart == -1) continue; // - Double_t vecHistMC[10] = {iPart, centrality, pT, sign, rap, 0, 1, 0, dxy, 0}; + Double_t vecHistMC[10] = {static_cast(iPart), centrality, pT, static_cast(sign), rap, 0, 1, 0, dxy, 0}; fHistMCparticles->Fill(vecHistMC); // if (iPart == 0) fHistEtaPtGen->Fill(pT, trackMC->Y(), 0.); @@ -629,7 +629,7 @@ void AliAnalysisDeuteronpA::UserExec(Option_t *) // if (iPart != 0) continue; // 0, 1, 2, 3, 4, 5, 6, 7, 8 - Double_t vecHistReal[9] = {iPart, centrality, pT, sign, rap[iPart], pullsTPC[iPart], hasTOF, pullsTOF[iPart], dca[0]}; + Double_t vecHistReal[9] = {static_cast(iPart), centrality, pT, static_cast(sign), rap[iPart], pullsTPC[iPart], static_cast(hasTOF), pullsTOF[iPart], dca[0]}; fHistRealTracks->Fill(vecHistReal); if (TMath::Abs(rap[1]) < 0.5) fHistPidQA->Fill(ptot,tpcSignal,sign); // has to be used for the very difficult deuterons. // @@ -678,7 +678,7 @@ void AliAnalysisDeuteronpA::UserExec(Option_t *) // IMPORTANT BIG PROBLEM HERE THE PROBABLILITY TO HAVE A PID SIGNAL MUST BE IN !!!!!!!!!!!! // // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 - Double_t vectorHistMC[10] = {iPart, centrality, pT, sign, rap[iPart], pullsTPC[iPart], hasTOF, pullsTOF[iPart], dca[0], code}; + Double_t vectorHistMC[10] = {static_cast(iPart), centrality, pT, static_cast(sign), rap[iPart], pullsTPC[iPart], static_cast(hasTOF), pullsTOF[iPart], dca[0], static_cast(code)}; fHistMCparticles->Fill(vectorHistMC); } diff --git a/PWGLF/SPECTRA/PiKaPr/TPCTOF/AliAnalysisCombinedHadronSpectra.cxx b/PWGLF/SPECTRA/PiKaPr/TPCTOF/AliAnalysisCombinedHadronSpectra.cxx index 490619ab9ba..ca723bbb511 100644 --- a/PWGLF/SPECTRA/PiKaPr/TPCTOF/AliAnalysisCombinedHadronSpectra.cxx +++ b/PWGLF/SPECTRA/PiKaPr/TPCTOF/AliAnalysisCombinedHadronSpectra.cxx @@ -547,12 +547,12 @@ void AliAnalysisCombinedHadronSpectra::UserExec(Option_t *) // if (!fSmallTHnSparse){ - Double_t vecHistMC[10] = {iPart, centrality, pT, sign, rap, 0, 1, 0, dxy, 0}; + Double_t vecHistMC[10] = {static_cast(iPart), centrality, pT, static_cast(sign), rap, 0, 1, 0, dxy, 0}; if (!fOnlyQA) fHistMCparticles->Fill(vecHistMC); } else{ if (rap>fRapidityCutLow && rap(iPart), centrality, pT, static_cast(sign), 1, 0, dxy, 0}; if (!fOnlyQA) fHistMCparticles->Fill(vecHistMC); } } @@ -726,12 +726,12 @@ void AliAnalysisCombinedHadronSpectra::UserExec(Option_t *) for(Int_t iPart = 0; iPart < 3; iPart++) { if (!fSmallTHnSparse) { - Double_t vecHistReal[9] = {iPart, centrality, pT, sign, rap[iPart], pullsTPC[iPart], hasTOF, pullsTOF[iPart], dca[0]}; + Double_t vecHistReal[9] = {static_cast(iPart), centrality, pT, static_cast(sign), rap[iPart], pullsTPC[iPart], static_cast(hasTOF), pullsTOF[iPart], dca[0]}; if (!fOnlyQA) fHistRealTracks->Fill(vecHistReal); } else { if (pullsTPC[iPart]>fTPCnSigmaCutLow && pullsTPC[iPart]fRapidityCutLow && rap[iPart](iPart), centrality, pT, static_cast(sign), static_cast(hasTOF), pullsTOF[iPart], dca[0]}; if (!fOnlyQA) fHistRealTracks->Fill(vecHistReal); } } @@ -781,11 +781,11 @@ void AliAnalysisCombinedHadronSpectra::UserExec(Option_t *) // IMPORTANT BIG PROBLEM HERE THE PROBABLILITY TO HAVE A PID SIGNAL MUST BE IN !!!!!!!!!!!! // if (!fSmallTHnSparse){ - Double_t vectorHistMC[10] = {iPart, centrality, pT, sign, rap[iPart], pullsTPC[iPart], hasTOF, pullsTOF[iPart], dca[0], code}; + Double_t vectorHistMC[10] = {static_cast(iPart), centrality, pT, static_cast(sign), rap[iPart], pullsTPC[iPart], static_cast(hasTOF), pullsTOF[iPart], dca[0], static_cast(code)}; if (!fOnlyQA) { fHistMCparticles->Fill(vectorHistMC); if (motherCode != -1 && fSaveMotherPDG) { //if mother of weak decay is K0, lambda or sigma+ add track again with this information - Double_t vectorHistMCmother[10] = {iPart, centrality, pT, sign, rap[iPart], pullsTPC[iPart], hasTOF, pullsTOF[iPart], dca[0], motherCode}; + Double_t vectorHistMCmother[10] = {static_cast(iPart), centrality, pT, static_cast(sign), rap[iPart], pullsTPC[iPart], static_cast(hasTOF), pullsTOF[iPart], dca[0], static_cast(motherCode)}; fHistMCparticles->Fill(vectorHistMCmother); } } @@ -793,11 +793,11 @@ void AliAnalysisCombinedHadronSpectra::UserExec(Option_t *) else{ if (pullsTPC[iPart]>fTPCnSigmaCutLow && pullsTPC[iPart]fRapidityCutLow && rap[iPart](iPart), centrality, pT, static_cast(sign), static_cast(hasTOF), pullsTOF[iPart], dca[0], static_cast(code)}; if (!fOnlyQA) { fHistMCparticles->Fill(vectorHistMC); if (motherCode != -1 && fSaveMotherPDG) { //if mother of weak decay is K0, lambda or sigma+ add track again with this information - Double_t vectorHistMCmother[8] = {iPart, centrality, pT, sign, hasTOF, pullsTOF[iPart], dca[0], motherCode}; + Double_t vectorHistMCmother[8] = {static_cast(iPart), centrality, pT, static_cast(sign), static_cast(hasTOF), pullsTOF[iPart], dca[0], static_cast(motherCode)}; fHistMCparticles->Fill(vectorHistMCmother); } } diff --git a/PWGLF/SPECTRA/PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx b/PWGLF/SPECTRA/PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx index 0f47d3f7ee8..189abaed1af 100644 --- a/PWGLF/SPECTRA/PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx +++ b/PWGLF/SPECTRA/PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.cxx @@ -643,12 +643,12 @@ void AliAnalysisTPCTOFpA::UserExec(Option_t *) // if (!fSmallTHnSparse){ - Double_t vecHistMC[10] = {iPart, centrality, pT, sign, rap, 0, 1, 0, dxy, 0}; + Double_t vecHistMC[10] = {static_cast(iPart), centrality, pT, static_cast(sign), rap, 0, 1, 0, dxy, 0}; if (!fOnlyQA) fHistMCparticles->Fill(vecHistMC); } else{ if (rap>fRapidityCutLow && rap(iPart), centrality, pT, static_cast(sign), 1, 0, dxy, 0}; if (!fOnlyQA) fHistMCparticles->Fill(vecHistMC); } } @@ -862,12 +862,12 @@ void AliAnalysisTPCTOFpA::UserExec(Option_t *) for(Int_t iPart = 0; iPart < 3; iPart++) { if (!fSmallTHnSparse) { - Double_t vecHistReal[9] = {iPart, centrality, pT, sign, rap[iPart], pullsTPC[iPart], hasTOF, pullsTOF[iPart], dca[0]}; + Double_t vecHistReal[9] = {static_cast(iPart), centrality, pT, static_cast(sign), rap[iPart], pullsTPC[iPart], static_cast(hasTOF), pullsTOF[iPart], dca[0]}; if (!fOnlyQA) fHistRealTracks->Fill(vecHistReal); } else { if (pullsTPC[iPart]>fTPCnSigmaCutLow && pullsTPC[iPart]fRapidityCutLow && rap[iPart](iPart), centrality, pT, static_cast(sign), static_cast(hasTOF), pullsTOF[iPart], dca[0]}; if (!fOnlyQA) fHistRealTracks->Fill(vecHistReal); } } @@ -946,11 +946,11 @@ void AliAnalysisTPCTOFpA::UserExec(Option_t *) // IMPORTANT BIG PROBLEM HERE THE PROBABLILITY TO HAVE A PID SIGNAL MUST BE IN !!!!!!!!!!!! // if (!fSmallTHnSparse){ - Double_t vectorHistMC[10] = {iPart, centrality, pT, sign, rap[iPart], pullsTPC[iPart], hasTOF, pullsTOF[iPart], dca[0], code}; + Double_t vectorHistMC[10] = {static_cast(iPart), centrality, pT, static_cast(sign), rap[iPart], pullsTPC[iPart], static_cast(hasTOF), pullsTOF[iPart], dca[0], static_cast(code)}; if (!fOnlyQA) { fHistMCparticles->Fill(vectorHistMC); if (motherCode != -1 && fSaveMotherPDG) { //if mother of weak decay is K0, lambda or sigma+ add track again with this information - Double_t vectorHistMCmother[10] = {iPart, centrality, pT, sign, rap[iPart], pullsTPC[iPart], hasTOF, pullsTOF[iPart], dca[0], motherCode}; + Double_t vectorHistMCmother[10] = {static_cast(iPart), centrality, pT, static_cast(sign), rap[iPart], pullsTPC[iPart], static_cast(hasTOF), pullsTOF[iPart], dca[0], static_cast(motherCode)}; fHistMCparticles->Fill(vectorHistMCmother); } } @@ -958,11 +958,11 @@ void AliAnalysisTPCTOFpA::UserExec(Option_t *) else{ if (pullsTPC[iPart]>fTPCnSigmaCutLow && pullsTPC[iPart]fRapidityCutLow && rap[iPart](iPart), centrality, pT, static_cast(sign), static_cast(hasTOF), pullsTOF[iPart], dca[0], static_cast(code)}; if (!fOnlyQA) { fHistMCparticles->Fill(vectorHistMC); if (motherCode != -1 && fSaveMotherPDG) { //if mother of weak decay is K0, lambda or sigma+ add track again with this information - Double_t vectorHistMCmother[8] = {iPart, centrality, pT, sign, hasTOF, pullsTOF[iPart], dca[0], motherCode}; + Double_t vectorHistMCmother[8] = {static_cast(iPart), centrality, pT, static_cast(sign), static_cast(hasTOF), pullsTOF[iPart], dca[0], static_cast(motherCode)}; fHistMCparticles->Fill(vectorHistMCmother); } } diff --git a/PWGLF/STRANGENESS/Correlations/AliAnalysisTaskLambdaOverK0sJets.cxx b/PWGLF/STRANGENESS/Correlations/AliAnalysisTaskLambdaOverK0sJets.cxx index 439a4b4e096..364044050d5 100644 --- a/PWGLF/STRANGENESS/Correlations/AliAnalysisTaskLambdaOverK0sJets.cxx +++ b/PWGLF/STRANGENESS/Correlations/AliAnalysisTaskLambdaOverK0sJets.cxx @@ -48,7 +48,7 @@ #include "AliAnalysisTaskLambdaOverK0sJets.h" -extern TROOT *gROOT; +//extern TROOT *gROOT; ClassImp(AliAnalysisTaskLambdaOverK0sJets) diff --git a/PWGLF/STRANGENESS/Correlations/AliAnalysisTaskV0ChCorrelations.cxx b/PWGLF/STRANGENESS/Correlations/AliAnalysisTaskV0ChCorrelations.cxx index 2e855cc4b9c..5cf673d1c07 100644 --- a/PWGLF/STRANGENESS/Correlations/AliAnalysisTaskV0ChCorrelations.cxx +++ b/PWGLF/STRANGENESS/Correlations/AliAnalysisTaskV0ChCorrelations.cxx @@ -865,7 +865,7 @@ void AliAnalysisTaskV0ChCorrelations::UserExec(Option_t *) if (dPhiMix > (1.5*kPi)) dPhiMix -= 2.0*kPi; if (dPhiMix < (-0.5*kPi)) dPhiMix += 2.0*kPi; - Double_t spMix[7] = {dPhiMix, dEtaMix, trigPt, assoc->Pt(), lCent, lPVz, trigC}; + Double_t spMix[7] = {dPhiMix, dEtaMix, trigPt, assoc->Pt(), lCent, lPVz, static_cast(trigC)}; fHistdPhidEtaMix->Fill(spMix); } // end of mixing track loop @@ -890,7 +890,7 @@ void AliAnalysisTaskV0ChCorrelations::UserExec(Option_t *) if (dPhiMix > (1.5*kPi)) dPhiMix -= 2.0*kPi; if (dPhiMix < (-0.5*kPi)) dPhiMix += 2.0*kPi; - Double_t spMix[7] = {dPhiMix, dEtaMix, trigPt, assoc->Pt(), lCent, lPVz, trigC}; + Double_t spMix[7] = {dPhiMix, dEtaMix, trigPt, assoc->Pt(), lCent, lPVz, static_cast(trigC)}; fHistdPhidEtaMix->Fill(spMix); } // end of mixing track loop diff --git a/PWGLF/STRANGENESS/Hypernuclei/AliAnalysisTaskAntiHe4.cxx b/PWGLF/STRANGENESS/Hypernuclei/AliAnalysisTaskAntiHe4.cxx index 32389829ea0..8fb7d1a4ab7 100644 --- a/PWGLF/STRANGENESS/Hypernuclei/AliAnalysisTaskAntiHe4.cxx +++ b/PWGLF/STRANGENESS/Hypernuclei/AliAnalysisTaskAntiHe4.cxx @@ -760,7 +760,7 @@ void AliAnalysisTaskAntiHe4::UserExec(Option_t *) if (ptot > 0.7 && TMath::Abs(tpcSignal - expSignalTriton)/expSignalTriton < 0.2) id = 2; if (ptot > 0.5 && (tpcSignal - expSignalHelium3)/expSignalHelium3 > -0.1 && (tpcSignal - expSignalHelium3)/expSignalHelium3 < 0.2) id = 3; // - Double_t vecAntiAlpha[4] = {dcaXYsign, sign, id, ptotInc}; + Double_t vecAntiAlpha[4] = {dcaXYsign, sign, static_cast(id), ptotInc}; if (id != -1 && tpcSignal > 120) fAntiAlpha->Fill(vecAntiAlpha); // // fill final histograms diff --git a/PWGLF/STRANGENESS/Hypernuclei/AliAnalysisTaskHdibaryonLPpi.cxx b/PWGLF/STRANGENESS/Hypernuclei/AliAnalysisTaskHdibaryonLPpi.cxx index 99bbc8410dd..8c795ebe1da 100644 --- a/PWGLF/STRANGENESS/Hypernuclei/AliAnalysisTaskHdibaryonLPpi.cxx +++ b/PWGLF/STRANGENESS/Hypernuclei/AliAnalysisTaskHdibaryonLPpi.cxx @@ -1408,7 +1408,7 @@ void AliAnalysisTaskHdibaryonLPpi::UserExec(Option_t *) //fHistNdim = new THnSparseF("fHistNdim","THnS;InvMass, InvMassLambda, pointingAngle, armPoAlpha, armPoQt, pTL, pTH, d0p, d0n, dcaHd, dca, decayL, cosPA, centr, multi, mcinf;InvMassH", 16,binsD01,xminD01,xmaxD01); - Double_t vec[16]={hDibaryon.M(), lInvMassLambda, pointingAngleH, alfa, qt, lPtLambda, hDibaryon.Pt(), posPionKF.GetDistanceFromVertex(primVtx), protonKF.GetDistanceFromVertex(primVtx), dca, protonKF.GetDistanceFromVertex(posPionKF), TMath::Cos(pointingAngleH), centrPerc, refMultTpc, mcStatus}; + Double_t vec[16]={hDibaryon.M(), lInvMassLambda, pointingAngleH, alfa, qt, lPtLambda, hDibaryon.Pt(), posPionKF.GetDistanceFromVertex(primVtx), protonKF.GetDistanceFromVertex(primVtx), dca, protonKF.GetDistanceFromVertex(posPionKF), TMath::Cos(pointingAngleH), centrPerc, static_cast(refMultTpc), static_cast(mcStatus)}; fHistNdim->Fill(vec); } diff --git a/PWGLF/STRANGENESS/LambdaK0PbPb/AliAnalysisTaskCTauPbPb.cxx b/PWGLF/STRANGENESS/LambdaK0PbPb/AliAnalysisTaskCTauPbPb.cxx index 903350333c4..d249de55caa 100644 --- a/PWGLF/STRANGENESS/LambdaK0PbPb/AliAnalysisTaskCTauPbPb.cxx +++ b/PWGLF/STRANGENESS/LambdaK0PbPb/AliAnalysisTaskCTauPbPb.cxx @@ -27,7 +27,7 @@ #include "AliAnalysisTaskCTauPbPb.h" -extern TROOT *gROOT; +//extern TROOT *gROOT; ClassImp(AliAnalysisTaskCTauPbPb) diff --git a/PWGLF/STRANGENESS/LambdaK0PbPb/AliAnalysisTaskCTauPbPbaod.cxx b/PWGLF/STRANGENESS/LambdaK0PbPb/AliAnalysisTaskCTauPbPbaod.cxx index 70151866198..747be6f6d53 100644 --- a/PWGLF/STRANGENESS/LambdaK0PbPb/AliAnalysisTaskCTauPbPbaod.cxx +++ b/PWGLF/STRANGENESS/LambdaK0PbPb/AliAnalysisTaskCTauPbPbaod.cxx @@ -27,7 +27,7 @@ #include "AliAnalysisTaskCTauPbPbaod.h" -extern TROOT *gROOT; +//extern TROOT *gROOT; ClassImp(AliAnalysisTaskCTauPbPbaod) diff --git a/PWGPP/EVCHAR/AliAnalysisTaskSPDdNdEta.cxx b/PWGPP/EVCHAR/AliAnalysisTaskSPDdNdEta.cxx index 197dc516488..6d029555831 100644 --- a/PWGPP/EVCHAR/AliAnalysisTaskSPDdNdEta.cxx +++ b/PWGPP/EVCHAR/AliAnalysisTaskSPDdNdEta.cxx @@ -576,7 +576,7 @@ void AliAnalysisTaskSPDdNdEta::UserExec(Option_t *) AliError(" Invalid ITS cluster tree !\n"); return; } - float vtxf[3] = {vtxESD->GetX(),vtxESD->GetY(),vtxESD->GetZ()}; + float vtxf[3] = {static_cast(vtxESD->GetX()),static_cast(vtxESD->GetY()),static_cast(vtxESD->GetZ())}; fMultReco->SetPhiWindow(fPhiWindow); fMultReco->SetThetaWindow(fThetaWindow); diff --git a/PWGPP/EVCHAR/AliTrackletAlg.cxx b/PWGPP/EVCHAR/AliTrackletAlg.cxx index 831890b0f3a..32d06a7c3c7 100644 --- a/PWGPP/EVCHAR/AliTrackletAlg.cxx +++ b/PWGPP/EVCHAR/AliTrackletAlg.cxx @@ -351,7 +351,7 @@ void AliTrackletAlg::Reconstruct(AliESDEvent* esd, TTree* treeRP) vtx = 0; } if(vtx){ - float vtxf[3] = {vtx->GetX(),vtx->GetY(),vtx->GetZ()}; + float vtxf[3] = {static_cast(vtx->GetX()),static_cast(vtx->GetY()),static_cast(vtx->GetZ())}; FindTracklets(vtxf); } else { diff --git a/PWGPP/EvTrkSelection/AliAnalysisTrackingUncertainties.cxx b/PWGPP/EvTrkSelection/AliAnalysisTrackingUncertainties.cxx index be651d5d35f..8f3017207b9 100644 --- a/PWGPP/EvTrkSelection/AliAnalysisTrackingUncertainties.cxx +++ b/PWGPP/EvTrkSelection/AliAnalysisTrackingUncertainties.cxx @@ -530,7 +530,7 @@ void AliAnalysisTrackingUncertainties::ProcessTrackCutVariation() { fESDtrackCuts->SetMinNClustersTPC(0); if (fESDtrackCuts->AcceptTrack(track)) { for(Int_t iPid = 0; iPid < 6; iPid++) { - Double_t vecHistNcl[kNumberOfAxes] = {nclsTPC, pT, eta, phi, iPid}; + Double_t vecHistNcl[kNumberOfAxes] = {static_cast(nclsTPC), pT, eta, phi, static_cast(iPid)}; if (IsConsistentWithPid(iPid, track)) histNcl->Fill(vecHistNcl); } } @@ -542,7 +542,7 @@ void AliAnalysisTrackingUncertainties::ProcessTrackCutVariation() { fESDtrackCuts->SetMaxChi2PerClusterTPC(999.); if (fESDtrackCuts->AcceptTrack(track)) { for(Int_t iPid = 0; iPid < 6; iPid++) { - Double_t vecHistChi2Tpc[kNumberOfAxes] = {chi2TPC, pT, eta, phi, iPid}; + Double_t vecHistChi2Tpc[kNumberOfAxes] = {chi2TPC, pT, eta, phi, static_cast(iPid)}; if (IsConsistentWithPid(iPid, track)) histChi2Tpc->Fill(vecHistChi2Tpc); } } @@ -554,7 +554,7 @@ void AliAnalysisTrackingUncertainties::ProcessTrackCutVariation() { fESDtrackCuts->SetMaxDCAToVertexZ(999.); if (fESDtrackCuts->AcceptTrack(track)) { for(Int_t iPid = 0; iPid < 6; iPid++) { - Double_t vecHistDcaZ[kNumberOfAxes] = {TMath::Abs(dca[1]), pT, eta, phi, iPid}; + Double_t vecHistDcaZ[kNumberOfAxes] = {TMath::Abs(dca[1]), pT, eta, phi, static_cast(iPid)}; if (IsConsistentWithPid(iPid, track)) histDcaZ->Fill(vecHistDcaZ); } } @@ -567,7 +567,7 @@ void AliAnalysisTrackingUncertainties::ProcessTrackCutVariation() { Int_t hasPoint = 0; if (track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)) hasPoint = 1; for(Int_t iPid = 0; iPid < 6; iPid++) { - Double_t vecHistSpd[kNumberOfAxes] = {hasPoint, pT, eta, phi, iPid}; + Double_t vecHistSpd[kNumberOfAxes] = {static_cast(hasPoint), pT, eta, phi, static_cast(iPid)}; if (IsConsistentWithPid(iPid, track)) histSpd->Fill(vecHistSpd); } } @@ -580,7 +580,7 @@ void AliAnalysisTrackingUncertainties::ProcessTrackCutVariation() { fESDtrackCuts->SetMinNCrossedRowsTPC(0); if (fESDtrackCuts->AcceptTrack(track)) { for(Int_t iPid = 0; iPid < 6; iPid++) { - Double_t vecHistNcr[kNumberOfAxes] = {ncrTPC, pT, eta, phi, iPid}; + Double_t vecHistNcr[kNumberOfAxes] = {static_cast(ncrTPC), pT, eta, phi, static_cast(iPid)}; if (IsConsistentWithPid(iPid, track)) histNcr->Fill(vecHistNcr); } } @@ -593,7 +593,7 @@ void AliAnalysisTrackingUncertainties::ProcessTrackCutVariation() { fESDtrackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.); if (fESDtrackCuts->AcceptTrack(track)) { for(Int_t iPid = 0; iPid < 6; iPid++) { - Double_t vecHistCRoverFC[kNumberOfAxes] = {nCRoverFC, pT, eta, phi, iPid}; + Double_t vecHistCRoverFC[kNumberOfAxes] = {static_cast(nCRoverFC), pT, eta, phi, static_cast(iPid)}; if (IsConsistentWithPid(iPid, track)) histCRoverFC->Fill(vecHistCRoverFC); } } @@ -605,7 +605,7 @@ void AliAnalysisTrackingUncertainties::ProcessTrackCutVariation() { fESDtrackCuts->SetMaxChi2PerClusterITS(999.); if (fESDtrackCuts->AcceptTrack(track)) { for(Int_t iPid = 0; iPid < 6; iPid++) { - Double_t vecHistChi2ITS[kNumberOfAxes] = {chi2ITS, pT, eta, phi, iPid}; + Double_t vecHistChi2ITS[kNumberOfAxes] = {chi2ITS, pT, eta, phi, static_cast(iPid)}; if (IsConsistentWithPid(iPid, track)) histChi2Its->Fill(vecHistChi2ITS); } } @@ -617,7 +617,7 @@ void AliAnalysisTrackingUncertainties::ProcessTrackCutVariation() { fESDtrackCuts->SetMinLengthActiveVolumeTPC(0); if (fESDtrackCuts->AcceptTrack(track)) { for(Int_t iPid = 0; iPid < 6; iPid++) { - Double_t vecHistTpcLength[kNumberOfAxes] = {tpcLength, pT, eta, phi, iPid}; + Double_t vecHistTpcLength[kNumberOfAxes] = {tpcLength, pT, eta, phi, static_cast(iPid)}; if (IsConsistentWithPid(iPid, track)) histTpcLength->Fill(vecHistTpcLength); } } @@ -647,7 +647,7 @@ void AliAnalysisTrackingUncertainties::ProcessTrackCutVariation() { if (fESDtrackCuts->AcceptTrack(track)) { for(Int_t iPid = 0; iPid < 6; iPid++) { - Double_t vecHistTpcItsMatch[kNumberOfAxes] = {isMatched, pT, eta, phi, iPid}; + Double_t vecHistTpcItsMatch[kNumberOfAxes] = {static_cast(isMatched), pT, eta, phi, static_cast(iPid)}; if (IsConsistentWithPid(iPid, track)) histTpcItsMatch->Fill(vecHistTpcItsMatch); // fill with 1 here } } @@ -661,7 +661,7 @@ void AliAnalysisTrackingUncertainties::ProcessTrackCutVariation() { isMatched=kTRUE; if (fESDtrackCuts->AcceptTrack(track)) { for(Int_t iPid = 0; iPid < 6; iPid++) { - Double_t vecHistTpcItsMatch[kNumberOfAxes] = {isMatched, pT, eta, phi, iPid}; + Double_t vecHistTpcItsMatch[kNumberOfAxes] = {static_cast(isMatched), pT, eta, phi, static_cast(iPid)}; if (IsConsistentWithPid(iPid, track)) histTpcItsMatch->Fill(vecHistTpcItsMatch); // fill with 0 here } } diff --git a/PWGPP/ITS/AliAnalysisTaskITSTrackingCheck.cxx b/PWGPP/ITS/AliAnalysisTaskITSTrackingCheck.cxx index 325886e38a8..383c09daae8 100644 --- a/PWGPP/ITS/AliAnalysisTaskITSTrackingCheck.cxx +++ b/PWGPP/ITS/AliAnalysisTaskITSTrackingCheck.cxx @@ -2815,7 +2815,7 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *) // fill ntuple with track properties if(fFillNtuples && SelectPt(track->Pt())) { - Float_t fillArray[22]={track->Pt(),track->Eta(),track->Phi(),d0z0[0],d0z0[1],TMath::Sqrt(covd0z0[0]),TMath::Sqrt(covd0z0[2]),ptMC,pdgMC,pdgMoth,d0MC,d0z0MCv[0],d0z0MCv[1],sigmad0MCv,TMath::Sqrt(covd0z0MCv[2]),(Float_t)iITSflag,isPrimaryFl,isTPCSelFl}; + Float_t fillArray[22]={static_cast(track->Pt()),static_cast(track->Eta()),static_cast(track->Phi()),static_cast(d0z0[0]),static_cast(d0z0[1]),static_cast(TMath::Sqrt(covd0z0[0])),static_cast(TMath::Sqrt(covd0z0[2])),ptMC,static_cast(pdgMC),static_cast(pdgMoth),static_cast(d0MC),static_cast(d0z0MCv[0]),static_cast(d0z0MCv[1]),static_cast(sigmad0MCv),static_cast(TMath::Sqrt(covd0z0MCv[2])),static_cast(iITSflag),static_cast(isPrimaryFl),static_cast(isTPCSelFl)}; fNtupleESDTracks->Fill(fillArray); } diff --git a/PWGPP/MUON/dep/AliAnalysisTaskMuonTrackingEff.cxx b/PWGPP/MUON/dep/AliAnalysisTaskMuonTrackingEff.cxx index 808f33603f7..c1665bb3371 100644 --- a/PWGPP/MUON/dep/AliAnalysisTaskMuonTrackingEff.cxx +++ b/PWGPP/MUON/dep/AliAnalysisTaskMuonTrackingEff.cxx @@ -219,7 +219,7 @@ void AliAnalysisTaskMuonTrackingEff::UserCreateOutputObjects() // 4: y // 5: sign const Int_t nDims = 5; - Int_t nBins[nDims] = {0., nCentBins, 20, 15, 2}; + Int_t nBins[nDims] = {0, nCentBins, 20, 15, 2}; Double_t xMin[nDims] = {0., centRange[0], 0., -4., -2.}; Double_t xMax[nDims] = {0., centRange[1], 20., -2.5, 2.}; @@ -588,7 +588,7 @@ void AliAnalysisTaskMuonTrackingEff::FillTDHistos(Int_t chamber, Int_t detElt, D { /// Fill the histo for detected tracks static_cast(fDetEltTDHistList->At(FromDetElt2iDet(chamber, detElt)))->Fill(posXL, posYL, fCurrentCentrality); - Double_t x[5] = {0., fCurrentCentrality, fCurrentTrack->Pt(), fCurrentTrack->Y(), fCurrentTrack->Charge()}; + Double_t x[5] = {0., fCurrentCentrality, fCurrentTrack->Pt(), fCurrentTrack->Y(), static_cast(fCurrentTrack->Charge())}; x[0] = static_cast(FromDetElt2LocalId(chamber, detElt)); static_cast(fChamberTDHistList->At(chamber))->Fill(x); x[0] = static_cast(chamber+1); @@ -600,7 +600,7 @@ void AliAnalysisTaskMuonTrackingEff::FillTTHistos(Int_t chamber, Int_t detElt, D { /// Fill the histo for all tracks static_cast(fDetEltTTHistList->At(FromDetElt2iDet(chamber, detElt)))->Fill(posXL, posYL, fCurrentCentrality); - Double_t x[5] = {0., fCurrentCentrality, fCurrentTrack->Pt(), fCurrentTrack->Y(), fCurrentTrack->Charge()}; + Double_t x[5] = {0., fCurrentCentrality, fCurrentTrack->Pt(), fCurrentTrack->Y(), static_cast(fCurrentTrack->Charge())}; x[0] = static_cast(FromDetElt2LocalId(chamber, detElt)); static_cast(fChamberTTHistList->At(chamber))->Fill(x); x[0] = static_cast(chamber+1); @@ -612,7 +612,7 @@ void AliAnalysisTaskMuonTrackingEff::FillSDHistos(Int_t chamber, Int_t detElt, D { /// Fill the histo for single detected tracks static_cast(fDetEltSDHistList->At(FromDetElt2iDet(chamber, detElt)))->Fill(posXL, posYL, fCurrentCentrality); - Double_t x[5] = {0., fCurrentCentrality, fCurrentTrack->Pt(), fCurrentTrack->Y(), fCurrentTrack->Charge()}; + Double_t x[5] = {0., fCurrentCentrality, fCurrentTrack->Pt(), fCurrentTrack->Y(), static_cast(fCurrentTrack->Charge())}; x[0] = static_cast(FromDetElt2LocalId(chamber, detElt)); static_cast(fChamberSDHistList->At(chamber))->Fill(x); x[0] = static_cast(chamber+1); diff --git a/PWGPP/TPC/AliAnalysisNoiseTPC.cxx b/PWGPP/TPC/AliAnalysisNoiseTPC.cxx index 509a6ff203a..64d3e929bd9 100644 --- a/PWGPP/TPC/AliAnalysisNoiseTPC.cxx +++ b/PWGPP/TPC/AliAnalysisNoiseTPC.cxx @@ -245,7 +245,7 @@ void AliAnalysisNoiseTPC::UserExec(Option_t *) Bool_t hasVtx = vertex; if (trackCounter > 98) trackCounter = 98; //Double_t vecNoise[7] = {fESD->GetRunNumber(),fESD->GetEventNumberInFile(), trackCounter, isSelectedMB, isSelectedWarm, hasVtx, fESD->GetTimeStamp()}; - Double_t vecNoise[6] = {fESD->GetEventNumberInFile(), trackCounter, isSelectedMB, isSelectedWarm, hasVtx, fESD->GetTimeStamp()}; + Double_t vecNoise[6] = {static_cast(fESD->GetEventNumberInFile()), static_cast(trackCounter), static_cast(isSelectedMB), static_cast(isSelectedWarm), static_cast(hasVtx), static_cast(fESD->GetTimeStamp())}; fHistNoiseTracks->Fill(vecNoise); diff --git a/PWGPP/TPC/AliESDRecV0Info.cxx b/PWGPP/TPC/AliESDRecV0Info.cxx index 74d4fea7d7c..16e27b21a08 100644 --- a/PWGPP/TPC/AliESDRecV0Info.cxx +++ b/PWGPP/TPC/AliESDRecV0Info.cxx @@ -258,8 +258,8 @@ void AliESDRecV0Info::Update(Float_t vertex[3]) // // - Float_t v[3] = {fXr[0]-vertex[0],fXr[1]-vertex[1],fXr[2]-vertex[2]}; - Float_t p[3] = {fPdr[0]+fPm[0], fPdr[1]+fPm[1],fPdr[2]+fPm[2]}; + Float_t v[3] = {static_cast(fXr[0]-vertex[0]),static_cast(fXr[1]-vertex[1]),static_cast(fXr[2]-vertex[2])}; + Float_t p[3] = {static_cast(fPdr[0]+fPm[0]), static_cast(fPdr[1]+fPm[1]),static_cast(fPdr[2]+fPm[2])}; Float_t vnorm2 = v[0]*v[0]+v[1]*v[1]; Float_t vnorm3 = TMath::Sqrt(v[2]*v[2]+vnorm2); diff --git a/PWGPP/TPC/AliGenV0Info.cxx b/PWGPP/TPC/AliGenV0Info.cxx index 2af08f90ceb..40144194a22 100644 --- a/PWGPP/TPC/AliGenV0Info.cxx +++ b/PWGPP/TPC/AliGenV0Info.cxx @@ -212,9 +212,9 @@ void AliGenV0Info::Update(Float_t vertex[3]) // // // - Float_t v[3] = {fMCXr[0]-vertex[0],fMCXr[1]-vertex[1],fMCXr[2]-vertex[2]}; + Float_t v[3] = {static_cast(fMCXr[0]-vertex[0]),static_cast(fMCXr[1]-vertex[1]),static_cast(fMCXr[2]-vertex[2])}; //Float_t v[3] = {fMCXr[0],fMCXr[1],fMCXr[2]}; - Float_t p[3] = {fMCPdr[0]+fMCPm[0], fMCPdr[1]+fMCPm[1],fMCPdr[2]+fMCPm[2]}; + Float_t p[3] = {static_cast(fMCPdr[0]+fMCPm[0]), static_cast(fMCPdr[1]+fMCPm[1]),static_cast(fMCPdr[2]+fMCPm[2])}; Float_t vnorm2 = v[0]*v[0]+v[1]*v[1]; Float_t vnorm3 = TMath::Sqrt(v[2]*v[2]+vnorm2); vnorm2 = TMath::Sqrt(vnorm2); diff --git a/PWGPP/TPC/AliPerformanceEff.cxx b/PWGPP/TPC/AliPerformanceEff.cxx index 2ddef0e6508..efc8efa0175 100644 --- a/PWGPP/TPC/AliPerformanceEff.cxx +++ b/PWGPP/TPC/AliPerformanceEff.cxx @@ -292,7 +292,7 @@ void AliPerformanceEff::ProcessTPC(AliMCEvent* const mcEvent, AliESDEvent *const else if (particle->GetPDG()->Charge() > 0) charge = 1.; // Fill histograms - Double_t vEffHisto[9] = {mceta, mcphi, mcpt, pid, recStatus, findable, charge, nClones, nFakes}; + Double_t vEffHisto[9] = {mceta, mcphi, mcpt, static_cast(pid), static_cast(recStatus), static_cast(findable), static_cast(charge), static_cast(nClones), static_cast(nFakes)}; fEffHisto->Fill(vEffHisto); } if(labelsRec) delete [] labelsRec; labelsRec = 0; @@ -431,7 +431,7 @@ void AliPerformanceEff::ProcessTPCSec(AliMCEvent* const mcEvent, AliESDEvent *co else if (particle->GetPDG()->Charge() > 0) charge = 1.; // Fill histograms - Double_t vEffSecHisto[12] = { mceta, mcphi, mcpt, pid, recStatus, findable, mcR, mother_phi, mother_eta, charge, nClones, nFakes }; + Double_t vEffSecHisto[12] = { mceta, mcphi, mcpt, static_cast(pid), static_cast(recStatus), static_cast(findable), mcR, mother_phi, mother_eta, static_cast(charge), static_cast(nClones), static_cast(nFakes) }; fEffSecHisto->Fill(vEffSecHisto); } } @@ -555,7 +555,7 @@ void AliPerformanceEff::ProcessTPCITS(AliMCEvent* const mcEvent, AliESDEvent *co else if (particle->GetPDG()->Charge() > 0) charge = 1.; // Fill histograms - Double_t vEffHisto[9] = { mceta, mcphi, mcpt, pid, recStatus, findable, charge, nClones, nFakes}; + Double_t vEffHisto[9] = { mceta, mcphi, mcpt, static_cast(pid), static_cast(recStatus), static_cast(findable), static_cast(charge), static_cast(nClones), static_cast(nFakes)}; fEffHisto->Fill(vEffHisto); } @@ -676,7 +676,7 @@ void AliPerformanceEff::ProcessConstrained(AliMCEvent* const mcEvent, AliESDEven else if (particle->GetPDG()->Charge() > 0) charge = 1.; // Fill histograms - Double_t vEffHisto[9] = { mceta, mcphi, mcpt, pid, recStatus, findable, charge, nClones, nFakes }; + Double_t vEffHisto[9] = { mceta, mcphi, mcpt, static_cast(pid), static_cast(recStatus), static_cast(findable), static_cast(charge), static_cast(nClones), static_cast(nFakes) }; fEffHisto->Fill(vEffHisto); } diff --git a/PWGPP/TPC/AliPerformanceMatch.cxx b/PWGPP/TPC/AliPerformanceMatch.cxx index 55aa669b3e7..46408dad6f7 100644 --- a/PWGPP/TPC/AliPerformanceMatch.cxx +++ b/PWGPP/TPC/AliPerformanceMatch.cxx @@ -304,7 +304,7 @@ void AliPerformanceMatch::ProcessTPCITS(AliStack* /*const stack*/, AliESDtrack * isMatch = kTRUE; if(isTPC){ - Double_t vecTrackingEff[5] = { isMatch,esdTrack->Phi(), esdTrack->Pt(),esdTrack->Eta(),esdTrack->GetITSclusters(0) }; + Double_t vecTrackingEff[5] = { static_cast(isMatch),esdTrack->Phi(), esdTrack->Pt(),esdTrack->Eta(),static_cast(esdTrack->GetITSclusters(0)) }; fTrackingEffHisto->Fill(vecTrackingEff); } } @@ -405,11 +405,11 @@ void AliPerformanceMatch::FillHistograms(AliESDtrack *const refParam, AliESDtrac } // Fill histograms - Double_t vResolHisto[9] = {delta[0],delta[1],delta[2],delta[3],delta[4],refParam->Phi(),refParam->Eta(),refParam->Pt(),isRec}; + Double_t vResolHisto[9] = {delta[0],delta[1],delta[2],delta[3],delta[4],refParam->Phi(),refParam->Eta(),refParam->Pt(),static_cast(isRec)}; if(fabs(pull[4])<5) fResolHisto->Fill(vResolHisto); - Double_t vPullHisto[9] = {pull[0],pull[1],pull[2],pull[3],pull[4],refParam->Phi(),refParam->Eta(),refParam->OneOverPt(),isRec}; + Double_t vPullHisto[9] = {pull[0],pull[1],pull[2],pull[3],pull[4],refParam->Phi(),refParam->Eta(),refParam->OneOverPt(),static_cast(isRec)}; if(fabs(pull[4])<5) fPullHisto->Fill(vPullHisto); } diff --git a/PWGPP/TPC/AliPerformanceTPC.cxx b/PWGPP/TPC/AliPerformanceTPC.cxx index fbdabd564c4..96a7174fb53 100644 --- a/PWGPP/TPC/AliPerformanceTPC.cxx +++ b/PWGPP/TPC/AliPerformanceTPC.cxx @@ -348,7 +348,7 @@ void AliPerformanceTPC::ProcessTPC(AliStack* const stack, AliESDtrack *const esd if(!fCutsRC->GetDCAToVertex2D() && TMath::Abs(dca[1]) > fCutsRC->GetMaxDCAToVertexZ()) return; //Double_t vTPCTrackHisto[10] = {nClust,chi2PerCluster,clustPerFindClust,dca[0],dca[1],eta,phi,pt,qpt,vertStatus}; - Double_t vTPCTrackHisto[10] = {nClust,chi2PerCluster,clustPerFindClust,dca[0],dca[1],eta,phi,pt,q,vertStatus}; + Double_t vTPCTrackHisto[10] = {static_cast(nClust),static_cast(chi2PerCluster),static_cast(clustPerFindClust),static_cast(dca[0]),static_cast(dca[1]),static_cast(eta),static_cast(phi),static_cast(pt),static_cast(q),static_cast(vertStatus)}; fTPCTrackHisto->Fill(vTPCTrackHisto); // @@ -419,7 +419,7 @@ void AliPerformanceTPC::ProcessTPCITS(AliStack* const stack, AliESDtrack *const if(!fCutsRC->GetDCAToVertex2D() && TMath::Abs(dca[0]) > fCutsRC->GetMaxDCAToVertexXY()) return; if(!fCutsRC->GetDCAToVertex2D() && TMath::Abs(dca[1]) > fCutsRC->GetMaxDCAToVertexZ()) return; - Double_t vTPCTrackHisto[10] = {nClust,chi2PerCluster,clustPerFindClust,dca[0],dca[1],eta,phi,pt,q,vertStatus}; + Double_t vTPCTrackHisto[10] = {static_cast(nClust),static_cast(chi2PerCluster),static_cast(clustPerFindClust),static_cast(dca[0]),static_cast(dca[1]),static_cast(eta),static_cast(phi),static_cast(pt),static_cast(q),static_cast(vertStatus)}; fTPCTrackHisto->Fill(vTPCTrackHisto); // @@ -557,7 +557,7 @@ void AliPerformanceTPC::Exec(AliMCEvent* const mcEvent, AliESDEvent *const esdEv //Float_t pad = cluster->GetPad(); //Int_t detector = cluster->GetDetector(); //Double_t vTPCClust[6] = { irow, phi, TPCside, pad, detector, gclf[2] }; - Double_t vTPCClust[3] = { irow, phi, TPCside }; + Double_t vTPCClust[3] = { static_cast(irow), phi, static_cast(TPCside) }; fTPCClustHisto->Fill(vTPCClust); } } @@ -603,7 +603,7 @@ void AliPerformanceTPC::Exec(AliMCEvent* const mcEvent, AliESDEvent *const esdEv } } - Double_t vTPCEvent[7] = {vtxESD->GetXv(),vtxESD->GetYv(),vtxESD->GetZv(),mult,multP,multN,vtxESD->GetStatus()}; + Double_t vTPCEvent[7] = {vtxESD->GetXv(),vtxESD->GetYv(),vtxESD->GetZv(),static_cast(mult),static_cast(multP),static_cast(multN),static_cast(vtxESD->GetStatus())}; fTPCEventHisto->Fill(vTPCEvent); } diff --git a/PWGPP/TPC/AliRecInfoMaker.cxx b/PWGPP/TPC/AliRecInfoMaker.cxx index fa2043d0a57..b1edecef3b2 100644 --- a/PWGPP/TPC/AliRecInfoMaker.cxx +++ b/PWGPP/TPC/AliRecInfoMaker.cxx @@ -1080,7 +1080,7 @@ Int_t AliRecInfoMaker::BuildV0Info(Int_t eventNr) TBranch * branch = fTreeCmpV0->GetBranch("RC."); branch->SetAddress(&fRecV0Info); // set all pointers const AliESDVertex * esdvertex = fEvent->GetVertex(); - Float_t vertex[3]= {esdvertex->GetXv(), esdvertex->GetYv(),esdvertex->GetZv()}; + Float_t vertex[3]= {static_cast(esdvertex->GetXv()), static_cast(esdvertex->GetYv()),static_cast(esdvertex->GetZv())}; // while (entry < nParticlesTR) { diff --git a/PWGPP/pid/AliAnalysisTaskK0sBayes.cxx b/PWGPP/pid/AliAnalysisTaskK0sBayes.cxx index 73052d95a2b..7109c73c00f 100644 --- a/PWGPP/pid/AliAnalysisTaskK0sBayes.cxx +++ b/PWGPP/pid/AliAnalysisTaskK0sBayes.cxx @@ -923,8 +923,8 @@ void AliAnalysisTaskK0sBayes::Analyze(AliAODEvent* aodEvent) if(fPtKn > 4.299) fPtKn = 4.299; - Float_t xTOfill[] = {fPtKs,KpTrack->Eta(),fPtKp,fPtKn,probP[2],probN[2],tofMatch1,tofMatch2,isTrue,nSigmaComb,nSigmaComb2,deltaphi1,deltaphi2,fPsi}; - Float_t xTOfill2[] = {fPtKs,KpTrack->Eta(),fPtKp,fPtKn,probP[2],probN[2],tofMatch1,tofMatch2,isTrue,nSigmaComb,nSigmaComb2,deltaphi1,deltaphi2,fPsi}; + Float_t xTOfill[] = {static_cast(fPtKs),static_cast(KpTrack->Eta()),static_cast(fPtKp),static_cast(fPtKn),static_cast(probP[2]),static_cast(probN[2]),static_cast(tofMatch1),static_cast(tofMatch2),static_cast(isTrue),static_cast(nSigmaComb),static_cast(nSigmaComb2),static_cast(deltaphi1),static_cast(deltaphi2),static_cast(fPsi)}; + Float_t xTOfill2[] = {static_cast(fPtKs),static_cast(KpTrack->Eta()),static_cast(fPtKp),static_cast(fPtKn),static_cast(probP[2]),static_cast(probN[2]),static_cast(tofMatch1),static_cast(tofMatch2),static_cast(isTrue),static_cast(nSigmaComb),static_cast(nSigmaComb2),static_cast(deltaphi1),static_cast(deltaphi2),static_cast(fPsi)}; Int_t ipt = 0; while(fPtKsMin[ipt] < fPtKs && ipt < nPtBin){ @@ -948,8 +948,8 @@ void AliAnalysisTaskK0sBayes::Analyze(AliAODEvent* aodEvent) fContPid2->Fill(0,fMassV0,fCentrality,xTOfill2); if(fPIDuserCut){ - Float_t xUser[] = {KpTrack->Eta(),fPtKp,isTrue,0,deltaphi1,fPsi}; - Float_t xUser2[] = {KnTrack->Eta(),fPtKn,isTrue,0,deltaphi2,fPsi}; + Float_t xUser[] = {static_cast(KpTrack->Eta()),static_cast(fPtKp),static_cast(isTrue),0,static_cast(deltaphi1),static_cast(fPsi)}; + Float_t xUser2[] = {static_cast(KnTrack->Eta()),static_cast(fPtKn),static_cast(isTrue),0,static_cast(deltaphi2),static_cast(fPsi)}; if(fPIDuserCut->IsSelected(KpTrack,AliPID::kPion)){ // to be filled for positive xUser[3] = 1; diff --git a/PWGPP/pid/AliAnalysisTaskLambdaBayes.cxx b/PWGPP/pid/AliAnalysisTaskLambdaBayes.cxx index d83390a7b9b..fb5a7ce6333 100644 --- a/PWGPP/pid/AliAnalysisTaskLambdaBayes.cxx +++ b/PWGPP/pid/AliAnalysisTaskLambdaBayes.cxx @@ -911,8 +911,8 @@ void AliAnalysisTaskLambdaBayes::Analyze(AliAODEvent* aodEvent) if(fPtKn > 4.299) fPtKn = 4.299; - Float_t xTOfill[] = {fPtLambdaC,KpTrack->Eta(),fPtKp,fPtKn,(fPidKp%128)*0.01,(fPidKn%128)*0.01,tofMatch1,tofMatch2,isTrue,nSigmaComb,nSigmaComb2,deltaphi1,deltaphi2,fPsi}; - Float_t xTOfill2[] = {fPtLambdaC,KpTrack->Eta(),fPtKn,fPtKp,(fPidKn%128)*0.01,(fPidKp%128)*0.01,tofMatch2,tofMatch1,isTrue,nSigmaComb2,nSigmaComb,deltaphi2,deltaphi1,fPsi}; + Float_t xTOfill[] = {static_cast(fPtLambdaC),static_cast(KpTrack->Eta()),static_cast(fPtKp),static_cast(fPtKn,(fPidKp%128)*0.01),static_cast((fPidKn%128)*0.01),static_cast(tofMatch1),static_cast(tofMatch2),static_cast(isTrue),static_cast(nSigmaComb),static_cast(nSigmaComb2),static_cast(deltaphi1),static_cast(deltaphi2),static_cast(fPsi)}; + Float_t xTOfill2[] = {static_cast(fPtLambdaC),static_cast(KpTrack->Eta()),static_cast(fPtKn),static_cast(fPtKp),static_cast((fPidKn%128)*0.01),static_cast((fPidKp%128)*0.01),static_cast(tofMatch2),static_cast(tofMatch1),static_cast(isTrue),static_cast(nSigmaComb2),static_cast(nSigmaComb),static_cast(deltaphi2),static_cast(deltaphi1),static_cast(fPsi)}; Int_t ipt = 0; @@ -938,7 +938,7 @@ void AliAnalysisTaskLambdaBayes::Analyze(AliAODEvent* aodEvent) if(fPIDuserCut){ - Float_t xUser[] = {KpTrack->Eta(),fPtKp,isTrue,0,deltaphi1,fPsi}; + Float_t xUser[] = {static_cast(KpTrack->Eta()),static_cast(fPtKp),static_cast(isTrue),0,static_cast(deltaphi1),static_cast(fPsi)}; if(fPIDuserCut->IsSelected(KpTrack,AliPID::kPion)){ // to be filled xUser[3] = 1; diff --git a/PWGPP/pid/AliAnalysisTaskPhiBayes.cxx b/PWGPP/pid/AliAnalysisTaskPhiBayes.cxx index b3b3b428141..8b355a2fb77 100644 --- a/PWGPP/pid/AliAnalysisTaskPhiBayes.cxx +++ b/PWGPP/pid/AliAnalysisTaskPhiBayes.cxx @@ -897,8 +897,8 @@ void AliAnalysisTaskPhiBayes::Analyze(AliAODEvent* aodEvent) if(fPtKn > 4.299) fPtKn = 4.299; - Float_t xTOfill[] = {fPtPhi,KpTrack->Eta(),fPtKp,fPtKn,(fPidKp%128)*0.01,(fPidKn%128)*0.01,tofMatch1,tofMatch2,isTrue,nSigmaComb,nSigmaComb2,deltaphi1,deltaphi2,fPsi}; - Float_t xTOfill2[] = {fPtPhi,KpTrack->Eta(),fPtKp,fPtKn,(fPidKp%128)*0.01,(fPidKn%128)*0.01,tofMatch1,tofMatch2,isTrue,nSigmaComb,nSigmaComb2,deltaphi1,deltaphi2,fPsi}; + Float_t xTOfill[] = {static_cast(fPtPhi),static_cast(KpTrack->Eta()),static_cast(fPtKp),static_cast(fPtKn),static_cast((fPidKp%128)*0.01),static_cast((fPidKn%128)*0.01),static_cast(tofMatch1),static_cast(tofMatch2),static_cast(isTrue),static_cast(nSigmaComb),static_cast(nSigmaComb2),static_cast(deltaphi1),static_cast(deltaphi2),static_cast(fPsi)}; + Float_t xTOfill2[] = {static_cast(fPtPhi),static_cast(KpTrack->Eta()),static_cast(fPtKp),static_cast(fPtKn),static_cast((fPidKp%128)*0.01),static_cast((fPidKn%128)*0.01),static_cast(tofMatch1),static_cast(tofMatch2),static_cast(isTrue),static_cast(nSigmaComb),static_cast(nSigmaComb2),static_cast(deltaphi1),static_cast(deltaphi2),static_cast(fPsi)}; Int_t ipt = 0; while(fPtPhiMin[ipt] < fPtPhi && ipt < nPtBin){ @@ -922,8 +922,8 @@ void AliAnalysisTaskPhiBayes::Analyze(AliAODEvent* aodEvent) if((fPidKp%128) > 80) fContPid2->Fill(0,fMassV0,fCentrality,xTOfill2);// use tagging on positive track if(fPIDuserCut){ - Float_t xUser[] = {KpTrack->Eta(),fPtKp,isTrue,0,deltaphi1,fPsi}; - Float_t xUser2[] = {KnTrack->Eta(),fPtKn,isTrue,0,deltaphi2,fPsi}; + Float_t xUser[] = {static_cast(KpTrack->Eta()),static_cast(fPtKp),static_cast(isTrue),0,static_cast(deltaphi1),static_cast(fPsi)}; + Float_t xUser2[] = {static_cast(KnTrack->Eta()),static_cast(fPtKn),static_cast(isTrue),0,static_cast(deltaphi2),static_cast(fPsi)}; if(fPIDuserCut->IsSelected(KpTrack,AliPID::kPion)){ // to be filled for positive xUser[3] = 1; diff --git a/PWGUD/DIFFRACTIVE/xsAndTwoProng/AliAnalysisTaskCDMeson.cxx b/PWGUD/DIFFRACTIVE/xsAndTwoProng/AliAnalysisTaskCDMeson.cxx index 26017ca237c..a8e0ffb5f8d 100644 --- a/PWGUD/DIFFRACTIVE/xsAndTwoProng/AliAnalysisTaskCDMeson.cxx +++ b/PWGUD/DIFFRACTIVE/xsAndTwoProng/AliAnalysisTaskCDMeson.cxx @@ -511,7 +511,7 @@ void AliAnalysisTaskCDMeson::UserCreateOutputObjects() const Int_t nrun = (Int_t)(run1-run0); - const Int_t bins[2] = {nrun, (Double_t)AliCDMesonBase::kBitGapMax - 1.}; + const Int_t bins[2] = {nrun, static_cast(AliCDMesonBase::kBitGapMax - 1.)}; const Double_t xmin[2] = {(Double_t)run0, 1.}; const Double_t xmax[2] = { (Double_t)run1, (Double_t)AliCDMesonBase::kBitGapMax diff --git a/PWGUD/DIFFRACTIVE/xsAndTwoProng/AliCDMesonBase.cxx b/PWGUD/DIFFRACTIVE/xsAndTwoProng/AliCDMesonBase.cxx index 87722cb8549..80041511faf 100644 --- a/PWGUD/DIFFRACTIVE/xsAndTwoProng/AliCDMesonBase.cxx +++ b/PWGUD/DIFFRACTIVE/xsAndTwoProng/AliCDMesonBase.cxx @@ -456,9 +456,9 @@ void AliCDMesonBase::FillThnEmptyEvents(THnSparseD * thn, Int_t eventType, // Double_t var[]={ - eventType, multFMDA, multFMDC, multSPDIA, multSPDIC, multSPDOA, - multSPDOC, multSPDtrkltA, multSPDtrkltC, fmdSum1I, fmdSum2I, fmdSum2O, - fmdSum3I, fmdSum3O//, multTPC, multTPCdiffVertex + static_cast(eventType), static_cast(multFMDA), static_cast(multFMDC), static_cast(multSPDIA), static_cast(multSPDIC), static_cast(multSPDOA), + static_cast(multSPDOC), static_cast(multSPDtrkltA), static_cast(multSPDtrkltC), static_cast(fmdSum1I), static_cast(fmdSum2I), static_cast(fmdSum2O), + static_cast(fmdSum3I), static_cast(fmdSum3O)//, multTPC, multTPCdiffVertex }; const Int_t nv = sizeof(var)/sizeof(Double_t); if(nv!=thn->GetNdimensions()){ diff --git a/STEER/STEER/AliLego.cxx b/STEER/STEER/AliLego.cxx index 9e1c6265a32..eeb6e280b43 100644 --- a/STEER/STEER/AliLego.cxx +++ b/STEER/STEER/AliLego.cxx @@ -287,17 +287,17 @@ void AliLego::StepManager() TString tmp1, tmp2; copy = 1; - id = gMC->CurrentVolID(copy); - vol = gMC->VolName(id); - Float_t step = gMC->TrackStep(); + id = TVirtualMC::GetMC()->CurrentVolID(copy); + vol = TVirtualMC::GetMC()->VolName(id); + Float_t step = TVirtualMC::GetMC()->TrackStep(); TLorentzVector pos, mom; - gMC->TrackPosition(pos); - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackPosition(pos); + TVirtualMC::GetMC()->TrackMomentum(mom); Int_t status = 0; - if (gMC->IsTrackEntering()) status = 1; - if (gMC->IsTrackExiting()) status = 2; + if (TVirtualMC::GetMC()->IsTrackEntering()) status = 1; + if (TVirtualMC::GetMC()->IsTrackExiting()) status = 2; if (! fStepBack) { // printf("\n volume %s %d", vol, status); @@ -314,7 +314,7 @@ void AliLego::StepManager() TClonesArray &lvols = *fVolumesFwd; if (fStepsForward > 0) { AliDebugVolume* tmp = dynamic_cast((*fVolumesFwd)[fStepsForward-1]); - if (tmp && tmp->IsVEqual(vol, copy) && gMC->IsTrackEntering()) { + if (tmp && tmp->IsVEqual(vol, copy) && TVirtualMC::GetMC()->IsTrackEntering()) { fStepsForward -= 2; fVolumesFwd->RemoveAt(fStepsForward); fVolumesFwd->RemoveAt(fStepsForward+1); @@ -328,7 +328,7 @@ void AliLego::StepManager() // // Get current material properties - gMC->CurrentMaterial(a,z,dens,radl,absl); + TVirtualMC::GetMC()->CurrentMaterial(a,z,dens,radl,absl); if (z < 1) return; @@ -336,7 +336,7 @@ void AliLego::StepManager() // --- See if we have to stop now if (TMath::Abs(pos[2]) > TMath::Abs(fGener->ZMax()) || pos[0]*pos[0] +pos[1]*pos[1] > fGener->RadMax()*fGener->RadMax()) { - if (!gMC->IsNewTrack()) { + if (!TVirtualMC::GetMC()->IsNewTrack()) { // Not the first step, add past contribution if (!fStopped) { if (absl) fTotAbso += t/absl; @@ -346,7 +346,7 @@ void AliLego::StepManager() // printf("We will stop now %5d %13.3f !\n", fStopped, t); // printf("%13.3f %13.3f %13.3f %13.3f %13.3f %13.3f %13.3f %s %13.3f\n", -// pos[2], TMath::Sqrt(pos[0] * pos[0] + pos[1] * pos[1]), step, a, z, radl, absl, gMC->CurrentVolName(), fTotRadl); +// pos[2], TMath::Sqrt(pos[0] * pos[0] + pos[1] * pos[1]), step, a, z, radl, absl, TVirtualMC::GetMC()->CurrentVolName(), fTotRadl); if (fDebug) { // // generate "mirror" particle flying back @@ -371,7 +371,7 @@ void AliLego::StepManager() if (fDebug) fStepBack = 1; fStopped = kTRUE; - gMC->StopTrack(); + TVirtualMC::GetMC()->StopTrack(); return; } // outside scoring region ? @@ -389,7 +389,7 @@ void AliLego::StepManager() if (radl) fTotRadl += step/radl; fTotGcm2 += step*dens; // printf("%13.3f %13.3f %13.3f %13.3f %13.3f %13.3f %13.3f %s %13.3f\n", -// pos[2], TMath::Sqrt(pos[0] * pos[0] + pos[1] * pos[1]), step, a, z, radl, absl, gMC->CurrentVolName(), fTotRadl); +// pos[2], TMath::Sqrt(pos[0] * pos[0] + pos[1] * pos[1]), step, a, z, radl, absl, TVirtualMC::GetMC()->CurrentVolName(), fTotRadl); } } else { @@ -401,7 +401,7 @@ void AliLego::StepManager() TClonesArray &lvols = *fVolumesBwd; if (fStepsBackward < fStepsForward) { AliDebugVolume* tmp = dynamic_cast((*fVolumesBwd)[fStepsBackward]); - if (tmp && tmp->IsVEqual(vol, copy) && gMC->IsTrackEntering()) { + if (tmp && tmp->IsVEqual(vol, copy) && TVirtualMC::GetMC()->IsTrackEntering()) { fStepsBackward += 2; fVolumesBwd->RemoveAt(fStepsBackward-1); fVolumesBwd->RemoveAt(fStepsBackward-2); @@ -411,7 +411,7 @@ void AliLego::StepManager() fStepsBackward--; // printf("\n steps %d %s %d", fStepsBackward, vol, fErrorCondition); if (fStepsBackward < 0) { - gMC->StopTrack(); + TVirtualMC::GetMC()->StopTrack(); fStepBack = 0; return; } diff --git a/STEER/STEER/AliMC.cxx b/STEER/STEER/AliMC.cxx index 6dc0a8e9c8d..335cf13c459 100644 --- a/STEER/STEER/AliMC.cxx +++ b/STEER/STEER/AliMC.cxx @@ -164,7 +164,7 @@ void AliMC::ConstructGeometry() return; } } - gMC->SetRootGeometry(); + TVirtualMC::GetMC()->SetRootGeometry(); }else{ // Create modules, materials, geometry if (!gGeoManager) new TGeoManager("ALICE", "ALICE geometry"); @@ -235,43 +235,43 @@ void AliMC::AddParticles() cout << "########## AliMC::AddParticles" << endl; //Hypertriton - gMC->DefineParticle(1010010030, "HyperTriton", kPTHadron, 2.99131 , 1.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 3, kFALSE); + TVirtualMC::GetMC()->DefineParticle(1010010030, "HyperTriton", kPTHadron, 2.99131 , 1.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 3, kFALSE); //Anti-Hypertriton - gMC->DefineParticle(-1010010030, "AntiHyperTriton", kPTHadron, 2.99131 , 1.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 3, kFALSE); + TVirtualMC::GetMC()->DefineParticle(-1010010030, "AntiHyperTriton", kPTHadron, 2.99131 , 1.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 3, kFALSE); //Hyper hydrogen 4 - gMC->DefineParticle(1010010040, "Hyperhydrog4", kPTHadron, 3.931 , 1.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE); + TVirtualMC::GetMC()->DefineParticle(1010010040, "Hyperhydrog4", kPTHadron, 3.931 , 1.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE); //Anti-Hyper hydrogen 4 - gMC->DefineParticle(-1010010040, "AntiHyperhydrog4", kPTHadron, 3.931 , 1.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE); + TVirtualMC::GetMC()->DefineParticle(-1010010040, "AntiHyperhydrog4", kPTHadron, 3.931 , 1.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE); //Hyper helium 4 - gMC->DefineParticle(1010020040, "Hyperhelium4", kPTHadron, 3.929 , 2.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE); + TVirtualMC::GetMC()->DefineParticle(1010020040, "Hyperhelium4", kPTHadron, 3.929 , 2.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE); //Anti-Hyper helium 4 - gMC->DefineParticle(-1010020040, "AntiHyperhelium4", kPTHadron, 3.929 , 2.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE); + TVirtualMC::GetMC()->DefineParticle(-1010020040, "AntiHyperhelium4", kPTHadron, 3.929 , 2.0, 2.632e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE); //Lambda-Neutron - gMC->DefineParticle(1010000020, "LambdaNeutron", kPTNeutron, 2.054 , 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); + TVirtualMC::GetMC()->DefineParticle(1010000020, "LambdaNeutron", kPTNeutron, 2.054 , 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); //Anti-Lambda-Neutron - gMC->DefineParticle(-1010000020, "AntiLambdaNeutron", kPTNeutron, 2.054 , 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); + TVirtualMC::GetMC()->DefineParticle(-1010000020, "AntiLambdaNeutron", kPTNeutron, 2.054 , 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); //H-Dibaryon - gMC->DefineParticle(1020000020, "Hdibaryon", kPTNeutron, 2.21, 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); + TVirtualMC::GetMC()->DefineParticle(1020000020, "Hdibaryon", kPTNeutron, 2.21, 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); //Anti-H-Dibaryon - gMC->DefineParticle(-1020000020, "AntiHdibaryon", kPTNeutron, 2.21 , 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); + TVirtualMC::GetMC()->DefineParticle(-1020000020, "AntiHdibaryon", kPTNeutron, 2.21 , 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); //Xi-Proton - gMC->DefineParticle(1030000020, "Xi0Proton", kPTHadron, 2.248 , 1.0, 1.333e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); + TVirtualMC::GetMC()->DefineParticle(1030000020, "Xi0Proton", kPTHadron, 2.248 , 1.0, 1.333e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); //Anti-Xi-Proton - gMC->DefineParticle(-1030000020, "AntiXi0Proton", kPTHadron, 2.248 , 1.0, 1.333e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); + TVirtualMC::GetMC()->DefineParticle(-1030000020, "AntiXi0Proton", kPTHadron, 2.248 , 1.0, 1.333e-10,"Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); //Lambda-Neutron-Neutron - gMC->DefineParticle(1010000030, "LambdaNeutronNeutron", kPTNeutron, 2.982 , 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); + TVirtualMC::GetMC()->DefineParticle(1010000030, "LambdaNeutronNeutron", kPTNeutron, 2.982 , 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); //Anti-Lambda-Neutron-Neutron - gMC->DefineParticle(-1010000030, "AntiLambdaNeutronNeutron", kPTNeutron, 2.982 , 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); + TVirtualMC::GetMC()->DefineParticle(-1010000030, "AntiLambdaNeutronNeutron", kPTNeutron, 2.982 , 0.0, 2.632e-10,"Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE); // Define the 2- and 3-body phase space decay for the Hyper-Triton @@ -293,7 +293,7 @@ void AliMC::AddParticles() mode[1][1] = 2212; // proton mode[1][2] = -211; // negative pion - gMC->SetDecayMode(1010010030,bratio,mode); + TVirtualMC::GetMC()->SetDecayMode(1010010030,bratio,mode); @@ -315,7 +315,7 @@ void AliMC::AddParticles() amode[1][1] = -2212; // anti-proton amode[1][2] = 211; // positive pion - gMC->SetDecayMode(-1010010030,abratio,amode); + TVirtualMC::GetMC()->SetDecayMode(-1010010030,abratio,amode); ////// ----------Hypernuclei with Mass=4 ----------- ////////// @@ -339,7 +339,7 @@ void AliMC::AddParticles() mode3[1][1] = 2212; // proton mode3[1][2] = -211; // negative pion - gMC->SetDecayMode(1010010040,bratio3,mode3); + TVirtualMC::GetMC()->SetDecayMode(1010010040,bratio3,mode3); // Define the 2- and 3-body phase space decay for the Hyper Hydrogen 4 @@ -360,7 +360,7 @@ void AliMC::AddParticles() amode3[1][1] = -2212; // anti-proton amode3[1][2] = 211; // positive pion - gMC->SetDecayMode(-1010010040,abratio3,amode3); + TVirtualMC::GetMC()->SetDecayMode(-1010010040,abratio3,amode3); // Define the 3-body phase space decay for the Hyper Helium 4 @@ -378,7 +378,7 @@ void AliMC::AddParticles() mode4[0][1] = -211; // negative pion mode4[0][2] = 2212; // proton - gMC->SetDecayMode(1010020040,bratio4,mode4); + TVirtualMC::GetMC()->SetDecayMode(1010020040,bratio4,mode4); // Define the 2-body phase space decay for the Anti-Hyper Helium 4 @@ -396,7 +396,7 @@ void AliMC::AddParticles() amode4[0][1] = 211; // positive pion amode4[0][2] = -2212; // anti proton - gMC->SetDecayMode(-1010020040,abratio4,amode4); + TVirtualMC::GetMC()->SetDecayMode(-1010020040,abratio4,amode4); // Define the 2-body phase space decay for the Lambda-neutron boundstate @@ -413,7 +413,7 @@ void AliMC::AddParticles() mode1[0][0] = 1000010020; // deuteron mode1[0][1] = -211; // negative pion - gMC->SetDecayMode(1010000020,bratio1,mode1); + TVirtualMC::GetMC()->SetDecayMode(1010000020,bratio1,mode1); // Define the 2-body phase space decay for the Anti-Lambda-neutron boundstate @@ -430,7 +430,7 @@ void AliMC::AddParticles() amode1[0][0] = -1000010020; // anti-deuteron amode1[0][1] = 211; // positive pion - gMC->SetDecayMode(-1010000020,abratio1,amode1); + TVirtualMC::GetMC()->SetDecayMode(-1010000020,abratio1,amode1); // Define the 2-body phase space decay for the H-Dibaryon Int_t mode2[6][3]; @@ -447,7 +447,7 @@ void AliMC::AddParticles() mode2[0][1] = 2212; // proton mode2[0][2] = -211; // negative pion - gMC->SetDecayMode(1020000020,bratio2,mode2); + TVirtualMC::GetMC()->SetDecayMode(1020000020,bratio2,mode2); // Define the 2-body phase space decay for the Anti-H-Dibaryon Int_t amode2[6][3]; @@ -464,7 +464,7 @@ void AliMC::AddParticles() amode2[0][1] = -2212; // anti-proton amode2[0][2] = 211; // positive pion - gMC->SetDecayMode(-1020000020,abratio2,amode2); + TVirtualMC::GetMC()->SetDecayMode(-1020000020,abratio2,amode2); // Define the 2-body phase space decay for the Xi0P Int_t mode5[6][3]; @@ -480,7 +480,7 @@ void AliMC::AddParticles() mode5[0][0] = 3122; // Lambda mode5[0][1] = 2212; // proton - gMC->SetDecayMode(1030000020,bratio5,mode5); + TVirtualMC::GetMC()->SetDecayMode(1030000020,bratio5,mode5); // Define the 2-body phase space decay for the Anti-Xi0P Int_t amode5[6][3]; @@ -496,7 +496,7 @@ void AliMC::AddParticles() amode5[0][0] = -3122; // anti-Lambda amode5[0][1] = -2212; // anti-proton - gMC->SetDecayMode(-1030000020,abratio5,amode5); + TVirtualMC::GetMC()->SetDecayMode(-1030000020,abratio5,amode5); // Define the 2-body phase space decay for the Lambda-Neutron-Neutron Int_t mode6[6][3]; @@ -512,7 +512,7 @@ void AliMC::AddParticles() mode6[0][0] = 1000010030; // triton mode6[0][1] = -211; // pion - gMC->SetDecayMode(1010000030,bratio6,mode6); + TVirtualMC::GetMC()->SetDecayMode(1010000030,bratio6,mode6); // Define the 2-body phase space decay for the Anti-Lambda-Neutron-Neutron Int_t amode6[6][3]; @@ -528,7 +528,7 @@ void AliMC::AddParticles() amode6[0][0] = -1000010030; // anti-triton amode6[0][1] = 211; // pion - gMC->SetDecayMode(-1010000030,abratio6,amode6); + TVirtualMC::GetMC()->SetDecayMode(-1010000030,abratio6,amode6); // end of the example // -------------------------------------------------------------------- @@ -678,15 +678,15 @@ void AliMC::Stepping() // //verbose.Stepping(); - Int_t id = DetFromMate(gMC->CurrentMedium()); + Int_t id = DetFromMate(TVirtualMC::GetMC()->CurrentMedium()); if (id < 0) return; - if ( gMC->IsNewTrack() && - gMC->TrackTime() == 0. && + if ( TVirtualMC::GetMC()->IsNewTrack() && + TVirtualMC::GetMC()->TrackTime() == 0. && fRDecayMin >= 0. && fRDecayMax > fRDecayMin && - gMC->TrackPid() == fDecayPdg ) + TVirtualMC::GetMC()->TrackPid() == fDecayPdg ) { FixParticleDecaytime(); } @@ -694,19 +694,19 @@ void AliMC::Stepping() // --- If monitoring timing was requested, monitor the step if (fUseMonitoring) { if (!fMonitor) { - fMonitor = new AliTransportMonitor(gMC->NofVolumes()+1); + fMonitor = new AliTransportMonitor(TVirtualMC::GetMC()->NofVolumes()+1); fMonitor->Start(); } - if (gMC->IsNewTrack() || gMC->TrackTime() == 0. || gMC->TrackStep()<1.1E-10) { + if (TVirtualMC::GetMC()->IsNewTrack() || TVirtualMC::GetMC()->TrackTime() == 0. || TVirtualMC::GetMC()->TrackStep()<1.1E-10) { fMonitor->DummyStep(); } else { // Normal stepping Int_t copy; - Int_t volId = gMC->CurrentVolID(copy); - Int_t pdg = gMC->TrackPid(); + Int_t volId = TVirtualMC::GetMC()->CurrentVolID(copy); + Int_t pdg = TVirtualMC::GetMC()->TrackPid(); TLorentzVector xyz, pxpypz; - gMC->TrackPosition(xyz); - gMC->TrackMomentum(pxpypz); + TVirtualMC::GetMC()->TrackPosition(xyz); + TVirtualMC::GetMC()->TrackMomentum(pxpypz); fMonitor->StepInfo(volId, pdg, pxpypz.E(), xyz.X(), xyz.Y(), xyz.Z()); } } @@ -717,12 +717,12 @@ void AliMC::Stepping() else { Int_t copy; //Update energy deposition tables - AddEnergyDeposit(gMC->CurrentVolID(copy),gMC->Edep()); + AddEnergyDeposit(TVirtualMC::GetMC()->CurrentVolID(copy),TVirtualMC::GetMC()->Edep()); // // write tracke reference for track which is dissapearing - MI - if (gMC->IsTrackDisappeared() && !(gMC->IsTrackAlive())) { - if (gMC->Etot() > 0.05) AddTrackReference(GetCurrentTrackNumber(), + if (TVirtualMC::GetMC()->IsTrackDisappeared() && !(TVirtualMC::GetMC()->IsTrackAlive())) { + if (TVirtualMC::GetMC()->Etot() > 0.05) AddTrackReference(GetCurrentTrackNumber(), AliTrackReference::kDisappeared); @@ -775,7 +775,7 @@ void AliMC::EnergySummary() for(i=0;i<(3VolName(id),fSummEnergy[j],fSum2Energy[j]); + printf(" %s %10.3f +- %10.3f%%;",TVirtualMC::GetMC()->VolName(id),fSummEnergy[j],fSum2Energy[j]); } printf("\n"); } @@ -788,7 +788,7 @@ void AliMC::EnergySummary() for(i=0;i<(5VolName(id),100*fSummEnergy[j]/edtot); + printf(" %s %10.3f%%;",TVirtualMC::GetMC()->VolName(id),100*fSummEnergy[j]/edtot); } printf("\n"); } @@ -867,8 +867,8 @@ void AliMC::BeginEvent() runloader->MakeTree("K"); } - AliDebug(1, "gMC->SetStack(fRunLoader->Stack())"); - gMC->SetStack(runloader->Stack());//Was in InitMC - but was moved here + AliDebug(1, "TVirtualMC::GetMC()->SetStack(fRunLoader->Stack())"); + TVirtualMC::GetMC()->SetStack(runloader->Stack());//Was in InitMC - but was moved here //because we don't have guarantee that //stack pointer is not going to change from event to event //since it bellobgs to header and is obtained via RunLoader @@ -970,7 +970,7 @@ void AliMC::FinishPrimary() // const Int_t times=10; // This primary is finished, purify stack #if ROOT_VERSION_CODE > 262152 - if (!(gMC->SecondariesAreOrdered())) { + if (!(TVirtualMC::GetMC()->SecondariesAreOrdered())) { if (runloader->Stack()->ReorderKine()) RemapHits(); } #endif @@ -1105,7 +1105,7 @@ void AliMC::Init() //=================Create Materials and geometry - gMC->Init(); + TVirtualMC::GetMC()->Init(); // Set alignable volumes for the whole geometry (with old root) #if ROOT_VERSION_CODE < 331527 SetAllAlignableVolumes(); @@ -1116,15 +1116,15 @@ void AliMC::Init() MediaTable(); //Compute cross-sections - gMC->BuildPhysics(); + TVirtualMC::GetMC()->BuildPhysics(); //Initialise geometry deposition table - fEventEnergy.Set(gMC->NofVolumes()+1); - fSummEnergy.Set(gMC->NofVolumes()+1); - fSum2Energy.Set(gMC->NofVolumes()+1); + fEventEnergy.Set(TVirtualMC::GetMC()->NofVolumes()+1); + fSummEnergy.Set(TVirtualMC::GetMC()->NofVolumes()+1); + fSum2Energy.Set(TVirtualMC::GetMC()->NofVolumes()+1); // Register MC in configuration - AliConfig::Instance()->Add(gMC); + AliConfig::Instance()->Add(TVirtualMC::GetMC()); } //_______________________________________________________________________ @@ -1266,7 +1266,7 @@ void AliMC::ReadTransPar() if(cut[kz]>=0) { AliDebug(2, Form("%-6s set to %10.3E for tracking medium code %4d for %s", kpars[kz],cut[kz],itmed,mod->GetName())); - gMC->Gstpar(ktmed,kpars[kz],cut[kz]); + TVirtualMC::GetMC()->Gstpar(ktmed,kpars[kz],cut[kz]); } } // Set transport mechanisms @@ -1274,7 +1274,7 @@ void AliMC::ReadTransPar() if(flag[kz]>=0) { AliDebug(2, Form("%-6s set to %10d for tracking medium code %4d for %s", kpars[kncuts+kz],flag[kz],itmed,mod->GetName())); - gMC->Gstpar(ktmed,kpars[kncuts+kz],Float_t(flag[kz])); + TVirtualMC::GetMC()->Gstpar(ktmed,kpars[kncuts+kz],Float_t(flag[kz])); } } } else { @@ -1526,7 +1526,7 @@ void AliMC::FixParticleDecaytime() // TLorentzVector p; - gMC->TrackMomentum(p); + TVirtualMC::GetMC()->TrackMomentum(p); Double_t tmin, tmax; Double_t b; @@ -1565,7 +1565,7 @@ void AliMC::FixParticleDecaytime() // // Force decay time in transport code // - gMC->ForceDecayTime(t / 2.99792458e10); + TVirtualMC::GetMC()->ForceDecayTime(t / 2.99792458e10); } void AliMC::MakeTmpTrackRefsTree() diff --git a/STEER/STEER/AliModule.cxx b/STEER/STEER/AliModule.cxx index 66b19189e73..88c5e610573 100644 --- a/STEER/STEER/AliModule.cxx +++ b/STEER/STEER/AliModule.cxx @@ -172,7 +172,7 @@ void AliModule::AliMaterial(Int_t imat, const char* name, Float_t a, }else{ if (fgDensityFactor != 1.0) AliWarning(Form("Material density multiplied by %.2f!", fgDensityFactor)); - gMC->Material(kmat, uniquename.Data(), a, z, dens * fgDensityFactor, radl, absl, buf, nwbuf); + TVirtualMC::GetMC()->Material(kmat, uniquename.Data(), a, z, dens * fgDensityFactor, radl, absl, buf, nwbuf); (*fIdmate)[imat]=kmat; } } @@ -200,7 +200,7 @@ void AliModule::AliGetMaterial(Int_t imat, char* name, Float_t &a, TString sname; TArrayD par; Double_t da, dz, ddens, dradl, dabsl; - gMC->GetMaterial(kmat, sname, da, dz, ddens, dradl, dabsl, par); + TVirtualMC::GetMC()->GetMaterial(kmat, sname, da, dz, ddens, dradl, dabsl, par); const char* chname = sname.Data(); strncpy(name, chname, strlen(chname)+1); @@ -248,7 +248,7 @@ void AliModule::AliMixture(Int_t imat, const char *name, Float_t *a, }else{ if (fgDensityFactor != 1.0) AliWarning(Form("Material density multiplied by %.2f!", fgDensityFactor)); - gMC->Mixture(kmat, uniquename.Data(), a, z, dens * fgDensityFactor, nlmat, wmat); + TVirtualMC::GetMC()->Mixture(kmat, uniquename.Data(), a, z, dens * fgDensityFactor, nlmat, wmat); (*fIdmate)[imat]=kmat; } } @@ -292,7 +292,7 @@ void AliModule::AliMedium(Int_t numed, const char *name, Int_t nmat, kmed = med->GetId(); (*fIdtmed)[numed]=kmed; }else{ - gMC->Medium(kmed, uniquename.Data(), (*fIdmate)[nmat], isvol, ifield, + TVirtualMC::GetMC()->Medium(kmed, uniquename.Data(), (*fIdmate)[nmat], isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin, ubuf, nbuf); (*fIdtmed)[numed]=kmed; } @@ -314,7 +314,7 @@ void AliModule::AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1, // theta3 polar angle for axis III // phi3 azimuthal angle for axis III // - gMC->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3); + TVirtualMC::GetMC()->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3); } //_______________________________________________________________________ diff --git a/STEER/STEER/AliRun.cxx b/STEER/STEER/AliRun.cxx index 93a38501082..d2a73b210a7 100644 --- a/STEER/STEER/AliRun.cxx +++ b/STEER/STEER/AliRun.cxx @@ -136,7 +136,7 @@ AliRun::~AliRun() } delete fMCApp; - delete gMC; gMC=0; + delete TVirtualMC::GetMC(); //gMC=0; if (fModules) { fModules->Delete(); delete fModules; diff --git a/STEER/STEER/AliSimulation.cxx b/STEER/STEER/AliSimulation.cxx index a85aa4d80fe..b339de0321c 100644 --- a/STEER/STEER/AliSimulation.cxx +++ b/STEER/STEER/AliSimulation.cxx @@ -888,7 +888,7 @@ Bool_t AliSimulation::RunLego(const char *setup, Int_t nc1, Float_t c1min, AliPDG::AddParticlesToPdgDataBase(); - gMC->SetMagField(TGeoGlobalMagField::Instance()->GetField()); + TVirtualMC::GetMC()->SetMagField(TGeoGlobalMagField::Instance()->GetField()); gAlice->GetMCApp()->Init(); @@ -906,13 +906,13 @@ Bool_t AliSimulation::RunLego(const char *setup, Int_t nc1, Float_t c1min, AliGenerator *gen=gAlice->GetMCApp()->Generator(); gAlice->GetMCApp()->ResetGenerator(gener); //Prepare MC for Lego Run - gMC->InitLego(); + TVirtualMC::GetMC()->InitLego(); //Run Lego Object AliRunLoader::Instance()->SetNumberOfEventsPerFile(nev); - gMC->ProcessRun(nev); + TVirtualMC::GetMC()->ProcessRun(nev); // End of this run, close files FinishRun(); @@ -1102,7 +1102,7 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents) AliPDG::AddParticlesToPdgDataBase(); - gMC->SetMagField(TGeoGlobalMagField::Instance()->GetField()); + TVirtualMC::GetMC()->SetMagField(TGeoGlobalMagField::Instance()->GetField()); AliSysInfo::AddStamp("RunSimulation_GetField"); gAlice->GetMCApp()->Init(); AliSysInfo::AddStamp("RunSimulation_InitMCApp"); @@ -1223,7 +1223,7 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents) // Create the Root Tree with one branch per detector //Hits moved to begin event -> now we are crating separate tree for each event - gMC->ProcessRun(nEvents); + TVirtualMC::GetMC()->ProcessRun(nEvents); // End of this run, close files if(nEvents>0) FinishRun(); @@ -1959,7 +1959,7 @@ Int_t AliSimulation::ConvertRaw2SDigits(const char* rawDirectory, const char* es AliPDG::AddParticlesToPdgDataBase(); - gMC->SetMagField(TGeoGlobalMagField::Instance()->GetField()); + TVirtualMC::GetMC()->SetMagField(TGeoGlobalMagField::Instance()->GetField()); gAlice->GetMCApp()->Init(); diff --git a/STEER/STEERBase/AliTrackReference.cxx b/STEER/STEERBase/AliTrackReference.cxx index 0552b7c96a5..feba4446f33 100644 --- a/STEER/STEERBase/AliTrackReference.cxx +++ b/STEER/STEERBase/AliTrackReference.cxx @@ -87,8 +87,8 @@ AliTrackReference::AliTrackReference(Int_t label, Int_t id) : fPx(0), fPy(0), fPz(0), - fLength(gMC->TrackLength()), - fTime(gMC->TrackTime()), + fLength(TVirtualMC::GetMC()->TrackLength()), + fTime(TVirtualMC::GetMC()->TrackTime()), fUserId(0), fDetectorId(id) { @@ -105,13 +105,13 @@ AliTrackReference::AliTrackReference(Int_t label, Int_t id) : Double_t vec[4]; - gMC->TrackPosition(vec[0],vec[1],vec[2]); + TVirtualMC::GetMC()->TrackPosition(vec[0],vec[1],vec[2]); fX = vec[0]; fY = vec[1]; fZ = vec[2]; - gMC->TrackMomentum(vec[0],vec[1],vec[2],vec[3]); + TVirtualMC::GetMC()->TrackMomentum(vec[0],vec[1],vec[2],vec[3]); fPx = vec[0]; fPy = vec[1]; @@ -122,14 +122,14 @@ AliTrackReference::AliTrackReference(Int_t label, Int_t id) : for(Int_t i=14; i<22; i++) ResetBit(BIT(i)); - SetBit(BIT(14), gMC->IsNewTrack()); - SetBit(BIT(15), gMC->IsTrackAlive()); - SetBit(BIT(16), gMC->IsTrackDisappeared()); - SetBit(BIT(17), gMC->IsTrackEntering()); - SetBit(BIT(18), gMC->IsTrackExiting()); - SetBit(BIT(19), gMC->IsTrackInside()); - SetBit(BIT(20), gMC->IsTrackOut()); - SetBit(BIT(21), gMC->IsTrackStop()); + SetBit(BIT(14), TVirtualMC::GetMC()->IsNewTrack()); + SetBit(BIT(15), TVirtualMC::GetMC()->IsTrackAlive()); + SetBit(BIT(16), TVirtualMC::GetMC()->IsTrackDisappeared()); + SetBit(BIT(17), TVirtualMC::GetMC()->IsTrackEntering()); + SetBit(BIT(18), TVirtualMC::GetMC()->IsTrackExiting()); + SetBit(BIT(19), TVirtualMC::GetMC()->IsTrackInside()); + SetBit(BIT(20), TVirtualMC::GetMC()->IsTrackOut()); + SetBit(BIT(21), TVirtualMC::GetMC()->IsTrackStop()); // // This particle has to be kept diff --git a/STRUCT/AliBODY.cxx b/STRUCT/AliBODY.cxx index 3347e42fbf3..be8d03f3af0 100644 --- a/STRUCT/AliBODY.cxx +++ b/STRUCT/AliBODY.cxx @@ -103,7 +103,7 @@ void AliBODY::CreateGeometry() dALIC[0]=2500.; dALIC[1]=2500.; dALIC[2]=15000.; - gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3); + TVirtualMC::GetMC()->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3); } else if ( gAlice->GetModule("ACORDE")) { // // If the Cosmic Ray Trigger is present we need a large box @@ -112,7 +112,7 @@ void AliBODY::CreateGeometry() dALIC[0]=13000.; dALIC[1]=5000.; dALIC[2]=13000.; - gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3); + TVirtualMC::GetMC()->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3); } else { // @@ -121,7 +121,7 @@ void AliBODY::CreateGeometry() dALIC[0]=2000; dALIC[1]=2000; dALIC[2]=3000; - gMC->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3); + TVirtualMC::GetMC()->Gsvolu("ALIC","BOX ",idtmed[1],dALIC,3); } } diff --git a/STRUCT/AliDIPOv2.cxx b/STRUCT/AliDIPOv2.cxx index b6594a3bc26..5749fcbac8a 100644 --- a/STRUCT/AliDIPOv2.cxx +++ b/STRUCT/AliDIPOv2.cxx @@ -118,7 +118,7 @@ void AliDIPOv2::CreateSpectrometerDipole() tpar[12] = 260.55 + kZDipole; tpar[13] = tpar[12] * TMath::Tan(2. * TMath::Pi() / 180.); tpar[14] = 527.34; - gMC->Gsvolu("DDIP", "PCON", idtmed[1874], tpar, 15); + TVirtualMC::GetMC()->Gsvolu("DDIP", "PCON", idtmed[1874], tpar, 15); // // Coils // air - m.f. @@ -128,10 +128,10 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = 119.; cpar[4] = 241.; // coil - high cuts - gMC->Gsvolu("DC1 ", "TUBS", idtmed[kCoil+40], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DC1 ", "TUBS", idtmed[kCoil+40], cpar, 5); cpar[3] = -61.; cpar[4] = 61.; - gMC->Gsvolu("DC2 ", "TUBS", idtmed[kCoil+40], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DC2 ", "TUBS", idtmed[kCoil+40], cpar, 5); // coil - low cuts cuts cpar[0] = 207.; @@ -140,23 +140,23 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = 119.; cpar[4] = 241.; - gMC->Gsvolu("DC3 ", "TUBS", idtmed[kCoil], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DC3 ", "TUBS", idtmed[kCoil], cpar, 5); cpar[0] = 207.; cpar[1] = 217; cpar[3] = -61.; cpar[4] = 61.; - gMC->Gsvolu("DC4 ", "TUBS", idtmed[kCoil], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DC4 ", "TUBS", idtmed[kCoil], cpar, 5); - gMC->Gspos("DC3 ", 1, "DC1 ", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("DC4 ", 1, "DC2 ", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DC3 ", 1, "DC1 ", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DC4 ", 1, "DC2 ", 0., 0., 0., 0, "ONLY"); // dz = 37.65 - 243.55 dz = -205.9-2.45; dx = 5.; - gMC->Gspos("DC1 ", 1, "DDIP", dx, 0., dz+kZDipole, 0, "ONLY"); - gMC->Gspos("DC1 ", 2, "DDIP", dx, 0., -dz+kZDipole, 0, "ONLY"); - gMC->Gspos("DC2 ", 1, "DDIP", -dx, 0., dz+kZDipole, 0, "ONLY"); - gMC->Gspos("DC2 ", 2, "DDIP", -dx, 0., -dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DC1 ", 1, "DDIP", dx, 0., dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DC1 ", 2, "DDIP", dx, 0., -dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DC2 ", 1, "DDIP", -dx, 0., dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DC2 ", 2, "DDIP", -dx, 0., -dz+kZDipole, 0, "ONLY"); the1 = 180.; phi1 = 0.; the2 = 90.; @@ -186,15 +186,15 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = 270.; cpar[4] = 360.; //* coil high cuts - gMC->Gsvolu("DC11", "TUBS", idtmed[kCoil+40], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DC11", "TUBS", idtmed[kCoil+40], cpar, 5); dx = TMath::Sin(30.5*kDegrad) * -(207.+33.5)+5./TMath::Sin(30.5*kDegrad); dy = TMath::Cos(30.5*kDegrad) * -(207.+33.5); dz = cpar[1] - 243.55-2.45; - gMC->Gspos("DC11", 1, "DDIP", dx, dy, dz+kZDipole, idrotm[1800], "ONLY"); - gMC->Gspos("DC11", 2, "DDIP", dx, dy, -dz+kZDipole, idrotm[1802], "ONLY"); - gMC->Gspos("DC11", 3, "DDIP", -dx, dy, dz+kZDipole, idrotm[1801], "ONLY"); - gMC->Gspos("DC11", 4, "DDIP", -dx, dy, -dz+kZDipole, idrotm[1803], "ONLY"); + TVirtualMC::GetMC()->Gspos("DC11", 1, "DDIP", dx, dy, dz+kZDipole, idrotm[1800], "ONLY"); + TVirtualMC::GetMC()->Gspos("DC11", 2, "DDIP", dx, dy, -dz+kZDipole, idrotm[1802], "ONLY"); + TVirtualMC::GetMC()->Gspos("DC11", 3, "DDIP", -dx, dy, dz+kZDipole, idrotm[1801], "ONLY"); + TVirtualMC::GetMC()->Gspos("DC11", 4, "DDIP", -dx, dy, -dz+kZDipole, idrotm[1803], "ONLY"); @@ -205,15 +205,15 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = 0.; cpar[4] = 90.; //* coil high cuts - gMC->Gsvolu("DC12", "TUBS", idtmed[kCoil+40], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DC12", "TUBS", idtmed[kCoil+40], cpar, 5); dx = TMath::Sin(30.5*kDegrad) * -(207.+33.5)+5./TMath::Sin(30.5*kDegrad); dy = TMath::Cos(30.5*kDegrad) *(207.+33.5); dz = cpar[1] - 243.55-2.45; - gMC->Gspos("DC12", 1, "DDIP", dx, dy, dz+kZDipole, idrotm[1801], "ONLY"); - gMC->Gspos("DC12", 2, "DDIP", dx, dy, -dz+kZDipole, idrotm[1803], "ONLY"); - gMC->Gspos("DC12", 3, "DDIP", -dx, dy, dz+kZDipole, idrotm[1800], "ONLY"); - gMC->Gspos("DC12", 4, "DDIP", -dx, dy, -dz+kZDipole, idrotm[1802], "ONLY"); + TVirtualMC::GetMC()->Gspos("DC12", 1, "DDIP", dx, dy, dz+kZDipole, idrotm[1801], "ONLY"); + TVirtualMC::GetMC()->Gspos("DC12", 2, "DDIP", dx, dy, -dz+kZDipole, idrotm[1803], "ONLY"); + TVirtualMC::GetMC()->Gspos("DC12", 3, "DDIP", -dx, dy, dz+kZDipole, idrotm[1800], "ONLY"); + TVirtualMC::GetMC()->Gspos("DC12", 4, "DDIP", -dx, dy, -dz+kZDipole, idrotm[1802], "ONLY"); the1 = 90.; phi1 = 61.; @@ -243,22 +243,22 @@ void AliDIPOv2::CreateSpectrometerDipole() tpar[0] = 37.65; tpar[1] = 33.5; tpar[2] = 145.5; - gMC->Gsvolu("DL1 ", "BOX ", idtmed[kCoil+40], tpar, 3); + TVirtualMC::GetMC()->Gsvolu("DL1 ", "BOX ", idtmed[kCoil+40], tpar, 3); // coil - low cuts tpar[0] = 5.; dx = 37.65 - 5.; - gMC->Gsvolu("DL2 ", "BOX ", idtmed[kCoil], tpar, 3); - gMC->Gspos("DL2 ", 1, "DL1 ", dx, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("DL2 ", "BOX ", idtmed[kCoil], tpar, 3); + TVirtualMC::GetMC()->Gspos("DL2 ", 1, "DL1 ", dx, 0., 0., 0, "ONLY"); dx =-53.62; dy =-241.26819; dz = 0.; - gMC->Gspos("DL1 ", 1, "DDIP", dx, dy, dz+kZDipole, idrotm[1804], "ONLY"); - gMC->Gspos("DL1 ", 2, "DDIP", dx, -dy, dz+kZDipole, idrotm[1805], "ONLY"); - gMC->Gspos("DL1 ", 3, "DDIP",-dx, dy, dz+kZDipole, idrotm[1806], "ONLY"); - gMC->Gspos("DL1 ", 4, "DDIP",-dx, -dy, dz+kZDipole, idrotm[1807], "ONLY"); + TVirtualMC::GetMC()->Gspos("DL1 ", 1, "DDIP", dx, dy, dz+kZDipole, idrotm[1804], "ONLY"); + TVirtualMC::GetMC()->Gspos("DL1 ", 2, "DDIP", dx, -dy, dz+kZDipole, idrotm[1805], "ONLY"); + TVirtualMC::GetMC()->Gspos("DL1 ", 3, "DDIP",-dx, dy, dz+kZDipole, idrotm[1806], "ONLY"); + TVirtualMC::GetMC()->Gspos("DL1 ", 4, "DDIP",-dx, -dy, dz+kZDipole, idrotm[1807], "ONLY"); // Contactor @@ -272,12 +272,12 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = -50.; cpar[4] = 50.; - gMC->Gsvolu("DCO1", "TUBS", idtmed[1818], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCO1", "TUBS", idtmed[1818], cpar, 5); dx = -5.; dz = 168.25-1.5-1.; - gMC->Gspos("DCO1", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO1", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); dz = 243.55+4.5+1.5+1.; - gMC->Gspos("DCO1", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO1", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // 9.06.2000 @@ -287,12 +287,12 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = 180.-50.; cpar[4] = 180.+50.; - gMC->Gsvolu("DCO2", "TUBS", idtmed[1818], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCO2", "TUBS", idtmed[1818], cpar, 5); dx = +5.; dz = 168.25-1.5-1.; - gMC->Gspos("DCO2", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO2", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); dz = 243.55+4.5+1.5+1.; - gMC->Gspos("DCO2", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO2", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); @@ -304,23 +304,23 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = -50.; cpar[4] = 50.; - gMC->Gsvolu("DCO3", "TUBS", idtmed[1812], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCO3", "TUBS", idtmed[1812], cpar, 5); dx = -5; dz = 168.25-0.75; - gMC->Gspos("DCO3", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO3", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); dz = 243.55+4.5+0.75; - gMC->Gspos("DCO3", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO3", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // 9.06.2000 cpar[3] = 180.-50.; cpar[4] = 180.+50.; - gMC->Gsvolu("DCO4", "TUBS", idtmed[1812], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCO4", "TUBS", idtmed[1812], cpar, 5); dx = +5; dz = 168.25-0.75; - gMC->Gspos("DCO4", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO4", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); dz = 243.55+4.5+0.75 ; - gMC->Gspos("DCO4", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO4", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // G10 face plane @@ -331,22 +331,22 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = -50.; cpar[4] = 50.; - gMC->Gsvolu("DCO5", "TUBS", idtmed[1810], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCO5", "TUBS", idtmed[1810], cpar, 5); dx = -5; dz = 243.55+2.25; - gMC->Gspos("DCO5", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO5", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // 9.06.2000 cpar[3] = 180.-50.; cpar[4] = 180.+50.; - gMC->Gsvolu("DCO6", "TUBS", idtmed[1810], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCO6", "TUBS", idtmed[1810], cpar, 5); dx = +5; dz = 243.55+2.25; - gMC->Gspos("DCO6", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO6", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); //Steel supported planes @@ -356,11 +356,11 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = -50.; cpar[4] = 50.; - gMC->Gsvolu("DCO7", "TUBS", idtmed[1818], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCO7", "TUBS", idtmed[1818], cpar, 5); dx = -5; dz = 168.25+1.; - gMC->Gspos("DCO7", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO7", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // 9.06.2000 cpar[0] = 274.+1.5+2.; @@ -370,11 +370,11 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[4] = 180.+50.; - gMC->Gsvolu("DCO8", "TUBS", idtmed[1818], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCO8", "TUBS", idtmed[1818], cpar, 5); dx = +5; dz = 168.25+1.; - gMC->Gspos("DCO8", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO8", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // @@ -384,11 +384,11 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = -50.; cpar[4] = 50.; - gMC->Gsvolu("DCO9", "TUBS", idtmed[1818], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCO9", "TUBS", idtmed[1818], cpar, 5); dx = -5; dz = 168.25+1.; - gMC->Gspos("DCO9", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCO9", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // 9.06.2000 @@ -398,11 +398,11 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = 180.-50.; cpar[4] = 180.+50.; - gMC->Gsvolu("DCOA", "TUBS", idtmed[1818], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOA", "TUBS", idtmed[1818], cpar, 5); dx = +5; dz = 168.25+1.; - gMC->Gspos("DCOA", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOA", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // Sides steel planes @@ -413,17 +413,17 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = -50.; cpar[4] = 50.; - gMC->Gsvolu("DCOB", "TUBS", idtmed[1818], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOB", "TUBS", idtmed[1818], cpar, 5); cpar[0] = 274. + 1.5; cpar[1] = 274. + 1.5 +2.; - gMC->Gsvolu("DCOC", "TUBS", idtmed[1818], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOC", "TUBS", idtmed[1818], cpar, 5); dx=-5.; dz = ((243.55+4.5+1.5)+168.25)/2; - gMC->Gspos("DCOB", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); - gMC->Gspos("DCOC", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOB", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOC", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // 9.06.2000 @@ -433,17 +433,17 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = 180.-50.; cpar[4] = 180.+50.; - gMC->Gsvolu("DCOD", "TUBS", idtmed[1818], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOD", "TUBS", idtmed[1818], cpar, 5); cpar[0] = 274. + 1.5; cpar[1] = 274. + 1.5 +2.; - gMC->Gsvolu("DCOE", "TUBS", idtmed[1818], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOE", "TUBS", idtmed[1818], cpar, 5); dx=+5.; dz = ((243.55+4.5+1.5)+168.25)/2; - gMC->Gspos("DCOD", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); - gMC->Gspos("DCOE", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOD", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOE", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // Top and bottom resin planes @@ -454,18 +454,18 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = -50.; cpar[4] = 50.; - gMC->Gsvolu("DCOF", "TUBS", idtmed[1812], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOF", "TUBS", idtmed[1812], cpar, 5); cpar[0] = 274.; cpar[1] = 274. + 1.5; - gMC->Gsvolu("DCOG", "TUBS", idtmed[1812], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOG", "TUBS", idtmed[1812], cpar, 5); dx=-5.; dz = ((243.55+4.5+1.5)+168.25)/2; - gMC->Gspos("DCOF", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); - gMC->Gspos("DCOG", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOF", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOG", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // 9.06.2000 cpar[0] = 207. - 1.5; @@ -475,18 +475,18 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = 180.-50.; cpar[4] = 180.+50.; - gMC->Gsvolu("DCOH", "TUBS", idtmed[1812], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOH", "TUBS", idtmed[1812], cpar, 5); cpar[0] = 274.; cpar[1] = 274. + 1.5; - gMC->Gsvolu("DCOI", "TUBS", idtmed[1812], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOI", "TUBS", idtmed[1812], cpar, 5); dx=+5.; dz = ((243.55+4.5+1.5)+168.25)/2; - gMC->Gspos("DCOH", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); - gMC->Gspos("DCOI", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOH", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOI", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // Aluminum cabels @@ -497,34 +497,34 @@ void AliDIPOv2::CreateSpectrometerDipole() cpar[3] = -24.; cpar[4] = 24.; - gMC->Gsvolu("DCOJ", "TUBS", idtmed[kCable], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOJ", "TUBS", idtmed[kCable], cpar, 5); // dx = 274. + 1.5 +2. +40.; // dx = 5. + 1.5 +2. +40.; // dx = 5. + 1.5 +2.; dx=-5.; dz = 168.25 + 5.05 + 5.05/2; - gMC->Gspos("DCOJ", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOJ", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); dz = 243.55 - 5.05/2; - gMC->Gspos("DCOJ", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOJ", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // 9.06.2000 cpar[3] = 180.-24.; cpar[4] = 180.+24.; - gMC->Gsvolu("DCOK", "TUBS", idtmed[kCable], cpar, 5); + TVirtualMC::GetMC()->Gsvolu("DCOK", "TUBS", idtmed[kCable], cpar, 5); // dx = 274. + 1.5 +2. +40.; // dx = 5. + 1.5 +2. +40.; // dx = 5. + 1.5 +2.; dx=+5.; dz = 168.25 + 5.05 + 5.05/2; - gMC->Gspos("DCOK", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOK", 1, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); dz = 243.55 - 5.05/2; - gMC->Gspos("DCOK", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCOK", 2, "DDIP", dx, 0, dz+kZDipole, 0, "ONLY"); // YOKE @@ -535,19 +535,19 @@ void AliDIPOv2::CreateSpectrometerDipole() ypar[2] = 155.75; // iron- high cuts - gMC->Gsvolu("DY1 ", "BOX ", idtmed[1858], ypar, 3); + TVirtualMC::GetMC()->Gsvolu("DY1 ", "BOX ", idtmed[1858], ypar, 3); ypar[0] = 144.+10.; ypar[1] = 193.3+10.; ypar[2] = 5.; ypar[3] = 155.75; dy = -69.5 + 5.; // iron- low cuts - gMC->Gsvolu("DY11", "TRD1", idtmed[1818], ypar, 4); - gMC->Gspos("DY11", 1, "DY1 ", 0., dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("DY11", "TRD1", idtmed[1818], ypar, 4); + TVirtualMC::GetMC()->Gspos("DY11", 1, "DY1 ", 0., dy, 0., 0, "ONLY"); dy = 365.5; dz = 4.95; - gMC->Gspos("DY1 ", 1, "DDIP", 0., dy, -dz+kZDipole, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DY1 ", 1, "DDIP", 0., dy, -dz+kZDipole, 0, "ONLY"); the1 = 270.; phi1 = 0.; @@ -556,7 +556,7 @@ void AliDIPOv2::CreateSpectrometerDipole() the3 = 0.; phi3 = 0.; AliMatrix(idrotm[1808], the1, phi1, the2, phi2, the3, phi3); - gMC->Gspos("DY1 ", 2, "DDIP", 0., -dy, -dz+kZDipole, idrotm[1808] , "ONLY"); + TVirtualMC::GetMC()->Gspos("DY1 ", 2, "DDIP", 0., -dy, -dz+kZDipole, idrotm[1808] , "ONLY"); // side walls // ypar[0] = 579./2.; @@ -575,7 +575,7 @@ void AliDIPOv2::CreateSpectrometerDipole() // iron - high cuts - gMC->Gsvolu("DY2 ", "TRAP", idtmed[1858], ypar,11); + TVirtualMC::GetMC()->Gsvolu("DY2 ", "TRAP", idtmed[1858], ypar,11); ypar[4] = 47.9 -5.; ypar[5] = 72.55 -5.; @@ -586,12 +586,12 @@ void AliDIPOv2::CreateSpectrometerDipole() // iron - low cuts - gMC->Gsvolu("DY22", "TRAP", idtmed[1818], ypar,11); + TVirtualMC::GetMC()->Gsvolu("DY22", "TRAP", idtmed[1818], ypar,11); dy = 0.; dx = -5.; - gMC->Gspos("DY22", 1, "DY2 ", dx, dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DY22", 1, "DY2 ", dx, dy, 0., 0, "ONLY"); the1 = 90.; phi1 = 180.; @@ -612,11 +612,11 @@ void AliDIPOv2::CreateSpectrometerDipole() dx = 228.875; dz = - 4.95; - gMC->Gspos("DY2 ", 1, "DDIP", dx, 0.0, dz+kZDipole, idrotm[1809], "ONLY"); - gMC->Gspos("DY2 ", 2, "DDIP", -dx, 0.0, dz+kZDipole, idrotm[1810], "ONLY"); + TVirtualMC::GetMC()->Gspos("DY2 ", 1, "DDIP", dx, 0.0, dz+kZDipole, idrotm[1809], "ONLY"); + TVirtualMC::GetMC()->Gspos("DY2 ", 2, "DDIP", -dx, 0.0, dz+kZDipole, idrotm[1810], "ONLY"); AliMatrix(idrotm[1811], 270., 0., 90., 90., 180., 0.); - gMC->Gspos("DDIP", 1, "ALIC", 0., 0., 0., idrotm[1811], "ONLY"); + TVirtualMC::GetMC()->Gspos("DDIP", 1, "ALIC", 0., 0., 0., idrotm[1811], "ONLY"); gGeoManager->SetVolumeAttribute("DDIP", "SEEN", 0); } @@ -661,31 +661,31 @@ void AliDIPOv2::CreateCompensatorDipole() pbox[1] = kHLYoke / 2.; pbox[2] = kLLYoke / 2.; - gMC->Gsvolu("DCML", "BOX", idtmed[1809 + 40], pbox, 3); + TVirtualMC::GetMC()->Gsvolu("DCML", "BOX", idtmed[1809 + 40], pbox, 3); // // Base pbox[0] = kWBase / 2.; pbox[1] = kHBase / 2.; - gMC->Gsvolu("DCBA", "BOX", idtmed[1809 + 40], pbox, 3); + TVirtualMC::GetMC()->Gsvolu("DCBA", "BOX", idtmed[1809 + 40], pbox, 3); // // Coil: straight sections, horizontal pbox[0] = kWCoil / 2.; pbox[1] = kHCoil / 2.; pbox[2] = kLCoilH / 2.; - gMC->Gsvolu("DCH1", "BOX", idtmed[1816 + 40], pbox, 3); + TVirtualMC::GetMC()->Gsvolu("DCH1", "BOX", idtmed[1816 + 40], pbox, 3); // // Coil: straight sections, horizontal pbox[0] = kWCoil / 2.; pbox[1] = kHCoil / 2.; pbox[2] = kLCoilH / 2.; - gMC->Gsvolu("DCH2", "BOX", idtmed[1816 + 40], pbox, 3); + TVirtualMC::GetMC()->Gsvolu("DCH2", "BOX", idtmed[1816 + 40], pbox, 3); // // Mother volume containing upper coil pbox[0] = kWUYoke / 2.; pbox[1] = kHUYoke / 2.; pbox[2] = kLCoilH / 2.; - gMC->Gsvolu("DCMU", "BOX", idtmed[1809 + 40], pbox, 3); + TVirtualMC::GetMC()->Gsvolu("DCMU", "BOX", idtmed[1809 + 40], pbox, 3); // // Coil: straight sections, vertical @@ -693,7 +693,7 @@ void AliDIPOv2::CreateCompensatorDipole() pbox[1] = kDCoil / 2.; pbox[2] = kHCoil / 2.; - gMC->Gsvolu("DCCV", "BOX", idtmed[1816 + 40], pbox, 3); + TVirtualMC::GetMC()->Gsvolu("DCCV", "BOX", idtmed[1816 + 40], pbox, 3); // // Coil: circular section @@ -703,7 +703,7 @@ void AliDIPOv2::CreateCompensatorDipole() ptubs[2] = kWCoil / 2.; ptubs[3] = 0.; ptubs[4] = 90.; - gMC->Gsvolu("DCC1", "TUBS", idtmed[1816 + 40], ptubs, 5); + TVirtualMC::GetMC()->Gsvolu("DCC1", "TUBS", idtmed[1816 + 40], ptubs, 5); // // Clamps Float_t ppgon[10]; @@ -717,7 +717,7 @@ void AliDIPOv2::CreateCompensatorDipole() ppgon[7] = 1.; ppgon[8] = 0.; ppgon[9] = 24.75; - gMC->Gsvolu("DCLA", "PGON", idtmed[1809 + 40], ppgon, 10); + TVirtualMC::GetMC()->Gsvolu("DCLA", "PGON", idtmed[1809 + 40], ppgon, 10); // // Assemble all // @@ -731,40 +731,40 @@ void AliDIPOv2::CreateCompensatorDipole() Float_t dy0 = 0.; dy0 = -kH / 2. + kHBase/2.; - gMC->Gspos("DCBA", 1, "DCM0", 0., dy0, 15.0, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCBA", 1, "DCM0", 0., dy0, 15.0, 0, "ONLY"); // Lower coil dx = ( kWLYoke - kWCoil) / 2.; dy = (-kHLYoke + kHCoil) / 2. + 6.; - gMC->Gspos("DCH1", 1, "DCML", dx, dy, -kRCoilC / 2., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCH1", 1, "DCML", dx, dy, -kRCoilC / 2., 0, "ONLY"); // Lower mother volume dx = (kWLYoke + kWApperture) / 2.; dy0 += (kHBase + kHLYoke) / 2.; - gMC->Gspos("DCML", 1, "DCM0", -dx, dy0, kRCoilC / 2., 0, "ONLY"); - gMC->Gspos("DCML", 2, "DCM0", +dx, dy0, kRCoilC / 2., idrotm[1811], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCML", 1, "DCM0", -dx, dy0, kRCoilC / 2., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCML", 2, "DCM0", +dx, dy0, kRCoilC / 2., idrotm[1811], "ONLY"); dx = (kWUYoke - kWCoil) / 2.; dy = (kHUYoke - kHCoil) / 2; // Upper coil - gMC->Gspos("DCH2", 1, "DCMU", dx, dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCH2", 1, "DCMU", dx, dy, 0., 0, "ONLY"); // Upper mother volume dx = (kWUYoke + kWApperture) / 2.; dy0 += (kHLYoke + kHUYoke) / 2.; - gMC->Gspos("DCMU", 1, "DCM0", -dx, dy0, 0., 0, "ONLY"); - gMC->Gspos("DCMU", 2, "DCM0", +dx, dy0, 0., idrotm[1811], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCMU", 1, "DCM0", -dx, dy0, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCMU", 2, "DCM0", +dx, dy0, 0., idrotm[1811], "ONLY"); // Vertical coils dx = (kWCoil + kWApperture) / 2.; dy = kH / 2. - kDCoil / 2. - kRCoilC; dz = (kLCoilH - kHCoil) / 2. + kRCoilC; - gMC->Gspos("DCCV", 1, "DCM0", dx, dy, -dz, 0, "ONLY"); - gMC->Gspos("DCCV", 2, "DCM0", -dx, dy, -dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCCV", 1, "DCM0", dx, dy, -dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCCV", 2, "DCM0", -dx, dy, -dz, 0, "ONLY"); dx = (kWLYoke - kWCoil) / 2.; dy = -kHLYoke / 2. + kDCoil / 2. + 6. + kRCoilC; dz = kLLYoke / 2. - kHCoil / 2.; - gMC->Gspos("DCCV", 3, "DCML", dx, dy, dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCCV", 3, "DCML", dx, dy, dz, 0, "ONLY"); @@ -772,37 +772,37 @@ void AliDIPOv2::CreateCompensatorDipole() dx = (kWCoil + kWApperture) / 2.; dy = dy0 + kHUYoke / 2. - kRCoilC; dz = kLCoilH / 2.; - gMC->Gspos("DCC1", 1, "DCM0", -dx, dy, dz, idrotm[1812], "ONLY"); - gMC->Gspos("DCC1", 2, "DCM0", +dx, dy, dz, idrotm[1812], "ONLY"); - gMC->Gspos("DCC1", 3, "DCM0", +dx, dy, -dz, idrotm[1813], "ONLY"); - gMC->Gspos("DCC1", 4, "DCM0", -dx, dy, -dz, idrotm[1813], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCC1", 1, "DCM0", -dx, dy, dz, idrotm[1812], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCC1", 2, "DCM0", +dx, dy, dz, idrotm[1812], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCC1", 3, "DCM0", +dx, dy, -dz, idrotm[1813], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCC1", 4, "DCM0", -dx, dy, -dz, idrotm[1813], "ONLY"); dy = -kH / 2. + kHBase + 6. + kRCoilC; - gMC->Gspos("DCC1", 5, "DCM0", +dx, dy, -dz, idrotm[1815], "ONLY"); - gMC->Gspos("DCC1", 6, "DCM0", -dx, dy, -dz, idrotm[1815], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCC1", 5, "DCM0", +dx, dy, -dz, idrotm[1815], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCC1", 6, "DCM0", -dx, dy, -dz, idrotm[1815], "ONLY"); dx = ( kWLYoke - kWCoil) / 2.; dy = -kHLYoke / 2. + 6. + kRCoilC; dz = kLLYoke / 2. - kRCoilC; - gMC->Gspos("DCC1", 7, "DCML", dx, dy, dz, idrotm[1814], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCC1", 7, "DCML", dx, dy, dz, idrotm[1814], "ONLY"); // Clamps dx = kWApperture / 2. + kWUYoke; dy = -kH / 2. + kHLYoke + kHBase; - gMC->Gspos("DCLA", 1, "DCM0", dx, dy, -119., 0, "ONLY"); - gMC->Gspos("DCLA", 2, "DCM0", dx, dy, -44., 0, "ONLY"); - gMC->Gspos("DCLA", 3, "DCM0", dx, dy, 46., 0, "ONLY"); - gMC->Gspos("DCLA", 4, "DCM0", dx, dy, 119., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCLA", 1, "DCM0", dx, dy, -119., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCLA", 2, "DCM0", dx, dy, -44., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCLA", 3, "DCM0", dx, dy, 46., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("DCLA", 4, "DCM0", dx, dy, 119., 0, "ONLY"); - gMC->Gspos("DCLA", 5, "DCM0", -dx, dy, -119., idrotm[1811], "ONLY"); - gMC->Gspos("DCLA", 6, "DCM0", -dx, dy, -44., idrotm[1811], "ONLY"); - gMC->Gspos("DCLA", 7, "DCM0", -dx, dy, 46., idrotm[1811], "ONLY"); - gMC->Gspos("DCLA", 8, "DCM0", -dx, dy, 119., idrotm[1811], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCLA", 5, "DCM0", -dx, dy, -119., idrotm[1811], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCLA", 6, "DCM0", -dx, dy, -44., idrotm[1811], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCLA", 7, "DCM0", -dx, dy, 46., idrotm[1811], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCLA", 8, "DCM0", -dx, dy, 119., idrotm[1811], "ONLY"); AliMatrix(idrotm[1816], 270., 0., 90., 90., 180., 0.); - gMC->Gspos("DCM0", 1, "ALIC", 0., -12., 1075., idrotm[1816], "ONLY"); + TVirtualMC::GetMC()->Gspos("DCM0", 1, "ALIC", 0., -12., 1075., idrotm[1816], "ONLY"); } diff --git a/STRUCT/AliFRAMEv2.cxx b/STRUCT/AliFRAMEv2.cxx index 56e5efae454..c90183b1624 100644 --- a/STRUCT/AliFRAMEv2.cxx +++ b/STRUCT/AliFRAMEv2.cxx @@ -178,7 +178,7 @@ void AliFRAMEv2::CreateGeometry() TGeoCompositeShape* shB77 = new TGeoCompositeShape("shB77", "shB77A+shB77B:trB77A+shB77B:trB77B"); TGeoVolume* voB77 = new TGeoVolume("B077", shB77, gGeoManager->GetMedium("FRAME_Air")); voB77->SetName("B077"); // just to avoid a warning - gMC->Gspos("B077", 1, "ALIC", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("B077", 1, "ALIC", 0., 0., 0., 0, "ONLY"); // // Reference plane #1 for TRD TGeoPgon* shBREFA = new TGeoPgon(0.0, 360., 18, 2); @@ -188,7 +188,7 @@ void AliFRAMEv2::CreateGeometry() TGeoCompositeShape* shBREF1 = new TGeoCompositeShape("shBREF1", "shBREFA-(shB77B:trB77A+shB77B:trB77B)"); TGeoVolume* voBREF = new TGeoVolume("BREF1", shBREF1, gGeoManager->GetMedium("FRAME_Air")); voBREF->SetVisibility(0); - gMC->Gspos("BREF1", 1, "B077", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BREF1", 1, "B077", 0., 0., 0., 0, "ONLY"); // // The outer Frame // @@ -212,8 +212,8 @@ void AliFRAMEv2::CreateGeometry() ppgon[7] = -ppgon[4]; ppgon[8] = ppgon[5]; ppgon[9] = ppgon[6]; - gMC->Gsvolu("B076", "PGON", kAir, ppgon, 10); - gMC->Gspos("B076", 1, "B077", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("B076", "PGON", kAir, ppgon, 10); + TVirtualMC::GetMC()->Gspos("B076", 1, "B077", 0., 0., 0., 0, "ONLY"); // // Rings // @@ -228,19 +228,19 @@ void AliFRAMEv2::CreateGeometry() ptrd1[1] = l2; ptrd1[2] = 8.0 / 2.; ptrd1[3] = 0.6 / 2.; - gMC->Gsvolu("BIH142", "TRD1", kSteel, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu("BIH142", "TRD1", kSteel, ptrd1, 4); ptrd1[0] = l1; ptrd1[1] = l1 + 0.6 * TMath::Tan(10.*kdeg2rad); ptrd1[2] = 8.0 / 2.; ptrd1[3] = 0.6 / 2.; - gMC->Gsvolu("BIH242", "TRD1", kSteel, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu("BIH242", "TRD1", kSteel, ptrd1, 4); // Vertical ptrd1[0] = l1 + 0.6 * TMath::Tan(10.*kdeg2rad); ptrd1[1] = l2 - 0.6 * TMath::Tan(10.*kdeg2rad); ptrd1[2] = 0.8 / 2.; ptrd1[3] = 6.8 / 2.; - gMC->Gsvolu("BIV42", "TRD1", kSteel, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu("BIV42", "TRD1", kSteel, ptrd1, 4); // Place asBI42->AddNode(gGeoManager->GetVolume("BIV42"), 1, new TGeoTranslation(0., 0., 0.)); asBI42->AddNode(gGeoManager->GetVolume("BIH142"), 1, new TGeoTranslation(0., 0., 3.7)); @@ -253,11 +253,11 @@ void AliFRAMEv2::CreateGeometry() pbox[0] = dol; pbox[1] = doh; pbox[2] = 345.; - gMC->Gsvolu("B033", "BOX", kSteel, pbox, 3); + TVirtualMC::GetMC()->Gsvolu("B033", "BOX", kSteel, pbox, 3); pbox[0] = dol-ds; pbox[1] = doh-ds; - gMC->Gsvolu("B034", "BOX", kAir, pbox, 3); - gMC->Gspos("B034", 1, "B033", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("B034", "BOX", kAir, pbox, 3); + TVirtualMC::GetMC()->Gspos("B034", 1, "B033", 0., 0., 0., 0, "ONLY"); // @@ -266,22 +266,22 @@ void AliFRAMEv2::CreateGeometry() pbox[0] = 3.37; pbox[1] = 2.0; pbox[2] = 375.5; - gMC->Gsvolu("B080", "BOX", kSteel, pbox, 3); + TVirtualMC::GetMC()->Gsvolu("B080", "BOX", kSteel, pbox, 3); pbox[0] = 2.78; pbox[1] = 1.4; pbox[2] = 375.5; - gMC->Gsvolu("B081", "BOX", kAir, pbox, 3); - gMC->Gspos("B081", 1, "B080", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("B081", "BOX", kAir, pbox, 3); + TVirtualMC::GetMC()->Gspos("B081", 1, "B080", 0., 0., 0., 0, "ONLY"); // Small 2nd reference plane elemenet pbox[0] = 0.05; pbox[1] = 2.0; pbox[2] = 375.5; - gMC->Gsvolu("BREF2", "BOX", kAir, pbox, 3); - gMC->Gspos("BREF2", 1, "B080", 3.37 - 0.05, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BREF2", "BOX", kAir, pbox, 3); + TVirtualMC::GetMC()->Gspos("BREF2", 1, "B080", 3.37 - 0.05, 0., 0., 0, "ONLY"); - gMC->Gspos("B080", 1, "B077", 283.3, 0., 0., 0, "ONLY"); - gMC->Gspos("B080", 2, "B077", -283.3, 0., 0., idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B080", 1, "B077", 283.3, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("B080", 2, "B077", -283.3, 0., 0., idrotm[2087], "ONLY"); // @@ -310,15 +310,15 @@ void AliFRAMEv2::CreateGeometry() ptrap[9] = ptrap[4]; ptrap[10] = 0; - gMC->Gsvolu("B047", "TRAP", kSteel, ptrap, 11); + TVirtualMC::GetMC()->Gsvolu("B047", "TRAP", kSteel, ptrap, 11); ptrap[3] = doh-ds; ptrap[4] = (dol-ds)/x; ptrap[5] = ptrap[4]; ptrap[7] = ptrap[3]; ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - gMC->Gsvolu("B048", "TRAP", kAir, ptrap, 11); - gMC->Gspos("B048", 1, "B047", 0.0, 0.0, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("B048", "TRAP", kAir, ptrap, 11); + TVirtualMC::GetMC()->Gspos("B048", 1, "B047", 0.0, 0.0, 0., 0, "ONLY"); /* Crosses (inner most) @@ -334,7 +334,7 @@ void AliFRAMEv2::CreateGeometry() pbox[0] = h/2; pbox[1] = doh; pbox[2] = dz/2.; - gMC->Gsvolu("BM49", "BOX ", kAir, pbox, 3); + TVirtualMC::GetMC()->Gsvolu("BM49", "BOX ", kAir, pbox, 3); dq = h*h+dz*dz; @@ -351,7 +351,7 @@ void AliFRAMEv2::CreateGeometry() ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - gMC->Gsvolu("B049", "TRAP", kSteel, ptrap, 11); + TVirtualMC::GetMC()->Gsvolu("B049", "TRAP", kSteel, ptrap, 11); ptrap[0] = ptrap[0]-kEps; ptrap[3] = (doh-ds); ptrap[4] = (dol-ds)/x; @@ -359,9 +359,9 @@ void AliFRAMEv2::CreateGeometry() ptrap[7] = ptrap[3]; ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - gMC->Gsvolu("B050", "TRAP", kAir, ptrap, 11); - gMC->Gspos("B050", 1, "B049", 0.0, 0.0, 0., 0, "ONLY"); - gMC->Gspos("B049", 1, "BM49", 0.0, 0.0, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("B050", "TRAP", kAir, ptrap, 11); + TVirtualMC::GetMC()->Gspos("B050", 1, "B049", 0.0, 0.0, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("B049", 1, "BM49", 0.0, 0.0, 0., 0, "ONLY"); Float_t dd1 = d*TMath::Tan(theta*kdeg2rad); @@ -381,7 +381,7 @@ void AliFRAMEv2::CreateGeometry() ptrap[9] = ptrap[8]; - gMC->Gsvolu("B051", "TRAP", kSteel, ptrap, 11); + TVirtualMC::GetMC()->Gsvolu("B051", "TRAP", kSteel, ptrap, 11); Float_t ddx0 = ptrap[8]; Float_t dd1s = dd1*(1.-2.*ds/d); @@ -400,8 +400,8 @@ void AliFRAMEv2::CreateGeometry() ptrap[8] = ptrap[8]-ds/2./d*(dd1+dd2); ptrap[9] = ptrap[8]; - gMC->Gsvolu("B052", "TRAP", kAir, ptrap, 11); - gMC->Gspos("B052", 1, "B051", 0.0, 0.0, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("B052", "TRAP", kAir, ptrap, 11); + TVirtualMC::GetMC()->Gspos("B052", 1, "B051", 0.0, 0.0, 0., 0, "ONLY"); Float_t ddx, ddz, drx, drz, rtheta; @@ -412,7 +412,7 @@ void AliFRAMEv2::CreateGeometry() drx = TMath::Cos(rtheta) * ddx +TMath::Sin(rtheta) *ddz+pbox[0]; drz = -TMath::Sin(rtheta) * ddx +TMath::Cos(rtheta) *ddz-pbox[2]; - gMC->Gspos("B051", 1, "BM49", + TVirtualMC::GetMC()->Gspos("B051", 1, "BM49", drx, 0.0, drz, idrotm[2001], "ONLY"); @@ -421,7 +421,7 @@ void AliFRAMEv2::CreateGeometry() drx = TMath::Cos(rtheta) * ddx + TMath::Sin(rtheta) * ddz-pbox[0]; drz = -TMath::Sin(rtheta) * ddx + TMath::Cos(rtheta) * ddz+pbox[2]; - gMC->Gspos("B051", 2, "BM49", + TVirtualMC::GetMC()->Gspos("B051", 2, "BM49", drx, 0.0, drz, idrotm[2002], "ONLY"); @@ -442,15 +442,15 @@ void AliFRAMEv2::CreateGeometry() ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - gMC->Gsvolu("B045", "TRAP", kSteel, ptrap, 11); + TVirtualMC::GetMC()->Gsvolu("B045", "TRAP", kSteel, ptrap, 11); ptrap[3] = doh-ds; ptrap[4] = (dol-ds)/x; ptrap[5] = ptrap[4]; ptrap[7] = ptrap[3]; ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - gMC->Gsvolu("B046", "TRAP", kAir, ptrap, 11); - gMC->Gspos("B046", 1, "B045", 0.0, 0.0, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("B046", "TRAP", kAir, ptrap, 11); + TVirtualMC::GetMC()->Gspos("B046", 1, "B045", 0.0, 0.0, 0., 0, "ONLY"); // // Positioning of diagonal bars @@ -467,10 +467,10 @@ void AliFRAMEv2::CreateGeometry() dy = rd * TMath::Cos(phi*kdeg2rad); - gMC->Gspos("B045", 1, "B076", -dx, dy, dz2, idrotm[2019], "ONLY"); - gMC->Gspos("B045", 2, "B076", -dx, dy, -dz2, idrotm[2003], "ONLY"); // ? - gMC->Gspos("B045", 3, "B076", dx, dy, dz2, idrotm[2020], "ONLY"); - gMC->Gspos("B045", 4, "B076", dx, dy, -dz2, idrotm[2027], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 1, "B076", -dx, dy, dz2, idrotm[2019], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 2, "B076", -dx, dy, -dz2, idrotm[2003], "ONLY"); // ? + TVirtualMC::GetMC()->Gspos("B045", 3, "B076", dx, dy, dz2, idrotm[2020], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 4, "B076", dx, dy, -dz2, idrotm[2027], "ONLY"); // @@ -481,10 +481,10 @@ void AliFRAMEv2::CreateGeometry() dx = rd * TMath::Sin(phi*kdeg2rad); dy = rd * TMath::Cos(phi*kdeg2rad); - gMC->Gspos("B045", 5, "B076", -dx, dy, dz2, idrotm[2021], "ONLY"); - gMC->Gspos("B045", 6, "B076", -dx, dy, -dz2, idrotm[2028], "ONLY"); - gMC->Gspos("B045", 7, "B076", dx, dy, dz2, idrotm[2022], "ONLY"); - gMC->Gspos("B045", 8, "B076", dx, dy, -dz2, idrotm[2029], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 5, "B076", -dx, dy, dz2, idrotm[2021], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 6, "B076", -dx, dy, -dz2, idrotm[2028], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 7, "B076", dx, dy, dz2, idrotm[2022], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 8, "B076", dx, dy, -dz2, idrotm[2029], "ONLY"); // // phi = 80 @@ -494,23 +494,23 @@ void AliFRAMEv2::CreateGeometry() dx = rd * TMath::Sin(phi*kdeg2rad); dy = rd * TMath::Cos(phi*kdeg2rad); - gMC->Gspos("B047", 13, "B076", -dx, -dy, dz, idrotm[2008], "ONLY"); - gMC->Gspos("B047", 14, "B076", -dx, -dy, -dz, idrotm[2010], "ONLY"); - gMC->Gspos("B047", 15, "B076", dx, -dy, dz, idrotm[2012], "ONLY"); - gMC->Gspos("B047", 16, "B076", dx, -dy, -dz, idrotm[2011], "ONLY"); + TVirtualMC::GetMC()->Gspos("B047", 13, "B076", -dx, -dy, dz, idrotm[2008], "ONLY"); + TVirtualMC::GetMC()->Gspos("B047", 14, "B076", -dx, -dy, -dz, idrotm[2010], "ONLY"); + TVirtualMC::GetMC()->Gspos("B047", 15, "B076", dx, -dy, dz, idrotm[2012], "ONLY"); + TVirtualMC::GetMC()->Gspos("B047", 16, "B076", dx, -dy, -dz, idrotm[2011], "ONLY"); - gMC->Gspos("B045", 9, "B076", -dx, dy, dz2, idrotm[2023], "ONLY"); - gMC->Gspos("B045", 10, "B076", -dx, dy, -dz2, idrotm[2031], "ONLY"); - gMC->Gspos("B045", 11, "B076", dx, dy, dz2, idrotm[2026], "ONLY"); - gMC->Gspos("B045", 12, "B076", dx, dy, -dz2, idrotm[2030], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 9, "B076", -dx, dy, dz2, idrotm[2023], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 10, "B076", -dx, dy, -dz2, idrotm[2031], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 11, "B076", dx, dy, dz2, idrotm[2026], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 12, "B076", dx, dy, -dz2, idrotm[2030], "ONLY"); - gMC->Gspos("B045", 13, "B076", -dx, -dy, dz2, idrotm[2024], "ONLY"); - gMC->Gspos("B045", 14, "B076", -dx, -dy, -dz2, idrotm[2032], "ONLY"); - gMC->Gspos("B045", 15, "B076", dx, -dy, dz2, idrotm[2025], "ONLY"); - gMC->Gspos("B045", 16, "B076", dx, -dy, -dz2, idrotm[2033], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 13, "B076", -dx, -dy, dz2, idrotm[2024], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 14, "B076", -dx, -dy, -dz2, idrotm[2032], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 15, "B076", dx, -dy, dz2, idrotm[2025], "ONLY"); + TVirtualMC::GetMC()->Gspos("B045", 16, "B076", dx, -dy, -dz2, idrotm[2033], "ONLY"); - gMC->Gspos("BM49", 7, "B076", dx, -dy, 0., idrotm[2025], "ONLY"); - gMC->Gspos("BM49", 8, "B076", -dx, -dy, 0., idrotm[2024], "ONLY"); + TVirtualMC::GetMC()->Gspos("BM49", 7, "B076", dx, -dy, 0., idrotm[2025], "ONLY"); + TVirtualMC::GetMC()->Gspos("BM49", 8, "B076", -dx, -dy, 0., idrotm[2024], "ONLY"); // // The internal frame @@ -537,7 +537,7 @@ void AliFRAMEv2::CreateGeometry() Int_t mod = i + 13; if (mod > 17) mod -= 18; snprintf(name, 16, "BSEGMO%d", mod); - gMC->Gsvolu(name, "TRD1", kAir, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu(name, "TRD1", kAir, ptrd1, 4); gGeoManager->GetVolume(name)->SetVisibility(kFALSE); module[i] = name; @@ -576,7 +576,7 @@ void AliFRAMEv2::CreateGeometry() dx = TMath::Sin(phi1*kdeg2rad)*rout2; dy = -TMath::Cos(phi1*kdeg2rad)*rout2; - gMC->Gspos("B033", i+1, "B076", dx, dy, 0., idrotm[2052+i], "ONLY"); + TVirtualMC::GetMC()->Gspos("B033", i+1, "B076", dx, dy, 0., idrotm[2052+i], "ONLY"); // } // Internal Frame rings @@ -591,15 +591,15 @@ void AliFRAMEv2::CreateGeometry() ptrd1[2] = ringW/2.; ptrd1[3] = ringH/2.; - gMC->Gsvolu("B072", "TRD1", kSteel, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu("B072", "TRD1", kSteel, ptrd1, 4); ptrd1[0] = 287.5 * TMath::Sin(10. * kdeg2rad) - 2.1; ptrd1[1] = 292.5 * TMath::Sin(10. * kdeg2rad) - 2.1; ptrd1[2] = ringW / 2. - 0.5; ptrd1[3] = ringH / 2. - 0.5; - gMC->Gsvolu("B073", "TRD1", kAir, ptrd1, 4); - gMC->Gspos("B073", 1, "B072", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("B073", "TRD1", kAir, ptrd1, 4); + TVirtualMC::GetMC()->Gspos("B073", 1, "B072", 0., 0., 0., 0, "ONLY"); // // I-Beam // Mother volume @@ -609,19 +609,19 @@ void AliFRAMEv2::CreateGeometry() ptrd1[1] = 293.0 * TMath::Sin(10.* kdeg2rad) - 2.1; ptrd1[2] = 6./2.; ptrd1[3] = 0.5/2.; - gMC->Gsvolu("BIH172", "TRD1", kSteel, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu("BIH172", "TRD1", kSteel, ptrd1, 4); ptrd1[0] = 287.0 * TMath::Sin(10.* kdeg2rad) - 2.1; ptrd1[1] = 287.5 * TMath::Sin(10.* kdeg2rad) - 2.1; ptrd1[2] = 6./2.; ptrd1[3] = 0.5/2.; - gMC->Gsvolu("BIH272", "TRD1", kSteel, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu("BIH272", "TRD1", kSteel, ptrd1, 4); // Vertical ptrd1[0] = 287.5 * TMath::Sin(10.* kdeg2rad) - 2.1; ptrd1[1] = 292.5 * TMath::Sin(10.* kdeg2rad) - 2.1; ptrd1[2] = 0.6/2.; ptrd1[3] = 5./2.; - gMC->Gsvolu("BIV72", "TRD1", kSteel, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu("BIV72", "TRD1", kSteel, ptrd1, 4); // Place asBI72->AddNode(gGeoManager->GetVolume("BIV72"), 1, new TGeoTranslation(0., 0., 0.)); asBI72->AddNode(gGeoManager->GetVolume("BIH172"), 1, new TGeoTranslation(0., 0., 2.75)); @@ -660,8 +660,8 @@ void AliFRAMEv2::CreateGeometry() for (i = 0; i < 3; i++) { // if ((i == 2) || (jmod ==0) || (jmod == 8)) { if (i == 2) { - gMC->Gspos("B072", 6*jmod+i+1, module[jmod], 0, dymodL[i], dz, 0, "ONLY"); - gMC->Gspos("B072", 6*jmod+i+4, module[jmod], 0, -dymodL[i], dz, idrotm[2070], "ONLY"); + TVirtualMC::GetMC()->Gspos("B072", 6*jmod+i+1, module[jmod], 0, dymodL[i], dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("B072", 6*jmod+i+4, module[jmod], 0, -dymodL[i], dz, idrotm[2070], "ONLY"); } else { TGeoVolume* vol = gGeoManager->GetVolume(module[jmod]); vol->AddNode(asBI72, 6*jmod+i+1, new TGeoTranslation(0, dymodL[i], dz)); @@ -675,46 +675,46 @@ void AliFRAMEv2::CreateGeometry() dy = dymodL[0] + (dHz/2. - 4.) * TMath::Tan(10. * kdeg2rad); for (jmod = 0; jmod < 18; jmod++) { - gMC->Gspos("B063", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2086], "ONLY"); - gMC->Gspos("B063I", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2087], "ONLY"); - gMC->Gspos("B063", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY"); - gMC->Gspos("B063I", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY"); + TVirtualMC::GetMC()->Gspos("B063", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2086], "ONLY"); + TVirtualMC::GetMC()->Gspos("B063I", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B063", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B063I", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY"); } dy = 73.6 + (dHz/2. + 4.) * TMath::Tan(40. * kdeg2rad); for (jmod = 0; jmod < 18; jmod++) { - gMC->Gspos("B163", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2086], "ONLY"); - gMC->Gspos("B163I", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2087], "ONLY"); - gMC->Gspos("B163", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY"); - gMC->Gspos("B163I", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY"); + TVirtualMC::GetMC()->Gspos("B163", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2086], "ONLY"); + TVirtualMC::GetMC()->Gspos("B163I", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B163", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B163I", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY"); } dy = 224.5 - (dHz/2 + 4.) * TMath::Tan(20. * kdeg2rad); for (jmod = 0; jmod < 18; jmod++) { - gMC->Gspos("B263", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2086], "ONLY"); - gMC->Gspos("B263I", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2087], "ONLY"); - gMC->Gspos("B263", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY"); - gMC->Gspos("B263I", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY"); + TVirtualMC::GetMC()->Gspos("B263", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2086], "ONLY"); + TVirtualMC::GetMC()->Gspos("B263I", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B263", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B263I", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY"); } dy = 231.4 + (dHz/2.+ 4.) * TMath::Tan(27.1 * kdeg2rad); for (jmod = 0; jmod < 18; jmod++) { - gMC->Gspos("B363", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2086], "ONLY"); - gMC->Gspos("B363I", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2087], "ONLY"); - gMC->Gspos("B363", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY"); - gMC->Gspos("B363I", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY"); + TVirtualMC::GetMC()->Gspos("B363", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2086], "ONLY"); + TVirtualMC::GetMC()->Gspos("B363I", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B363", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B363I", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY"); } dy = 340.2 - (dHz/2.+ 4.) * TMath::Tan(18.4 * kdeg2rad); for (jmod = 0; jmod < 18; jmod++) { - gMC->Gspos("B463", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2086], "ONLY"); - gMC->Gspos("B463I", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2087], "ONLY"); - gMC->Gspos("B463", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY"); - gMC->Gspos("B463I", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY"); + TVirtualMC::GetMC()->Gspos("B463", 4*jmod+1, module[jmod], dx0, dy, dz0, idrotm[2086], "ONLY"); + TVirtualMC::GetMC()->Gspos("B463I", 4*jmod+2, module[jmod], dx0, -dy, dz0, idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B463", 4*jmod+3, module[jmod], -dx0, -dy, dz0, idrotm[2087], "ONLY"); + TVirtualMC::GetMC()->Gspos("B463I", 4*jmod+4, module[jmod], -dx0, dy, dz0, idrotm[2086], "ONLY"); } // longitudinal bars (TPC rails attached) @@ -736,15 +736,15 @@ void AliFRAMEv2::CreateGeometry() ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; ptrap[10] = 0; -// gMC->Gsvolu("B059", "TRAP", kSteel, ptrap, 11); +// TVirtualMC::GetMC()->Gsvolu("B059", "TRAP", kSteel, ptrap, 11); ptrap[0] = 2.2; ptrap[4] = 2.15; ptrap[5] = ptrap[4]; ptrap[7] = ptrap[3]; ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - //gMC->Gsvolu("B062", "TRAP", kAir, ptrap, 11); - //gMC->Gspos("B062", 1, "B059", 0.0, 0., 0., 0, "ONLY"); + //TVirtualMC::GetMC()->Gsvolu("B062", "TRAP", kAir, ptrap, 11); + //TVirtualMC::GetMC()->Gspos("B062", 1, "B059", 0.0, 0., 0., 0, "ONLY"); // // longitudinal bars (no TPC rails attached) @@ -759,21 +759,21 @@ void AliFRAMEv2::CreateGeometry() ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - gMC->Gsvolu("BA59", "TRAP", kSteel, ptrap, 11); + TVirtualMC::GetMC()->Gsvolu("BA59", "TRAP", kSteel, ptrap, 11); ptrap[0] = longW/4.-0.25; ptrap[4] = longH/2.-0.50; ptrap[5] = ptrap[4]; ptrap[7] = ptrap[3]; ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - gMC->Gsvolu("BA62", "TRAP", kAir, ptrap, 11); - gMC->Gspos("BA62", 1, "BA59", 0.0, 0.0, -0.15, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BA62", "TRAP", kAir, ptrap, 11); + TVirtualMC::GetMC()->Gspos("BA62", 1, "BA59", 0.0, 0.0, -0.15, 0, "ONLY"); dz = -iFrH/2. + longH/2.; for (jmod = 0; jmod < 18; jmod++) { - gMC->Gspos("BA59", 2*jmod+1, module[jmod], 49.31, 0.0, dz, idrotm[2084], "ONLY"); - gMC->Gspos("BA59", 2*jmod+2, module[jmod], -49.31, 0.0, dz, idrotm[2083], "ONLY"); + TVirtualMC::GetMC()->Gspos("BA59", 2*jmod+1, module[jmod], 49.31, 0.0, dz, idrotm[2084], "ONLY"); + TVirtualMC::GetMC()->Gspos("BA59", 2*jmod+2, module[jmod], -49.31, 0.0, dz, idrotm[2083], "ONLY"); } @@ -797,15 +797,15 @@ void AliFRAMEv2::CreateGeometry() char nameMo[16]; snprintf(nameMo, 16, "BSEGMO%d",i); // M - gMC->Gspos("BTSH_M" , i+1 , nameMo, 0., 0., dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BTSH_M" , i+1 , nameMo, 0., 0., dz, 0, "ONLY"); // AM, CM dy = dymodL[0] + dyAM / 2. + 3.; - gMC->Gspos("BTSH_AM", i+ 1, nameMo, 0., dy, dz, 0, "ONLY"); - gMC->Gspos("BTSH_AM", i+19, nameMo, 0., -dy, dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BTSH_AM", i+ 1, nameMo, 0., dy, dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BTSH_AM", i+19, nameMo, 0., -dy, dz, 0, "ONLY"); // A, C dy = dymodL[1] + dyA / 2 + 0.4; - gMC->Gspos("BTSH_A" , i+ 1, nameMo, 0., dy, dz, 0, "ONLY"); - gMC->Gspos("BTSH_A" , i+19, nameMo, 0., -dy, dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BTSH_A" , i+ 1, nameMo, 0., dy, dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BTSH_A" , i+19, nameMo, 0., -dy, dz, 0, "ONLY"); } @@ -823,9 +823,9 @@ void AliFRAMEv2::CreateGeometry() snprintf(nameCh, 16, "BTRD%d",i); char nameMo[16]; snprintf(nameMo, 16, "BSEGMO%d",i); - gMC->Gsvolu(nameCh, "TRD1", kAir, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu(nameCh, "TRD1", kAir, ptrd1, 4); gGeoManager->GetVolume(nameCh)->SetVisibility(kFALSE); - gMC->Gspos(nameCh, 1, nameMo, 0., 0., -12.62, 0, "ONLY"); // CBL 28/6/2006 + TVirtualMC::GetMC()->Gspos(nameCh, 1, nameMo, 0., 0., -12.62, 0, "ONLY"); // CBL 28/6/2006 } // @@ -859,7 +859,7 @@ void AliFRAMEv2::CreateGeometry() TGeoVolume* btf = new TGeoVolume(nameCh, btofcs, gGeoManager->GetMedium("FRAME_Air")); btf->SetName(nameCh); gGeoManager->GetVolume(nameCh)->SetVisibility(kFALSE); - gMC->Gspos(nameCh, 1, nameMo, 0., 0., 43.525, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos(nameCh, 1, nameMo, 0., 0., 43.525, 0, "ONLY"); } // // Geometry of Rails starts here @@ -873,31 +873,31 @@ void AliFRAMEv2::CreateGeometry() rbox[0] = 25.00; rbox[1] = 27.50; rbox[2] = 600.00; - gMC->Gsvolu("BRS1", "BOX", kAir, rbox, 3); + TVirtualMC::GetMC()->Gsvolu("BRS1", "BOX", kAir, rbox, 3); rbox[0] = 25.00; rbox[1] = 3.75; - gMC->Gsvolu("BRS2", "BOX", kSteel, rbox, 3); + TVirtualMC::GetMC()->Gsvolu("BRS2", "BOX", kSteel, rbox, 3); rbox[0] = 3.00; rbox[1] = 20.00; - gMC->Gsvolu("BRS3", "BOX", kSteel, rbox, 3); + TVirtualMC::GetMC()->Gsvolu("BRS3", "BOX", kSteel, rbox, 3); - gMC->Gspos("BRS2", 1, "BRS1", 0., -27.5+3.75, 0., 0, "ONLY"); - gMC->Gspos("BRS2", 2, "BRS1", 0., 27.5-3.75, 0., 0, "ONLY"); - gMC->Gspos("BRS3", 1, "BRS1", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("BRS1", 1, "ALIC", -430.-3., -190., 0., 0, "ONLY"); - gMC->Gspos("BRS1", 2, "ALIC", 430.+3., -190., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BRS2", 1, "BRS1", 0., -27.5+3.75, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BRS2", 2, "BRS1", 0., 27.5-3.75, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BRS3", 1, "BRS1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BRS1", 1, "ALIC", -430.-3., -190., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BRS1", 2, "ALIC", 430.+3., -190., 0., 0, "ONLY"); rbox[0] = 3.0; rbox[1] = 145./4.; rbox[2] = 25.0; - gMC->Gsvolu("BRS4", "BOX", kSteel, rbox, 3); + TVirtualMC::GetMC()->Gsvolu("BRS4", "BOX", kSteel, rbox, 3); - gMC->Gspos("BRS4", 1, "ALIC", 430.+3., -190.+55./2.+rbox[1], 224., 0, "ONLY"); - gMC->Gspos("BRS4", 2, "ALIC", 430.+3., -190.+55./2.+rbox[1], -224., 0, "ONLY"); -// gMC->Gspos("BRS4", 3, "ALIC", -430.+3, -180.+55./2.+rbox[1], 224., 0, "ONLY"); -// gMC->Gspos("BRS4", 4, "ALIC", -430.+3, -180.+55./2.+rbox[1], -224., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BRS4", 1, "ALIC", 430.+3., -190.+55./2.+rbox[1], 224., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BRS4", 2, "ALIC", 430.+3., -190.+55./2.+rbox[1], -224., 0, "ONLY"); +// TVirtualMC::GetMC()->Gspos("BRS4", 3, "ALIC", -430.+3, -180.+55./2.+rbox[1], 224., 0, "ONLY"); +// TVirtualMC::GetMC()->Gspos("BRS4", 4, "ALIC", -430.+3, -180.+55./2.+rbox[1], -224., 0, "ONLY"); @@ -928,7 +928,7 @@ void AliFRAMEv2::CreateGeometry() tpar[0] = kBFMRin; tpar[1] = kBFMRou; tpar[2] = kBFMdz / 2.; - gMC->Gsvolu("BFMO", "TUBE", kAir, tpar, 3); + TVirtualMC::GetMC()->Gsvolu("BFMO", "TUBE", kAir, tpar, 3); // CBL //////////////////////////////////////////////////////// // @@ -939,7 +939,7 @@ void AliFRAMEv2::CreateGeometry() ptrd1[1] = 61.1765 - 0.3; ptrd1[2] = kBFMdz / 2.; ptrd1[3] = 38.95; - gMC->Gsvolu("BFTRD", "TRD1", kAir, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu("BFTRD", "TRD1", kAir, ptrd1, 4); gGeoManager->GetVolume("BFTRD")->SetVisibility(kFALSE); for (i = 0; i < 18; i++) { @@ -947,7 +947,7 @@ void AliFRAMEv2::CreateGeometry() Float_t phiBF = i * 20.0; dx = TMath::Sin(phiBF*kdeg2rad)*(342.0-12.62); dy = -TMath::Cos(phiBF*kdeg2rad)*(342.0-12.62); - gMC->Gspos("BFTRD",i,"BFMO",dx,dy,0.0,idrotm[2034+i],"ONLY"); + TVirtualMC::GetMC()->Gspos("BFTRD",i,"BFMO",dx,dy,0.0,idrotm[2034+i],"ONLY"); } @@ -960,14 +960,14 @@ void AliFRAMEv2::CreateGeometry() tpar[1] = tpar[0] + kBFRdr; tpar[2] = kBFRdz / 2.; - gMC->Gsvolu("BFIR", "TUBE", kSteel, tpar, 3); + TVirtualMC::GetMC()->Gsvolu("BFIR", "TUBE", kSteel, tpar, 3); tpar[0] = tpar[0] + kBFBdd; tpar[1] = tpar[1] - kBFBdd; tpar[2] = (kBFRdz - 2. * kBFBdd) / 2.; - gMC->Gsvolu("BFII", "TUBE", kAir, tpar, 3); - gMC->Gspos("BFII", 1, "BFIR", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BFII", "TUBE", kAir, tpar, 3); + TVirtualMC::GetMC()->Gspos("BFII", 1, "BFIR", 0., 0., 0., 0, "ONLY"); // // Outer RING @@ -975,21 +975,21 @@ void AliFRAMEv2::CreateGeometry() tpar[1] = kBFMRou; tpar[2] = kBFRdz / 2.; - gMC->Gsvolu("BFOR", "TUBE", kSteel, tpar, 3); + TVirtualMC::GetMC()->Gsvolu("BFOR", "TUBE", kSteel, tpar, 3); tpar[0] = tpar[0] + kBFBdd; tpar[1] = tpar[1] - kBFBdd; tpar[2] = (kBFRdz - 2. * kBFBdd) / 2.; - gMC->Gsvolu("BFOO", "TUBE", kAir, tpar, 3); - gMC->Gspos("BFOO", 1, "BFOR", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BFOO", "TUBE", kAir, tpar, 3); + TVirtualMC::GetMC()->Gspos("BFOO", 1, "BFOR", 0., 0., 0., 0, "ONLY"); dz = kBFMdz/2. - kBFRdz / 2.; - gMC->Gspos("BFIR", 1, "BFMO", 0., 0., dz, 0, "ONLY"); - gMC->Gspos("BFIR", 2, "BFMO", 0., 0., -dz, 0, "ONLY"); - gMC->Gspos("BFOR", 1, "BFMO", 0., 0., dz, 0, "ONLY"); - gMC->Gspos("BFOR", 2, "BFMO", 0., 0., -dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BFIR", 1, "BFMO", 0., 0., dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BFIR", 2, "BFMO", 0., 0., -dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BFOR", 1, "BFMO", 0., 0., dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BFOR", 2, "BFMO", 0., 0., -dz, 0, "ONLY"); // // Longitudinal Bars @@ -999,13 +999,13 @@ void AliFRAMEv2::CreateGeometry() bpar[0] = kBFBd/2; bpar[1] = bpar[0]; bpar[2] = kBFMdz/2. - kBFBd; - gMC->Gsvolu("BFLB", "BOX ", kSteel, bpar, 3); + TVirtualMC::GetMC()->Gsvolu("BFLB", "BOX ", kSteel, bpar, 3); bpar[0] = bpar[0] - kBFBdd; bpar[1] = bpar[1] - kBFBdd; bpar[2] = bpar[2] - kBFBdd; - gMC->Gsvolu("BFLL", "BOX ", kAir, bpar, 3); - gMC->Gspos("BFLL", 1, "BFLB", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BFLL", "BOX ", kAir, bpar, 3); + TVirtualMC::GetMC()->Gspos("BFLL", 1, "BFLB", 0., 0., 0., 0, "ONLY"); for (i = 0; i < 18; i++) { @@ -1018,12 +1018,12 @@ void AliFRAMEv2::CreateGeometry() Float_t yb = ri * TMath::Sin(phi0 * kDegrad); AliMatrix(idrotm[2090+i], 90.0, phi0, 90.0, phi0 + 270., 0., 0.); - gMC->Gspos("BFLB", i + 1, "BFMO", xb, yb, 0., idrotm[2090 + i], "ONLY"); + TVirtualMC::GetMC()->Gspos("BFLB", i + 1, "BFMO", xb, yb, 0., idrotm[2090 + i], "ONLY"); xb = ro * TMath::Cos(phi0 * kDegrad); yb = ro * TMath::Sin(phi0 * kDegrad); - gMC->Gspos("BFLB", i + 19, "BFMO", xb, yb, 0., idrotm[2090 +i], "ONLY"); + TVirtualMC::GetMC()->Gspos("BFLB", i + 19, "BFMO", xb, yb, 0., idrotm[2090 +i], "ONLY"); } // @@ -1039,13 +1039,13 @@ void AliFRAMEv2::CreateGeometry() bpar[0] -= delta /2.; - gMC->Gsvolu("BFRB", "BOX ", kSteel, bpar, 3); + TVirtualMC::GetMC()->Gsvolu("BFRB", "BOX ", kSteel, bpar, 3); bpar[0] = bpar[0] - kBFBdd; bpar[1] = bpar[1] - kBFBdd; bpar[2] = bpar[2] - kBFBdd; - gMC->Gsvolu("BFRR", "BOX ", kAir, bpar, 3); - gMC->Gspos("BFRR", 1, "BFRB", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BFRR", "BOX ", kAir, bpar, 3); + TVirtualMC::GetMC()->Gspos("BFRR", 1, "BFRB", 0., 0., 0., 0, "ONLY"); Int_t iphi[10] = {0, 1, 3, 6, 8, 9, 10, 12, 15, 17}; @@ -1058,12 +1058,12 @@ void AliFRAMEv2::CreateGeometry() Float_t xb = rb * TMath::Cos(phib * kDegrad); Float_t yb = rb * TMath::Sin(phib * kDegrad); - gMC->Gspos("BFRB", i + 1, "BFMO", xb, yb, dz, idrotm[2034 + iphi[i]], "ONLY"); - gMC->Gspos("BFRB", i + 11, "BFMO", xb, yb, -dz, idrotm[2034 + iphi[i]], "ONLY"); + TVirtualMC::GetMC()->Gspos("BFRB", i + 1, "BFMO", xb, yb, dz, idrotm[2034 + iphi[i]], "ONLY"); + TVirtualMC::GetMC()->Gspos("BFRB", i + 11, "BFMO", xb, yb, -dz, idrotm[2034 + iphi[i]], "ONLY"); } - gMC->Gspos("BFMO", i + 19, "ALIC", 0, 0, - 376. - kBFMdz/2. - 0.5 , 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BFMO", i + 19, "ALIC", 0, 0, - 376. - kBFMdz/2. - 0.5 , 0, "ONLY"); @@ -1098,8 +1098,8 @@ void AliFRAMEv2::CreateGeometry() ppgon[8] = ppgon[5]; ppgon[9] = ppgon[6]; - gMC->Gsvolu("BBMO", "PGON", kAir, ppgon, 10); - gMC->Gsdvn("BBCE", "BBMO", 18, 2); + TVirtualMC::GetMC()->Gsvolu("BBMO", "PGON", kAir, ppgon, 10); + TVirtualMC::GetMC()->Gsdvn("BBCE", "BBMO", 18, 2); // CBL //////////////////////////////////////////////////////// // @@ -1112,9 +1112,9 @@ void AliFRAMEv2::CreateGeometry() ptrd1[1] = 61.1765 - 2.5; ptrd1[2] = kBBMdz / 2.; ptrd1[3] = 38.95; - gMC->Gsvolu("BBTRD", "TRD1", kAir, ptrd1, 4); + TVirtualMC::GetMC()->Gsvolu("BBTRD", "TRD1", kAir, ptrd1, 4); gGeoManager->GetVolume("BBTRD")->SetVisibility(kFALSE); - gMC->Gspos("BBTRD", 1, "BBCE", 342.0-12.62, 0.0, 0.0, idrotm[2092], "ONLY"); + TVirtualMC::GetMC()->Gspos("BBTRD", 1, "BBCE", 342.0-12.62, 0.0, 0.0, idrotm[2092], "ONLY"); // CBL //////////////////////////////////////////////////////// @@ -1122,21 +1122,21 @@ void AliFRAMEv2::CreateGeometry() bpar[0] = kBBBdz/2.; bpar[1] = bpar[0]; bpar[2] = kBBMdz/2. - kBBBdz; - gMC->Gsvolu("BBLB", "BOX ", kSteel, bpar, 3); + TVirtualMC::GetMC()->Gsvolu("BBLB", "BOX ", kSteel, bpar, 3); bpar[0] -= kBBBdd; bpar[1] -= kBBBdd; bpar[2] -= kBBBdd; - gMC->Gsvolu("BBLL", "BOX ", kAir, bpar, 3); - gMC->Gspos("BBLL", 1, "BBLB", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BBLL", "BOX ", kAir, bpar, 3); + TVirtualMC::GetMC()->Gspos("BBLL", 1, "BBLB", 0., 0., 0., 0, "ONLY"); dx = kBBMRin + kBBBdz/2. + (bpar[1] + kBBBdd) * TMath::Sin(10. * kDegrad); dy = dx * TMath::Tan(10. * kDegrad) - kBBBdz/2./TMath::Cos(10. * kDegrad); - gMC->Gspos("BBLB", 1, "BBCE", dx, dy, 0., idrotm[2052], "ONLY"); + TVirtualMC::GetMC()->Gspos("BBLB", 1, "BBCE", dx, dy, 0., idrotm[2052], "ONLY"); dx = kBBMRou - kBBBdz/2. - (bpar[1] + kBBBdd) * TMath::Sin(10. * kDegrad); dy = dx * TMath::Tan(10. * kDegrad) - kBBBdz/2./TMath::Cos(10. * kDegrad); - gMC->Gspos("BBLB", 2, "BBCE", dx, dy, 0., idrotm[2052], "ONLY"); + TVirtualMC::GetMC()->Gspos("BBLB", 2, "BBCE", dx, dy, 0., idrotm[2052], "ONLY"); // // Radial Bars @@ -1145,21 +1145,21 @@ void AliFRAMEv2::CreateGeometry() bpar[1] = kBBBdz/2; bpar[2] = bpar[1]; - gMC->Gsvolu("BBRB", "BOX ", kSteel, bpar, 3); + TVirtualMC::GetMC()->Gsvolu("BBRB", "BOX ", kSteel, bpar, 3); bpar[0] -= kBBBdd; bpar[1] -= kBBBdd; bpar[2] -= kBBBdd; - gMC->Gsvolu("BBRR", "BOX ", kAir, bpar, 3); - gMC->Gspos("BBRR", 1, "BBRB", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BBRR", "BOX ", kAir, bpar, 3); + TVirtualMC::GetMC()->Gspos("BBRR", 1, "BBRB", 0., 0., 0., 0, "ONLY"); dx = (kBBMRou + kBBMRin) / 2.; dy = ((kBBMRou + kBBMRin)/ 2) * TMath::Tan(10 * kDegrad) - kBBBdz / 2./ TMath::Cos(10 * kDegrad); dz = kBBMdz/2. - kBBBdz / 2.; - gMC->Gspos("BBRB", 1, "BBCE", dx, dy, dz, idrotm[2052], "ONLY"); - gMC->Gspos("BBRB", 2, "BBCE", dx, dy, - dz, idrotm[2052], "ONLY"); - gMC->Gspos("BBRB", 3, "BBCE", dx, dy, 0., idrotm[2052], "ONLY"); + TVirtualMC::GetMC()->Gspos("BBRB", 1, "BBCE", dx, dy, dz, idrotm[2052], "ONLY"); + TVirtualMC::GetMC()->Gspos("BBRB", 2, "BBCE", dx, dy, - dz, idrotm[2052], "ONLY"); + TVirtualMC::GetMC()->Gspos("BBRB", 3, "BBCE", dx, dy, 0., idrotm[2052], "ONLY"); // // Circular bars @@ -1169,31 +1169,31 @@ void AliFRAMEv2::CreateGeometry() bpar[1] = kBBMRin * TMath::Sin(10. * kDegrad); bpar[0] = kBBBdz/2; bpar[2] = bpar[0]; - gMC->Gsvolu("BBC1", "BOX ", kSteel, bpar, 3); + TVirtualMC::GetMC()->Gsvolu("BBC1", "BOX ", kSteel, bpar, 3); bpar[0] -= kBBBdd; bpar[1] -= kBBBdd; bpar[2] -= kBBBdd; - gMC->Gsvolu("BBC2", "BOX ", kAir, bpar, 3); - gMC->Gspos("BBC2", 1, "BBC1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BBC2", "BOX ", kAir, bpar, 3); + TVirtualMC::GetMC()->Gspos("BBC2", 1, "BBC1", 0., 0., 0., 0, "ONLY"); dx = kBBMRin + kBBBdz/2; dy = 0.; - gMC->Gspos("BBC1", 1, "BBCE", dx, dy, dz, 0, "ONLY"); - gMC->Gspos("BBC1", 2, "BBCE", dx, dy, -dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BBC1", 1, "BBCE", dx, dy, dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BBC1", 2, "BBCE", dx, dy, -dz, 0, "ONLY"); // // Outer bpar[1] = (kBBMRou - kBBBdz) * TMath::Sin(10. * kDegrad); bpar[0] = kBBBdz/2; bpar[2] = bpar[0]; - gMC->Gsvolu("BBC3", "BOX ", kSteel, bpar, 3); + TVirtualMC::GetMC()->Gsvolu("BBC3", "BOX ", kSteel, bpar, 3); bpar[0] -= kBBBdd; bpar[1] -= kBBBdd; bpar[2] -= kBBBdd; - gMC->Gsvolu("BBC4", "BOX ", kAir, bpar, 3); - gMC->Gspos("BBC4", 1, "BBC3", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BBC4", "BOX ", kAir, bpar, 3); + TVirtualMC::GetMC()->Gspos("BBC4", 1, "BBC3", 0., 0., 0., 0, "ONLY"); dx = kBBMRou - kBBBdz/2; dy = 0.; - gMC->Gspos("BBC3", 1, "BBCE", dx, dy, dz, 0, "ONLY"); - gMC->Gspos("BBC3", 2, "BBCE", dx, dy, - dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BBC3", 1, "BBCE", dx, dy, dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BBC3", 2, "BBCE", dx, dy, - dz, 0, "ONLY"); // // Diagonal Bars // @@ -1218,18 +1218,18 @@ void AliFRAMEv2::CreateGeometry() ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; ptrap[10] = 0; - gMC->Gsvolu("BBD1", "TRAP", kSteel, ptrap, 11); + TVirtualMC::GetMC()->Gsvolu("BBD1", "TRAP", kSteel, ptrap, 11); ptrap[3] = d/2-kBBBdd; ptrap[4] = (d/2-kBBBdd)/x; ptrap[5] = ptrap[4]; ptrap[7] = ptrap[3]; ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - gMC->Gsvolu("BBD3", "TRAP", kAir, ptrap, 11); - gMC->Gspos("BBD3", 1, "BBD1", 0.0, 0.0, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BBD3", "TRAP", kAir, ptrap, 11); + TVirtualMC::GetMC()->Gspos("BBD3", 1, "BBD1", 0.0, 0.0, 0., 0, "ONLY"); dx = (kBBMRou + kBBMRin) / 2.; dy = ((kBBMRou + kBBMRin)/ 2) * TMath::Tan(10 * kDegrad) - kBBBdz / 2./ TMath::Cos(10 * kDegrad); - gMC->Gspos("BBD1", 1, "BBCE", dx, dy, dz/2. + kBBBdz/2., idrotm[2052], "ONLY"); + TVirtualMC::GetMC()->Gspos("BBD1", 1, "BBCE", dx, dy, dz/2. + kBBBdz/2., idrotm[2052], "ONLY"); ptrap[0] = dz/2.; @@ -1243,21 +1243,21 @@ void AliFRAMEv2::CreateGeometry() ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; ptrap[10] = 0; - gMC->Gsvolu("BBD2", "TRAP", kSteel, ptrap, 11); + TVirtualMC::GetMC()->Gsvolu("BBD2", "TRAP", kSteel, ptrap, 11); ptrap[3] = d/2-kBBBdd; ptrap[4] = (d/2-kBBBdd)/x; ptrap[5] = ptrap[4]; ptrap[7] = ptrap[3]; ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - gMC->Gsvolu("BBD4", "TRAP", kAir, ptrap, 11); - gMC->Gspos("BBD4", 1, "BBD2", 0.0, 0.0, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("BBD4", "TRAP", kAir, ptrap, 11); + TVirtualMC::GetMC()->Gspos("BBD4", 1, "BBD2", 0.0, 0.0, 0., 0, "ONLY"); dx = (kBBMRou + kBBMRin) / 2.; dy = ((kBBMRou + kBBMRin)/ 2) * TMath::Tan(10 * kDegrad) - kBBBdz / 2./ TMath::Cos(10 * kDegrad); - gMC->Gspos("BBD2", 1, "BBCE", dx, dy, -dz/2. - kBBBdz/2., idrotm[2052], "ONLY"); + TVirtualMC::GetMC()->Gspos("BBD2", 1, "BBCE", dx, dy, -dz/2. - kBBBdz/2., idrotm[2052], "ONLY"); - gMC->Gspos("BBMO", 1, "ALIC", 0., 0., + 376. + kBBMdz / 2. + 0.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("BBMO", 1, "ALIC", 0., 0., + 376. + kBBMdz / 2. + 0.5, 0, "ONLY"); } @@ -1337,8 +1337,8 @@ void AliFRAMEv2::Init() } // // The reference volume id - fRefVolumeId1 = gMC->VolId("BREF1"); - fRefVolumeId2 = gMC->VolId("BREF2"); + fRefVolumeId1 = TVirtualMC::GetMC()->VolId("BREF1"); + fRefVolumeId2 = TVirtualMC::GetMC()->VolId("BREF2"); } Int_t AliFRAMEv2::IsVersion() const @@ -1359,15 +1359,15 @@ void AliFRAMEv2::StepManager() // // Only charged tracks - if( !(gMC->TrackCharge()) ) return; + if( !(TVirtualMC::GetMC()->TrackCharge()) ) return; // // Only tracks entering mother volume // - id=gMC->CurrentVolID(copy); + id=TVirtualMC::GetMC()->CurrentVolID(copy); if ((id != fRefVolumeId1) && (id != fRefVolumeId2)) return; - if(!gMC->IsTrackEntering()) return; + if(!TVirtualMC::GetMC()->IsTrackEntering()) return; // // Add the reference track // @@ -1403,13 +1403,13 @@ void AliFRAMEv2::MakeHeatScreen(const char* name, Float_t dyP, Int_t rot1, Int_t thshM[1] = dyP / 2.; thshM[2] = dzP / 2.; snprintf(mname, 16, "BTSH_%s", name); - gMC->Gsvolu(mname, "BOX ", kAir, thshM, 3); + TVirtualMC::GetMC()->Gsvolu(mname, "BOX ", kAir, thshM, 3); // // Aluminum sheet thshM[2] = 0.025; snprintf(cname, 16, "BTSHA_%s", name); - gMC->Gsvolu(cname, "BOX ", kAlu, thshM, 3); - gMC->Gspos(cname, 1, mname, 0., 0., -0.5, 0); + TVirtualMC::GetMC()->Gsvolu(cname, "BOX ", kAlu, thshM, 3); + TVirtualMC::GetMC()->Gspos(cname, 1, mname, 0., 0., -0.5, 0); // // Tubes Float_t thshT[3]; @@ -1418,20 +1418,20 @@ void AliFRAMEv2::MakeHeatScreen(const char* name, Float_t dyP, Int_t rot1, Int_t thshT[2] = (dyP / 2. - 8.); // snprintf(t1name, 16, "BTSHT1_%s", name); - gMC->Gsvolu(t1name, "TUBE", kAlu, thshT, 3); + TVirtualMC::GetMC()->Gsvolu(t1name, "TUBE", kAlu, thshT, 3); dx = - dxP / 2. + 8. - 0.5; - gMC->Gspos(t1name, 1, mname, dx, 0., 0.025, rot1); + TVirtualMC::GetMC()->Gspos(t1name, 1, mname, dx, 0., 0.025, rot1); // snprintf(t2name, 16, "BTSHT2_%s", name); snprintf(t3name, 16, "BTSHT3_%s", name); snprintf(t4name, 16, "BTSHT4_%s", name); snprintf(t5name, 16, "BTSHT5_%s", name); thshT[2] = (thshM[1] - 12.); - gMC->Gsvolu(t2name, "TUBE", kAlu, thshT, 3); + TVirtualMC::GetMC()->Gsvolu(t2name, "TUBE", kAlu, thshT, 3); thshT[2] = 7.9/2.; - gMC->Gsvolu(t3name, "TUBE", kAlu, thshT, 3); + TVirtualMC::GetMC()->Gsvolu(t3name, "TUBE", kAlu, thshT, 3); thshT[2] = 23.9/2.; - gMC->Gsvolu(t4name, "TUBE", kAlu, thshT, 3); + TVirtualMC::GetMC()->Gsvolu(t4name, "TUBE", kAlu, thshT, 3); Int_t sig = 1; Int_t ipo = 1; @@ -1442,16 +1442,16 @@ void AliFRAMEv2::MakeHeatScreen(const char* name, Float_t dyP, Int_t rot1, Int_t Float_t dy1 = - (thshM[1] - 15.5) * sig; Float_t dy2 = - (thshM[1] - 7.5) * sig; - gMC->Gspos(t2name, ipo++, mname, dx, dy, 0.025, rot1); + TVirtualMC::GetMC()->Gspos(t2name, ipo++, mname, dx, dy, 0.025, rot1); dx += 6.9; - gMC->Gspos(t2name, ipo++, mname, dx, dy, 0.025, rot1); + TVirtualMC::GetMC()->Gspos(t2name, ipo++, mname, dx, dy, 0.025, rot1); - gMC->Gspos(t3name, i+1, mname, dx - 3.45, dy1, 0.025, rot2); - gMC->Gspos(t4name, i+1, mname, dx - 3.45, dy2, 0.025, rot2); + TVirtualMC::GetMC()->Gspos(t3name, i+1, mname, dx - 3.45, dy1, 0.025, rot2); + TVirtualMC::GetMC()->Gspos(t4name, i+1, mname, dx - 3.45, dy2, 0.025, rot2); } dx += 8.; - gMC->Gspos(t1name, 2, mname, dx, 0., 0.025, rot1); - gMC->Gspos(t3name, 6, mname, dx - 3.45, -(thshM[1] - 7.5), 0.025, rot2); + TVirtualMC::GetMC()->Gspos(t1name, 2, mname, dx, 0., 0.025, rot1); + TVirtualMC::GetMC()->Gspos(t3name, 6, mname, dx - 3.45, -(thshM[1] - 7.5), 0.025, rot2); } @@ -1490,7 +1490,7 @@ void AliFRAMEv2::WebFrame(const char* name, Float_t dHz, Float_t theta0, Float_t ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; ptrap[10] = 0; - gMC->Gsvolu(name, "TRAP", kSteel, ptrap, 11); + TVirtualMC::GetMC()->Gsvolu(name, "TRAP", kSteel, ptrap, 11); ptrap[3] = (6. - 1.)/cos(theta0 * kdeg2rad)/2.; ptrap[4] = 0.75; ptrap[5] = ptrap[4]; @@ -1498,8 +1498,8 @@ void AliFRAMEv2::WebFrame(const char* name, Float_t dHz, Float_t theta0, Float_t ptrap[8] = ptrap[4]; ptrap[9] = ptrap[4]; - gMC->Gsvolu(nameA, "TRAP", kAir, ptrap, 11); - gMC->Gspos(nameA, 1, name, 0.0, -0.25, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu(nameA, "TRAP", kAir, ptrap, 11); + TVirtualMC::GetMC()->Gspos(nameA, 1, name, 0.0, -0.25, 0., 0, "ONLY"); gGeoManager->GetVolume(name)->SetVisibility(1); } diff --git a/STRUCT/AliHALL.cxx b/STRUCT/AliHALL.cxx index 3b7a229479e..47545374ee6 100644 --- a/STRUCT/AliHALL.cxx +++ b/STRUCT/AliHALL.cxx @@ -132,9 +132,9 @@ void AliHALL::CreateGeometry() trdpar[3] = dh / 2.; AliMatrix(idrotm[1900], 90., 0., 0., 0., 90., 90.); AliMatrix(idrotm[1901], 270., 0., 90., 90., 0., 0.); - gMC->Gsvolu("HUFL", "TRD1", idtmed[1956], trdpar, 4); + TVirtualMC::GetMC()->Gsvolu("HUFL", "TRD1", idtmed[1956], trdpar, 4); r2 = hullen + 1900.; - gMC->Gspos("HUFL", 1, "ALIC", 70.,-100-trdpar[3] , -r2, idrotm[1900], "ONLY"); + TVirtualMC::GetMC()->Gspos("HUFL", 1, "ALIC", 70.,-100-trdpar[3] , -r2, idrotm[1900], "ONLY"); // RB24/26 wall @@ -144,8 +144,8 @@ void AliHALL::CreateGeometry() tspar[2] = hullen; tspar[3] = phid - 90.; tspar[4] = 270. - phid; - gMC->Gsvolu("HUWA", "TUBS", idtmed[1956], tspar, 5); - gMC->Gspos("HUWA", 1, "ALIC", 70., 40., -1900 - hullen , 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("HUWA", "TUBS", idtmed[1956], tspar, 5); + TVirtualMC::GetMC()->Gspos("HUWA", 1, "ALIC", 70., 40., -1900 - hullen , 0, "ONLY"); // Hall floor @@ -155,9 +155,9 @@ void AliHALL::CreateGeometry() trdpar[1] = TMath::Tan(phid * kDegrad) * 190. + 700.; trdpar[2] = 550.; trdpar[3] = 95.; - gMC->Gsvolu("HHF1", "TRD1", idtmed[1956], trdpar, 4); - gMC->Gspos("HHF1", 1, "ALIC", 0., -801., 1350., idrotm[1900], "ONLY"); - gMC->Gspos("HHF1", 2, "ALIC", 0., -801.,-1350., idrotm[1900], "ONLY"); + TVirtualMC::GetMC()->Gsvolu("HHF1", "TRD1", idtmed[1956], trdpar, 4); + TVirtualMC::GetMC()->Gspos("HHF1", 1, "ALIC", 0., -801., 1350., idrotm[1900], "ONLY"); + TVirtualMC::GetMC()->Gspos("HHF1", 2, "ALIC", 0., -801.,-1350., idrotm[1900], "ONLY"); // Hall side walls @@ -173,17 +173,17 @@ void AliHALL::CreateGeometry() trapar[9] = trapar[5]; trapar[10] = trapar[6]; dx = trapar[4] * 1.5 + 700. - trapar[5] * .5; - gMC->Gsvolu("HHW1", "TRAP", idtmed[1956], trapar, 11); - gMC->Gspos("HHW1", 1, "ALIC", dx, -896+trapar[3], 1350., 0, "ONLY"); - gMC->Gspos("HHW1", 2, "ALIC",-dx, -896+trapar[3], 1350., idrotm[1901], "ONLY"); - gMC->Gspos("HHW1", 3, "ALIC", dx, -896+trapar[3], -1350., 0, "ONLY"); - gMC->Gspos("HHW1", 4, "ALIC",-dx, -896+trapar[3], -1350., idrotm[1901], "ONLY"); + TVirtualMC::GetMC()->Gsvolu("HHW1", "TRAP", idtmed[1956], trapar, 11); + TVirtualMC::GetMC()->Gspos("HHW1", 1, "ALIC", dx, -896+trapar[3], 1350., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("HHW1", 2, "ALIC",-dx, -896+trapar[3], 1350., idrotm[1901], "ONLY"); + TVirtualMC::GetMC()->Gspos("HHW1", 3, "ALIC", dx, -896+trapar[3], -1350., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("HHW1", 4, "ALIC",-dx, -896+trapar[3], -1350., idrotm[1901], "ONLY"); pbox[0] = 50.; pbox[1] = (500. - (trapar[3] * 2. - 896.)) / 2.; pbox[2] = 1900.; - gMC->Gsvolu("HBW1", "BOX ", idtmed[1956], pbox, 3); - gMC->Gspos("HBW1", 1, "ALIC", 1120., 500-pbox[1], 0., 0, "ONLY"); - gMC->Gspos("HBW1", 2, "ALIC", -1120., 500-pbox[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("HBW1", "BOX ", idtmed[1956], pbox, 3); + TVirtualMC::GetMC()->Gspos("HBW1", 1, "ALIC", 1120., 500-pbox[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("HBW1", 2, "ALIC", -1120., 500-pbox[1], 0., 0, "ONLY"); // slanted wall close to L3 magnet @@ -206,10 +206,10 @@ void AliHALL::CreateGeometry() trapar[10] = trapar[6]; w1 = trapar[4]; dx = cm*TMath::Tan(phid * kDegrad) + 700. + trapar[4] * 1.5 - trapar[5] * .5; - gMC->Gsvolu("HHW2", "TRAP", idtmed[1956], trapar, 11); + TVirtualMC::GetMC()->Gsvolu("HHW2", "TRAP", idtmed[1956], trapar, 11); r2 = cm - 896. + trapar[3]; - gMC->Gspos("HHW2", 1, "ALIC", dx, r2, 0., 0, "ONLY"); - gMC->Gspos("HHW2", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY"); + TVirtualMC::GetMC()->Gspos("HHW2", 1, "ALIC", dx, r2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("HHW2", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY"); trapar[3] = cm / 2.; trapar[4] = w1 + cm / 2.; trapar[5] = w1; @@ -219,10 +219,10 @@ void AliHALL::CreateGeometry() trapar[9] = trapar[5]; trapar[10] = trapar[6]; dx = 1170. - trapar[4] * .5 - trapar[5] * .5; - gMC->Gsvolu("HHW3", "TRAP", idtmed[1956], trapar, 11); + TVirtualMC::GetMC()->Gsvolu("HHW3", "TRAP", idtmed[1956], trapar, 11); r2 = trapar[3] - 896.; - gMC->Gspos("HHW3", 1, "ALIC", dx, r2, 0., 0, "ONLY"); - gMC->Gspos("HHW3", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY"); + TVirtualMC::GetMC()->Gspos("HHW3", 1, "ALIC", dx, r2, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("HHW3", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY"); tspar[0] = 1070.; @@ -230,23 +230,23 @@ void AliHALL::CreateGeometry() tspar[2] = 1900.; tspar[3] = 0.; tspar[4] = 180.; - gMC->Gsvolu("HHC1", "TUBS", idtmed[1956], tspar, 5); - gMC->Gspos("HHC1", 1, "ALIC", 0., 500., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("HHC1", "TUBS", idtmed[1956], tspar, 5); + TVirtualMC::GetMC()->Gspos("HHC1", 1, "ALIC", 0., 500., 0., 0, "ONLY"); trdpar[0] = 1170 - trapar[4] * 2.; trdpar[1] = trdpar[0] + TMath::Tan(phim * kDegrad) * 76.; trdpar[2] = 800.; trdpar[3] = 38.; - gMC->Gsvolu("HHF2", "TRD1", idtmed[1956], trdpar, 4); - gMC->Gspos("HHF2", 1, "ALIC", 0., -858., 0., idrotm[1900], "ONLY"); + TVirtualMC::GetMC()->Gsvolu("HHF2", "TRD1", idtmed[1956], trdpar, 4); + TVirtualMC::GetMC()->Gspos("HHF2", 1, "ALIC", 0., -858., 0., idrotm[1900], "ONLY"); // pillars for working platform pbox[0] = 40.; pbox[1] = 96.; pbox[2] = 550.; - gMC->Gsvolu("HPIL", "BOX ", idtmed[1956], pbox, 3); - gMC->Gspos("HPIL", 1, "ALIC", 165.,-706+pbox[1] , -1350., 0, "ONLY"); - gMC->Gspos("HPIL", 2, "ALIC",-165.,-706+pbox[1] , -1350., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("HPIL", "BOX ", idtmed[1956], pbox, 3); + TVirtualMC::GetMC()->Gspos("HPIL", 1, "ALIC", 165.,-706+pbox[1] , -1350., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("HPIL", 2, "ALIC",-165.,-706+pbox[1] , -1350., 0, "ONLY"); // simple concrete beam shield @@ -262,8 +262,8 @@ void AliHALL::CreateGeometry() ppgon[5] = 150.; ppgon[6] = 250.; - gMC->Gsvolu("HMBS", "PGON", idtmed[1956], ppgon, 10); - gMC->Gspos("HMBS", 1, "ALIC", 0., 70., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("HMBS", "PGON", idtmed[1956], ppgon, 10); + TVirtualMC::GetMC()->Gspos("HMBS", 1, "ALIC", 0., 70., 0., 0, "ONLY"); } //_____________________________________________________________________________ diff --git a/STRUCT/AliHALLv3.cxx b/STRUCT/AliHALLv3.cxx index 50e4880c618..cf348da3cd1 100644 --- a/STRUCT/AliHALLv3.cxx +++ b/STRUCT/AliHALLv3.cxx @@ -513,7 +513,7 @@ void AliHALLv3::Init() } // // The reference volume id - fRefVolumeId = gMC->VolId("RB24Scoring"); + fRefVolumeId = TVirtualMC::GetMC()->VolId("RB24Scoring"); } void AliHALLv3::StepManager() @@ -527,15 +527,15 @@ void AliHALLv3::StepManager() // // Only charged tracks - if( !(gMC->TrackCharge()) ) return; + if( !(TVirtualMC::GetMC()->TrackCharge()) ) return; // // Only tracks entering mother volume // - id=gMC->CurrentVolID(copy); + id=TVirtualMC::GetMC()->CurrentVolID(copy); if ((id != fRefVolumeId)) return; - if(!gMC->IsTrackEntering()) return; + if(!TVirtualMC::GetMC()->IsTrackEntering()) return; // // Add the reference track // diff --git a/STRUCT/AliPIPEv0.cxx b/STRUCT/AliPIPEv0.cxx index 0d83788bbb4..cd197af496e 100644 --- a/STRUCT/AliPIPEv0.cxx +++ b/STRUCT/AliPIPEv0.cxx @@ -243,7 +243,7 @@ void AliPIPEv0::CreateGeometry() ppcon[61] = 0.; ppcon[62] = 4.1; - gMC->Gsvolu("QBPM", "PCON", idtmed[kAir], ppcon,63); + TVirtualMC::GetMC()->Gsvolu("QBPM", "PCON", idtmed[kAir], ppcon,63); // @@ -252,24 +252,24 @@ void AliPIPEv0::CreateGeometry() // // The Vacuum - gMC->Gsvolu("QBVA","TUBE", idtmed[kVac], ptube, 0); + TVirtualMC::GetMC()->Gsvolu("QBVA","TUBE", idtmed[kVac], ptube, 0); ptube[0] = 0.0; ptube[1] = kRinSt; ptube[2] = (90.-hlenQbbe2)/2.; dz = -90. + ptube[2]; - gMC->Gsposp ("QBVA", 1, "QBPM", 0., 0., dz , 0, "ONLY", ptube, 3); + TVirtualMC::GetMC()->Gsposp ("QBVA", 1, "QBPM", 0., 0., dz , 0, "ONLY", ptube, 3); dz = dz + ptube[2]; ptube[1] = kRinBe; ptube[2] = hlenQbbe+hlenQbab; dz = dz + ptube[2]; - gMC->Gsposp ("QBVA", 2, "QBPM", 0., 0., dz , 0, "ONLY", ptube, 3); + TVirtualMC::GetMC()->Gsposp ("QBVA", 2, "QBPM", 0., 0., dz , 0, "ONLY", ptube, 3); dz = dz + ptube[2]; ptube[1] = kRinSt; ptube[2] = (800.-hlenQbbe1-2.*hlenQbab)/2.; dz = dz + ptube[2]; - gMC->Gsposp ("QBVA", 3, "QBPM", 0., 0., dz , 0, "ONLY", ptube, 3); + TVirtualMC::GetMC()->Gsposp ("QBVA", 3, "QBPM", 0., 0., dz , 0, "ONLY", ptube, 3); // // Be Pipe in central Alice @@ -277,7 +277,7 @@ void AliPIPEv0::CreateGeometry() ptube[1] = kRoutBe; ptube[2] = hlenQbbe; - gMC->Gsvolu("QBBE","TUBE", idtmed[kBe], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("QBBE","TUBE", idtmed[kBe], ptube, 3); // // Support Ring @@ -286,17 +286,17 @@ void AliPIPEv0::CreateGeometry() ptube[0] = kRoutSB; ptube[1] = 4.0; ptube[2] = 0.6; - gMC->Gsvolu("QBSR", "TUBE", idtmed[kAlu], ptube,3); + TVirtualMC::GetMC()->Gsvolu("QBSR", "TUBE", idtmed[kAlu], ptube,3); // Inner support ptube[0] = kRoutSB; ptube[1] = 3.5; - gMC->Gsvolu("QBSS", "TUBE", idtmed[kPA], ptube,3); - gMC->Gspos("QBSS", 1, "QBSR", 0.0, 0.0, 0.0, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBSS", "TUBE", idtmed[kPA], ptube,3); + TVirtualMC::GetMC()->Gspos("QBSS", 1, "QBSR", 0.0, 0.0, 0.0, 0, "ONLY"); - gMC->Gspos("QBSR", 1, "QBPM", 0.0, 0.0, 40., 0, "ONLY"); - gMC->Gspos("QBSR", 2, "QBPM", 0.0, 0.0, 150., 0, "ONLY"); - gMC->Gspos("QBSR", 3, "QBPM", 0.0, 0.0, 260., 0, "ONLY"); - gMC->Gspos("QBSR", 4, "QBPM", 0.0, 0.0,- 46., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBSR", 1, "QBPM", 0.0, 0.0, 40., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBSR", 2, "QBPM", 0.0, 0.0, 150., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBSR", 3, "QBPM", 0.0, 0.0, 260., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBSR", 4, "QBPM", 0.0, 0.0,- 46., 0, "ONLY"); // // Flange and Fixed Point: non absorber side // @@ -323,27 +323,27 @@ void AliPIPEv0::CreateGeometry() ppcon[13] = kRinSt; ppcon[14] = 3.6; - gMC->Gsvolu("QB29", "PCON", idtmed[kAir], ppcon,15); + TVirtualMC::GetMC()->Gsvolu("QB29", "PCON", idtmed[kAir], ppcon,15); // Flange ptube[0] = kRinSt; ptube[1] = 5.7; ptube[2] = 1.75; - gMC->Gsvolu("QF29","TUBE", idtmed[kInox], ptube, 3); - gMC->Gspos("QF29", 1, "QB29", 0.0, 0.0, -hlenQb29+1.75, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QF29","TUBE", idtmed[kInox], ptube, 3); + TVirtualMC::GetMC()->Gspos("QF29", 1, "QB29", 0.0, 0.0, -hlenQb29+1.75, 0, "ONLY"); // Pipe ptube[0] = kRinSt; ptube[1] = 3.06; ptube[2] = hlenQb29; - gMC->Gsvolu("QS29","TUBE", idtmed[kInox], ptube, 3); - gMC->Gspos("QS29", 1, "QB29", 0.0, 0.0, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QS29","TUBE", idtmed[kInox], ptube, 3); + TVirtualMC::GetMC()->Gspos("QS29", 1, "QB29", 0.0, 0.0, 0., 0, "ONLY"); // Fixed point ptube[0] = kRinSt; ptube[1] = 3.5; ptube[2] = 0.3; - gMC->Gsvolu("QP29","TUBE", idtmed[kInox], ptube, 3); - gMC->Gspos("QP29", 1, "QB29", 0.0, 0.0, -hlenQb29+9.75+3., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QP29","TUBE", idtmed[kInox], ptube, 3); + TVirtualMC::GetMC()->Gspos("QP29", 1, "QB29", 0.0, 0.0, -hlenQb29+9.75+3., 0, "ONLY"); // // @@ -353,7 +353,7 @@ void AliPIPEv0::CreateGeometry() ptube[1] = kRoutSt; ptube[2] = hlenQb28; - gMC->Gsvolu("QB28","TUBE", idtmed[kInox], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("QB28","TUBE", idtmed[kInox], ptube, 3); // // // Air with high transport cuts outside QB28 @@ -361,7 +361,7 @@ void AliPIPEv0::CreateGeometry() ptube[1] = 100.; ptube[2] = hlenQb28; - gMC->Gsvolu("QA28","TUBE", idtmed[kAirHigh], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("QA28","TUBE", idtmed[kAirHigh], ptube, 3); gGeoManager->SetVolumeAttribute("QA28", "SEEN", 0); // Al-Be (40-60 wgt%, rho=2.7 g/cm**3) beam pipe // @@ -378,7 +378,7 @@ void AliPIPEv0::CreateGeometry() } ptube[2] = hlenQbab; - gMC->Gsvolu("QBAB","TUBE", idtmed[fPipeMaterial], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("QBAB","TUBE", idtmed[fPipeMaterial], ptube, 3); // 2.5 mm thick SS tube for hanging pump /* @@ -386,7 +386,7 @@ void AliPIPEv0::CreateGeometry() ptube[1] = 3.15; ptube[2] = hlenQb26; - gMC->Gsvolu("QB26","TUBE", idtmed[kInox], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("QB26","TUBE", idtmed[kInox], ptube, 3); */ // // Bellows @@ -438,16 +438,16 @@ void AliPIPEv0::CreateGeometry() pconQBE0[31] = kRinSB; pconQBE0[32] = kRoutSB; - gMC->Gsvolu("QBE0", "PCON", idtmed[kAir], pconQBE0, 33); + TVirtualMC::GetMC()->Gsvolu("QBE0", "PCON", idtmed[kAir], pconQBE0, 33); // // Undulated piece mother ptube[0] = kRinSB; ptube[1] = 3.60; ptube[2] = kdzubA; - gMC->Gsvolu("QBEM","TUBE", idtmed[kAir], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("QBEM","TUBE", idtmed[kAir], ptube, 3); dz = -kdzbA+kdzubA+2.5; - gMC->Gspos("QBEM", 2 ,"QBE0", 0.0, 0.0, dz, 0 , "ONLY"); - gMC->Gspos("QBEM", 1 ,"QBE0", 0.0, 0.0, -dz, idrotm[2012], "ONLY"); + TVirtualMC::GetMC()->Gspos("QBEM", 2 ,"QBE0", 0.0, 0.0, dz, 0 , "ONLY"); + TVirtualMC::GetMC()->Gspos("QBEM", 1 ,"QBE0", 0.0, 0.0, -dz, idrotm[2012], "ONLY"); // Float_t pund[30]; Float_t uw = 0.02; @@ -491,29 +491,29 @@ void AliPIPEv0::CreateGeometry() pund[25] = pund[22]; pund[26] = pund[23]; - gMC->Gsvolu("QBEU", "PCON", idtmed[kInox], pund, 27); + TVirtualMC::GetMC()->Gsvolu("QBEU", "PCON", idtmed[kInox], pund, 27); for (i = 0; i < 18; i++) { dz = -kdzubA+(1+2*i)*ut; - gMC->Gspos("QBEU", i+1 ,"QBEM", 0.0, 0.0, dz, 0 , "ONLY"); + TVirtualMC::GetMC()->Gspos("QBEU", i+1 ,"QBEM", 0.0, 0.0, dz, 0 , "ONLY"); } ptube[0] = kRinSB; ptube[1] = kRinSB+uw; ptube[2] = uz; - gMC->Gsvolu("QBEW","TUBE", idtmed[kInox], ptube, 3); - gMC->Gspos("QBEW", 1 ,"QBEM", 0.0, 0.0, kdzubA-uz, 0 , "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBEW","TUBE", idtmed[kInox], ptube, 3); + TVirtualMC::GetMC()->Gspos("QBEW", 1 ,"QBEM", 0.0, 0.0, kdzubA-uz, 0 , "ONLY"); // // BeamPipe - gMC->Gsvolu("QBEP","TUBE", idtmed[kInox], ptube, 0); + TVirtualMC::GetMC()->Gsvolu("QBEP","TUBE", idtmed[kInox], ptube, 0); ptube[0] = kRinSB; ptube[1] = kRoutSB; ptube[2] = 1.25; - gMC->Gsposp("QBEP", 1 ,"QBE0", 0.0, 0.0, -kdzbA+1.25, 0 , "ONLY", ptube, 3); - gMC->Gsposp("QBEP", 2 ,"QBE0", 0.0, 0.0, kdzbA-1.25, 0 , "ONLY", ptube, 3); + TVirtualMC::GetMC()->Gsposp("QBEP", 1 ,"QBE0", 0.0, 0.0, -kdzbA+1.25, 0 , "ONLY", ptube, 3); + TVirtualMC::GetMC()->Gsposp("QBEP", 2 ,"QBE0", 0.0, 0.0, kdzbA-1.25, 0 , "ONLY", ptube, 3); ptube[2] = kdzbbA; - gMC->Gsposp("QBEP", 3 ,"QBE0", 0.0, 0.0, 0., 0 , "ONLY", ptube, 3); + TVirtualMC::GetMC()->Gsposp("QBEP", 3 ,"QBE0", 0.0, 0.0, 0., 0 , "ONLY", ptube, 3); // // // ----> End Bellow @@ -523,32 +523,32 @@ void AliPIPEv0::CreateGeometry() // // first the beryllium section Float_t zpos = -(hlenQbbe2-hlenQbbe1)/2; - gMC->Gspos("QBBE", 1, "QBPM", 0., 0., zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBBE", 1, "QBPM", 0., 0., zpos, 0, "ONLY"); // next meta-metal transition QBT1 on on-absorber side // zpos = zpos + hlenQbbe + hlenQbt1; -// gMC->Gspos("QBT1", 1, "QBPM", 0., 0., zpos, 0, "ONLY"); +// TVirtualMC::GetMC()->Gspos("QBT1", 1, "QBPM", 0., 0., zpos, 0, "ONLY"); // Aluminium OR Al-be alloy section zpos = hlenQbbe1+hlenQbab; - gMC->Gspos("QBAB", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBAB", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY"); // // inox flange at the start of bellow zpos = zpos + hlenQbab + hlenQb29; - gMC->Gspos("QB29", 1, "QBPM", 0.0, 0.0, zpos, idrotm[2012], "ONLY"); + TVirtualMC::GetMC()->Gspos("QB29", 1, "QBPM", 0.0, 0.0, zpos, idrotm[2012], "ONLY"); // // bellow section zpos = zpos + hlenQb29 + hlenQbe0; - gMC->Gspos("QBE0", 2 ,"QBPM", 0.0, 0.0, zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBE0", 2 ,"QBPM", 0.0, 0.0, zpos, 0, "ONLY"); // // inox flange at the end of bellow and start of thick inox for pump zpos = zpos + hlenQbe0 + hlenQb29; - gMC->Gspos("QB29", 2, "QBPM", 0.0, 0.0, zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QB29", 2, "QBPM", 0.0, 0.0, zpos, 0, "ONLY"); // //last inox section till 800 cm zpos = zpos + hlenQb29 + hlenQb28; - gMC->Gspos("QB28", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY"); - gMC->Gspos("QA28", 1, "ALIC", 0.0, 0.0, zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QB28", 1, "QBPM", 0.0, 0.0, zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA28", 1, "ALIC", 0.0, 0.0, zpos, 0, "ONLY"); //******** end of placement on non-absorber side ********* // @@ -558,7 +558,7 @@ void AliPIPEv0::CreateGeometry() // // Beam pipes between elements // - gMC->Gsvolu("QB24","TUBE", idtmed[kInox], ptube, 0); + TVirtualMC::GetMC()->Gsvolu("QB24","TUBE", idtmed[kInox], ptube, 0); ptube[0] = kRinSt; ptube[1] = kRoutSt; ptube[2] = hlenQb24[0]; @@ -607,20 +607,20 @@ void AliPIPEv0::CreateGeometry() bpbe[31] = kRinSt; bpbe[32] = kRoutSt; - gMC->Gsvolu("QA24","PCON", idtmed[kInox], bpbe, 33); + TVirtualMC::GetMC()->Gsvolu("QA24","PCON", idtmed[kInox], bpbe, 33); dz = hlenQbbe2 + hlenQb24[0]; - gMC->Gspos("QA24", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA24", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY"); // // Bellow on absorber side dz = dz+hlenQb24[0] + kdzbA; - gMC->Gspos("QBE0", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBE0", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY"); // ptube[2] = hlenQb24[1]; dz = dz + kdzb + ptube[2]; - gMC->Gsposp("QB24", 2 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY", ptube, 3); + TVirtualMC::GetMC()->Gsposp("QB24", 2 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY", ptube, 3); dz = dz + ptube[2]; // @@ -631,9 +631,9 @@ void AliPIPEv0::CreateGeometry() ptube[1] = 4.300; ptube[2] = 1.4; - gMC->Gsvolu("QFA0","TUBE", idtmed[kInox], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("QFA0","TUBE", idtmed[kInox], ptube, 3); dz = dz + ptube[2]; - gMC->Gspos("QFA0", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QFA0", 1 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY"); dz = dz + ptube[2]; // // @@ -641,15 +641,15 @@ void AliPIPEv0::CreateGeometry() ptube[1] = kRoutSB; ptube[2] = hlenQb24[2]; dz = dz + ptube[2]; - gMC->Gsposp("QB24", 3 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY", ptube, 3); + TVirtualMC::GetMC()->Gsposp("QB24", 3 ,"QBPM", 0.0, 0.0, -dz, 0, "ONLY", ptube, 3); // --- Place the PIPE ghost volume (QBPM) in its mother volume (ALIC) // by rotating it to 180 deg. and make it invisible // - gMC->Gspos("QBPM",1,"ALIC", 0, 0, 0, 0, "ONLY"); - gMC->Gsbool("QBPM", "L3DX"); - gMC->Gsbool("QBPM", "L3O3"); - gMC->Gsbool("QBPM", "L3O4"); + TVirtualMC::GetMC()->Gspos("QBPM",1,"ALIC", 0, 0, 0, 0, "ONLY"); + TVirtualMC::GetMC()->Gsbool("QBPM", "L3DX"); + TVirtualMC::GetMC()->Gsbool("QBPM", "L3O3"); + TVirtualMC::GetMC()->Gsbool("QBPM", "L3O4"); // @@ -660,38 +660,38 @@ void AliPIPEv0::CreateGeometry() pbox[0] = 6.50; pbox[1] = 6.75; pbox[2] = 15.60; - gMC->Gsvolu("QI32","BOX", idtmed[kInox], pbox, 3); + TVirtualMC::GetMC()->Gsvolu("QI32","BOX", idtmed[kInox], pbox, 3); pbox[0] = 5.90; pbox[1] = 6.15; pbox[2] = 15.00; - gMC->Gsvolu("QI42","BOX", idtmed[kGetter], pbox, 3); - gMC->Gspos("QI42", 1, "QI32", 0.0, 0.0, 0.0, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QI42","BOX", idtmed[kGetter], pbox, 3); + TVirtualMC::GetMC()->Gspos("QI42", 1, "QI32", 0.0, 0.0, 0.0, 0, "ONLY"); // <- ptube[0] = 0.0; ptube[1] = 19.0; ptube[2] = 2.5; - gMC->Gsvolu("QI33","TUBE", idtmed[kInox], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("QI33","TUBE", idtmed[kInox], ptube, 3); ptube[0] = 0.0; ptube[1] = 15.0; ptube[2] = 2.5; - gMC->Gsvolu("QI43","TUBE", idtmed[kAir], ptube, 3); - gMC->Gspos("QI43", 1, "QI33", 0.0, 0.0, 0.0, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QI43","TUBE", idtmed[kAir], ptube, 3); + TVirtualMC::GetMC()->Gspos("QI43", 1, "QI33", 0.0, 0.0, 0.0, 0, "ONLY"); // // Connecting tube -> ptube[0] = 0.0; ptube[1] = 4.5; ptube[2] = 14.6; - gMC->Gsvolu("QI34","TUBE", idtmed[kInox], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("QI34","TUBE", idtmed[kInox], ptube, 3); ptube[0] = 0.0; ptube[1] = 3.9; ptube[2] = 14.6; - gMC->Gsvolu("QI44","TUBE", idtmed[kAir], ptube, 3); - gMC->Gspos("QI44", 1, "QI34", 0.0, 0.0, 0.0, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QI44","TUBE", idtmed[kAir], ptube, 3); + TVirtualMC::GetMC()->Gspos("QI44", 1, "QI34", 0.0, 0.0, 0.0, 0, "ONLY"); // <- // @@ -699,12 +699,12 @@ void AliPIPEv0::CreateGeometry() ptube[0] = 4.6; ptube[1] = 7.30; ptube[2] = 2.15; - gMC->Gsvolu("QI35","TUBE", idtmed[kInox], ptube, 3); + TVirtualMC::GetMC()->Gsvolu("QI35","TUBE", idtmed[kInox], ptube, 3); // <- - gMC->Gspos("QI32", 1, "QBPM", 0.0, -44.25, zPump, 0, "ONLY"); - gMC->Gspos("QI33", 1, "QBPM", 0.0, -35.00, zPump,idrotm[2002], "ONLY"); - gMC->Gspos("QI34", 1, "QBPM", 0.0, -17.90, zPump,idrotm[2002], "ONLY"); - gMC->Gspos("QI35", 1, "QBPM", 0.0, -24.35, zPump,idrotm[2002], "ONLY"); + TVirtualMC::GetMC()->Gspos("QI32", 1, "QBPM", 0.0, -44.25, zPump, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QI33", 1, "QBPM", 0.0, -35.00, zPump,idrotm[2002], "ONLY"); + TVirtualMC::GetMC()->Gspos("QI34", 1, "QBPM", 0.0, -17.90, zPump,idrotm[2002], "ONLY"); + TVirtualMC::GetMC()->Gspos("QI35", 1, "QBPM", 0.0, -24.35, zPump,idrotm[2002], "ONLY"); gGeoManager->SetVolumeAttribute("QBPM", "SEEN", 1); gGeoManager->SetVolumeAttribute("QBEM", "SEEN", 1); diff --git a/STRUCT/AliPIPEv1.cxx b/STRUCT/AliPIPEv1.cxx index 75ec2641517..e201804bd9a 100644 --- a/STRUCT/AliPIPEv1.cxx +++ b/STRUCT/AliPIPEv1.cxx @@ -128,8 +128,8 @@ void AliPIPEv1::CreateGeometry() tpar[1] = 3.; tpar[2] = (absorberDistance + 700.) / 2.; dzmo = tpar[2] - absorberDistance; - gMC->Gsvolu("QQMO", "TUBE", idtmed[2015], tpar, 3); - gMC->Gspos("QQMO", 1, "ALIC", 0., 0., -dzmo, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QQMO", "TUBE", idtmed[2015], tpar, 3); + TVirtualMC::GetMC()->Gspos("QQMO", 1, "ALIC", 0., 0., -dzmo, 0, "ONLY"); // BEAM PIPE IN DRIFT SPACE @@ -137,24 +137,24 @@ void AliPIPEv1::CreateGeometry() tpar[0] = 0.; tpar[1] = 3.; tpar[2] = 30; - gMC->Gsvolu("QDT1", "TUBE", idtmed[2015], tpar, 3); + TVirtualMC::GetMC()->Gsvolu("QDT1", "TUBE", idtmed[2015], tpar, 3); tpar[0] = 2.9; - gMC->Gsvolu("QTB1", "TUBE", idtmed[2004], tpar, 3); - gMC->Gspos("QTB1", 1, "QDT1", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("QDT1", 1, "QQMO", 0., 0., dzmo, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTB1", "TUBE", idtmed[2004], tpar, 3); + TVirtualMC::GetMC()->Gspos("QTB1", 1, "QDT1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QDT1", 1, "QQMO", 0., 0., dzmo, 0, "ONLY"); // 30-90 tpar[0] = 0.; tpar[1] = 3.; tpar[2] = 30.; - gMC->Gsvolu("QDT2", "TUBE", idtmed[2015], tpar, 3); + TVirtualMC::GetMC()->Gsvolu("QDT2", "TUBE", idtmed[2015], tpar, 3); tpar[0] = 2.9; - gMC->Gsvolu("QTB2", "TUBE", idtmed[2004], tpar, 3); - gMC->Gspos("QTB2", 1, "QDT2", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("QDT2", 1, "QQMO", 0., 0., dzmo, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTB2", "TUBE", idtmed[2004], tpar, 3); + TVirtualMC::GetMC()->Gspos("QTB2", 1, "QDT2", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QDT2", 1, "QQMO", 0., 0., dzmo, 0, "ONLY"); // beam pipe outside absorber on the left side @@ -164,13 +164,13 @@ void AliPIPEv1::CreateGeometry() tpar[0] = 0.; tpar[1] = 3.; tpar[2] = (kZFlange - 30)/2; - gMC->Gsvolu("QDT5", "TUBE", idtmed[2015], tpar, 3); + TVirtualMC::GetMC()->Gsvolu("QDT5", "TUBE", idtmed[2015], tpar, 3); tpar[0] = 2.9; zpos = -30. - tpar[2] + dzmo; - gMC->Gsvolu("QTB5", "TUBE", idtmed[2004], tpar, 3); - gMC->Gspos("QTB5", 1, "QDT5", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("QDT5", 1, "QQMO", 0., 0., zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTB5", "TUBE", idtmed[2004], tpar, 3); + TVirtualMC::GetMC()->Gspos("QTB5", 1, "QDT5", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QDT5", 1, "QQMO", 0., 0., zpos, 0, "ONLY"); // STRAIGHT STEEL PIECE @@ -180,21 +180,21 @@ void AliPIPEv1::CreateGeometry() tpar[0] = 0.; tpar[1] = r2 + dr; tpar[2] = (zpos + 700.) / 2.; - gMC->Gsvolu("QDT7", "TUBE", idtmed[2015], tpar, 3); + TVirtualMC::GetMC()->Gsvolu("QDT7", "TUBE", idtmed[2015], tpar, 3); tpar[0] = r2; - gMC->Gsvolu("QTB7", "TUBE", idtmed[2018], tpar, 3); - gMC->Gspos("QTB7", 1, "QDT7", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTB7", "TUBE", idtmed[2018], tpar, 3); + TVirtualMC::GetMC()->Gspos("QTB7", 1, "QDT7", 0., 0., 0., 0, "ONLY"); zpos = zpos - tpar[2] + dzmo; - gMC->Gspos("QDT7", 1, "QQMO", 0., 0., zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QDT7", 1, "QQMO", 0., 0., zpos, 0, "ONLY"); // flange dn 63 tpar[0] = 3.; tpar[1] = 5.7; tpar[2] = 2.; - gMC->Gsvolu("QN63", "TUBE", idtmed[2018], tpar, 3); + TVirtualMC::GetMC()->Gsvolu("QN63", "TUBE", idtmed[2018], tpar, 3); zpos = tpar[2] - kZFlange; - gMC->Gspos("QN63", 1, "ALIC", 0., 0., zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QN63", 1, "ALIC", 0., 0., zpos, 0, "ONLY"); // Replace Absorber or Shield by Beam-Pipe @@ -202,28 +202,28 @@ void AliPIPEv1::CreateGeometry() if (gAlice->GetModule("ABSO") == 0) { - gMC->Gspos("QN63", 2, "ALIC", 0., 0., kZFlange, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QN63", 2, "ALIC", 0., 0., kZFlange, 0, "ONLY"); r2 = 2.9; dr = .1; tpar[0] = 0.; tpar[1] = r2 + dr; tpar[2] = (kZFlange - absorberDistance) / 2.; - gMC->Gsvolu("QDT8", "TUBE", idtmed[2015], tpar, 3); + TVirtualMC::GetMC()->Gsvolu("QDT8", "TUBE", idtmed[2015], tpar, 3); tpar[0] = r2; - gMC->Gsvolu("QTB8", "TUBE", idtmed[2004], tpar, 3); - gMC->Gspos("QTB8", 1, "QDT8", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTB8", "TUBE", idtmed[2004], tpar, 3); + TVirtualMC::GetMC()->Gspos("QTB8", 1, "QDT8", 0., 0., 0., 0, "ONLY"); zpos = absorberDistance + tpar[2]; - gMC->Gspos("QDT8", 1, "ALIC", 0., 0., zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QDT8", 1, "ALIC", 0., 0., zpos, 0, "ONLY"); dr = .015; tpar[0] = 0.; tpar[1] = r2 + dr; tpar[2] = (absorberEnd - kZFlange) / 2.; - gMC->Gsvolu("QDTS", "TUBE", idtmed[2015], tpar, 3); + TVirtualMC::GetMC()->Gsvolu("QDTS", "TUBE", idtmed[2015], tpar, 3); tpar[0] = r2; - gMC->Gsvolu("QTBS", "TUBE", idtmed[2018], tpar, 3); - gMC->Gspos("QTBS", 1, "QDTS", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTBS", "TUBE", idtmed[2018], tpar, 3); + TVirtualMC::GetMC()->Gspos("QTBS", 1, "QDTS", 0., 0., 0., 0, "ONLY"); zpos = tpar[2] + kZFlange; - gMC->Gspos("QDTS", 1, "ALIC", 0., 0., zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QDTS", 1, "ALIC", 0., 0., zpos, 0, "ONLY"); } if (gAlice->GetModule("SHIL") == 0) { r2 = 2.9; @@ -231,12 +231,12 @@ void AliPIPEv1::CreateGeometry() tpar[0] = 0.; tpar[1] = r2 + dr; tpar[2] = (700. - absorberEnd) / 2.; - gMC->Gsvolu("QDT9", "TUBE", idtmed[2015], tpar, 3); + TVirtualMC::GetMC()->Gsvolu("QDT9", "TUBE", idtmed[2015], tpar, 3); tpar[0] = r2; - gMC->Gsvolu("QTB9", "TUBE", idtmed[2018], tpar, 3); - gMC->Gspos("QTB9", 1, "QDT9", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTB9", "TUBE", idtmed[2018], tpar, 3); + TVirtualMC::GetMC()->Gspos("QTB9", 1, "QDT9", 0., 0., 0., 0, "ONLY"); zpos = absorberEnd + tpar[2]; - gMC->Gspos("QDT9", 1, "ALIC", 0., 0., zpos, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QDT9", 1, "ALIC", 0., 0., zpos, 0, "ONLY"); } } diff --git a/T0/AliT0v0.cxx b/T0/AliT0v0.cxx index d0c866baae7..ffb8c5a24eb 100644 --- a/T0/AliT0v0.cxx +++ b/T0/AliT0v0.cxx @@ -186,9 +186,9 @@ void AliT0v0::CreateGeometry() // ppcon[40] = 3.15; // ppcon[41] = 7.6; - gMC->Gsvolu("0SUP", "PCON", idtmed[kAir], ppcon,42); + TVirtualMC::GetMC()->Gsvolu("0SUP", "PCON", idtmed[kAir], ppcon,42); z=-69.7;//-14.1/2; - gMC->Gspos("0SUP",1,"ALIC",0.,0.,z,idrotm[901],"ONLY"); + TVirtualMC::GetMC()->Gspos("0SUP",1,"ALIC",0.,0.,z,idrotm[901],"ONLY"); Float_t zdetRight=69.7,zdetLeft=350; @@ -197,23 +197,23 @@ void AliT0v0::CreateGeometry() //------------------------------------------------------------------- - gMC->Gsvolu("0STR","PCON",idtmed[kAir],pstartR,18); - gMC->Gsvolu("0STL","TUBE",idtmed[kAir],pstart,3); - gMC->Gspos("0STR",1,"ALIC",0.,0.,-zdetRight-pstart[2],idrotm[901],"ONLY"); - gMC->Gspos("0STL",1,"ALIC",0.,0.,zdetLeft+pstart[2],0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0STR","PCON",idtmed[kAir],pstartR,18); + TVirtualMC::GetMC()->Gsvolu("0STL","TUBE",idtmed[kAir],pstart,3); + TVirtualMC::GetMC()->Gspos("0STR",1,"ALIC",0.,0.,-zdetRight-pstart[2],idrotm[901],"ONLY"); + TVirtualMC::GetMC()->Gspos("0STL",1,"ALIC",0.,0.,zdetLeft+pstart[2],0,"ONLY"); //T0 interior - gMC->Gsvolu("0INS","TUBE",idtmed[kAir],pinstart,3); - gMC->Gsvolu("0PMT","TUBE",idtmed[kOpAir],ppmt,3); - gMC->Gsvolu("0DIV","TUBE",idtmed[kVac],pdivider,3); - gMC->Gsvolu("0SU1","TUBE",idtmed[kC],psupport1,3);//C kozhuh vnutri - gMC->Gsvolu("0SU2","TUBE",idtmed[kC],psupport2,3);// snaruzhi C - gMC->Gsvolu("0SU3","TUBE",idtmed[kC],psupport3,3);//kryshka perednaiai C - gMC->Gsvolu("0SU4","TUBE",idtmed[kC],psupport3,3);//kryshka zadnaiai C - // gMC->Gsvolu("0SU5","TUBE",idtmed[kAir],psupport4,3);// dyrki dlia feu v zadnej kryshke Air - gMC->Gsvolu("0SU6","TUBE",idtmed[kC],psupport5,3);// stakanchik dlai feu C - gMC->Gsvolu("0SU7","TUBE",idtmed[kAl],psupport6,3);//kryshechka stakanchika Al - gMC->Gsvolu("0SU8","TUBE",idtmed[kAl],psupport7,3);//kolechko snaruzhu stakanchika Al + TVirtualMC::GetMC()->Gsvolu("0INS","TUBE",idtmed[kAir],pinstart,3); + TVirtualMC::GetMC()->Gsvolu("0PMT","TUBE",idtmed[kOpAir],ppmt,3); + TVirtualMC::GetMC()->Gsvolu("0DIV","TUBE",idtmed[kVac],pdivider,3); + TVirtualMC::GetMC()->Gsvolu("0SU1","TUBE",idtmed[kC],psupport1,3);//C kozhuh vnutri + TVirtualMC::GetMC()->Gsvolu("0SU2","TUBE",idtmed[kC],psupport2,3);// snaruzhi C + TVirtualMC::GetMC()->Gsvolu("0SU3","TUBE",idtmed[kC],psupport3,3);//kryshka perednaiai C + TVirtualMC::GetMC()->Gsvolu("0SU4","TUBE",idtmed[kC],psupport3,3);//kryshka zadnaiai C + // TVirtualMC::GetMC()->Gsvolu("0SU5","TUBE",idtmed[kAir],psupport4,3);// dyrki dlia feu v zadnej kryshke Air + TVirtualMC::GetMC()->Gsvolu("0SU6","TUBE",idtmed[kC],psupport5,3);// stakanchik dlai feu C + TVirtualMC::GetMC()->Gsvolu("0SU7","TUBE",idtmed[kAl],psupport6,3);//kryshechka stakanchika Al + TVirtualMC::GetMC()->Gsvolu("0SU8","TUBE",idtmed[kAl],psupport7,3);//kolechko snaruzhu stakanchika Al // first ring: 12 units of Scintillator+PMT+divider Float_t theta = (180 / TMath::Pi()) * TMath::ATan(6.5 / zdetRight); @@ -236,13 +236,13 @@ void AliT0v0::CreateGeometry() 90. + theta, phi[1], theta, phi[2]); z=-pstart[2]+pinstart[2]+0.2; - gMC->Gspos ("0INS", is + 1, "0STR", x, y, z, idrotm[902 + is], "ONLY"); - gMC->Gspos ("0INS", is + 13, "0STL", x, y, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0INS", is + 1, "0STR", x, y, z, idrotm[902 + is], "ONLY"); + TVirtualMC::GetMC()->Gspos ("0INS", is + 13, "0STL", x, y, z, 0, "ONLY"); x = 9 * TMath::Sin(angle/2+is * angle); y = 9 * TMath::Cos(angle/2+is * angle); - gMC->Gspos ("0INS", is + 25, "0STL", x, y, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0INS", is + 25, "0STL", x, y, z, 0, "ONLY"); } @@ -250,127 +250,127 @@ void AliT0v0::CreateGeometry() x=0; y=0; z=-pinstart[2]+ppmt[2]+2.*psupport6[2]+0.1; - gMC->Gspos("0PMT",1,"0INS",x,y,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0PMT",1,"0INS",x,y,z,0,"ONLY"); z=z+pdivider[2]+ppmt[2]; - gMC->Gspos("0DIV",1,"0INS",x,y,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0DIV",1,"0INS",x,y,z,0,"ONLY"); // PMT // Entry window (glass) - gMC->Gsvolu("0TOP","TUBE",idtmed[kOpGlass],ptop,3); //glass - // gMC->Gsvolu("0TOP","TUBE",idtmed[12],ptop,3); //lucite + TVirtualMC::GetMC()->Gsvolu("0TOP","TUBE",idtmed[kOpGlass],ptop,3); //glass + // TVirtualMC::GetMC()->Gsvolu("0TOP","TUBE",idtmed[12],ptop,3); //lucite z=-ppmt[2]+ptop[2]; - gMC->Gspos("0TOP",1,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0TOP",1,"0PMT",0,0,z,0,"ONLY"); //Fotokatod - gMC->Gsvolu ("0REG", "TUBE", idtmed[kOpGlass], preg, 3); //photocathode dobavil bogdanov(AliT0v2) + TVirtualMC::GetMC()->Gsvolu ("0REG", "TUBE", idtmed[kOpGlass], preg, 3); //photocathode dobavil bogdanov(AliT0v2) z = -ppmt[2] + 2 * ptop[2] + preg[2]; //photocathode dobavil bogdanov - gMC->Gspos ("0REG", 1, "0PMT", 0, 0, z, 0, "ONLY"); //photocathode dobavil bogdanov(AliT0v2) + TVirtualMC::GetMC()->Gspos ("0REG", 1, "0PMT", 0, 0, z, 0, "ONLY"); //photocathode dobavil bogdanov(AliT0v2) // Bottom glass - gMC->Gsvolu("0BOT","TUBE",idtmed[kGlass],pbot,3); + TVirtualMC::GetMC()->Gsvolu("0BOT","TUBE",idtmed[kGlass],pbot,3); z=ppmt[2]-pbot[2]; AliDebugClass(1,Form(" Z bottom %f\n",z)); - gMC->Gspos("0BOT",1,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0BOT",1,"0PMT",0,0,z,0,"ONLY"); // Side cylinder glass - gMC->Gsvolu("0OUT","TUBE",idtmed[kGlass],pglass,3); + TVirtualMC::GetMC()->Gsvolu("0OUT","TUBE",idtmed[kGlass],pglass,3); z=ppmt[2]-pglass[2]; - gMC->Gspos("0OUT",1,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0OUT",1,"0PMT",0,0,z,0,"ONLY"); //PMT electrodes support structure - gMC->Gsvolu("0CER","TUBE",idtmed[kCer],pcer,3); - gMC->Gsvolu("0STE","TUBE",idtmed[kSteel],psteel,3); + TVirtualMC::GetMC()->Gsvolu("0CER","TUBE",idtmed[kCer],pcer,3); + TVirtualMC::GetMC()->Gsvolu("0STE","TUBE",idtmed[kSteel],psteel,3); z=-ppmt[2]+2*ptop[2]+0.3;; for (is=1; is<=15; is++) { z=z+psteel[2]+pcer[2]; - gMC->Gspos("0CER",is,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0CER",is,"0PMT",0,0,z,0,"ONLY"); z=z+psteel[2]+pcer[2]; - gMC->Gspos("0STE",is,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0STE",is,"0PMT",0,0,z,0,"ONLY"); } // Divider // Knob at the bottom of PMT baloon - gMC->Gsvolu("0NB","TUBE",idtmed[6],pknob,3); + TVirtualMC::GetMC()->Gsvolu("0NB","TUBE",idtmed[6],pknob,3); z=-pdivider[2]+pknob[2]; - gMC->Gspos("0NB",1,"0DIV",0,0,z,0,"ONLY"); - gMC->Gsvolu("0KB","TUBE",idtmed[kGlass],pknob_bot,3); + TVirtualMC::GetMC()->Gspos("0NB",1,"0DIV",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0KB","TUBE",idtmed[kGlass],pknob_bot,3); z=-pdivider[2]+2*pknob[2]+pknob_bot[2]; - gMC->Gspos("0KB",1,"0DIV ",0,0,z,0,"ONLY"); - gMC->Gsvolu("0VAC","TUBE",idtmed[kVac],pknob_vac,3); + TVirtualMC::GetMC()->Gspos("0KB",1,"0DIV ",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0VAC","TUBE",idtmed[kVac],pknob_vac,3); z=-pdivider[2]+pknob_vac[2]; - gMC->Gspos("0VAC",1,"0DIV",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0VAC",1,"0DIV",0,0,z,0,"ONLY"); //Steel pins + pin holes - gMC->Gsvolu("0PIN","TUBE",idtmed[kSteel],ppins,3); + TVirtualMC::GetMC()->Gsvolu("0PIN","TUBE",idtmed[kSteel],ppins,3); z=-pdivider[2]+ppins[2]; - gMC->Gspos("0PIN",1,"0DIV",0,0,z,0,"ONLY"); - gMC->Gsvolu("0HOL","TUBE",idtmed[kBrass],phole,3); + TVirtualMC::GetMC()->Gspos("0PIN",1,"0DIV",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0HOL","TUBE",idtmed[kBrass],phole,3); z=-pdivider[2]+2*ppins[2]+phole[2]; - gMC->Gspos("0HOL",1,"0DIV",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0HOL",1,"0DIV",0,0,z,0,"ONLY"); //Socket - gMC->Gsvolu("0V1","TUBE",idtmed[kCer],pdiv1,3); + TVirtualMC::GetMC()->Gsvolu("0V1","TUBE",idtmed[kCer],pdiv1,3); z=-pdivider[2]+pdiv1[2]; - gMC->Gspos("0V1",1,"0DIV",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0V1",1,"0DIV",0,0,z,0,"ONLY"); //Resistors - gMC->Gsvolu("0V2","TUBE",idtmed[kAir],pdiv2,3); + TVirtualMC::GetMC()->Gsvolu("0V2","TUBE",idtmed[kAir],pdiv2,3); z=pdivider[2]-pdiv2[2]; - gMC->Gspos("0V2",1,"0DIV",0,0,z,0,"ONLY"); - gMC->Gsvolu("0RS","TUBE",idtmed[kCer],presist,3); + TVirtualMC::GetMC()->Gspos("0V2",1,"0DIV",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0RS","TUBE",idtmed[kCer],presist,3); z=-pdiv2[2]+presist[2]; - gMC->Gspos("0RS",1,"0V2",0,0,z,0,"ONLY"); - gMC->Gsvolu("0RB","TUBE",idtmed[kRibber],pribber,3); + TVirtualMC::GetMC()->Gspos("0RS",1,"0V2",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0RB","TUBE",idtmed[kRibber],pribber,3); z=pdiv2[2]-pribber[2]; - gMC->Gspos("0RB",1,"0V2",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0RB",1,"0V2",0,0,z,0,"ONLY"); //Support left side /* z=-pstart[2]+psupport1[2]; - gMC->Gspos("0SU1",2,"0STL",0,0,z,0,"ONLY"); //C kozhuh snaruzhi - gMC->Gspos("0SU2",2,"0STL",0,0,z,0,"ONLY"); //C kozhuh vnutri + TVirtualMC::GetMC()->Gspos("0SU1",2,"0STL",0,0,z,0,"ONLY"); //C kozhuh snaruzhi + TVirtualMC::GetMC()->Gspos("0SU2",2,"0STL",0,0,z,0,"ONLY"); //C kozhuh vnutri z=-pstart[2]+psupport3[2]; - gMC->Gspos("0SU3",2,"0STL",0,0,z,0,"ONLY"); //peredniaia kryshka + TVirtualMC::GetMC()->Gspos("0SU3",2,"0STL",0,0,z,0,"ONLY"); //peredniaia kryshka z=-pstart[2]+2.*psupport1[2]; - gMC->Gspos("0SU4",2,"0STL",0,0,z,0,"MANY"); //zadnaiai kryshka + TVirtualMC::GetMC()->Gspos("0SU4",2,"0STL",0,0,z,0,"MANY"); //zadnaiai kryshka */ z=-pstart[2]+psupport1[2]+0.1; - gMC->Gspos("0SU1",1,"0STR",0,0,z,0,"ONLY"); //C kozhuh snaruzhi - gMC->Gspos("0SU2",1,"0STR",0,0,z,0,"ONLY"); //C kozhuh vnutri + TVirtualMC::GetMC()->Gspos("0SU1",1,"0STR",0,0,z,0,"ONLY"); //C kozhuh snaruzhi + TVirtualMC::GetMC()->Gspos("0SU2",1,"0STR",0,0,z,0,"ONLY"); //C kozhuh vnutri z=-pstart[2]+psupport3[2]+0.1; - gMC->Gspos("0SU3",1,"0STR",0,0,z,0,"ONLY"); //peredniaia kryshka + TVirtualMC::GetMC()->Gspos("0SU3",1,"0STR",0,0,z,0,"ONLY"); //peredniaia kryshka z=-pstart[2]+2.*psupport1[2]+0.1; - gMC->Gspos("0SU4",1,"0STR",0,0,z,0,"MANY"); //zadnaiai kryshka - gMC->Gspos("0SU6",1,"0INS",0,0,0,0,"ONLY");//C stakanchik dlia feu + TVirtualMC::GetMC()->Gspos("0SU4",1,"0STR",0,0,z,0,"MANY"); //zadnaiai kryshka + TVirtualMC::GetMC()->Gspos("0SU6",1,"0INS",0,0,0,0,"ONLY");//C stakanchik dlia feu z=-pinstart[2]+psupport6[2]; - gMC->Gspos("0SU7",1,"0INS",0,0,z,0,"ONLY"); //Al kryshechka + TVirtualMC::GetMC()->Gspos("0SU7",1,"0INS",0,0,z,0,"ONLY"); //Al kryshechka z=pinstart[2]-psupport7[2]; - gMC->Gspos("0SU8",1,"0INS",0,0,z,0,"ONLY"); //Al kolechko + TVirtualMC::GetMC()->Gspos("0SU8",1,"0INS",0,0,z,0,"ONLY"); //Al kolechko Float_t par[3]; par[0]=4.4; par[1]=4.5; par[2]=0.5; - gMC->Gsvolu("0SC0","TUBE",idtmed[kC],par,3); + TVirtualMC::GetMC()->Gsvolu("0SC0","TUBE",idtmed[kC],par,3); z=ppcon[3]+par[2]; - gMC->Gspos("0SC0",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SC0",1,"0SUP",0,0,z,0,"ONLY"); z += par[2]; par[0]=4.4; par[1]=5.1; par[2]=0.05; - gMC->Gsvolu("0SC1","TUBE",idtmed[kC],par,3); + TVirtualMC::GetMC()->Gsvolu("0SC1","TUBE",idtmed[kC],par,3); z += par[2]; - gMC->Gspos("0SC1",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SC1",1,"0SUP",0,0,z,0,"ONLY"); z=z+par[2]; par[0]=4.9; par[1]=5.0; par[2]=6.9/2; - gMC->Gsvolu("0SC2","TUBE",idtmed[kC],par,3); + TVirtualMC::GetMC()->Gsvolu("0SC2","TUBE",idtmed[kC],par,3); z += par[2]; - gMC->Gspos("0SC2",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SC2",1,"0SUP",0,0,z,0,"ONLY"); z += par[2]; /* Float_t parC[5]; @@ -379,54 +379,54 @@ void AliT0v0::CreateGeometry() parC[2]=5.2; parC[3]=5.5; parC[4]=5.6; - gMC->Gsvolu("0SC3","CONE",idtmed[kC],parC,5); + TVirtualMC::GetMC()->Gsvolu("0SC3","CONE",idtmed[kC],parC,5); z += parC[0]; - gMC->Gspos("0SC3",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SC3",1,"0SUP",0,0,z,0,"ONLY"); z += parC[0]; par[0]=5.5; par[1]=5.6; par[2]=1.2/2; - gMC->Gsvolu("0SC4","TUBE",idtmed[kC],par,3); + TVirtualMC::GetMC()->Gsvolu("0SC4","TUBE",idtmed[kC],par,3); z += par[2]; - gMC->Gspos("0SC4",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SC4",1,"0SUP",0,0,z,0,"ONLY"); par[0]=5.1; par[1]=5.5; par[2]=1.2/2; - gMC->Gsvolu("0SA0","TUBE",idtmed[kAl],par,3); - gMC->Gspos("0SA0",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0SA0","TUBE",idtmed[kAl],par,3); + TVirtualMC::GetMC()->Gspos("0SA0",1,"0SUP",0,0,z,0,"ONLY"); //gvozdi dlia skruchivaniia Al i C parts par[0]=5.75; par[1]=5.78; - gMC->Gsvolu("0SN1","TUBE",idtmed[kSteel],par,3); - gMC->Gspos("0SN1",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0SN1","TUBE",idtmed[kSteel],par,3); + TVirtualMC::GetMC()->Gspos("0SN1",1,"0SUP",0,0,z,0,"ONLY"); z += par[2]; */ par[0]=3.15; par[1]=4.9; par[2]=0.1/2; - gMC->Gsvolu("0SA1","TUBE",idtmed[kAl],par,3); + TVirtualMC::GetMC()->Gsvolu("0SA1","TUBE",idtmed[kAl],par,3); z += par[2]; - gMC->Gspos("0SA1",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SA1",1,"0SUP",0,0,z,0,"ONLY"); z=z+par[2]; par[0]=3.15; par[1]=3.16; par[2]=4.5/2; - gMC->Gsvolu("0SA2","TUBE",idtmed[kAl],par,3); + TVirtualMC::GetMC()->Gsvolu("0SA2","TUBE",idtmed[kAl],par,3); z += par[2]; - gMC->Gspos("0SA2",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SA2",1,"0SUP",0,0,z,0,"ONLY"); z=z+par[2]; par[0]=3.16; // eta chast' prikruchena k absorberu par[1]=7.5; par[2]=0.2; - gMC->Gsvolu("0SA3","TUBE",idtmed[kAl],par,3); + TVirtualMC::GetMC()->Gsvolu("0SA3","TUBE",idtmed[kAl],par,3); z += par[2]; - gMC->Gspos("0SA3",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SA3",1,"0SUP",0,0,z,0,"ONLY"); par[0]=3.16; // gvozdi eta chast' prikruchena k absorberu par[1]=7.5; par[2]=0.01; - gMC->Gsvolu("0SN2","TUBE",idtmed[kSteel],par,3); - gMC->Gspos("0SN2",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0SN2","TUBE",idtmed[kSteel],par,3); + TVirtualMC::GetMC()->Gspos("0SN2",1,"0SUP",0,0,z,0,"ONLY"); } @@ -494,10 +494,10 @@ void AliT0v0::CreateMaterials() AliMixture( 3, "Al2O3 $", aal2o3, zal2o3, denscer, -2, wal2o3); AliMixture( 4, "PMT glass $",aglass,zglass,dglass,-2,wglass); TString namate; - gMC->GetMaterial((*fIdmate)[3], namate, a, z, d, radl, absl, par); + TVirtualMC::GetMC()->GetMaterial((*fIdmate)[3], namate, a, z, d, radl, absl, par); acer[0]=a; zcer[0]=z; - gMC->GetMaterial((*fIdmate)[4], namate, a, z, d, radl, absl, par); + TVirtualMC::GetMC()->GetMaterial((*fIdmate)[4], namate, a, z, d, radl, absl, par); acer[1]=a; zcer[1]=z; @@ -534,7 +534,7 @@ void AliT0v0::Init() // //Int_t *idtmed = gAlice->Idtmed(); AliT0::Init(); - fIdSens1=gMC->VolId("0TOP"); + fIdSens1=TVirtualMC::GetMC()->VolId("0TOP"); AliDebug(1,Form("%s: *** T0 version 0 initialized ***\n",ClassName())); } diff --git a/T0/AliT0v1.cxx b/T0/AliT0v1.cxx index fe10a622a05..3adca935fc3 100644 --- a/T0/AliT0v1.cxx +++ b/T0/AliT0v1.cxx @@ -218,31 +218,31 @@ void AliT0v1::CreateGeometry() ppcon[41] = 7.6; - gMC->Gsvolu("0SUP", "PCON", idtmed[kAir], ppcon,42); + TVirtualMC::GetMC()->Gsvolu("0SUP", "PCON", idtmed[kAir], ppcon,42); z = -zdetC; - gMC->Gspos("0SUP",1,"ALIC",0.,0.,z,idrotm[901],"ONLY"); + TVirtualMC::GetMC()->Gspos("0SUP",1,"ALIC",0.,0.,z,idrotm[901],"ONLY"); //------------------------------------------------------------------- // T0 volume //------------------------------------------------------------------- - gMC->Gsvolu("0STR","PCON",idtmed[kAir],pstartR,18); - gMC->Gspos("0STR",1,"ALIC",0.,0.,-zdetC+pstartR[3],idrotm[901],"ONLY"); - // gMC->Gspos("0STL",1,"ALIC",0.,0.,zdetA+pstart[2],0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0STR","PCON",idtmed[kAir],pstartR,18); + TVirtualMC::GetMC()->Gspos("0STR",1,"ALIC",0.,0.,-zdetC+pstartR[3],idrotm[901],"ONLY"); + // TVirtualMC::GetMC()->Gspos("0STL",1,"ALIC",0.,0.,zdetA+pstart[2],0,"ONLY"); //T0 interior - gMC->Gsvolu("0INS","TUBE",idtmed[kAir],pinstart,3); - gMC->Gsvolu("0PMT","TUBE",idtmed[kAir],ppmt,3); + TVirtualMC::GetMC()->Gsvolu("0INS","TUBE",idtmed[kAir],pinstart,3); + TVirtualMC::GetMC()->Gsvolu("0PMT","TUBE",idtmed[kAir],ppmt,3); - gMC->Gsvolu("0SU1","TUBE",idtmed[kC],psupport1,3);//C kozhuh vnutri - gMC->Gsvolu("0SU2","TUBE",idtmed[kC],psupport2,3);// snaruzhi C - gMC->Gsvolu("0SU3","TUBE",idtmed[kC],psupport3,3);//kryshka perednaiai C - gMC->Gsvolu("0SU4","TUBE",idtmed[kC],psupport3,3);//kryshka zadnaiai C - // gMC->Gsvolu("0SU5","TUBE",idtmed[kAir],psupport4,3);// dyrki dlia feu v zadnej kryshke Air - gMC->Gsvolu("0SU6","TUBE",idtmed[kC],psupport5,3);// stakanchik dlai feu C - gMC->Gsvolu("0SU7","TUBE",idtmed[kAl],psupport6,3);//kryshechka stakanchika Al - gMC->Gsvolu("0SU8","TUBE",idtmed[kAl],psupport7,3);//kolechko snaruzhu stakanchika Al + TVirtualMC::GetMC()->Gsvolu("0SU1","TUBE",idtmed[kC],psupport1,3);//C kozhuh vnutri + TVirtualMC::GetMC()->Gsvolu("0SU2","TUBE",idtmed[kC],psupport2,3);// snaruzhi C + TVirtualMC::GetMC()->Gsvolu("0SU3","TUBE",idtmed[kC],psupport3,3);//kryshka perednaiai C + TVirtualMC::GetMC()->Gsvolu("0SU4","TUBE",idtmed[kC],psupport3,3);//kryshka zadnaiai C + // TVirtualMC::GetMC()->Gsvolu("0SU5","TUBE",idtmed[kAir],psupport4,3);// dyrki dlia feu v zadnej kryshke Air + TVirtualMC::GetMC()->Gsvolu("0SU6","TUBE",idtmed[kC],psupport5,3);// stakanchik dlai feu C + TVirtualMC::GetMC()->Gsvolu("0SU7","TUBE",idtmed[kAl],psupport6,3);//kryshechka stakanchika Al + TVirtualMC::GetMC()->Gsvolu("0SU8","TUBE",idtmed[kAl],psupport7,3);//kolechko snaruzhu stakanchika Al @@ -304,112 +304,112 @@ void AliT0v1::CreateGeometry() 90. + theta, phi[1], theta, phi[2]); z=-pstart[2]+pinstart[2]+0.3; - gMC->Gspos ("0INS", is + 1, "0STR", x, y, z, idrotm[902 + is], "ONLY"); + TVirtualMC::GetMC()->Gspos ("0INS", is + 1, "0STR", x, y, z, idrotm[902 + is], "ONLY"); } x=0; y=0; // z=-pinstart[2]+ppmt[2]+psupport6[2]*2; z=-pinstart[2]+ppmt[2]+0.08; //+psupport6[2]; - gMC->Gspos("0PMT",1,"0INS",x,y,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0PMT",1,"0INS",x,y,z,0,"ONLY"); // PMT // Entry window (glass) - gMC->Gsvolu("0TOP","TUBE",idtmed[kOpGlass],ptop,3); //glass + TVirtualMC::GetMC()->Gsvolu("0TOP","TUBE",idtmed[kOpGlass],ptop,3); //glass z=-ppmt[2]+ptop[2]; - gMC->Gspos("0TOP",1,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0TOP",1,"0PMT",0,0,z,0,"ONLY"); //"metal" air volume to simulate reclection - gMC->Gsvolu("0TOO","TUBE",idtmed[kOpAir],ptopout,3); - gMC->Gspos("0TOO",1,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gsvolu("0TOO","TUBE",idtmed[kOpAir],ptopout,3); + TVirtualMC::GetMC()->Gspos("0TOO",1,"0PMT",0,0,z,0,"ONLY"); //Fotokatod - gMC->Gsvolu ("0REG", "TUBE", idtmed[kOpGlassCathode], preg, 3); + TVirtualMC::GetMC()->Gsvolu ("0REG", "TUBE", idtmed[kOpGlassCathode], preg, 3); z = -ppmt[2] + 2 * ptop[2] + preg[2]; - gMC->Gspos ("0REG", 1, "0PMT", 0, 0, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0REG", 1, "0PMT", 0, 0, z, 0, "ONLY"); // Bottom glass - gMC->Gsvolu("0BOT","TUBE",idtmed[kGlass],pbot,3); + TVirtualMC::GetMC()->Gsvolu("0BOT","TUBE",idtmed[kGlass],pbot,3); z=ppmt[2]-pbot[2]; - gMC->Gspos("0BOT",1,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0BOT",1,"0PMT",0,0,z,0,"ONLY"); // Side cylinder glass - gMC->Gsvolu("0OUT","TUBE",idtmed[kGlass],pglass,3); + TVirtualMC::GetMC()->Gsvolu("0OUT","TUBE",idtmed[kGlass],pglass,3); z=ppmt[2]-pglass[2]; - gMC->Gspos("0OUT",1,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0OUT",1,"0PMT",0,0,z,0,"ONLY"); //PMT electrodes support structure - gMC->Gsvolu("0CER","TUBE",idtmed[kCer],pcer,3); - gMC->Gsvolu("0STE","TUBE",idtmed[kSteel],psteel,3); + TVirtualMC::GetMC()->Gsvolu("0CER","TUBE",idtmed[kCer],pcer,3); + TVirtualMC::GetMC()->Gsvolu("0STE","TUBE",idtmed[kSteel],psteel,3); z=-ppmt[2]+2*ptop[2]+0.3 + pcer[2]; - gMC->Gspos("0CER",1,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0CER",1,"0PMT",0,0,z,0,"ONLY"); z +=psteel[2]+pcer[2]; - gMC->Gspos("0STE",1,"0PMT",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0STE",1,"0PMT",0,0,z,0,"ONLY"); //Support absorber (C) side z=-pstart[2]+psupport1[2];// 0.05; //0.1; - gMC->Gspos("0SU1",1,"0STR",0,0,z,0,"ONLY"); //C kozhuh snaruzhi - gMC->Gspos("0SU2",1,"0STR",0,0,z,0,"ONLY"); //C kozhuh vnutri + TVirtualMC::GetMC()->Gspos("0SU1",1,"0STR",0,0,z,0,"ONLY"); //C kozhuh snaruzhi + TVirtualMC::GetMC()->Gspos("0SU2",1,"0STR",0,0,z,0,"ONLY"); //C kozhuh vnutri z=-pstart[2]+psupport3[2];// - 0.1; - gMC->Gspos("0SU3",1,"0STR",0,0,z,0,"ONLY"); //peredniaia kryshka + TVirtualMC::GetMC()->Gspos("0SU3",1,"0STR",0,0,z,0,"ONLY"); //peredniaia kryshka z=-pstart[2]+2.*psupport1[2];//+0.1; - gMC->Gspos("0SU4",1,"0STR",0,0,z,0,"MANY"); //zadnaiai kryshka - gMC->Gspos("0SU6",1,"0INS",0,0,0,0,"ONLY");//C stakanchik dlia feu + TVirtualMC::GetMC()->Gspos("0SU4",1,"0STR",0,0,z,0,"MANY"); //zadnaiai kryshka + TVirtualMC::GetMC()->Gspos("0SU6",1,"0INS",0,0,0,0,"ONLY");//C stakanchik dlia feu z=-pinstart[2]+psupport6[2]; //-0.1; - gMC->Gspos("0SU7",1,"0INS",0,0,z,0,"ONLY"); //Al kryshechka + TVirtualMC::GetMC()->Gspos("0SU7",1,"0INS",0,0,z,0,"ONLY"); //Al kryshechka z=pinstart[2]-psupport7[2]; - // gMC->Gspos("0SU8",1,"0SU6",0,0,z,0,"ONLY"); //Al kolechko + // TVirtualMC::GetMC()->Gspos("0SU8",1,"0SU6",0,0,z,0,"ONLY"); //Al kolechko Float_t par[3]; par[0]=4.4; par[1]=4.5; par[2]=0.5; - gMC->Gsvolu("0SC0","TUBE",idtmed[kC],par,3); + TVirtualMC::GetMC()->Gsvolu("0SC0","TUBE",idtmed[kC],par,3); z=ppcon[3]+par[2]; - gMC->Gspos("0SC0",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SC0",1,"0SUP",0,0,z,0,"ONLY"); z += par[2]; par[0]=4.4; par[1]=5.1; par[2]=0.05; - gMC->Gsvolu("0SC1","TUBE",idtmed[kC],par,3); + TVirtualMC::GetMC()->Gsvolu("0SC1","TUBE",idtmed[kC],par,3); z += par[2]; - gMC->Gspos("0SC1",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SC1",1,"0SUP",0,0,z,0,"ONLY"); z=z+par[2]; par[0]=4.9; par[1]=5.0; par[2]=6.7/2; - gMC->Gsvolu("0SC2","TUBE",idtmed[kC],par,3); + TVirtualMC::GetMC()->Gsvolu("0SC2","TUBE",idtmed[kC],par,3); z += par[2]; - gMC->Gspos("0SC2",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SC2",1,"0SUP",0,0,z,0,"ONLY"); z += par[2]; par[0]=3.15; par[1]=4.9; par[2]=0.01/2; - gMC->Gsvolu("0SA1","TUBE",idtmed[kAl],par,3); + TVirtualMC::GetMC()->Gsvolu("0SA1","TUBE",idtmed[kAl],par,3); z += par[2]; // z -= par[2]; - gMC->Gspos("0SA1",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SA1",1,"0SUP",0,0,z,0,"ONLY"); z=z+par[2]; par[0]=3.15; par[1]=3.16; par[2]=4.7/2; - gMC->Gsvolu("0SA2","TUBE",idtmed[kAl],par,3); + TVirtualMC::GetMC()->Gsvolu("0SA2","TUBE",idtmed[kAl],par,3); z += par[2]; - gMC->Gspos("0SA2",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SA2",1,"0SUP",0,0,z,0,"ONLY"); z=z+par[2]; par[0]=3.16; // eta chast' prikruchena k absorberu par[1]=7.4; par[2]=0.01; - gMC->Gsvolu("0SA3","TUBE",idtmed[kAl],par,3); + TVirtualMC::GetMC()->Gsvolu("0SA3","TUBE",idtmed[kAl],par,3); // z += par[2]; z = ppcon[39] - par[2]; - gMC->Gspos("0SA3",1,"0SUP",0,0,z,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("0SA3",1,"0SUP",0,0,z,0,"ONLY"); par[0]=3.16; // gvozdi eta chast' prikruchena k absorberu par[1]=7.4; par[2]=0.01; - gMC->Gsvolu("0SN2","TUBE",idtmed[kSteel],par,3); - gMC->Gspos("0SN2",1,"0SUP",0,0,z,0,"MANY"); + TVirtualMC::GetMC()->Gsvolu("0SN2","TUBE",idtmed[kSteel],par,3); + TVirtualMC::GetMC()->Gspos("0SN2",1,"0SUP",0,0,z,0,"MANY"); @@ -533,11 +533,11 @@ void AliT0v1::CreateMaterials() /* char namate[21]=""; - gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf); + TVirtualMC::GetMC()->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf); acer[0]=a; zcer[0]=z; - gMC->Gfmate((*fIdmate)[4], namate, a, z, d, radl, absl, buf, nbuf); + TVirtualMC::GetMC()->Gfmate((*fIdmate)[4], namate, a, z, d, radl, absl, buf, nbuf); acer[1]=a; zcer[1]=z; AliMixture( 11, "Ceramic $", acer, zcer, denscer, 2, wcer); @@ -634,17 +634,17 @@ void AliT0v1::DefineOpticalProperties() } - gMC->SetCerenkov (idtmed[kOpGlass], kNbins, aPckov, aAbsSiO2, efficAll, rindexSiO2 ); - // gMC->SetCerenkov (idtmed[kOpGlassCathode], kNbins, aPckov, aAbsSiO2, effCathode, rindexSiO2 ); - gMC->SetCerenkov (idtmed[kOpGlassCathode], kNbins, aPckov, aAbsSiO2,efficAll , rindexSiO2 ); - gMC->SetCerenkov (idtmed[kOpAir], kNbins, aPckov,absorAir , efficAll,rindexAir ); - gMC->SetCerenkov (idtmed[kOpAirNext], kNbins, aPckov,absorbCathodeNext , efficAll, rindexCathodeNext); + TVirtualMC::GetMC()->SetCerenkov (idtmed[kOpGlass], kNbins, aPckov, aAbsSiO2, efficAll, rindexSiO2 ); + // TVirtualMC::GetMC()->SetCerenkov (idtmed[kOpGlassCathode], kNbins, aPckov, aAbsSiO2, effCathode, rindexSiO2 ); + TVirtualMC::GetMC()->SetCerenkov (idtmed[kOpGlassCathode], kNbins, aPckov, aAbsSiO2,efficAll , rindexSiO2 ); + TVirtualMC::GetMC()->SetCerenkov (idtmed[kOpAir], kNbins, aPckov,absorAir , efficAll,rindexAir ); + TVirtualMC::GetMC()->SetCerenkov (idtmed[kOpAirNext], kNbins, aPckov,absorbCathodeNext , efficAll, rindexCathodeNext); //Define a boarder for radiator optical properties - gMC->DefineOpSurface("surfRd", kUnified /*kGlisur*/,kDielectric_metal,kPolished, 0.); - gMC->SetMaterialProperty("surfRd", "EFFICIENCY", kNbins, dPckov, efficMet); - gMC->SetMaterialProperty("surfRd", "REFLECTIVITY", kNbins, dPckov, aReflMet); - gMC->SetBorderSurface("0TOPborder", "0TOP",1,"0TOO",1, "surfRd"); + TVirtualMC::GetMC()->DefineOpSurface("surfRd", kUnified /*kGlisur*/,kDielectric_metal,kPolished, 0.); + TVirtualMC::GetMC()->SetMaterialProperty("surfRd", "EFFICIENCY", kNbins, dPckov, efficMet); + TVirtualMC::GetMC()->SetMaterialProperty("surfRd", "REFLECTIVITY", kNbins, dPckov, aReflMet); + TVirtualMC::GetMC()->SetBorderSurface("0TOPborder", "0TOP",1,"0TOO",1, "surfRd"); } @@ -655,7 +655,7 @@ void AliT0v1::Init() // Initialises version 0 of the Forward Multiplicity Detector // AliT0::Init(); - fIdSens1=gMC->VolId("0REG"); + fIdSens1=TVirtualMC::GetMC()->VolId("0REG"); AliDebug(1,Form("%s: *** T0 version 1 initialized ***\n",ClassName())); } @@ -675,32 +675,32 @@ void AliT0v1::StepManager() // TClonesArray &lhits = *fHits; - if(!gMC->IsTrackAlive()) return; // particle has disappeared + if(!TVirtualMC::GetMC()->IsTrackAlive()) return; // particle has disappeared - id=gMC->CurrentVolID(copy); + id=TVirtualMC::GetMC()->CurrentVolID(copy); // Check the sensetive volume if(id==fIdSens1 ) { - if(gMC->IsTrackEntering()) { - gMC->CurrentVolOffID(2,copy); + if(TVirtualMC::GetMC()->IsTrackEntering()) { + TVirtualMC::GetMC()->CurrentVolOffID(2,copy); vol[1]=copy; - gMC->CurrentVolOffID(3,copy1); + TVirtualMC::GetMC()->CurrentVolOffID(3,copy1); vol[0]=copy1; - gMC->TrackPosition(pos); + TVirtualMC::GetMC()->TrackPosition(pos); hits[0] = pos[0]; hits[1] = pos[1]; hits[2] = pos[2]; if(pos[2]<0) vol[0] = 2; if(pos[2]>=0) vol[0] = 1; - Float_t etot=gMC->Etot(); + Float_t etot=TVirtualMC::GetMC()->Etot(); hits[3]=etot; - Int_t iPart= gMC->TrackPid(); - Int_t partID=gMC->IdFromPDG(iPart); + Int_t iPart= TVirtualMC::GetMC()->TrackPid(); + Int_t partID=TVirtualMC::GetMC()->IdFromPDG(iPart); hits[4]=partID; - Float_t ttime=gMC->TrackTime(); + Float_t ttime=TVirtualMC::GetMC()->TrackTime(); hits[5]=ttime*1e12; - if (gMC->TrackPid() == 50000050) // If particles is photon then ... + if (TVirtualMC::GetMC()->TrackPid() == 50000050) // If particles is photon then ... { if(RegisterPhotoE(vol[1]-1,hits[3])) { AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol,hits); @@ -709,20 +709,20 @@ void AliT0v1::StepManager() } //charge particle - if ( gMC->TrackCharge() ) + if ( TVirtualMC::GetMC()->TrackCharge() ) AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kT0); /* printf("track(%i) alive(%i) disap(%i) enter(%i) exit(%i) inside(%i) out(%i) stop(%i) new(%i) \n", gAlice->GetMCApp()->GetCurrentTrackNumber(), - gMC->IsTrackAlive(), - gMC->IsTrackDisappeared(), - gMC->IsTrackEntering(), - gMC->IsTrackExiting(), - gMC->IsTrackInside(), - gMC->IsTrackOut(), - gMC->IsTrackStop(), - gMC->IsNewTrack()); + TVirtualMC::GetMC()->IsTrackAlive(), + TVirtualMC::GetMC()->IsTrackDisappeared(), + TVirtualMC::GetMC()->IsTrackEntering(), + TVirtualMC::GetMC()->IsTrackExiting(), + TVirtualMC::GetMC()->IsTrackInside(), + TVirtualMC::GetMC()->IsTrackOut(), + TVirtualMC::GetMC()->IsTrackStop(), + TVirtualMC::GetMC()->IsNewTrack()); */ }// trck entering } //sensitive diff --git a/T0/AliT0v2.cxx b/T0/AliT0v2.cxx index cc1b2097aec..56a4074b123 100644 --- a/T0/AliT0v2.cxx +++ b/T0/AliT0v2.cxx @@ -95,13 +95,13 @@ void AliT0v2::CreateGeometry() AliMatrix (idrotm[901], 90., 0., 90., 90., 180., 0.); - gMC->Gsvolu ("0RST", "TUBE", idtmed[3], pstart, 3); - gMC->Gsvolu ("0LST", "TUBE", idtmed[3], pstart, 3); - gMC->Gspos ("0RST", 1, "ALIC", 0., 0., -zRight, 0, "ONLY"); - gMC->Gspos ("0LST", 1, "ALIC", 0., 0., zLeft, idrotm[901], "ONLY"); + TVirtualMC::GetMC()->Gsvolu ("0RST", "TUBE", idtmed[3], pstart, 3); + TVirtualMC::GetMC()->Gsvolu ("0LST", "TUBE", idtmed[3], pstart, 3); + TVirtualMC::GetMC()->Gspos ("0RST", 1, "ALIC", 0., 0., -zRight, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0LST", 1, "ALIC", 0., 0., zLeft, idrotm[901], "ONLY"); // 12 unit: PMT + divider - gMC->Gsvolu("0INS", "TUBE", idtmed[3], pinstart, 3); + TVirtualMC::GetMC()->Gsvolu("0INS", "TUBE", idtmed[3], pinstart, 3); z = 0; for (i = 0; i < 12; i++) { @@ -118,28 +118,28 @@ void AliT0v2::CreateGeometry() 90. + theta, phi[1], theta, phi[2]); - gMC->Gspos ("0INS", i + 1, "0RST", x, y, z, idrotm[902 + i], "ONLY"); - gMC->Gspos ("0INS", i + 13, "0LST", x, y, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0INS", i + 1, "0RST", x, y, z, idrotm[902 + i], "ONLY"); + TVirtualMC::GetMC()->Gspos ("0INS", i + 13, "0LST", x, y, z, 0, "ONLY"); } - gMC->Gsvolu ("0PMT", "TUBE", idtmed[1], ppmt, 3); + TVirtualMC::GetMC()->Gsvolu ("0PMT", "TUBE", idtmed[1], ppmt, 3); x = y = 0; z = -pinstart[2] + ppmt[2]; - gMC->Gspos ("0PMT", 1, "0INS", x, y, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0PMT", 1, "0INS", x, y, z, 0, "ONLY"); // PMT // Entry window (glass) - gMC->Gsvolu ("0TOP", "TUBE", idtmed[6], ptop, 3); + TVirtualMC::GetMC()->Gsvolu ("0TOP", "TUBE", idtmed[6], ptop, 3); z = -ppmt[2] + ptop[2]; - gMC->Gspos ("0TOP", 1, "0PMT", 0, 0, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0TOP", 1, "0PMT", 0, 0, z, 0, "ONLY"); - gMC->Gsvolu ("0REG", "TUBE", idtmed[6], preg, 3); + TVirtualMC::GetMC()->Gsvolu ("0REG", "TUBE", idtmed[6], preg, 3); z = -ppmt[2] + 2 * ptop[2] + preg[2]; - gMC->Gspos ("0REG", 1, "0PMT", 0, 0, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0REG", 1, "0PMT", 0, 0, z, 0, "ONLY"); - gMC->Gsvolu ("0DES", "TUBE", idtmed[6], pdes, 3); + TVirtualMC::GetMC()->Gsvolu ("0DES", "TUBE", idtmed[6], pdes, 3); z = -ppmt[2] + 2 * ptop[2] + preg[2]; - gMC->Gspos ("0DES", 1, "0PMT", 0, 0, z, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("0DES", 1, "0PMT", 0, 0, z, 0, "ONLY"); } @@ -195,10 +195,10 @@ void AliT0v2::CreateMaterials() AliMixture (3, "Al2O3 $", aal2o3, zal2o3, denscer, -2, wal2o3); AliMixture (4, "PMT glass $", aglass, zglass, dglass, -2, wglass); TString namate; - gMC->GetMaterial((*fIdmate)[3], namate, a, z, d, radl, absl, par); + TVirtualMC::GetMC()->GetMaterial((*fIdmate)[3], namate, a, z, d, radl, absl, par); acer[0] = a; zcer[0] = z; - gMC->GetMaterial((*fIdmate)[4], namate, a, z, d, radl, absl, par); + TVirtualMC::GetMC()->GetMaterial((*fIdmate)[4], namate, a, z, d, radl, absl, par); acer[1] = a; zcer[1] = z; @@ -271,8 +271,8 @@ void AliT0v2::DefineOpticalProperties() Int_t *idtmed = fIdtmed->GetArray(); - gMC->SetCerenkov (idtmed[6], NUMENTRIES, ppckov, absor_qwarz, effic_all, rindex_qwarz); - gMC->SetCerenkov (idtmed[1], NUMENTRIES, ppckov, absor_air, effic_all, rindex_air); + TVirtualMC::GetMC()->SetCerenkov (idtmed[6], NUMENTRIES, ppckov, absor_qwarz, effic_all, rindex_qwarz); + TVirtualMC::GetMC()->SetCerenkov (idtmed[1], NUMENTRIES, ppckov, absor_air, effic_all, rindex_air); } ////////////////////////////////////////////////////////////////////// @@ -281,7 +281,7 @@ void AliT0v2::DefineOpticalProperties() void AliT0v2::Init() { AliT0::Init(); - fIdSens1 = gMC->VolId ("0REG"); + fIdSens1 = TVirtualMC::GetMC()->VolId ("0REG"); printf ("*** T0 version 2 initialized ***\n"); } @@ -304,9 +304,9 @@ void AliT0v2::StepManager() TLorentzVector mom; - if(!gMC->IsTrackAlive()) return; // particle has disappeared + if(!TVirtualMC::GetMC()->IsTrackAlive()) return; // particle has disappeared -// TGeant3 *g3 = (TGeant3*) gMC; +// TGeant3 *g3 = (TGeant3*) TVirtualMC::GetMC(); // g3->Gpcxyz(); TClonesArray &lhits = *fHits; @@ -315,16 +315,16 @@ void AliT0v2::StepManager() /////////////////////////////////////////////// // If particles is photon then ... - if (gMC->TrackPid() == 50000050) + if (TVirtualMC::GetMC()->TrackPid() == 50000050) { - id = gMC->CurrentVolID(copy); + id = TVirtualMC::GetMC()->CurrentVolID(copy); // Check the sensetive volume if (id == fIdSens1) { - if (gMC->IsTrackEntering()) + if (TVirtualMC::GetMC()->IsTrackEntering()) { - gMC->CurrentVolOffID(2,copy); + TVirtualMC::GetMC()->CurrentVolOffID(2,copy); if (copy < 13) { vol[0] = RIGHT_ARRAY; @@ -336,26 +336,26 @@ void AliT0v2::StepManager() vol[1] = copy - 12; } - gMC->TrackPosition(pos); - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackPosition(pos); + TVirtualMC::GetMC()->TrackMomentum(mom); XYZ[0] = pos[0]; XYZ[1] = pos[1]; XYZ[2] = pos[2]; - gMC->Gmtod (XYZ, xyz, 1); + TVirtualMC::GetMC()->Gmtod (XYZ, xyz, 1); hitPhoton[0] = sqrt (xyz[0] * xyz[0] + xyz[1] * xyz[1]); hitPhoton[1] = mom[0]; hitPhoton[2] = mom[1]; hitPhoton[3] = mom[2]; - hitPhoton[4] = 1e9 * gMC->TrackTime(); - hitPhoton[5] = 1e9 * gMC->Etot(); + hitPhoton[4] = 1e9 * TVirtualMC::GetMC()->TrackTime(); + hitPhoton[5] = 1e9 * TVirtualMC::GetMC()->Etot(); AddHitPhoton (gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hitPhoton); } - gMC->StopTrack(); + TVirtualMC::GetMC()->StopTrack(); } else - if (id == gMC->VolId ("0DES")) gMC->StopTrack(); + if (id == TVirtualMC::GetMC()->VolId ("0DES")) TVirtualMC::GetMC()->StopTrack(); } // end photon particalary @@ -365,16 +365,16 @@ void AliT0v2::StepManager() /////////////////////////////////////////////// // If particles is charge then ... - // Float_t charge = gMC->TrackCharge(); + // Float_t charge = TVirtualMC::GetMC()->TrackCharge(); // if(TMath::Abs(charge) <= 0.) return; - id = gMC->CurrentVolID(copy); + id = TVirtualMC::GetMC()->CurrentVolID(copy); - // printf("gMC->ckine->ipart %d",gMC->ckine->ipart); + // printf("TVirtualMC::GetMC()->ckine->ipart %d",TVirtualMC::GetMC()->ckine->ipart); // Check the sensetive volume - if(id==gMC->VolId("0TOP") ) { - if(gMC->IsTrackEntering()) { - gMC->CurrentVolOffID(2,copy); + if(id==TVirtualMC::GetMC()->VolId("0TOP") ) { + if(TVirtualMC::GetMC()->IsTrackEntering()) { + TVirtualMC::GetMC()->CurrentVolOffID(2,copy); if (copy < 13) { vol[0] = RIGHT_ARRAY; @@ -386,27 +386,27 @@ void AliT0v2::StepManager() vol[1] = copy - 12; } - gMC->TrackPosition(pos); + TVirtualMC::GetMC()->TrackPosition(pos); hits[0] = pos[0]; hits[1] = pos[1]; hits[2] = pos[2]; - Float_t etot = gMC->Etot(); + Float_t etot = TVirtualMC::GetMC()->Etot(); hits[4] = etot; - Int_t part = gMC->TrackPid(); + Int_t part = TVirtualMC::GetMC()->TrackPid(); hits[5] = part; - Float_t ttime = gMC->TrackTime(); + Float_t ttime = TVirtualMC::GetMC()->TrackTime(); hits[6] = ttime*1e9; edep = 0; } - if(gMC->IsTrackInside()) { - Float_t de = gMC->Edep(); + if(TVirtualMC::GetMC()->IsTrackInside()) { + Float_t de = TVirtualMC::GetMC()->Edep(); edep = edep + de; // printf ("E deposition %f\n",edep); // for (i=0; i<=6; i++){ // printf(" HITS on T0 inside %f\n",hits[i]); } } - if(gMC->IsTrackExiting()) { - Float_t de = gMC->Edep(); + if(TVirtualMC::GetMC()->IsTrackExiting()) { + Float_t de = TVirtualMC::GetMC()->Edep(); edep = edep + de; hits[3] = edep * 1e3; diff --git a/TOF/AliTOF.cxx b/TOF/AliTOF.cxx index 86fcf36506e..14bffafbf27 100644 --- a/TOF/AliTOF.cxx +++ b/TOF/AliTOF.cxx @@ -69,7 +69,7 @@ class AliTOFcluster; // extern TROOT *gROOT; -// extern TVirtualMC *gMC; +// extern TVirtualMC *TVirtualMC::GetMC(); // extern AliRun *gAlice; @@ -419,7 +419,7 @@ void AliTOF::Init() // Initialise TOF detector after it has been built // // Set id of TOF sensitive volume - if (IsVersion() !=0) fIdSens=gMC->VolId("FPAD"); + if (IsVersion() !=0) fIdSens=TVirtualMC::GetMC()->VolId("FPAD"); /* // Save the geometry @@ -493,7 +493,7 @@ void AliTOF::Makehits(Bool_t hits) // disabled for TOFv0 // if (hits && (IsVersion()!=0)) - fIdSens = gMC->VolId("FPAD"); + fIdSens = TVirtualMC::GetMC()->VolId("FPAD"); else AliInfo("Option for writing the TOF-hits branch on TreeH: disabled"); } diff --git a/TOF/AliTOFAnalysisTaskCalibPass0.cxx b/TOF/AliTOFAnalysisTaskCalibPass0.cxx index 8cc3731bc9e..e9c9f107cc2 100644 --- a/TOF/AliTOFAnalysisTaskCalibPass0.cxx +++ b/TOF/AliTOFAnalysisTaskCalibPass0.cxx @@ -789,9 +789,9 @@ AliTOFAnalysisTaskCalibPass0::CalibrateAndStore(TH2F *histoVertexTimestamp, TH2F tofReso[ipoint] = timeZeroSigma[ipoint]; t0Spread[ipoint] = vertexSigma[ipoint] / 2.99792457999999984e-02; } - UInt_t run[1] = {runNb}; + UInt_t run[1] = {static_cast(runNb)}; UInt_t runFirstPoint[1] = {0}; - UInt_t runLastPoint[1] = {nPoints - 1}; + UInt_t runLastPoint[1] = {static_cast(nPoints - 1)}; /* create run params object */ AliTOFRunParams obj(nPoints, 1); diff --git a/TOF/AliTOFGeometry.cxx b/TOF/AliTOFGeometry.cxx index a06c401c154..76c007c30fa 100644 --- a/TOF/AliTOFGeometry.cxx +++ b/TOF/AliTOFGeometry.cxx @@ -665,7 +665,7 @@ Int_t AliTOFGeometry::GetPlate(const Float_t * pos) }; Rotation(posLocal,angles); - Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5}; + Float_t step[3] = {0., 0., static_cast((fgkRmax+fgkRmin)*0.5)}; Translation(posLocal,step); // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA = FLTA reference frame @@ -809,7 +809,7 @@ Int_t AliTOFGeometry::GetStrip(const Float_t * pos) // AliDebug(1,Form(" posLocal[0] = %f, posLocal[1] = %f, posLocal[2] = %f ", // posLocal[0],posLocal[1],posLocal[2])); - Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5}; + Float_t step[3] = {0., 0., static_cast((fgkRmax+fgkRmin)*0.5)}; Translation(posLocal,step); // AliDebug(1,Form(" posLocal[0] = %f, posLocal[1] = %f, posLocal[2] = %f ", // posLocal[0],posLocal[1],posLocal[2])); @@ -922,7 +922,7 @@ Int_t AliTOFGeometry::GetPadZ(const Float_t * pos) }; Rotation(posLocal,angles); - Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5}; + Float_t step[3] = {0., 0., static_cast((fgkRmax+fgkRmin)*0.5)}; Translation(posLocal,step); // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA = FLTA reference frame @@ -1015,7 +1015,7 @@ Int_t AliTOFGeometry::GetPadX(const Float_t * pos) }; Rotation(posLocal,angles); - Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5}; + Float_t step[3] = {0., 0., static_cast((fgkRmax+fgkRmin)*0.5)}; Translation(posLocal,step); // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA/B/C = FLTA/B/C reference frame @@ -1107,7 +1107,7 @@ Float_t AliTOFGeometry::GetX(const Int_t * det) // Pad reference frame -> FSTR reference frame Float_t posLocal[3] = {0., 0., 0.}; - Float_t step[3] = {-(ipadx+0.5)*fgkXPad, 0., -(ipadz+0.5)*fgkZPad}; + Float_t step[3] = {static_cast(-(ipadx+0.5)*fgkXPad), 0., static_cast(-(ipadz+0.5)*fgkZPad)}; Translation(posLocal,step); step[0] = kNpadX*0.5*fgkXPad; @@ -1218,7 +1218,7 @@ Float_t AliTOFGeometry::GetY(const Int_t * det) // Pad reference frame -> FSTR reference frame Float_t posLocal[3] = {0., 0., 0.}; - Float_t step[3] = {-(ipadx+0.5)*fgkXPad, 0., -(ipadz+0.5)*fgkZPad}; + Float_t step[3] = {static_cast(-(ipadx+0.5)*fgkXPad), 0., static_cast(-(ipadz+0.5)*fgkZPad)}; Translation(posLocal,step); step[0] = kNpadX*0.5*fgkXPad; @@ -1316,7 +1316,7 @@ Float_t AliTOFGeometry::GetZ(const Int_t * det) // Pad reference frame -> FSTR reference frame Float_t posLocal[3] = {0., 0., 0.}; - Float_t step[3] = {-(ipadx+0.5)*fgkXPad, 0., -(ipadz+0.5)*fgkZPad}; + Float_t step[3] = {static_cast(-(ipadx+0.5)*fgkXPad), 0., static_cast(-(ipadz+0.5)*fgkZPad)}; Translation(posLocal,step); step[0] = kNpadX*0.5*fgkXPad; @@ -1499,7 +1499,7 @@ Float_t AliTOFGeometry::GetPadDx(const Float_t * pos) }; Rotation(posLocal,angles); - Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5}; + Float_t step[3] = {0., 0., static_cast((fgkRmax+fgkRmin)*0.5)}; Translation(posLocal,step); // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA/B/C = FLTA/B/C reference frame @@ -1600,7 +1600,7 @@ Float_t AliTOFGeometry::GetPadDy(const Float_t * pos) }; Rotation(posLocal,angles); - Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5}; + Float_t step[3] = {0., 0., static_cast((fgkRmax+fgkRmin)*0.5)}; Translation(posLocal,step); // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA/B/C = FLTA/B/C reference frame @@ -1701,7 +1701,7 @@ Float_t AliTOFGeometry::GetPadDz(const Float_t * pos) }; Rotation(posLocal,angles); - Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5}; + Float_t step[3] = {0., 0., static_cast((fgkRmax+fgkRmin)*0.5)}; Translation(posLocal,step); // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA/B/C = FLTA/B/C reference frame diff --git a/TOF/AliTOFTrigger.cxx b/TOF/AliTOFTrigger.cxx index 8208036586d..efea00c0616 100644 --- a/TOF/AliTOFTrigger.cxx +++ b/TOF/AliTOFTrigger.cxx @@ -1093,7 +1093,7 @@ Bool_t AliTOFTrigger::GetBit(Int_t nDDL, Int_t nTRM, Int_t iChain, if (nDDL>=36) iLTMindex++; iChannelindex=iCH+iTDC*AliTOFGeometry::NCh()-12*AliTOFGeometry::NCh(); - Int_t index[2]={iLTMindex,iChannelindex}; + Int_t index[2]={static_cast(iLTMindex),static_cast(iChannelindex)}; return (index[0]<36)?fCTTMmatrixFront[index[0]][index[1]]:fCTTMmatrixBack[index[0]-36][index[1]]; } diff --git a/TOF/AliTOFtrackerMI.cxx b/TOF/AliTOFtrackerMI.cxx index 8a9359000ab..7cdd1cd33af 100644 --- a/TOF/AliTOFtrackerMI.cxx +++ b/TOF/AliTOFtrackerMI.cxx @@ -537,7 +537,7 @@ void AliTOFtrackerMI::MatchTracksMI(Bool_t mLastStep){ -1, tgamma, qualityGold, - cgold->GetQuality()}; + static_cast(cgold->GetQuality())}; // GetLinearDistances(trackTOFin,cgold,&info[6]); if (inonfake>=0){ info[6] = inonfake; diff --git a/TOF/AliTOFtrackerV1.cxx b/TOF/AliTOFtrackerV1.cxx index 97a7eba6d27..270c33f3e96 100644 --- a/TOF/AliTOFtrackerV1.cxx +++ b/TOF/AliTOFtrackerV1.cxx @@ -615,7 +615,7 @@ void AliTOFtrackerV1::MatchTracks( ){ distR+=deltaY*deltaY; distR+=dzTW*dzTW; distR = TMath::Sqrt(distR); - Float_t info[10] = {distR, deltaY, dzTW, + Float_t info[10] = {distR, deltaY, static_cast(dzTW), 0.,0.,0.,0.,0.,0.,0.}; t->SetTOFInfo(info); diff --git a/TOF/AliTOFv6T0.cxx b/TOF/AliTOFv6T0.cxx index 4c99f6889c2..720e55fbb73 100644 --- a/TOF/AliTOFv6T0.cxx +++ b/TOF/AliTOFv6T0.cxx @@ -109,7 +109,7 @@ Revision 0.1 2007 March G. Cara Romeo and A. De Caro #include "AliTOFGeometry.h" #include "AliTOFv6T0.h" -// extern TVirtualMC *gMC; +// extern TVirtualMC *TVirtualMC::GetMC(); // extern TGeoManager *gGeoManager; // extern AliRun *gAlice; @@ -138,15 +138,15 @@ const Float_t AliTOFv6T0::fgkCBLw = 13.5; // cm const Float_t AliTOFv6T0::fgkCBLh1 = 2.0; // cm const Float_t AliTOFv6T0::fgkCBLh2 = 12.3; // cm const Float_t AliTOFv6T0::fgkBetweenLandMask = 0.1; // cm -const Float_t AliTOFv6T0::fgkAl1parameters[3] = {fgkFEAwidth1*0.5, 0.4, 0.2}; // cm +const Float_t AliTOFv6T0::fgkAl1parameters[3] = {static_cast(fgkFEAwidth1*0.5), 0.4, 0.2}; // cm const Float_t AliTOFv6T0::fgkAl2parameters[3] = {7.25, 0.75, 0.25}; // cm const Float_t AliTOFv6T0::fgkAl3parameters[3] = {3., 4., 0.1}; // cm const Float_t AliTOFv6T0::fgkRoof1parameters[3] = {fgkAl1parameters[0], fgkAl1parameters[2], 1.45}; // cm const Float_t AliTOFv6T0::fgkRoof2parameters[3] = {fgkAl3parameters[0], 0.1, 1.15}; // cm -const Float_t AliTOFv6T0::fgkFEAparameters[3] = {fgkFEAwidth1*0.5, 5.6, 0.1}; // cm +const Float_t AliTOFv6T0::fgkFEAparameters[3] = {static_cast(fgkFEAwidth1*0.5), 5.6, 0.1}; // cm const Float_t AliTOFv6T0::fgkBar[3] = {8.575, 0.6, 0.25}; // cm const Float_t AliTOFv6T0::fgkBar1[3] = {fgkBar[0], fgkBar[1], 0.1}; // cm -const Float_t AliTOFv6T0::fgkBar2[3] = {fgkBar[0], 0.1, fgkBar[1] - 2.*fgkBar1[2]}; // cm +const Float_t AliTOFv6T0::fgkBar2[3] = {fgkBar[0], 0.1, static_cast(fgkBar[1] - 2.*fgkBar1[2])}; // cm const Float_t AliTOFv6T0::fgkBarS[3] = {2., fgkBar[1], fgkBar[2]}; // cm const Float_t AliTOFv6T0::fgkBarS1[3] = {fgkBarS[0], fgkBar1[1], fgkBar1[2]}; // cm const Float_t AliTOFv6T0::fgkBarS2[3] = {fgkBarS[0], fgkBar2[1], fgkBar2[2]}; // cm @@ -427,14 +427,14 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, par[0] = xtof * 0.5; par[1] = ytof * 0.25; par[2] = zlenA * 0.5; - gMC->Gsvolu("FTOA", "BOX ", idtmed[503], par, 3); // Fibre glass + TVirtualMC::GetMC()->Gsvolu("FTOA", "BOX ", idtmed[503], par, 3); // Fibre glass if (fTOFHoles) { par[0] = xtof * 0.5; par[1] = ytof * 0.25; par[2] = (zlenA*0.5 - fgkInterCentrModBorder1)*0.5; - gMC->Gsvolu("FTOB", "BOX ", idtmed[503], par, 3); // Fibre glass - gMC->Gsvolu("FTOC", "BOX ", idtmed[503], par, 3); // Fibre glass + TVirtualMC::GetMC()->Gsvolu("FTOB", "BOX ", idtmed[503], par, 3); // Fibre glass + TVirtualMC::GetMC()->Gsvolu("FTOC", "BOX ", idtmed[503], par, 3); // Fibre glass } @@ -443,24 +443,24 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, par[0] = xFLT*0.5; par[1] = yFLT*0.5; par[2] = zFLTA*0.5; - gMC->Gsvolu("FLTA", "BOX ", idtmed[506], par, 3); // Freon mix + TVirtualMC::GetMC()->Gsvolu("FLTA", "BOX ", idtmed[506], par, 3); // Freon mix Float_t xcoor, ycoor, zcoor; xcoor = 0.; ycoor = fgkModuleWallThickness*0.5; zcoor = 0.; - gMC->Gspos ("FLTA", 0, "FTOA", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("FLTA", 0, "FTOA", xcoor, ycoor, zcoor, 0, "ONLY"); if (fTOFHoles) { par[2] = (zlenA*0.5 - 2.*fgkModuleWallThickness - fgkInterCentrModBorder1)*0.5; - gMC->Gsvolu("FLTB", "BOX ", idtmed[506], par, 3); // Freon mix - gMC->Gsvolu("FLTC", "BOX ", idtmed[506], par, 3); // Freon mix + TVirtualMC::GetMC()->Gsvolu("FLTB", "BOX ", idtmed[506], par, 3); // Freon mix + TVirtualMC::GetMC()->Gsvolu("FLTC", "BOX ", idtmed[506], par, 3); // Freon mix //xcoor = 0.; //ycoor = fgkModuleWallThickness*0.5; zcoor = fgkModuleWallThickness; - gMC->Gspos ("FLTB", 0, "FTOB", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos ("FLTC", 0, "FTOC", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("FLTB", 0, "FTOB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos ("FLTC", 0, "FTOC", xcoor, ycoor,-zcoor, 0, "ONLY"); } // Definition and positioning @@ -486,7 +486,7 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, //trpa[8] = (fgkLengthInCeModBorder - 2.*fgkModuleWallThickness*tgbe)*0.5; //trpa[9] = (fgkLengthInCeModBorder + 2.*fgkModuleWallThickness*tgbe)*0.5; trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg; - gMC->Gsvolu("FWZ1D", "TRAP", idtmed[503], trpa, 11); // Fibre glass + TVirtualMC::GetMC()->Gsvolu("FWZ1D", "TRAP", idtmed[503], trpa, 11); // Fibre glass AliMatrix (idrotm[0],90., 90.,180.,0.,90.,180.); AliMatrix (idrotm[1],90., 90., 0.,0.,90., 0.); @@ -495,8 +495,8 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, //ycoor = -(yFLT - fgkLengthInCeModBorder)*0.5; ycoor = -(yFLT - fgkLengthInCeModBorderD)*0.5; zcoor = fgkInterCentrModBorder1; - gMC->Gspos("FWZ1D", 1, "FLTA", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); - gMC->Gspos("FWZ1D", 2, "FLTA", xcoor, ycoor,-zcoor, idrotm[1], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ1D", 1, "FLTA", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ1D", 2, "FLTA", xcoor, ycoor,-zcoor, idrotm[1], "ONLY"); Float_t y0B, ycoorB, zcoorB; @@ -517,9 +517,9 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, //xcoor = 0.; ycoorB = ycoor - fgkModuleWallThickness*0.5*tgbe; zcoorB = (zlenA*0.5 - 2.*fgkModuleWallThickness - fgkInterCentrModBorder1)*0.5 - 2.*fgkModuleWallThickness; - gMC->Gsvolu("FWZAD", "TRAP", idtmed[503], trpa, 11); // Fibre glass - gMC->Gspos("FWZAD", 1, "FLTB", xcoor, ycoorB, zcoorB, idrotm[1], "ONLY"); - gMC->Gspos("FWZAD", 2, "FLTC", xcoor, ycoorB,-zcoorB, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gsvolu("FWZAD", "TRAP", idtmed[503], trpa, 11); // Fibre glass + TVirtualMC::GetMC()->Gspos("FWZAD", 1, "FLTB", xcoor, ycoorB, zcoorB, idrotm[1], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZAD", 2, "FLTC", xcoor, ycoorB,-zcoorB, idrotm[0], "ONLY"); } @@ -543,7 +543,7 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, //trpa[8] = (fgkLengthInCeModBorder - 2.*fgkModuleWallThickness*tgbe)*0.5; //trpa[9] = (fgkLengthInCeModBorder + 2.*fgkModuleWallThickness*tgbe)*0.5; trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg; - gMC->Gsvolu("FWZ1U", "TRAP", idtmed[503], trpa, 11); // Fibre glass + TVirtualMC::GetMC()->Gsvolu("FWZ1U", "TRAP", idtmed[503], trpa, 11); // Fibre glass AliMatrix (idrotm[2],90.,270., 0.,0.,90.,180.); @@ -553,8 +553,8 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, //ycoor = (yFLT - fgkLengthInCeModBorder)*0.5; ycoor = (yFLT - fgkLengthInCeModBorderU)*0.5; zcoor = fgkInterCentrModBorder2; - gMC->Gspos("FWZ1U", 1, "FLTA", xcoor, ycoor, zcoor,idrotm[2], "ONLY"); - gMC->Gspos("FWZ1U", 2, "FLTA", xcoor, ycoor,-zcoor,idrotm[3], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ1U", 1, "FLTA", xcoor, ycoor, zcoor,idrotm[2], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ1U", 2, "FLTA", xcoor, ycoor,-zcoor,idrotm[3], "ONLY"); if (fTOFHoles) { //y0B = fgkLengthInCeModBorder + fgkModuleWallThickness*tgbe; @@ -570,13 +570,13 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, trpa[8] = (y0B - fgkModuleWallThickness*tgbe)*0.5; trpa[9] = (y0B + fgkModuleWallThickness*tgbe)*0.5; trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg; - gMC->Gsvolu("FWZBU", "TRAP", idtmed[503], trpa, 11); // Fibre glass + TVirtualMC::GetMC()->Gsvolu("FWZBU", "TRAP", idtmed[503], trpa, 11); // Fibre glass //xcoor = 0.; ycoorB = ycoor - fgkModuleWallThickness*0.5*tgbe; zcoorB = (zlenA*0.5 - 2.*fgkModuleWallThickness - fgkInterCentrModBorder1)*0.5 - (fgkInterCentrModBorder2 - fgkInterCentrModBorder1) - 2.*fgkModuleWallThickness; - gMC->Gspos("FWZBU", 1, "FLTB", xcoor, ycoorB, zcoorB, idrotm[3], "ONLY"); - gMC->Gspos("FWZBU", 2, "FLTC", xcoor, ycoorB,-zcoorB, idrotm[2], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZBU", 1, "FLTB", xcoor, ycoorB, zcoorB, idrotm[3], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZBU", 2, "FLTC", xcoor, ycoorB,-zcoorB, idrotm[2], "ONLY"); } trpa[0] = 0.5*(fgkInterCentrModBorder2 - fgkInterCentrModBorder1)/TMath::Cos(alpha); @@ -585,7 +585,7 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, trpa[3] = -beta*kRaddeg; trpa[4] = 0.; trpa[5] = 0.; - gMC->Gsvolu("FWZ2", "PARA", idtmed[503], trpa, 6); // Fibre glass + TVirtualMC::GetMC()->Gsvolu("FWZ2", "PARA", idtmed[503], trpa, 6); // Fibre glass AliMatrix (idrotm[4], alpha*kRaddeg,90.,90.+alpha*kRaddeg,90.,90.,180.); AliMatrix (idrotm[5],180.-alpha*kRaddeg,90.,90.-alpha*kRaddeg,90.,90., 0.); @@ -594,8 +594,8 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, //ycoor = 0.; ycoor = (fgkLengthInCeModBorderD - fgkLengthInCeModBorderU)*0.5; zcoor = (fgkInterCentrModBorder2 + fgkInterCentrModBorder1)*0.5; - gMC->Gspos("FWZ2", 1, "FLTA", xcoor, ycoor, zcoor, idrotm[4], "ONLY"); - gMC->Gspos("FWZ2", 2, "FLTA", xcoor, ycoor,-zcoor, idrotm[5], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ2", 1, "FLTA", xcoor, ycoor, zcoor, idrotm[4], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ2", 2, "FLTA", xcoor, ycoor,-zcoor, idrotm[5], "ONLY"); if (fTOFHoles) { trpa[0] = 0.5*(fgkInterCentrModBorder2 - fgkInterCentrModBorder1)/TMath::Cos(alpha); @@ -604,13 +604,13 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, trpa[3] = -beta*kRaddeg; trpa[4] = 0.; trpa[5] = 0.; - gMC->Gsvolu("FWZC", "PARA", idtmed[503], trpa, 6); // Fibre glass + TVirtualMC::GetMC()->Gsvolu("FWZC", "PARA", idtmed[503], trpa, 6); // Fibre glass //xcoor = 0.; ycoorB = ycoor - fgkModuleWallThickness*tgbe; zcoorB = (zlenA*0.5 - 2.*fgkModuleWallThickness - fgkInterCentrModBorder1)*0.5 - (fgkInterCentrModBorder2 - fgkInterCentrModBorder1)*0.5 - 2.*fgkModuleWallThickness; - gMC->Gspos("FWZC", 1, "FLTB", xcoor, ycoorB, zcoorB, idrotm[5], "ONLY"); - gMC->Gspos("FWZC", 2, "FLTC", xcoor, ycoorB,-zcoorB, idrotm[4], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZC", 1, "FLTB", xcoor, ycoorB, zcoorB, idrotm[5], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZC", 2, "FLTC", xcoor, ycoorB,-zcoorB, idrotm[4], "ONLY"); } @@ -631,34 +631,34 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, trpa[8] = (fgkLengthExInModBorder - 2.*fgkModuleWallThickness*tgbe)*0.5; trpa[9] = (fgkLengthExInModBorder + 2.*fgkModuleWallThickness*tgbe)*0.5; trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg; - gMC->Gsvolu("FWZ3", "TRAP", idtmed[503], trpa, 11); // Fibre glass + TVirtualMC::GetMC()->Gsvolu("FWZ3", "TRAP", idtmed[503], trpa, 11); // Fibre glass //xcoor = 0.; ycoor = (yFLT - fgkLengthExInModBorder)*0.5; zcoor = fgkExterInterModBorder1; - gMC->Gspos("FWZ3", 1, "FLTA", xcoor, ycoor, zcoor,idrotm[3], "ONLY"); - gMC->Gspos("FWZ3", 2, "FLTA", xcoor, ycoor,-zcoor,idrotm[2], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ3", 1, "FLTA", xcoor, ycoor, zcoor,idrotm[3], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ3", 2, "FLTA", xcoor, ycoor,-zcoor,idrotm[2], "ONLY"); if (fTOFHoles) { //xcoor = 0.; //ycoor = (yFLT - fgkLengthExInModBorder)*0.5; zcoor = -fgkExterInterModBorder1 + (zlenA*0.5 + fgkInterCentrModBorder1 - 2.*fgkModuleWallThickness)*0.5; - gMC->Gspos("FWZ3", 5, "FLTB", xcoor, ycoor, zcoor, idrotm[2], "ONLY"); - gMC->Gspos("FWZ3", 6, "FLTC", xcoor, ycoor,-zcoor, idrotm[3], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ3", 5, "FLTB", xcoor, ycoor, zcoor, idrotm[2], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ3", 6, "FLTC", xcoor, ycoor,-zcoor, idrotm[3], "ONLY"); } //xcoor = 0.; ycoor = -(yFLT - fgkLengthExInModBorder)*0.5; zcoor = fgkExterInterModBorder2; - gMC->Gspos("FWZ3", 3, "FLTA", xcoor, ycoor, zcoor, idrotm[1], "ONLY"); - gMC->Gspos("FWZ3", 4, "FLTA", xcoor, ycoor,-zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ3", 3, "FLTA", xcoor, ycoor, zcoor, idrotm[1], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ3", 4, "FLTA", xcoor, ycoor,-zcoor, idrotm[0], "ONLY"); if (fTOFHoles) { //xcoor = 0.; //ycoor = -(yFLT - fgkLengthExInModBorder)*0.5; zcoor = -fgkExterInterModBorder2 + (zlenA*0.5 + fgkInterCentrModBorder1 - 2.*fgkModuleWallThickness)*0.5; - gMC->Gspos("FWZ3", 7, "FLTB", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); - gMC->Gspos("FWZ3", 8, "FLTC", xcoor, ycoor,-zcoor, idrotm[1], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ3", 7, "FLTB", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ3", 8, "FLTC", xcoor, ycoor,-zcoor, idrotm[1], "ONLY"); } trpa[0] = 0.5*(fgkExterInterModBorder2 - fgkExterInterModBorder1)/TMath::Cos(alpha); @@ -667,7 +667,7 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, trpa[3] = -beta*kRaddeg; trpa[4] = 0.; trpa[5] = 0.; - gMC->Gsvolu("FWZ4", "PARA", idtmed[503], trpa, 6); // Fibre glass + TVirtualMC::GetMC()->Gsvolu("FWZ4", "PARA", idtmed[503], trpa, 6); // Fibre glass AliMatrix (idrotm[6],alpha*kRaddeg,90.,90.+alpha*kRaddeg,90.,90.,180.); AliMatrix (idrotm[7],180.-alpha*kRaddeg,90.,90.-alpha*kRaddeg,90.,90.,0.); @@ -675,16 +675,16 @@ void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA, //xcoor = 0.; ycoor = 0.; zcoor = (fgkExterInterModBorder2 + fgkExterInterModBorder1)*0.5; - gMC->Gspos("FWZ4", 1, "FLTA", xcoor, ycoor, zcoor, idrotm[7], "ONLY"); - gMC->Gspos("FWZ4", 2, "FLTA", xcoor, ycoor,-zcoor, idrotm[6], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ4", 1, "FLTA", xcoor, ycoor, zcoor, idrotm[7], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ4", 2, "FLTA", xcoor, ycoor,-zcoor, idrotm[6], "ONLY"); if (fTOFHoles) { //xcoor = 0.; //ycoor = 0.; zcoor = -(fgkExterInterModBorder2 + fgkExterInterModBorder1)*0.5 + (zlenA*0.5 + fgkInterCentrModBorder1 - 2.*fgkModuleWallThickness)*0.5; - gMC->Gspos("FWZ4", 3, "FLTB", xcoor, ycoor, zcoor, idrotm[6], "ONLY"); - gMC->Gspos("FWZ4", 4, "FLTC", xcoor, ycoor,-zcoor, idrotm[7], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ4", 3, "FLTB", xcoor, ycoor, zcoor, idrotm[6], "ONLY"); + TVirtualMC::GetMC()->Gspos("FWZ4", 4, "FLTC", xcoor, ycoor,-zcoor, idrotm[7], "ONLY"); } } @@ -708,8 +708,8 @@ void AliTOFv6T0::CreateModuleCovers(Float_t xtof, Float_t zlenA) const par[0] = xtof*0.5 + 2.; par[1] = fgkModuleCoverThickness*0.5; par[2] = zlenA*0.5 + 2.; - gMC->Gsvolu("FPEA", "BOX ", idtmed[500], par, 3); // Air - if (fTOFHoles) gMC->Gsvolu("FPEB", "BOX ", idtmed[500], par, 3); // Air + TVirtualMC::GetMC()->Gsvolu("FPEA", "BOX ", idtmed[500], par, 3); // Air + if (fTOFHoles) TVirtualMC::GetMC()->Gsvolu("FPEB", "BOX ", idtmed[500], par, 3); // Air const Float_t kAlCoverThickness = 1.5; const Float_t kInterfaceCardThickness = 0.16; @@ -718,107 +718,107 @@ void AliTOFv6T0::CreateModuleCovers(Float_t xtof, Float_t zlenA) const //par[0] = xtof*0.5 + 2.; par[1] = kAlCoverThickness*0.5; //par[2] = zlenA*0.5 + 2.; - gMC->Gsvolu("FALT", "BOX ", idtmed[504], par, 3); // Al - if (fTOFHoles) gMC->Gsvolu("FALB", "BOX ", idtmed[504], par, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FALT", "BOX ", idtmed[504], par, 3); // Al + if (fTOFHoles) TVirtualMC::GetMC()->Gsvolu("FALB", "BOX ", idtmed[504], par, 3); // Al Float_t xcoor, ycoor, zcoor; xcoor = 0.; ycoor = 0.; zcoor = 0.; - gMC->Gspos("FALT", 0, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); - if (fTOFHoles) gMC->Gspos("FALB", 0, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FALT", 0, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); + if (fTOFHoles) TVirtualMC::GetMC()->Gspos("FALB", 0, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY"); par[0] = xtof*0.5; //par[1] = kAlCoverThickness*0.5; par[2] = fgkInterCentrModBorder2 - 2.; - gMC->Gsvolu("FPE1", "BOX ", idtmed[505], par, 3); // Al honeycomb + TVirtualMC::GetMC()->Gsvolu("FPE1", "BOX ", idtmed[505], par, 3); // Al honeycomb //xcoor = 0.; //ycoor = 0.; //zcoor = 0.; - gMC->Gspos("FPE1", 0, "FALT", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPE1", 0, "FALT", xcoor, ycoor, zcoor, 0, "ONLY"); if (fTOFHoles) { //par[0] = xtof*0.5; par[1] = kAlCoverThickness*0.5 - kAlSkinThickness; //par[2] = fgkInterCentrModBorder2 - 2.; - gMC->Gsvolu("FPE4", "BOX ", idtmed[515], par, 3); // Al honeycomb for holes + TVirtualMC::GetMC()->Gsvolu("FPE4", "BOX ", idtmed[515], par, 3); // Al honeycomb for holes //xcoor = 0.; //ycoor = 0.; //zcoor = 0.; - gMC->Gspos("FPE4", 0, "FALB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPE4", 0, "FALB", xcoor, ycoor, zcoor, 0, "ONLY"); } //par[0] = xtof*0.5; //par[1] = kAlCoverThickness*0.5; par[2] = (fgkExterInterModBorder1 - fgkInterCentrModBorder2)*0.5 - 2.; - gMC->Gsvolu("FPE2", "BOX ", idtmed[505], par, 3); // Al honeycomb + TVirtualMC::GetMC()->Gsvolu("FPE2", "BOX ", idtmed[505], par, 3); // Al honeycomb //xcoor = 0.; //ycoor = 0.; zcoor = (fgkExterInterModBorder1 + fgkInterCentrModBorder2)*0.5; - gMC->Gspos("FPE2", 1, "FALT", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FPE2", 2, "FALT", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPE2", 1, "FALT", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPE2", 2, "FALT", xcoor, ycoor,-zcoor, 0, "ONLY"); if (fTOFHoles) { //xcoor = 0.; //ycoor = 0.; //zcoor = (fgkExterInterModBorder1 + fgkInterCentrModBorder2)*0.5; - gMC->Gspos("FPE2", 1, "FALB", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FPE2", 2, "FALB", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPE2", 1, "FALB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPE2", 2, "FALB", xcoor, ycoor,-zcoor, 0, "ONLY"); } //par[0] = xtof*0.5; //par[1] = kAlCoverThickness*0.5; par[2] = (zlenA*0.5 + 2. - fgkExterInterModBorder1)*0.5 - 2.; - gMC->Gsvolu("FPE3", "BOX ", idtmed[505], par, 3); // Al honeycomb + TVirtualMC::GetMC()->Gsvolu("FPE3", "BOX ", idtmed[505], par, 3); // Al honeycomb //xcoor = 0.; //ycoor = 0.; zcoor = (zlenA*0.5 + 2. + fgkExterInterModBorder1)*0.5; - gMC->Gspos("FPE3", 1, "FALT", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FPE3", 2, "FALT", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPE3", 1, "FALT", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPE3", 2, "FALT", xcoor, ycoor,-zcoor, 0, "ONLY"); if (fTOFHoles) { //xcoor = 0.; //ycoor = 0.; zcoor = (zlenA*0.5 + 2. + fgkExterInterModBorder1)*0.5; - gMC->Gspos("FPE3", 1, "FALB", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FPE3", 2, "FALB", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPE3", 1, "FALB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPE3", 2, "FALB", xcoor, ycoor,-zcoor, 0, "ONLY"); } // volumes for Interface cards par[0] = xtof*0.5; par[1] = kInterfaceCardThickness*0.5; par[2] = fgkInterCentrModBorder2 - 2.; - gMC->Gsvolu("FIF1", "BOX ", idtmed[502], par, 3); // G10 + TVirtualMC::GetMC()->Gsvolu("FIF1", "BOX ", idtmed[502], par, 3); // G10 //xcoor = 0.; ycoor = kAlCoverThickness*0.5 + kInterfaceCardThickness*0.5; zcoor = 0.; - gMC->Gspos("FIF1", 0, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FIF1", 0, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); //par[0] = xtof*0.5; //par[1] = kInterfaceCardThickness*0.5; par[2] = (fgkExterInterModBorder1 - fgkInterCentrModBorder2)*0.5 - 2.; - gMC->Gsvolu("FIF2", "BOX ", idtmed[502], par, 3); // G10 + TVirtualMC::GetMC()->Gsvolu("FIF2", "BOX ", idtmed[502], par, 3); // G10 //xcoor = 0.; //ycoor = kAlCoverThickness*0.5 + kInterfaceCardThickness*0.5; zcoor = (fgkExterInterModBorder1 + fgkInterCentrModBorder2)*0.5; - gMC->Gspos("FIF2", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FIF2", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FIF2", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FIF2", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY"); if (fTOFHoles) { - gMC->Gspos("FIF2", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FIF2", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FIF2", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FIF2", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY"); } //par[0] = xtof*0.5; //par[1] = kInterfaceCardThickness*0.5; par[2] = (zlenA*0.5 + 2. - fgkExterInterModBorder1)*0.5 - 2.; - gMC->Gsvolu("FIF3", "BOX ", idtmed[502], par, 3); // G10 + TVirtualMC::GetMC()->Gsvolu("FIF3", "BOX ", idtmed[502], par, 3); // G10 //xcoor = 0.; //ycoor = kAlCoverThickness*0.5 + kInterfaceCardThickness*0.5; zcoor = (zlenA*0.5 + 2. + fgkExterInterModBorder1)*0.5; - gMC->Gspos("FIF3", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FIF3", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FIF3", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FIF3", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY"); if (fTOFHoles) { - gMC->Gspos("FIF3", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FIF3", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FIF3", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FIF3", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY"); } // volumes for flat cables @@ -827,38 +827,38 @@ void AliTOFv6T0::CreateModuleCovers(Float_t xtof, Float_t zlenA) const par[0] = xtof*0.5; par[1] = kPlasticFlatCableThickness*0.5; par[2] = fgkInterCentrModBorder2 - 2.; - gMC->Gsvolu("FFC1", "BOX ", idtmed[513], par, 3); // Plastic (CH2) + TVirtualMC::GetMC()->Gsvolu("FFC1", "BOX ", idtmed[513], par, 3); // Plastic (CH2) //xcoor = 0.; ycoor = -kAlCoverThickness*0.5 - kPlasticFlatCableThickness*0.5; zcoor = 0.; - gMC->Gspos("FFC1", 0, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFC1", 0, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); //par[0] = xtof*0.5; //par[1] = kPlasticFlatCableThickness*0.5; par[2] = (fgkExterInterModBorder1 - fgkInterCentrModBorder2)*0.5 - 2.; - gMC->Gsvolu("FFC2", "BOX ", idtmed[513], par, 3); // Plastic (CH2) + TVirtualMC::GetMC()->Gsvolu("FFC2", "BOX ", idtmed[513], par, 3); // Plastic (CH2) //xcoor = 0.; //ycoor = -kAlCoverThickness*0.5 - kPlasticFlatCableThickness*0.5; zcoor = (fgkExterInterModBorder1 + fgkInterCentrModBorder2)*0.5; - gMC->Gspos("FFC2", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FFC2", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFC2", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFC2", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY"); if (fTOFHoles) { - gMC->Gspos("FFC2", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FFC2", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFC2", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFC2", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY"); } //par[0] = xtof*0.5; //par[1] = kPlasticFlatCableThickness*0.5; par[2] = (zlenA*0.5 + 2. - fgkExterInterModBorder1)*0.5 - 2.; - gMC->Gsvolu("FFC3", "BOX ", idtmed[513], par, 3); // Plastic (CH2) + TVirtualMC::GetMC()->Gsvolu("FFC3", "BOX ", idtmed[513], par, 3); // Plastic (CH2) //xcoor = 0.; //ycoor = -kAlCoverThickness*0.5 - kPlasticFlatCableThickness*0.5; zcoor = (zlenA*0.5 + 2. + fgkExterInterModBorder1)*0.5; - gMC->Gspos("FFC3", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FFC3", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFC3", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFC3", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY"); if (fTOFHoles) { - gMC->Gspos("FFC3", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FFC3", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFC3", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFC3", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY"); } // Cu @@ -866,20 +866,20 @@ void AliTOFv6T0::CreateModuleCovers(Float_t xtof, Float_t zlenA) const par[0] = xtof*0.5; par[1] = kCopperFlatCableThickness*0.5; par[2] = fgkInterCentrModBorder2 - 2.; - gMC->Gsvolu("FCC1", "BOX ", idtmed[512], par, 3); // Cu - gMC->Gspos("FCC1", 0, "FFC1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("FCC1", "BOX ", idtmed[512], par, 3); // Cu + TVirtualMC::GetMC()->Gspos("FCC1", 0, "FFC1", 0., 0., 0., 0, "ONLY"); //par[0] = xtof*0.5; //par[1] = kCopperFlatCableThickness*0.5; par[2] = (fgkExterInterModBorder1 - fgkInterCentrModBorder2)*0.5 - 2.; - gMC->Gsvolu("FCC2", "BOX ", idtmed[512], par, 3); // Cu - gMC->Gspos("FCC2", 0, "FFC2", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("FCC2", "BOX ", idtmed[512], par, 3); // Cu + TVirtualMC::GetMC()->Gspos("FCC2", 0, "FFC2", 0., 0., 0., 0, "ONLY"); //par[0] = xtof*0.5; //par[1] = kCopperFlatCableThickness*0.5; par[2] = (zlenA*0.5 + 2. - fgkExterInterModBorder1)*0.5 - 2.; - gMC->Gsvolu("FCC3", "BOX ", idtmed[512], par, 3); // Cu - gMC->Gspos("FCC3", 0, "FFC3", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("FCC3", "BOX ", idtmed[512], par, 3); // Cu + TVirtualMC::GetMC()->Gspos("FCC3", 0, "FFC3", 0., 0., 0., 0, "ONLY"); } @@ -913,14 +913,14 @@ void AliTOFv6T0::MakeModulesInBTOFvolumes(Float_t ytof, Float_t zlenA) const //xcoor = 0.; ycoor = (zlenA*0.5 + fgkInterCentrModBorder1)*0.5; zcoor = -ytof * 0.25; - gMC->Gspos("FTOB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); - gMC->Gspos("FTOC", 0, name, xcoor,-ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FTOB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FTOC", 0, name, xcoor,-ycoor, zcoor, idrotm[0], "ONLY"); } else { //xcoor = 0.; ycoor = 0.; zcoor = -ytof * 0.25; - gMC->Gspos("FTOA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FTOA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); } } @@ -956,9 +956,9 @@ void AliTOFv6T0::MakeCoversInBTOFvolumes() const if(fTOFSectors[isec]==-1)continue; snprintf(name, kSize, "BTOF%d",isec); if (fTOFHoles && (isec==13 || isec==14 || isec==15)) - gMC->Gspos("FPEB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FPEB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); else - gMC->Gspos("FPEA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FPEA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); } } @@ -992,12 +992,12 @@ void AliTOFv6T0::MakeBackInBTOFvolumes(Float_t ytof) const if(fTOFSectors[isec]==-1)continue; snprintf(name, kSize, "BTOF%d",isec); if (fgkFEAwithMasks[isec]) - gMC->Gspos("FAIA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FAIA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); else { if (fTOFHoles && (isec==13 || isec==14 || isec==15)) - gMC->Gspos("FAIB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FAIB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); else - gMC->Gspos("FAIC", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FAIC", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY"); } } @@ -1055,8 +1055,8 @@ void AliTOFv6T0::MakeStripsInModules(Float_t ytof, Float_t zlenA) const // FSTR volume definition-filling this volume with non sensitive Gas Mixture - Float_t parfp[3]={klstripx*0.5, khstripy*0.5, kwstripz*0.5}; - gMC->Gsvolu("FSTR", "BOX", idtmed[506], parfp, 3); // Freon mix + Float_t parfp[3]={static_cast(klstripx*0.5), static_cast(khstripy*0.5), static_cast(kwstripz*0.5)}; + TVirtualMC::GetMC()->Gsvolu("FSTR", "BOX", idtmed[506], parfp, 3); // Freon mix Float_t posfp[3]={0.,0.,0.}; @@ -1064,79 +1064,79 @@ void AliTOFv6T0::MakeStripsInModules(Float_t ytof, Float_t zlenA) const //parfp[0] = klstripx*0.5; parfp[1] = khhony*0.5; parfp[2] = kwhonz*0.5; - gMC->Gsvolu("FHON", "BOX", idtmed[501], parfp, 3); // Nomex (Honeycomb) + TVirtualMC::GetMC()->Gsvolu("FHON", "BOX", idtmed[501], parfp, 3); // Nomex (Honeycomb) // positioning 2 NOMEX Layers on FSTR volume //posfp[0] = 0.; posfp[1] =-khstripy*0.5 + parfp[1]; //posfp[2] = 0.; - gMC->Gspos("FHON", 1, "FSTR", 0., posfp[1], 0., 0, "ONLY"); - gMC->Gspos("FHON", 2, "FSTR", 0.,-posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FHON", 1, "FSTR", 0., posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FHON", 2, "FSTR", 0.,-posfp[1], 0., 0, "ONLY"); // Lower PCB Layer definition //parfp[0] = klstripx*0.5; parfp[1] = khpcby*0.5; parfp[2] = kwpcbz1*0.5; - gMC->Gsvolu("FPC1", "BOX", idtmed[502], parfp, 3); // G10 + TVirtualMC::GetMC()->Gsvolu("FPC1", "BOX", idtmed[502], parfp, 3); // G10 // Upper PCB Layer definition //parfp[0] = klstripx*0.5; //parfp[1] = khpcby*0.5; parfp[2] = kwpcbz2*0.5; - gMC->Gsvolu("FPC2", "BOX", idtmed[502], parfp, 3); // G10 + TVirtualMC::GetMC()->Gsvolu("FPC2", "BOX", idtmed[502], parfp, 3); // G10 // positioning 2 external PCB Layers in FSTR volume //posfp[0] = 0.; posfp[1] =-khstripy*0.5+khhony+parfp[1]; //posfp[2] = 0.; - gMC->Gspos("FPC1", 1, "FSTR", 0.,-posfp[1], 0., 0, "ONLY"); - gMC->Gspos("FPC2", 1, "FSTR", 0., posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPC1", 1, "FSTR", 0.,-posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPC2", 1, "FSTR", 0., posfp[1], 0., 0, "ONLY"); // Central PCB layer definition //parfp[0] = klstripx*0.5; parfp[1] = khcpcby*0.5; parfp[2] = kwcpcbz*0.5; - gMC->Gsvolu("FPCB", "BOX", idtmed[502], parfp, 3); // G10 + TVirtualMC::GetMC()->Gsvolu("FPCB", "BOX", idtmed[502], parfp, 3); // G10 gGeoManager->GetVolume("FPCB")->VisibleDaughters(kFALSE); // positioning the central PCB layer - gMC->Gspos("FPCB", 1, "FSTR", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPCB", 1, "FSTR", 0., 0., 0., 0, "ONLY"); // Sensitive volume definition - Float_t parfs[3] = {klsensmx*0.5, khsensmy*0.5, kwsensmz*0.5}; - gMC->Gsvolu("FSEN", "BOX", idtmed[507], parfs, 3); // Cu sensitive + Float_t parfs[3] = {static_cast(klsensmx*0.5), static_cast(khsensmy*0.5), static_cast(kwsensmz*0.5)}; + TVirtualMC::GetMC()->Gsvolu("FSEN", "BOX", idtmed[507], parfs, 3); // Cu sensitive // dividing FSEN along z in knz=2 and along x in knx=48 - gMC->Gsdvn("FSEZ", "FSEN", knz, 3); - gMC->Gsdvn("FPAD", "FSEZ", knx, 1); + TVirtualMC::GetMC()->Gsdvn("FSEZ", "FSEN", knz, 3); + TVirtualMC::GetMC()->Gsdvn("FPAD", "FSEZ", knx, 1); // positioning sensitive layer inside FPCB - gMC->Gspos("FSEN", 1, "FPCB", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FSEN", 1, "FPCB", 0., 0., 0., 0, "ONLY"); // RED GLASS Layer definition //parfp[0] = klstripx*0.5; parfp[1] = khrgly*0.5; parfp[2] = kwrglz*0.5; - gMC->Gsvolu("FRGL", "BOX", idtmed[508], parfp, 3); // red glass + TVirtualMC::GetMC()->Gsvolu("FRGL", "BOX", idtmed[508], parfp, 3); // red glass // positioning 4 RED GLASS Layers in FSTR volume //posfp[0] = 0.; posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1]; //posfp[2] = 0.; - gMC->Gspos("FRGL", 1, "FSTR", 0., posfp[1], 0., 0, "ONLY"); - gMC->Gspos("FRGL", 4, "FSTR", 0.,-posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRGL", 1, "FSTR", 0., posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRGL", 4, "FSTR", 0.,-posfp[1], 0., 0, "ONLY"); //posfp[0] = 0.; posfp[1] = (khcpcby+khrgly)*0.5; //posfp[2] = 0.; - gMC->Gspos("FRGL", 2, "FSTR", 0.,-posfp[1], 0., 0, "ONLY"); - gMC->Gspos("FRGL", 3, "FSTR", 0., posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRGL", 2, "FSTR", 0.,-posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRGL", 3, "FSTR", 0., posfp[1], 0., 0, "ONLY"); // GLASS Layer definition //parfp[0] = klstripx*0.5; parfp[1] = khglassy; parfp[2] = kwglfz*0.5; - gMC->Gsvolu("FGLF", "BOX", idtmed[508], parfp, 3); // glass + TVirtualMC::GetMC()->Gsvolu("FGLF", "BOX", idtmed[508], parfp, 3); // glass // positioning 2 GLASS Layers in FSTR volume //posfp[0] = 0.; posfp[1] = (khcpcby + khglfy)*0.5 + khrgly; //posfp[2] = 0.; - gMC->Gspos("FGLF", 1, "FSTR", 0.,-posfp[1], 0., 0, "ONLY"); - gMC->Gspos("FGLF", 2, "FSTR", 0., posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FGLF", 1, "FSTR", 0.,-posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FGLF", 2, "FSTR", 0., posfp[1], 0., 0, "ONLY"); // Positioning the Strips (FSTR volumes) in the FLT volumes Int_t maxStripNumbers [5] ={fTOFGeometry->NStripC(), @@ -1163,13 +1163,13 @@ void AliTOFv6T0::MakeStripsInModules(Float_t ytof, Float_t zlenA) const xpos = 0.; ypos = fTOFGeometry->GetHeights(iplate,istrip) + yFLT*0.5; zpos = fTOFGeometry->GetDistances(iplate,istrip); - gMC->Gspos("FSTR", istrip+totalStrip+1, "FLTA", xpos, ypos,-zpos, idrotm[istrip+totalStrip], "ONLY"); + TVirtualMC::GetMC()->Gspos("FSTR", istrip+totalStrip+1, "FLTA", xpos, ypos,-zpos, idrotm[istrip+totalStrip], "ONLY"); if (fTOFHoles) { if (istrip+totalStrip+1>53) - gMC->Gspos("FSTR", istrip+totalStrip+1, "FLTC", xpos, ypos,-zpos-(zlenA*0.5 - 2.*fgkModuleWallThickness + fgkInterCentrModBorder1)*0.5, idrotm[istrip+totalStrip], "ONLY"); + TVirtualMC::GetMC()->Gspos("FSTR", istrip+totalStrip+1, "FLTC", xpos, ypos,-zpos-(zlenA*0.5 - 2.*fgkModuleWallThickness + fgkInterCentrModBorder1)*0.5, idrotm[istrip+totalStrip], "ONLY"); if (istrip+totalStrip+1<39) - gMC->Gspos("FSTR", istrip+totalStrip+1, "FLTB", xpos, ypos,-zpos+(zlenA*0.5 - 2.*fgkModuleWallThickness + fgkInterCentrModBorder1)*0.5, idrotm[istrip+totalStrip], "ONLY"); + TVirtualMC::GetMC()->Gspos("FSTR", istrip+totalStrip+1, "FLTB", xpos, ypos,-zpos+(zlenA*0.5 - 2.*fgkModuleWallThickness + fgkInterCentrModBorder1)*0.5, idrotm[istrip+totalStrip], "ONLY"); } } } @@ -1198,9 +1198,9 @@ void AliTOFv6T0::CreateBackZone(Float_t xtof, Float_t ytof, Float_t zlenA) const par[0] = xtof*0.5; par[1] = (ytof*0.5 - fgkModuleCoverThickness)*0.5; par[2] = zlenA*0.5; - gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air - if (fTOFHoles) gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air - gMC->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air + TVirtualMC::GetMC()->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air + if (fTOFHoles) TVirtualMC::GetMC()->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air + TVirtualMC::GetMC()->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air Float_t feaParam[3] = {fgkFEAparameters[0], fgkFEAparameters[1], fgkFEAparameters[2]}; Float_t feaRoof1[3] = {fgkRoof1parameters[0], fgkRoof1parameters[1], fgkRoof1parameters[2]}; @@ -1208,11 +1208,11 @@ void AliTOFv6T0::CreateBackZone(Float_t xtof, Float_t ytof, Float_t zlenA) const //Float_t feaRoof2[3] = {fgkRoof2parameters[0], fgkRoof2parameters[1], fgkRoof2parameters[2]}; // FEA card mother-volume definition - Float_t carpar[3] = {xtof*0.5 - fgkCBLw - fgkSawThickness, - feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5, - feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2]}; - gMC->Gsvolu("FCA1", "BOX ", idtmed[500], carpar, 3); // Air - gMC->Gsvolu("FCA2", "BOX ", idtmed[500], carpar, 3); // Air + Float_t carpar[3] = {static_cast(xtof*0.5 - fgkCBLw - fgkSawThickness), + static_cast(feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5), + static_cast(feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2])}; + TVirtualMC::GetMC()->Gsvolu("FCA1", "BOX ", idtmed[500], carpar, 3); // Air + TVirtualMC::GetMC()->Gsvolu("FCA2", "BOX ", idtmed[500], carpar, 3); // Air // rotation matrix AliMatrix(idrotm[0], 90.,180., 90., 90.,180., 0.); @@ -1222,10 +1222,10 @@ void AliTOFv6T0::CreateBackZone(Float_t xtof, Float_t ytof, Float_t zlenA) const Float_t rowgap[5] = {13.5, 22.9, 16.94, 23.8, 20.4}; Int_t rowb[5] = {6, 7, 6, 19, 7}; Float_t carpos[3] = {0., - -(ytof*0.5 - fgkModuleCoverThickness)*0.5 + carpar[1], + static_cast(-(ytof*0.5 - fgkModuleCoverThickness)*0.5 + carpar[1]), -0.8}; - gMC->Gspos("FCA1", 91, "FAIA", carpos[0], carpos[1], carpos[2], 0, "MANY"); - gMC->Gspos("FCA2", 91, "FAIC", carpos[0], carpos[1], carpos[2], 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FCA1", 91, "FAIA", carpos[0], carpos[1], carpos[2], 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FCA2", 91, "FAIC", carpos[0], carpos[1], carpos[2], 0, "MANY"); Int_t row = 1; Int_t nrow = 0; @@ -1239,19 +1239,19 @@ void AliTOFv6T0::CreateBackZone(Float_t xtof, Float_t ytof, Float_t zlenA) const carpos[2] -= sg*rowstep; if (nb==4) { - gMC->Gspos("FCA1", row, "FAIA", carpos[0], carpos[1], carpos[2], 0, "ONLY"); - gMC->Gspos("FCA2", row, "FAIC", carpos[0], carpos[1], carpos[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FCA1", row, "FAIA", carpos[0], carpos[1], carpos[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FCA2", row, "FAIC", carpos[0], carpos[1], carpos[2], 0, "ONLY"); } else { switch (sg) { case 1: - gMC->Gspos("FCA1", row, "FAIA", carpos[0], carpos[1], carpos[2], 0, "ONLY"); - gMC->Gspos("FCA2", row, "FAIC", carpos[0], carpos[1], carpos[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FCA1", row, "FAIA", carpos[0], carpos[1], carpos[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FCA2", row, "FAIC", carpos[0], carpos[1], carpos[2], 0, "ONLY"); break; case -1: - gMC->Gspos("FCA1", row, "FAIA", carpos[0], carpos[1], carpos[2], idrotm[0], "ONLY"); - gMC->Gspos("FCA2", row, "FAIC", carpos[0], carpos[1], carpos[2], idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCA1", row, "FAIA", carpos[0], carpos[1], carpos[2], idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCA2", row, "FAIC", carpos[0], carpos[1], carpos[2], idrotm[0], "ONLY"); break; } @@ -1273,10 +1273,10 @@ void AliTOFv6T0::CreateBackZone(Float_t xtof, Float_t ytof, Float_t zlenA) const switch (sg) { case 1: - gMC->Gspos("FCA1", row, "FAIB", carpos[0], carpos[1], carpos[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FCA1", row, "FAIB", carpos[0], carpos[1], carpos[2], 0, "ONLY"); break; case -1: - gMC->Gspos("FCA1", row, "FAIB", carpos[0], carpos[1], carpos[2], idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCA1", row, "FAIB", carpos[0], carpos[1], carpos[2], idrotm[0], "ONLY"); break; } } @@ -1297,30 +1297,30 @@ void AliTOFv6T0::MakeFrontEndElectronics(Float_t xtof) const // FEA card volume definition Float_t feaParam[3] = {fgkFEAparameters[0], fgkFEAparameters[1], fgkFEAparameters[2]}; - gMC->Gsvolu("FFEA", "BOX ", idtmed[502], feaParam, 3); // G10 + TVirtualMC::GetMC()->Gsvolu("FFEA", "BOX ", idtmed[502], feaParam, 3); // G10 Float_t al1[3] = {fgkAl1parameters[0], fgkAl1parameters[1], fgkAl1parameters[2]}; Float_t al3[3] = {fgkAl3parameters[0], fgkAl3parameters[1], fgkAl3parameters[2]}; Float_t feaRoof1[3] = {fgkRoof1parameters[0], fgkRoof1parameters[1], fgkRoof1parameters[2]}; //Float_t feaRoof2[3] = {fgkRoof2parameters[0], fgkRoof2parameters[1], fgkRoof2parameters[2]}; - Float_t carpar[3] = {xtof*0.5 - fgkCBLw - fgkSawThickness, - feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5, - feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2]}; + Float_t carpar[3] = {static_cast(xtof*0.5 - fgkCBLw - fgkSawThickness), + static_cast(feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5), + static_cast(feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2])}; // FEA card volume positioning Float_t xCoor = xtof*0.5 - 25.; Float_t yCoor =-carpar[1] + feaParam[1]; Float_t zCoor =-carpar[2] + (2.*feaRoof1[2] - 2.*al1[2] - feaParam[2]); - gMC->Gspos("FFEA", 1, "FCA1",-xCoor, yCoor, zCoor, 0, "ONLY"); - gMC->Gspos("FFEA", 4, "FCA1", xCoor, yCoor, zCoor, 0, "ONLY"); - gMC->Gspos("FFEA", 1, "FCA2",-xCoor, yCoor, zCoor, 0, "ONLY"); - gMC->Gspos("FFEA", 4, "FCA2", xCoor, yCoor, zCoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFEA", 1, "FCA1",-xCoor, yCoor, zCoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFEA", 4, "FCA1", xCoor, yCoor, zCoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFEA", 1, "FCA2",-xCoor, yCoor, zCoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFEA", 4, "FCA2", xCoor, yCoor, zCoor, 0, "ONLY"); xCoor = feaParam[0] + (fgkFEAwidth2*0.5 - fgkFEAwidth1); - gMC->Gspos("FFEA", 2, "FCA1",-xCoor, yCoor, zCoor, 0, "ONLY"); - gMC->Gspos("FFEA", 3, "FCA1", xCoor, yCoor, zCoor, 0, "ONLY"); - gMC->Gspos("FFEA", 2, "FCA2",-xCoor, yCoor, zCoor, 0, "ONLY"); - gMC->Gspos("FFEA", 3, "FCA2", xCoor, yCoor, zCoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFEA", 2, "FCA1",-xCoor, yCoor, zCoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFEA", 3, "FCA1", xCoor, yCoor, zCoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFEA", 2, "FCA2",-xCoor, yCoor, zCoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FFEA", 3, "FCA2", xCoor, yCoor, zCoor, 0, "ONLY"); } @@ -1337,122 +1337,122 @@ void AliTOFv6T0::MakeFEACooling(Float_t xtof) const // first FEA cooling element definition Float_t al1[3] = {fgkAl1parameters[0], fgkAl1parameters[1], fgkAl1parameters[2]}; - gMC->Gsvolu("FAL1", "BOX ", idtmed[504], al1, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FAL1", "BOX ", idtmed[504], al1, 3); // Al // second FEA cooling element definition Float_t feaRoof1[3] = {fgkRoof1parameters[0], fgkRoof1parameters[1], fgkRoof1parameters[2]}; - gMC->Gsvolu("FRO1", "BOX ", idtmed[504], feaRoof1, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FRO1", "BOX ", idtmed[504], feaRoof1, 3); // Al Float_t al3[3] = {fgkAl3parameters[0], fgkAl3parameters[1], fgkAl3parameters[2]}; //Float_t feaRoof2[3] = {fgkRoof2parameters[0], fgkRoof2parameters[1], fgkRoof2parameters[2]}; // definition and positioning of a small air groove in the FRO1 volume - Float_t airHole[3] = {fgkRoof2parameters[0], fgkRoof2parameters[1]*0.5, feaRoof1[2]}; - gMC->Gsvolu("FREE", "BOX ", idtmed[500], airHole, 3); // Air - gMC->Gspos("FREE", 1, "FRO1", 0., feaRoof1[1]-airHole[1], 0., 0, "ONLY"); + Float_t airHole[3] = {fgkRoof2parameters[0], static_cast(fgkRoof2parameters[1]*0.5), feaRoof1[2]}; + TVirtualMC::GetMC()->Gsvolu("FREE", "BOX ", idtmed[500], airHole, 3); // Air + TVirtualMC::GetMC()->Gspos("FREE", 1, "FRO1", 0., feaRoof1[1]-airHole[1], 0., 0, "ONLY"); gGeoManager->GetVolume("FRO1")->VisibleDaughters(kFALSE); // third FEA cooling element definition Float_t bar[3] = {fgkBar[0], fgkBar[1], fgkBar[2]}; - gMC->Gsvolu("FBAR", "BOX ", idtmed[504], bar, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FBAR", "BOX ", idtmed[504], bar, 3); // Al Float_t feaParam[3] = {fgkFEAparameters[0], fgkFEAparameters[1], fgkFEAparameters[2]}; - Float_t carpar[3] = {xtof*0.5 - fgkCBLw - fgkSawThickness, - feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5, - feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2]}; + Float_t carpar[3] = {static_cast(xtof*0.5 - fgkCBLw - fgkSawThickness), + static_cast(feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5), + static_cast(feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2])}; // fourth FEA cooling element definition Float_t bar1[3] = {fgkBar1[0], fgkBar1[1], fgkBar1[2]}; - gMC->Gsvolu("FBA1", "BOX ", idtmed[504], bar1, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FBA1", "BOX ", idtmed[504], bar1, 3); // Al // fifth FEA cooling element definition Float_t bar2[3] = {fgkBar2[0], fgkBar2[1], fgkBar2[2]}; - gMC->Gsvolu("FBA2", "BOX ", idtmed[504], bar2, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FBA2", "BOX ", idtmed[504], bar2, 3); // Al // first FEA cooling element positioning Float_t xcoor = xtof*0.5 - 25.; Float_t ycoor = carpar[1] - 2.*fgkRoof2parameters[1]*0.5 - 2.*feaRoof1[1] - al1[1]; Float_t zcoor =-carpar[2] + 2.*feaRoof1[2] - al1[2]; - gMC->Gspos("FAL1", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FAL1", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FAL1", 1, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FAL1", 4, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL1", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL1", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL1", 1, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL1", 4, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = feaParam[0] + (fgkFEAwidth2*0.5 - fgkFEAwidth1); - gMC->Gspos("FAL1", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FAL1", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FAL1", 2, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FAL1", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL1", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL1", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL1", 2, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL1", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); // second FEA cooling element positioning xcoor = xtof*0.5 - 25.; ycoor = carpar[1] - 2.*fgkRoof2parameters[1]*0.5 - feaRoof1[1]; zcoor =-carpar[2] + feaRoof1[2]; - gMC->Gspos("FRO1", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "MANY"); // (AdC) - gMC->Gspos("FRO1", 4, "FCA1", xcoor, ycoor, zcoor, 0, "MANY"); // (AdC) - gMC->Gspos("FRO1", 1, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FRO1", 4, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRO1", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "MANY"); // (AdC) + TVirtualMC::GetMC()->Gspos("FRO1", 4, "FCA1", xcoor, ycoor, zcoor, 0, "MANY"); // (AdC) + TVirtualMC::GetMC()->Gspos("FRO1", 1, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRO1", 4, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = feaParam[0] + (fgkFEAwidth2*0.5 - fgkFEAwidth1); - gMC->Gspos("FRO1", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "MANY"); // (AdC) - gMC->Gspos("FRO1", 3, "FCA1", xcoor, ycoor, zcoor, 0, "MANY"); // (AdC) - gMC->Gspos("FRO1", 2, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FRO1", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRO1", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "MANY"); // (AdC) + TVirtualMC::GetMC()->Gspos("FRO1", 3, "FCA1", xcoor, ycoor, zcoor, 0, "MANY"); // (AdC) + TVirtualMC::GetMC()->Gspos("FRO1", 2, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRO1", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); // third FEA cooling element positioning xcoor = xtof*0.5 - 25.; ycoor = carpar[1] - 2.*fgkRoof2parameters[1]*0.5 - 2.*feaRoof1[1] - bar[1]; zcoor =-carpar[2] + bar[2]; - gMC->Gspos("FBAR", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBAR", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBAR", 1, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBAR", 4, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAR", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAR", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAR", 1, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAR", 4, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = feaParam[0] + (fgkFEAwidth2*0.5 - fgkFEAwidth1); - gMC->Gspos("FBAR", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBAR", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBAR", 2, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBAR", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAR", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAR", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAR", 2, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAR", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); // fourth FEA cooling element positioning - Float_t tubepar[3] = {0., 0.4, xtof*0.5 - fgkCBLw}; + Float_t tubepar[3] = {0., 0.4, static_cast(xtof*0.5 - fgkCBLw)}; xcoor = xtof*0.5 - 25.; ycoor = carpar[1] - 2.*fgkRoof2parameters[1]*0.5 - 2.*feaRoof1[1] - bar[1]; zcoor =-carpar[2] + 2.*bar[2] + 2.*tubepar[1] + bar1[2]; - gMC->Gspos("FBA1", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA1", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA1", 1, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA1", 4, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA1", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA1", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA1", 1, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA1", 4, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = feaParam[0] + (fgkFEAwidth2*0.5 - fgkFEAwidth1); - gMC->Gspos("FBA1", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA1", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA1", 2, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA1", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA1", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA1", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA1", 2, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA1", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); // fifth FEA cooling element positioning xcoor = xtof*0.5 - 25.; ycoor = carpar[1] - 2.*fgkRoof2parameters[1]*0.5 - 2.*feaRoof1[1] - bar2[1]; zcoor =-carpar[2] + 2.*bar[2] + bar2[2]; - gMC->Gspos("FBA2", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 1, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 4, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 1, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 4, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = feaParam[0] + (fgkFEAwidth2*0.5 - fgkFEAwidth1); - gMC->Gspos("FBA2", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 2, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 2, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = xtof*0.5 - 25.; ycoor = carpar[1] - 2.*fgkRoof2parameters[1]*0.5 - 2.*feaRoof1[1] - 2.*bar2[1] - 2.*tubepar[1] - bar2[1]; zcoor =-carpar[2] + 2.*bar[2] + bar2[2]; - gMC->Gspos("FBA2", 5, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 8, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 5, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 8, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 5, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 8, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 5, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 8, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = feaParam[0] + (fgkFEAwidth2*0.5 - fgkFEAwidth1); - gMC->Gspos("FBA2", 6, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 7, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 6, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBA2", 7, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 6, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 7, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 6, "FCA2",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBA2", 7, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); } @@ -1469,52 +1469,52 @@ void AliTOFv6T0::MakeNinoMask(Float_t xtof) const // first Nino ASIC mask volume definition Float_t al2[3] = {fgkAl2parameters[0], fgkAl2parameters[1], fgkAl2parameters[2]}; - gMC->Gsvolu("FAL2", "BOX ", idtmed[504], al2, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FAL2", "BOX ", idtmed[504], al2, 3); // Al // second Nino ASIC mask volume definition Float_t al3[3] = {fgkAl3parameters[0], fgkAl3parameters[1], fgkAl3parameters[2]}; - gMC->Gsvolu("FAL3", "BOX ", idtmed[504], al3, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FAL3", "BOX ", idtmed[504], al3, 3); // Al // third Nino ASIC mask volume definition Float_t feaRoof2[3] = {fgkRoof2parameters[0], fgkRoof2parameters[1], fgkRoof2parameters[2]}; - gMC->Gsvolu("FRO2", "BOX ", idtmed[504], feaRoof2, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FRO2", "BOX ", idtmed[504], feaRoof2, 3); // Al Float_t feaRoof1[3] = {fgkRoof1parameters[0], fgkRoof1parameters[1], fgkRoof1parameters[2]}; Float_t feaParam[3] = {fgkFEAparameters[0], fgkFEAparameters[1], fgkFEAparameters[2]}; - Float_t carpar[3] = {xtof*0.5 - fgkCBLw - fgkSawThickness, - feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5, - feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2]}; + Float_t carpar[3] = {static_cast(xtof*0.5 - fgkCBLw - fgkSawThickness), + static_cast(feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5), + static_cast(feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2])}; // first Nino ASIC mask volume positioning Float_t xcoor = xtof*0.5 - 25.; Float_t ycoor = carpar[1] - 2.*al3[1]; Float_t zcoor = carpar[2] - 2.*al3[2] - al2[2]; - gMC->Gspos("FAL2", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FAL2", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL2", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL2", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = feaParam[0] + (fgkFEAwidth2*0.5 - fgkFEAwidth1); - gMC->Gspos("FAL2", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FAL2", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL2", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL2", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); // second Nino ASIC mask volume positioning xcoor = xtof*0.5 - 25.; ycoor = carpar[1] - al3[1]; zcoor = carpar[2] - al3[2]; - gMC->Gspos("FAL3", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FAL3", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL3", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL3", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = feaParam[0] + (fgkFEAwidth2*0.5 - fgkFEAwidth1); - gMC->Gspos("FAL3", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FAL3", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL3", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FAL3", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); // third Nino ASIC mask volume positioning xcoor = xtof*0.5 - 25.; ycoor = carpar[1] - fgkRoof2parameters[1]; zcoor = carpar[2] - 2.*al3[2] - fgkRoof2parameters[2]; - gMC->Gspos("FRO2", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FRO2", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRO2", 1, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRO2", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = feaParam[0] + (fgkFEAwidth2*0.5 - fgkFEAwidth1); - gMC->Gspos("FRO2", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FRO2", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRO2", 2, "FCA1",-xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRO2", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); } @@ -1532,19 +1532,19 @@ void AliTOFv6T0::MakeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlen Int_t idrotm[1]={0}; // cooling tube volume definition - Float_t tubepar[3] = {0., 0.4, xtof*0.5 - fgkCBLw - fgkSawThickness}; - gMC->Gsvolu("FTUB", "TUBE", idtmed[512], tubepar, 3); // Cu + Float_t tubepar[3] = {0., 0.4, static_cast(xtof*0.5 - fgkCBLw - fgkSawThickness)}; + TVirtualMC::GetMC()->Gsvolu("FTUB", "TUBE", idtmed[512], tubepar, 3); // Cu // water cooling tube volume definition Float_t tubeparW[3] = {0., 0.3, tubepar[2]}; - gMC->Gsvolu("FITU", "TUBE", idtmed[509], tubeparW, 3); // H2O + TVirtualMC::GetMC()->Gsvolu("FITU", "TUBE", idtmed[509], tubeparW, 3); // H2O // Positioning of the water tube into the steel one - gMC->Gspos("FITU", 1, "FTUB", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FITU", 1, "FTUB", 0., 0., 0., 0, "ONLY"); // definition of transverse components of SM cooling system Float_t trapar[3] = {tubepar[2], 6.175/*6.15*/, 0.7}; - gMC->Gsvolu("FTLN", "BOX ", idtmed[504], trapar, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FTLN", "BOX ", idtmed[504], trapar, 3); // Al // rotation matrix AliMatrix(idrotm[0], 180., 90., 90., 90., 90., 0.); @@ -1556,9 +1556,9 @@ void AliTOFv6T0::MakeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlen Float_t al3[3] = {fgkAl3parameters[0], fgkAl3parameters[1], fgkAl3parameters[2]}; //Float_t feaRoof2[3] = {fgkRoof2parameters[0], fgkRoof2parameters[1], fgkRoof2parameters[2]}; - Float_t carpar[3] = {xtof*0.5 - fgkCBLw - fgkSawThickness, - feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5, - feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2]}; + Float_t carpar[3] = {static_cast(xtof*0.5 - fgkCBLw - fgkSawThickness), + static_cast(feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5), + static_cast(feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2])}; Float_t ytub =-(ytof*0.5 - fgkModuleCoverThickness)*0.5 + carpar[1] + carpar[1] - 2.*fgkRoof2parameters[1]*0.5 - 2.*feaRoof1[1] - 2.*bar2[1] - tubepar[1]; @@ -1566,150 +1566,150 @@ void AliTOFv6T0::MakeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlen // Positioning of tubes for the SM cooling system Float_t ycoor = carpar[1] - 2.*fgkRoof2parameters[1]*0.5 - 2.*feaRoof1[1] - 2.*bar2[1] - tubepar[1]; Float_t zcoor =-carpar[2] + 2.*bar[2] + tubepar[1]; - gMC->Gspos("FTUB", 1, "FCA1", 0., ycoor, zcoor, idrotm[0], "ONLY"); - gMC->Gspos("FTUB", 1, "FCA2", 0., ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FTUB", 1, "FCA1", 0., ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FTUB", 1, "FCA2", 0., ycoor, zcoor, idrotm[0], "ONLY"); gGeoManager->GetVolume("FTUB")->VisibleDaughters(kFALSE); Float_t yFLTN = trapar[1] - (ytof*0.5 - fgkModuleCoverThickness)*0.5; for (Int_t sg= -1; sg< 2; sg+= 2) { // Positioning of transverse components for the SM cooling system - gMC->Gspos("FTLN", 5+4*sg, "FAIA", 0., yFLTN, 369.9*sg, 0, "MANY"); - gMC->Gspos("FTLN", 5+3*sg, "FAIA", 0., yFLTN, 366.9*sg, 0, "MANY"); - gMC->Gspos("FTLN", 5+2*sg, "FAIA", 0., yFLTN, 198.8*sg, 0, "MANY"); - gMC->Gspos("FTLN", 5+sg, "FAIA", 0., yFLTN, 56.82*sg, 0, "MANY"); - gMC->Gspos("FTLN", 5+4*sg, "FAIC", 0., yFLTN, 369.9*sg, 0, "MANY"); - gMC->Gspos("FTLN", 5+3*sg, "FAIC", 0., yFLTN, 366.9*sg, 0, "MANY"); - gMC->Gspos("FTLN", 5+2*sg, "FAIC", 0., yFLTN, 198.8*sg, 0, "MANY"); - gMC->Gspos("FTLN", 5+sg, "FAIC", 0., yFLTN, 56.82*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+4*sg, "FAIA", 0., yFLTN, 369.9*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+3*sg, "FAIA", 0., yFLTN, 366.9*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+2*sg, "FAIA", 0., yFLTN, 198.8*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+sg, "FAIA", 0., yFLTN, 56.82*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+4*sg, "FAIC", 0., yFLTN, 369.9*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+3*sg, "FAIC", 0., yFLTN, 366.9*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+2*sg, "FAIC", 0., yFLTN, 198.8*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+sg, "FAIC", 0., yFLTN, 56.82*sg, 0, "MANY"); } // definition of longitudinal components of SM cooling system - Float_t lonpar1[3] = {2., 0.5, 56.82 - trapar[2]}; - Float_t lonpar2[3] = {lonpar1[0], lonpar1[1], (198.8 - 56.82)*0.5 - trapar[2]}; - Float_t lonpar3[3] = {lonpar1[0], lonpar1[1], (366.9 - 198.8)*0.5 - trapar[2]}; - gMC->Gsvolu("FLO1", "BOX ", idtmed[504], lonpar1, 3); // Al - gMC->Gsvolu("FLO2", "BOX ", idtmed[504], lonpar2, 3); // Al - gMC->Gsvolu("FLO3", "BOX ", idtmed[504], lonpar3, 3); // Al + Float_t lonpar1[3] = {2., 0.5, static_cast(56.82 - trapar[2])}; + Float_t lonpar2[3] = {lonpar1[0], lonpar1[1], static_cast((198.8 - 56.82)*0.5 - trapar[2])}; + Float_t lonpar3[3] = {lonpar1[0], lonpar1[1], static_cast((366.9 - 198.8)*0.5 - trapar[2])}; + TVirtualMC::GetMC()->Gsvolu("FLO1", "BOX ", idtmed[504], lonpar1, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FLO2", "BOX ", idtmed[504], lonpar2, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FLO3", "BOX ", idtmed[504], lonpar3, 3); // Al // Positioning of longitudinal components for the SM cooling system ycoor = ytub + (tubepar[1] + 2.*bar2[1] + lonpar1[1]); - gMC->Gspos("FLO1", 4, "FAIA",-24., ycoor, 0., 0, "MANY"); - gMC->Gspos("FLO1", 2, "FAIA", 24., ycoor, 0., 0, "MANY"); - gMC->Gspos("FLO1", 4, "FAIC",-24., ycoor, 0., 0, "MANY"); - gMC->Gspos("FLO1", 2, "FAIC", 24., ycoor, 0., 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO1", 4, "FAIA",-24., ycoor, 0., 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO1", 2, "FAIA", 24., ycoor, 0., 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO1", 4, "FAIC",-24., ycoor, 0., 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO1", 2, "FAIC", 24., ycoor, 0., 0, "MANY"); zcoor = (198.8 + 56.82)*0.5; - gMC->Gspos("FLO2", 4, "FAIA",-24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 2, "FAIA", 24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 4, "FAIC",-24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 2, "FAIC", 24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 8, "FAIA",-24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 6, "FAIA", 24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 8, "FAIC",-24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 6, "FAIC", 24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 4, "FAIA",-24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 2, "FAIA", 24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 4, "FAIC",-24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 2, "FAIC", 24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 8, "FAIA",-24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 6, "FAIA", 24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 8, "FAIC",-24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 6, "FAIC", 24., ycoor, zcoor, 0, "MANY"); zcoor = (366.9 + 198.8)*0.5; - gMC->Gspos("FLO3", 4, "FAIA",-24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 2, "FAIA", 24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 4, "FAIC",-24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 2, "FAIC", 24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 8, "FAIA",-24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 6, "FAIA", 24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 8, "FAIC",-24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 6, "FAIC", 24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 4, "FAIA",-24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 2, "FAIA", 24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 4, "FAIC",-24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 2, "FAIC", 24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 8, "FAIA",-24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 6, "FAIA", 24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 8, "FAIC",-24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 6, "FAIC", 24., ycoor, zcoor, 0, "MANY"); ycoor = ytub - (tubepar[1] + 2.*bar2[1] + lonpar1[1]); - gMC->Gspos("FLO1", 3, "FAIA",-24., ycoor, 0., 0, "MANY"); - gMC->Gspos("FLO1", 1, "FAIA", 24., ycoor, 0., 0, "MANY"); - gMC->Gspos("FLO1", 3, "FAIC",-24., ycoor, 0., 0, "MANY"); - gMC->Gspos("FLO1", 1, "FAIC", 24., ycoor, 0., 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO1", 3, "FAIA",-24., ycoor, 0., 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO1", 1, "FAIA", 24., ycoor, 0., 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO1", 3, "FAIC",-24., ycoor, 0., 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO1", 1, "FAIC", 24., ycoor, 0., 0, "MANY"); zcoor = (198.8 + 56.82)*0.5; - gMC->Gspos("FLO2", 3, "FAIA",-24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 1, "FAIA", 24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 3, "FAIC",-24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 1, "FAIC", 24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 7, "FAIA",-24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 5, "FAIA", 24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 7, "FAIC",-24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 5, "FAIC", 24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 3, "FAIA",-24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 1, "FAIA", 24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 3, "FAIC",-24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 1, "FAIC", 24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 7, "FAIA",-24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 5, "FAIA", 24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 7, "FAIC",-24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 5, "FAIC", 24., ycoor, zcoor, 0, "MANY"); zcoor = (366.9 + 198.8)*0.5; - gMC->Gspos("FLO3", 3, "FAIA",-24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 1, "FAIA", 24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 3, "FAIC",-24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 1, "FAIC", 24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 7, "FAIA",-24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 5, "FAIA", 24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 7, "FAIC",-24., ycoor, zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 5, "FAIC", 24., ycoor, zcoor, 0, "MANY"); - - - Float_t carpos[3] = {25. - xtof*0.5, - (11.5 - (ytof*0.5 - fgkModuleCoverThickness))*0.5, + TVirtualMC::GetMC()->Gspos("FLO3", 3, "FAIA",-24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 1, "FAIA", 24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 3, "FAIC",-24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 1, "FAIC", 24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 7, "FAIA",-24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 5, "FAIA", 24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 7, "FAIC",-24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 5, "FAIC", 24., ycoor, zcoor, 0, "MANY"); + + + Float_t carpos[3] = {static_cast(25. - xtof*0.5), + static_cast((11.5 - (ytof*0.5 - fgkModuleCoverThickness))*0.5), 0.}; if (fTOFHoles) { for (Int_t sg= -1; sg< 2; sg+= 2) { carpos[2] = sg*zlenA*0.5; - gMC->Gspos("FTLN", 5+4*sg, "FAIB", 0., yFLTN, 369.9*sg, 0, "MANY"); - gMC->Gspos("FTLN", 5+3*sg, "FAIB", 0., yFLTN, 366.9*sg, 0, "MANY"); - gMC->Gspos("FTLN", 5+2*sg, "FAIB", 0., yFLTN, 198.8*sg, 0, "MANY"); - gMC->Gspos("FTLN", 5+sg, "FAIB", 0., yFLTN, 56.82*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+4*sg, "FAIB", 0., yFLTN, 369.9*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+3*sg, "FAIB", 0., yFLTN, 366.9*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+2*sg, "FAIB", 0., yFLTN, 198.8*sg, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FTLN", 5+sg, "FAIB", 0., yFLTN, 56.82*sg, 0, "MANY"); } ycoor = ytub + (tubepar[1] + 2.*bar2[1] + lonpar1[1]); zcoor = (198.8 + 56.82)*0.5; - gMC->Gspos("FLO2", 2, "FAIB",-24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 1, "FAIB",-24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 2, "FAIB",-24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 1, "FAIB",-24., ycoor, zcoor, 0, "MANY"); zcoor = (366.9 + 198.8)*0.5; - gMC->Gspos("FLO3", 2, "FAIB",-24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 1, "FAIB",-24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 2, "FAIB",-24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 1, "FAIB",-24., ycoor, zcoor, 0, "MANY"); ycoor = ytub - (tubepar[1] + 2.*bar2[1] + lonpar1[1]); zcoor = (198.8 + 56.82)*0.5; - gMC->Gspos("FLO2", 4, "FAIB", 24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO2", 3, "FAIB", 24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 4, "FAIB", 24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO2", 3, "FAIB", 24., ycoor, zcoor, 0, "MANY"); zcoor = (366.9 + 198.8)*0.5; - gMC->Gspos("FLO3", 4, "FAIB", 24., ycoor,-zcoor, 0, "MANY"); - gMC->Gspos("FLO3", 3, "FAIB", 24., ycoor, zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 4, "FAIB", 24., ycoor,-zcoor, 0, "MANY"); + TVirtualMC::GetMC()->Gspos("FLO3", 3, "FAIB", 24., ycoor, zcoor, 0, "MANY"); } Float_t barS[3] = {fgkBarS[0], fgkBarS[1], fgkBarS[2]}; - gMC->Gsvolu("FBAS", "BOX ", idtmed[504], barS, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FBAS", "BOX ", idtmed[504], barS, 3); // Al Float_t barS1[3] = {fgkBarS1[0], fgkBarS1[1], fgkBarS1[2]}; - gMC->Gsvolu("FBS1", "BOX ", idtmed[504], barS1, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FBS1", "BOX ", idtmed[504], barS1, 3); // Al Float_t barS2[3] = {fgkBarS2[0], fgkBarS2[1], fgkBarS2[2]}; - gMC->Gsvolu("FBS2", "BOX ", idtmed[504], barS2, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FBS2", "BOX ", idtmed[504], barS2, 3); // Al Float_t ytubBis = carpar[1] - 2.*fgkRoof2parameters[1]*0.5 - 2.*feaRoof1[1] - 2.*barS2[1] - tubepar[1]; ycoor = ytubBis; zcoor =-carpar[2] + barS[2]; - gMC->Gspos("FBAS", 1, "FCA1",-24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBAS", 2, "FCA1", 24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBAS", 1, "FCA2",-24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBAS", 2, "FCA2", 24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAS", 1, "FCA1",-24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAS", 2, "FCA1", 24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAS", 1, "FCA2",-24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBAS", 2, "FCA2", 24., ycoor, zcoor, 0, "ONLY"); zcoor =-carpar[2] + 2.*barS[2] + 2.*tubepar[1] + barS1[2]; - gMC->Gspos("FBS1", 1, "FCA1",-24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBS1", 2, "FCA1", 24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBS1", 1, "FCA2",-24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBS1", 2, "FCA2", 24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS1", 1, "FCA1",-24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS1", 2, "FCA1", 24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS1", 1, "FCA2",-24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS1", 2, "FCA2", 24., ycoor, zcoor, 0, "ONLY"); ycoor = ytubBis + (tubepar[1] + barS2[1]); zcoor =-carpar[2] + 2.*barS[2] + barS2[2]; - gMC->Gspos("FBS2", 1, "FCA1",-24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBS2", 2, "FCA1", 24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBS2", 1, "FCA2",-24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBS2", 2, "FCA2", 24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS2", 1, "FCA1",-24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS2", 2, "FCA1", 24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS2", 1, "FCA2",-24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS2", 2, "FCA2", 24., ycoor, zcoor, 0, "ONLY"); ycoor = ytubBis - (tubepar[1] + barS2[1]); //zcoor =-carpar[2] + 2.*barS[2] + barS2[2]; - gMC->Gspos("FBS2", 3, "FCA1",-24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBS2", 4, "FCA1", 24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBS2", 3, "FCA2",-24., ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FBS2", 4, "FCA2", 24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS2", 3, "FCA1",-24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS2", 4, "FCA1", 24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS2", 3, "FCA2",-24., ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FBS2", 4, "FCA2", 24., ycoor, zcoor, 0, "ONLY"); } @@ -1726,7 +1726,7 @@ void AliTOFv6T0::MakeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zle Int_t idrotm[3]={0,0,0}; - Float_t tubepar[3] = {0., 0.4, xtof*0.5 - fgkCBLw - fgkSawThickness}; + Float_t tubepar[3] = {0., 0.4, static_cast(xtof*0.5 - fgkCBLw - fgkSawThickness)}; Float_t al1[3] = {fgkAl1parameters[0], fgkAl1parameters[1], fgkAl1parameters[2]}; Float_t al3[3] = {fgkAl3parameters[0], fgkAl3parameters[1], fgkAl3parameters[2]}; Float_t feaRoof1[3] = {fgkRoof1parameters[0], fgkRoof1parameters[1], fgkRoof1parameters[2]}; @@ -1734,18 +1734,18 @@ void AliTOFv6T0::MakeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zle Float_t feaParam[3] = {fgkFEAparameters[0], fgkFEAparameters[1], fgkFEAparameters[2]}; // FEA cables definition - Float_t cbpar[3] = {0., 0.5, (tubepar[2] - (fgkFEAwidth2 - fgkFEAwidth1/6.)*0.5)*0.5}; - gMC->Gsvolu("FCAB", "TUBE", idtmed[510], cbpar, 3); // copper+alu + Float_t cbpar[3] = {0., 0.5, static_cast((tubepar[2] - (fgkFEAwidth2 - fgkFEAwidth1/6.)*0.5)*0.5)}; + TVirtualMC::GetMC()->Gsvolu("FCAB", "TUBE", idtmed[510], cbpar, 3); // copper+alu - Float_t cbparS[3] = {cbpar[0], cbpar[1], (tubepar[2] - (xtof*0.5 - 25. + (fgkFEAwidth1 - fgkFEAwidth1/6.)*0.5))*0.5}; - gMC->Gsvolu("FCAL", "TUBE", idtmed[510], cbparS, 3); // copper+alu + Float_t cbparS[3] = {cbpar[0], cbpar[1], static_cast((tubepar[2] - (xtof*0.5 - 25. + (fgkFEAwidth1 - fgkFEAwidth1/6.)*0.5))*0.5)}; + TVirtualMC::GetMC()->Gsvolu("FCAL", "TUBE", idtmed[510], cbparS, 3); // copper+alu // rotation matrix AliMatrix(idrotm[0], 180., 90., 90., 90., 90., 0.); - Float_t carpar[3] = {xtof*0.5 - fgkCBLw - fgkSawThickness, - feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5, - feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2]}; + Float_t carpar[3] = {static_cast(xtof*0.5 - fgkCBLw - fgkSawThickness), + static_cast(feaParam[1] + feaRoof1[1] + fgkRoof2parameters[1]*0.5), + static_cast(feaRoof1[2] + fgkBetweenLandMask*0.5 + al3[2])}; Float_t bar2[3] = {fgkBar2[0], fgkBar2[1], fgkBar2[2]}; Float_t ytub =-(ytof*0.5 - fgkModuleCoverThickness)*0.5 + carpar[1] + @@ -1755,16 +1755,16 @@ void AliTOFv6T0::MakeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zle Float_t xcoor = (tubepar[2] + (fgkFEAwidth2 - fgkFEAwidth1/6.)*0.5)*0.5; Float_t ycoor = ytub - 3.; Float_t zcoor =-carpar[2] + (2.*feaRoof1[2] - 2.*al1[2] - 2.*feaParam[2] - cbpar[1]); - gMC->Gspos("FCAB", 1, "FCA1",-xcoor, ycoor, zcoor, idrotm[0], "ONLY"); - gMC->Gspos("FCAB", 2, "FCA1", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); - gMC->Gspos("FCAB", 1, "FCA2",-xcoor, ycoor, zcoor, idrotm[0], "ONLY"); - gMC->Gspos("FCAB", 2, "FCA2", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCAB", 1, "FCA1",-xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCAB", 2, "FCA1", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCAB", 1, "FCA2",-xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCAB", 2, "FCA2", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); xcoor = (tubepar[2] + (xtof*0.5 - 25. + (fgkFEAwidth1 - fgkFEAwidth1/6.)*0.5))*0.5; ycoor -= 2.*cbpar[1]; - gMC->Gspos("FCAL", 1, "FCA1",-xcoor, ycoor, zcoor, idrotm[0], "ONLY"); - gMC->Gspos("FCAL", 2, "FCA1", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); - gMC->Gspos("FCAL", 1, "FCA2",-xcoor, ycoor, zcoor, idrotm[0], "ONLY"); - gMC->Gspos("FCAL", 2, "FCA2", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCAL", 1, "FCA1",-xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCAL", 2, "FCA1", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCAL", 1, "FCA2",-xcoor, ycoor, zcoor, idrotm[0], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCAL", 2, "FCA2", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); // Cables and tubes on the side blocks @@ -1790,11 +1790,11 @@ void AliTOFv6T0::MakeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zle cblpar[8] = fgkCBLh1 *0.5; cblpar[9] = fgkCBLh2 *0.5; cblpar[10]= cblpar[6]; - gMC->Gsvolu("FCBL", "TRAP", idtmed[511], cblpar, 11); // cables and tubes mix + TVirtualMC::GetMC()->Gsvolu("FCBL", "TRAP", idtmed[511], cblpar, 11); // cables and tubes mix // Side Al Walls definition - Float_t sawpar[3] = {fgkSawThickness*0.5, fgkCBLh2*0.5, kCBLl}; - gMC->Gsvolu("FSAW", "BOX ", idtmed[504], sawpar, 3); // Al + Float_t sawpar[3] = {static_cast(fgkSawThickness*0.5), static_cast(fgkCBLh2*0.5), kCBLl}; + TVirtualMC::GetMC()->Gsvolu("FSAW", "BOX ", idtmed[504], sawpar, 3); // Al AliMatrix(idrotm[1], 90., 90., 180., 0., 90., 180.); AliMatrix(idrotm[2], 90., 90., 0., 0., 90., 0.); @@ -1803,68 +1803,68 @@ void AliTOFv6T0::MakeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zle xcoor = (xtof - fgkCBLw)*0.5 - 2.*sawpar[0]; ycoor = (fgkCBLh1 + fgkCBLh2)*0.25 - (ytof*0.5 - fgkModuleCoverThickness)*0.5; zcoor = kCBLl*0.5; - gMC->Gspos("FCBL", 1, "FAIA", -xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); - gMC->Gspos("FCBL", 2, "FAIA", xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); - gMC->Gspos("FCBL", 3, "FAIA", -xcoor, ycoor, zcoor, idrotm[2], "ONLY"); - gMC->Gspos("FCBL", 4, "FAIA", xcoor, ycoor, zcoor, idrotm[2], "ONLY"); - gMC->Gspos("FCBL", 1, "FAIC", -xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); - gMC->Gspos("FCBL", 2, "FAIC", xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); - gMC->Gspos("FCBL", 3, "FAIC", -xcoor, ycoor, zcoor, idrotm[2], "ONLY"); - gMC->Gspos("FCBL", 4, "FAIC", xcoor, ycoor, zcoor, idrotm[2], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBL", 1, "FAIA", -xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBL", 2, "FAIA", xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBL", 3, "FAIA", -xcoor, ycoor, zcoor, idrotm[2], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBL", 4, "FAIA", xcoor, ycoor, zcoor, idrotm[2], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBL", 1, "FAIC", -xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBL", 2, "FAIC", xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBL", 3, "FAIC", -xcoor, ycoor, zcoor, idrotm[2], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBL", 4, "FAIC", xcoor, ycoor, zcoor, idrotm[2], "ONLY"); if (fTOFHoles) { cblpar[3] = kCBLlh *0.5; cblpar[5] = fgkCBLh1*0.5 + kCBLlh*tgal; cblpar[7] = kCBLlh *0.5; cblpar[9] = cblpar[5]; - gMC->Gsvolu("FCBB", "TRAP", idtmed[511], cblpar, 11); // cables and tubes mix + TVirtualMC::GetMC()->Gsvolu("FCBB", "TRAP", idtmed[511], cblpar, 11); // cables and tubes mix xcoor = (xtof - fgkCBLw)*0.5 - 2.*sawpar[0]; ycoor = (fgkCBLh1 + 2.*cblpar[5])*0.25 - (ytof*0.5 - fgkModuleCoverThickness)*0.5; zcoor = kCBLl-kCBLlh*0.5; - gMC->Gspos("FCBB", 1, "FAIB", -xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); - gMC->Gspos("FCBB", 2, "FAIB", xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); - gMC->Gspos("FCBB", 3, "FAIB", -xcoor, ycoor, zcoor, idrotm[2], "ONLY"); - gMC->Gspos("FCBB", 4, "FAIB", xcoor, ycoor, zcoor, idrotm[2], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBB", 1, "FAIB", -xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBB", 2, "FAIB", xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBB", 3, "FAIB", -xcoor, ycoor, zcoor, idrotm[2], "ONLY"); + TVirtualMC::GetMC()->Gspos("FCBB", 4, "FAIB", xcoor, ycoor, zcoor, idrotm[2], "ONLY"); } // lateral cable and tube volume positioning xcoor = xtof*0.5 - sawpar[0]; ycoor = (fgkCBLh2 - ytof*0.5 + fgkModuleCoverThickness)*0.5; zcoor = 0.; - gMC->Gspos("FSAW", 1, "FAIA", -xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FSAW", 2, "FAIA", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FSAW", 1, "FAIC", -xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FSAW", 2, "FAIC", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FSAW", 1, "FAIA", -xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FSAW", 2, "FAIA", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FSAW", 1, "FAIC", -xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FSAW", 2, "FAIC", xcoor, ycoor, zcoor, 0, "ONLY"); if (fTOFHoles) { xcoor = xtof*0.5 - sawpar[0]; ycoor = (fgkCBLh2 - ytof*0.5 + fgkModuleCoverThickness)*0.5; - gMC->Gspos("FSAW", 1, "FAIB", -xcoor, ycoor, 0., 0, "ONLY"); - gMC->Gspos("FSAW", 2, "FAIB", xcoor, ycoor, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FSAW", 1, "FAIB", -xcoor, ycoor, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FSAW", 2, "FAIB", xcoor, ycoor, 0., 0, "ONLY"); } // TOF Supermodule cover definition and positioning - Float_t covpar[3] = {xtof*0.5, 0.075, zlenA*0.5}; - gMC->Gsvolu("FCOV", "BOX ", idtmed[504], covpar, 3); // Al + Float_t covpar[3] = {static_cast(xtof*0.5), 0.075, static_cast(zlenA*0.5)}; + TVirtualMC::GetMC()->Gsvolu("FCOV", "BOX ", idtmed[504], covpar, 3); // Al if (fTOFHoles) { covpar[2] = (zlenA*0.5 - fgkInterCentrModBorder2)*0.5; - gMC->Gsvolu("FCOB", "BOX ", idtmed[504], covpar, 3); // Al + TVirtualMC::GetMC()->Gsvolu("FCOB", "BOX ", idtmed[504], covpar, 3); // Al covpar[2] = fgkInterCentrModBorder2; - gMC->Gsvolu("FCOP", "BOX ", idtmed[513], covpar, 3); // Plastic (CH2) + TVirtualMC::GetMC()->Gsvolu("FCOP", "BOX ", idtmed[513], covpar, 3); // Plastic (CH2) } xcoor = 0.; ycoor = (ytof*0.5 - fgkModuleCoverThickness)*0.5 - covpar[1]; zcoor = 0.; - gMC->Gspos("FCOV", 0, "FAIA", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FCOV", 0, "FAIC", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FCOV", 0, "FAIA", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FCOV", 0, "FAIC", xcoor, ycoor, zcoor, 0, "ONLY"); if (fTOFHoles) { zcoor = (zlenA*0.5 + fgkInterCentrModBorder2)*0.5; - gMC->Gspos("FCOB", 1, "FAIB", xcoor, ycoor, zcoor, 0, "ONLY"); - gMC->Gspos("FCOB", 2, "FAIB", xcoor, ycoor, -zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FCOB", 1, "FAIB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FCOB", 2, "FAIB", xcoor, ycoor, -zcoor, 0, "ONLY"); zcoor = 0.; - gMC->Gspos("FCOP", 0, "FAIB", xcoor, ycoor, zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FCOP", 0, "FAIB", xcoor, ycoor, zcoor, 0, "ONLY"); } } @@ -1905,7 +1905,7 @@ void AliTOFv6T0::MakeReadoutCrates(Float_t ytof) const // volume definition Float_t serpar[3] = {29.*0.5, 121.*0.5, 90.*0.5}; - gMC->Gsvolu("FTOS", "BOX ", idtmed[514], serpar, 3); // Al + Cu + steel + TVirtualMC::GetMC()->Gsvolu("FTOS", "BOX ", idtmed[514], serpar, 3); // Al + Cu + steel Float_t xcoor, ycoor, zcoor; zcoor = (118.-90.)*0.5; @@ -1915,11 +1915,11 @@ void AliTOFv6T0::MakeReadoutCrates(Float_t ytof) const xcoor = ra * TMath::Cos(phi * kDegrad); ycoor = ra * TMath::Sin(phi * kDegrad); AliMatrix(idrotm[i], 90., phi, 90., phi + 270., 0., 0.); - gMC->Gspos("FTOS", i, "BFMO", xcoor, ycoor, zcoor, idrotm[i], "ONLY"); + TVirtualMC::GetMC()->Gspos("FTOS", i, "BFMO", xcoor, ycoor, zcoor, idrotm[i], "ONLY"); } zcoor = (90. - 223.)*0.5; - gMC->Gspos("FTOS", 1, "BBCE", ra, -3., zcoor, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FTOS", 1, "BBCE", ra, -3., zcoor, 0, "ONLY"); } @@ -2102,15 +2102,15 @@ void AliTOFv6T0::Init() AliTOF::Init(); - fIdFTOA = gMC->VolId("FTOA"); + fIdFTOA = TVirtualMC::GetMC()->VolId("FTOA"); if (fTOFHoles) { - fIdFTOB = gMC->VolId("FTOB"); - fIdFTOC = gMC->VolId("FTOC"); + fIdFTOB = TVirtualMC::GetMC()->VolId("FTOB"); + fIdFTOC = TVirtualMC::GetMC()->VolId("FTOC"); } - fIdFLTA = gMC->VolId("FLTA"); + fIdFLTA = TVirtualMC::GetMC()->VolId("FLTA"); if (fTOFHoles) { - fIdFLTB = gMC->VolId("FLTB"); - fIdFLTC = gMC->VolId("FLTC"); + fIdFLTB = TVirtualMC::GetMC()->VolId("FLTB"); + fIdFLTC = TVirtualMC::GetMC()->VolId("FLTC"); } AliDebug(1, "**************************************" @@ -2140,11 +2140,11 @@ void AliTOFv6T0::StepManager() Int_t index = 0; if( - gMC->IsTrackEntering() - && gMC->TrackCharge() - //&& gMC->GetMedium()==idtmed[507] - && gMC->CurrentMedium()==idtmed[507] - && gMC->CurrentVolID(copy)==fIdSens + TVirtualMC::GetMC()->IsTrackEntering() + && TVirtualMC::GetMC()->TrackCharge() + //&& TVirtualMC::GetMC()->GetMedium()==idtmed[507] + && TVirtualMC::GetMC()->CurrentMedium()==idtmed[507] + && TVirtualMC::GetMC()->CurrentVolID(copy)==fIdSens ) { @@ -2155,20 +2155,20 @@ void AliTOFv6T0::StepManager() // getting information about hit volumes - padzid=gMC->CurrentVolOffID(1,copy); + padzid=TVirtualMC::GetMC()->CurrentVolOffID(1,copy); padz=copy; padz--; - padxid=gMC->CurrentVolOffID(0,copy); + padxid=TVirtualMC::GetMC()->CurrentVolOffID(0,copy); padx=copy; padx--; - stripid=gMC->CurrentVolOffID(4,copy); + stripid=TVirtualMC::GetMC()->CurrentVolOffID(4,copy); strip=copy; strip--; - gMC->TrackPosition(pos); - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackPosition(pos); + TVirtualMC::GetMC()->TrackMomentum(mom); Double_t normMom=1./mom.Rho(); @@ -2182,8 +2182,8 @@ void AliTOFv6T0::StepManager() pm[1] = (Float_t)mom.Y()*normMom; pm[2] = (Float_t)mom.Z()*normMom; - gMC->Gmtod(xm,xpad,1); // from MRS to DRS: coordinates convertion - gMC->Gmtod(pm,ppad,2); // from MRS to DRS: direction cosinus convertion + TVirtualMC::GetMC()->Gmtod(xm,xpad,1); // from MRS to DRS: coordinates convertion + TVirtualMC::GetMC()->Gmtod(pm,ppad,2); // from MRS to DRS: direction cosinus convertion if (TMath::Abs(ppad[1])>1) { @@ -2217,7 +2217,7 @@ void AliTOFv6T0::StepManager() strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA() - fTOFGeometry->NStripB(); } - volpath=gMC->CurrentVolOffName(7); + volpath=TVirtualMC::GetMC()->CurrentVolOffName(7); index=atoi(&volpath[4]); sector=-1; sector=index; @@ -2241,8 +2241,8 @@ void AliTOFv6T0::StepManager() hits[9] = xpad[1]; hits[10]= xpad[2]; hits[11]= incidenceAngle; - hits[12]= gMC->Edep(); - hits[13]= gMC->TrackLength(); + hits[12]= TVirtualMC::GetMC()->Edep(); + hits[13]= TVirtualMC::GetMC()->TrackLength(); vol[0]= sector; vol[1]= plate; diff --git a/TPC/Base/AliTPCCalibCE.cxx b/TPC/Base/AliTPCCalibCE.cxx index eb5578bd2e9..32befce2b39 100644 --- a/TPC/Base/AliTPCCalibCE.cxx +++ b/TPC/Base/AliTPCCalibCE.cxx @@ -2783,7 +2783,7 @@ void AliTPCCalibCE::CalculateDV(TObjArray * const arrIdeal, TObjArray * const ar fdriftC.AddPoint(xxx,mdrift,1); } // Double_t xxx2[4] = { ldrift,iGy*ldrift/(zlength*250.), 250.-mR, iltr->fVecSec->GetMatrixArray()[index]>35, iltr->GetSide()}; - Double_t xxx2[4] = { ldrift,iGy*ldrift/(zlength*250.), 250.-mR, iltr->GetSide()}; + Double_t xxx2[4] = { ldrift,iGy*ldrift/(zlength*250.), 250.-mR, static_cast(iltr->GetSide())}; fdriftAC.AddPoint(xxx2,mdrift,1); }//end index loop diff --git a/TPC/Base/AliTPCCalibRaw.cxx b/TPC/Base/AliTPCCalibRaw.cxx index a124cf2b75b..d438fc790c5 100644 --- a/TPC/Base/AliTPCCalibRaw.cxx +++ b/TPC/Base/AliTPCCalibRaw.cxx @@ -250,7 +250,7 @@ Int_t AliTPCCalibRaw::Update(const Int_t isector, const Int_t iRow, const Int_t ++fNOkMinus; if (!fPeakTimeBin) fPeakTimeBin=fLastTimeBinProc; if ( fNOkMinus>=fPeakDetMinus ) { - Double_t x[kHnBinsDV]={fPeakTimeBin,isector,(fTimeStamp-fFirstTimeStamp)/fNSecTime}; + Double_t x[kHnBinsDV]={static_cast(fPeakTimeBin),static_cast(isector),static_cast((fTimeStamp-fFirstTimeStamp)/fNSecTime)}; fHnDrift->Fill(x); } } else { @@ -475,9 +475,9 @@ void AliTPCCalibRaw::CreateDVhist() if (fHnDrift) return; //HnSparse bins //time bin, roc, time - Int_t bins[kHnBinsDV] = {fLastTimeBin-fFirstTimeBin, 72, fNBinsTime}; - Double_t xmin[kHnBinsDV] = {fFirstTimeBin,0,0}; - Double_t xmax[kHnBinsDV] = {fLastTimeBin,72,fNBinsTime}; + Int_t bins[kHnBinsDV] = {static_cast(fLastTimeBin-fFirstTimeBin), 72, static_cast(fNBinsTime)}; + Double_t xmin[kHnBinsDV] = {static_cast(fFirstTimeBin),0,0}; + Double_t xmax[kHnBinsDV] = {static_cast(fLastTimeBin),72,static_cast(fNBinsTime)}; fHnDrift=new THnSparseI("fHnDrift",Form("Drift velocity using last time bin;time bin[#times 100ns];ROC;Time bin [#times %us]",fNSecTime),kHnBinsDV, bins, xmin, xmax); } diff --git a/TPC/Base/AliTPCCorrection.cxx b/TPC/Base/AliTPCCorrection.cxx index c9f12588f16..17a0f5a101d 100644 --- a/TPC/Base/AliTPCCorrection.cxx +++ b/TPC/Base/AliTPCCorrection.cxx @@ -455,7 +455,7 @@ void AliTPCCorrection::GetCorrectionIntegralDz(const Float_t x[], Short_t roc,Fl // the slopes will be positive. // but since we chose deltaZ opposite sign the singn of the corretion should be fine - Float_t xyz2[3]={xyz[0],xyz[1],xyz[2]+deltaZ/2.}; + Float_t xyz2[3]={xyz[0],xyz[1],static_cast(xyz[2]+deltaZ/2.)}; GetCorrectionDz(xyz2,roc,dxyz,delta/2.); xyz[0]+=deltaZ*dxyz[0]; xyz[1]+=deltaZ*dxyz[1]; @@ -498,7 +498,7 @@ void AliTPCCorrection::GetDistortionIntegralDz(const Float_t x[], Short_t roc,Fl // and since we are moving towards the read-out plane the deltaZ for // weighting the dK/dz should have the opposite sign deltaZ*=sign; - Float_t xyz2[3]={xyz[0],xyz[1],xyz[2]+deltaZ/2.}; + Float_t xyz2[3]={xyz[0],xyz[1],static_cast(xyz[2]+deltaZ/2.)}; GetDistortionDz(xyz2,roc,dxyz,delta/2.); xyz[0]+=-deltaZ*dxyz[0]; xyz[1]+=-deltaZ*dxyz[1]; @@ -1764,7 +1764,7 @@ AliExternalTrackParam * AliTPCCorrection::FitDistortedTrack(AliExternalTrackPara // // simulate the track Int_t npoints=0; - Float_t covPoint[6]={0,0,0, kSigmaY*kSigmaY,0,kSigmaZ*kSigmaZ}; //covariance at the local frame + Float_t covPoint[6]={0,0,0, static_cast(kSigmaY*kSigmaY),0,static_cast(kSigmaZ*kSigmaZ)}; //covariance at the local frame for (Double_t radius=kRTPC0; radius(xyz[0]),static_cast(xyz[1]),static_cast(xyz[2])}; DistortPoint(distPoint, sector); pIn0.SetXYZ(xyz[0], xyz[1],xyz[2]); pIn1.SetXYZ(distPoint[0], distPoint[1],distPoint[2]); @@ -2435,7 +2435,7 @@ void AliTPCCorrection::MakeLaserDistortionTreeOld(TTree* tree, TObjArray *corrAr Double_t pt=0; // if (1 && oldR>1) { - Float_t xyz1[3]={gx,gy,gz}; + Float_t xyz1[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; Int_t sector=(gz>0)?0:18; correction->CorrectPoint(xyz1, sector); refX=TMath::Sqrt(xyz1[0]*xyz1[0]+xyz1[1]*xyz1[1]); @@ -2507,7 +2507,7 @@ void AliTPCCorrection::MakeLaserDistortionTreeOld(TTree* tree, TObjArray *corrAr if (iter==1){ for (Int_t icorr=0; icorrAt(icorr); - Float_t distPoint[3]={gx,gy,gz}; + Float_t distPoint[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; Int_t sector= (gz>0)? 0:18; if (r0>80){ corr->DistortPoint(distPoint, sector); @@ -3095,7 +3095,7 @@ Double_t AliTPCCorrection::GetCorrSector(Double_t sector, Double_t r, Double_t k // // // - Float_t distPoint[3]={gx,gy,gz}; + Float_t distPoint[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; corr->DistortPoint(distPoint, nsector); Double_t r0=TMath::Sqrt(gx*gx+gy*gy); Double_t r1=TMath::Sqrt(distPoint[0]*distPoint[0]+distPoint[1]*distPoint[1]); @@ -3117,7 +3117,7 @@ Double_t AliTPCCorrection::GetCorrXYZ(Double_t gx, Double_t gy, Double_t gz, Int if (!corr) return 0; Double_t phi0= TMath::ATan2(gy,gx); Int_t nsector=(gz>=0) ? 0:18; - Float_t distPoint[3]={gx,gy,gz}; + Float_t distPoint[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; corr->CorrectPoint(distPoint, nsector); Double_t r0=TMath::Sqrt(gx*gx+gy*gy); Double_t r1=TMath::Sqrt(distPoint[0]*distPoint[0]+distPoint[1]*distPoint[1]); @@ -3137,8 +3137,8 @@ Double_t AliTPCCorrection::GetCorrXYZDz(Double_t gx, Double_t gy, Double_t gz, I if (!corr) return 0; Double_t phi0= TMath::ATan2(gy,gx); Int_t nsector=(gz>=0) ? 0:18; - Float_t distPoint[3]={gx,gy,gz}; - Float_t dxyz[3]={gx,gy,gz}; + Float_t distPoint[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; + Float_t dxyz[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; // corr->GetCorrectionDz(distPoint, nsector,dxyz,delta); distPoint[0]+=dxyz[0]; @@ -3162,8 +3162,8 @@ Double_t AliTPCCorrection::GetCorrXYZIntegrateZ(Double_t gx, Double_t gy, Double if (!corr) return 0; Double_t phi0= TMath::ATan2(gy,gx); Int_t nsector=(gz>=0) ? 0:18; - Float_t distPoint[3]={gx,gy,gz}; - Float_t dxyz[3]={gx,gy,gz}; + Float_t distPoint[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; + Float_t dxyz[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; // corr->GetCorrectionIntegralDz(distPoint, nsector,dxyz,delta); distPoint[0]+=dxyz[0]; @@ -3188,7 +3188,7 @@ Double_t AliTPCCorrection::GetDistXYZ(Double_t gx, Double_t gy, Double_t gz, Int if (!corr) return 0; Double_t phi0= TMath::ATan2(gy,gx); Int_t nsector=(gz>=0) ? 0:18; - Float_t distPoint[3]={gx,gy,gz}; + Float_t distPoint[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; corr->DistortPoint(distPoint, nsector); Double_t r0=TMath::Sqrt(gx*gx+gy*gy); Double_t r1=TMath::Sqrt(distPoint[0]*distPoint[0]+distPoint[1]*distPoint[1]); @@ -3208,8 +3208,8 @@ Double_t AliTPCCorrection::GetDistXYZDz(Double_t gx, Double_t gy, Double_t gz, I if (!corr) return 0; Double_t phi0= TMath::ATan2(gy,gx); Int_t nsector=(gz>=0) ? 0:18; - Float_t distPoint[3]={gx,gy,gz}; - Float_t dxyz[3]={gx,gy,gz}; + Float_t distPoint[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; + Float_t dxyz[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; // corr->GetDistortionDz(distPoint, nsector,dxyz,delta); distPoint[0]+=dxyz[0]; @@ -3233,8 +3233,8 @@ Double_t AliTPCCorrection::GetDistXYZIntegrateZ(Double_t gx, Double_t gy, Double if (!corr) return 0; Double_t phi0= TMath::ATan2(gy,gx); Int_t nsector=(gz>=0) ? 0:18; - Float_t distPoint[3]={gx,gy,gz}; - Float_t dxyz[3]={gx,gy,gz}; + Float_t distPoint[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; + Float_t dxyz[3]={static_cast(gx),static_cast(gy),static_cast(gz)}; // corr->GetDistortionIntegralDz(distPoint, nsector,dxyz,delta); distPoint[0]+=dxyz[0]; diff --git a/TPC/Base/AliTPCTransform.cxx b/TPC/Base/AliTPCTransform.cxx index 08597320337..cfbc0d6fe72 100644 --- a/TPC/Base/AliTPCTransform.cxx +++ b/TPC/Base/AliTPCTransform.cxx @@ -199,13 +199,13 @@ void AliTPCTransform::Transform(Double_t *x,Int_t *i,UInt_t /*time*/, // new composed correction - will replace soon ExB correction // if(fCurrentRecoParam->GetUseComposedCorrection()&&correction) { - Float_t distPoint[3]={xx[0],xx[1],xx[2]}; + Float_t distPoint[3]={static_cast(xx[0]),static_cast(xx[1]),static_cast(xx[2])}; correction->CorrectPoint(distPoint, sector); xx[0]=distPoint[0]; xx[1]=distPoint[1]; xx[2]=distPoint[2]; if (correctionDelta&&fCurrentRecoParam->GetUseAlignmentTime()){ // appply time dependent correction if available and enabled - Float_t distPointDelta[3]={xx[0],xx[1],xx[2]}; + Float_t distPointDelta[3]={static_cast(xx[0]),static_cast(xx[1]),static_cast(xx[2])}; correctionDelta->CorrectPoint(distPointDelta, sector); xx[0]=distPointDelta[0]; xx[1]=distPointDelta[1]; diff --git a/TPC/Calib/AliTPCcalibAlign.cxx b/TPC/Calib/AliTPCcalibAlign.cxx index 8a95ad320e6..b1ac4d69af6 100644 --- a/TPC/Calib/AliTPCcalibAlign.cxx +++ b/TPC/Calib/AliTPCcalibAlign.cxx @@ -700,8 +700,8 @@ void AliTPCcalibAlign::ExportTrackPoints(AliESDEvent *event){ Double_t dc[6]={0,0,0}; tpcVertex->GetXYZ(dxyz); tpcVertex->GetCovarianceMatrix(dc); - Float_t xyz[3]={dxyz[0],dxyz[1],dxyz[2]}; - Float_t cov[6]={dc[0]+1,dc[1],dc[2]+1,dc[3],dc[4],dc[5]+100.}; + Float_t xyz[3]={static_cast(dxyz[0]),static_cast(dxyz[1]),static_cast(dxyz[2])}; + Float_t cov[6]={static_cast(dc[0]+1),static_cast(dc[1]),static_cast(dc[2]+1),static_cast(dc[3]),static_cast(dc[4]),static_cast(dc[5]+100.)}; AliTrackPoint point(xyz,cov,73); // add point to not existing volume Float_t dtpc[2],dcov[3]; track0->GetImpactParametersTPC(dtpc,dcov); diff --git a/TPC/Calib/AliTPCcalibCalib.cxx b/TPC/Calib/AliTPCcalibCalib.cxx index 3987a4b48a8..f97c0cc62c6 100644 --- a/TPC/Calib/AliTPCcalibCalib.cxx +++ b/TPC/Calib/AliTPCcalibCalib.cxx @@ -213,7 +213,7 @@ Bool_t AliTPCcalibCalib::RefitTrack(AliESDtrack * track, AliTPCseed *seed, Floa AliTPCclusterMI *cluster=seed->GetClusterPointer(irow); if (!cluster) continue; AliTPCclusterMI cl0(*cluster); - Double_t x[3]={cluster->GetRow(),cluster->GetPad(),cluster->GetTimeBin()}; + Double_t x[3]={static_cast(cluster->GetRow()),cluster->GetPad(),cluster->GetTimeBin()}; Int_t i[1]={cluster->GetDetector()}; AliTPCTrackerPoint * point = seed->GetTrackPoint(irow); Double_t ty=0,tz=0; diff --git a/TPC/Calib/AliTPCcalibCosmic.cxx b/TPC/Calib/AliTPCcalibCosmic.cxx index 01d24ef4453..c9e466575a6 100644 --- a/TPC/Calib/AliTPCcalibCosmic.cxx +++ b/TPC/Calib/AliTPCcalibCosmic.cxx @@ -1327,7 +1327,7 @@ void AliTPCcalibCosmic::MakeFitTree(TTree * treeInput, TTreeSRedirector *pcstrea for (Int_t irow=0; irow<159; irow++){ AliTPCclusterMI *cluster0=seed0->GetClusterPointer(irow); if (cluster0 &&cluster0->GetX()>10){ - Double_t x0[3]={cluster0->GetRow(),cluster0->GetPad(),cluster0->GetTimeBin()+deltaTimeCluster}; + Double_t x0[3]={ static_cast(cluster0->GetRow()),cluster0->GetPad(),cluster0->GetTimeBin()+deltaTimeCluster}; Int_t index0[1]={cluster0->GetDetector()}; transform->Transform(x0,index0,0,1); cluster0->SetX(x0[0]); @@ -1337,7 +1337,7 @@ void AliTPCcalibCosmic::MakeFitTree(TTree * treeInput, TTreeSRedirector *pcstrea } AliTPCclusterMI *cluster1=seed1->GetClusterPointer(irow); if (cluster1&&cluster1->GetX()>10){ - Double_t x1[3]={cluster1->GetRow(),cluster1->GetPad(),cluster1->GetTimeBin()+deltaTimeCluster}; + Double_t x1[3]={ static_cast(cluster1->GetRow()),cluster1->GetPad(),cluster1->GetTimeBin()+deltaTimeCluster}; Int_t index1[1]={cluster1->GetDetector()}; transform->Transform(x1,index1,0,1); cluster1->SetX(x1[0]); @@ -1387,7 +1387,7 @@ void AliTPCcalibCosmic::MakeFitTree(TTree * treeInput, TTreeSRedirector *pcstrea if (!isOKT) break; Double_t rD[3]={cluster->GetX(),cluster->GetY(),cluster->GetZ()}; transform->RotatedGlobal2Global(cluster->GetDetector()%36,rD); // transform to global - Float_t r[3]={rD[0],rD[1],rD[2]}; + Float_t r[3]={static_cast(rD[0]),static_cast(rD[1]),static_cast(rD[2])}; if (corr){ corr->DistortPoint(r, cluster->GetDetector()); } @@ -1407,7 +1407,7 @@ void AliTPCcalibCosmic::MakeFitTree(TTree * treeInput, TTreeSRedirector *pcstrea if (!isOKT) break; Double_t rD[3]={cluster->GetX(),cluster->GetY(),cluster->GetZ()}; transform->RotatedGlobal2Global(cluster->GetDetector()%36,rD); - Float_t r[3]={rD[0],rD[1],rD[2]}; + Float_t r[3]={static_cast(rD[0]),static_cast(rD[1]),static_cast(rD[2])}; if (corr){ corr->DistortPoint(r, cluster->GetDetector()); } diff --git a/TPC/Calib/AliTPCcalibGainMult.cxx b/TPC/Calib/AliTPCcalibGainMult.cxx index 49d444aa73d..4f54f1ca299 100644 --- a/TPC/Calib/AliTPCcalibGainMult.cxx +++ b/TPC/Calib/AliTPCcalibGainMult.cxx @@ -460,7 +460,7 @@ void AliTPCcalibGainMult::Process(AliESDEvent *event) { // for(Int_t ipad = 0; ipad < 4; ipad ++) { // "dEdxRatioMax","dEdxRatioTot","padType","mult","driftlength" - Double_t vecPadEqual[5] = {signalArrayMax[ipad]/meanMax, signalArrayTot[ipad]/meanTot, ipad, nContributors, dipAngleTgl}; + Double_t vecPadEqual[5] = {signalArrayMax[ipad]/meanMax, signalArrayTot[ipad]/meanTot, static_cast(ipad), static_cast(nContributors), dipAngleTgl}; if (fMinMomentumMIP > meanP && meanP < fMaxMomentumMIP) fHistPadEqual->Fill(vecPadEqual); } // @@ -470,8 +470,8 @@ void AliTPCcalibGainMult::Process(AliESDEvent *event) { seed->CookdEdxAnalytical(fLowerTrunc,fUpperTrunc,0,row0,row1)/corrFactorMip, meanDrift, 3, - nContributors, - ncls}; + static_cast(nContributors), + static_cast(ncls)}; // fHistGainMult->Fill(vecMult); vecMult[0]=mipSignalShort/corrFactorMip; vecMult[1]=mipSignalShort/corrFactorMip; vecMult[3]=0; @@ -522,7 +522,7 @@ void AliTPCcalibGainMult::Process(AliESDEvent *event) { // for(Int_t ipad = 0; ipad < 3; ipad++) { // AK. - run Number To be removed - not needed - Double_t vecGainSec[5] = {vecMip[ipad], sector[ipad], ipad, runNumber, ncl[ipad]}; + Double_t vecGainSec[5] = {vecMip[ipad], sector[ipad], static_cast(ipad), static_cast(runNumber), static_cast(ncl[ipad])}; if (isNotSplit[ipad]) fHistGainSector->Fill(vecGainSec); } } @@ -1060,7 +1060,7 @@ void AliTPCcalibGainMult::DumpTrack(AliESDtrack * track, AliESDfriendTrack *ftra Int_t ncont = vertex->GetNContributors(); for (Int_t ipad=0; ipad<3; ipad++){ // histogram with enahanced phi granularity - to make gain phi maps - Double_t xxx[4]={0,gangle[ipad],1./dedxDef,ipad*2+((side>0)?0:1)}; + Double_t xxx[4]={0,gangle[ipad],1./dedxDef, static_cast(ipad*2+((side>0)?0:1))}; Double_t nclR=0; if (ipad==0) {xxx[0]=vecIROCTot[4]/medianMIP0; nclR=ncl21IROC/63.;} if (ipad==1) {xxx[0]=vecOROC0Tot[4]/medianMIP0;nclR=ncl21OROC0/63.;} @@ -1075,7 +1075,7 @@ void AliTPCcalibGainMult::DumpTrack(AliESDtrack * track, AliESDfriendTrack *ftra // Maybe dead end - we can not put all info which can be used into the THnSparse // It is keeped there for educational point of view // - Double_t xxx[6]={0,1./dedxDef, TMath::Abs(langle[ipad]), TMath::Abs(tgl), ncont, ipad }; + Double_t xxx[6]={0,1./dedxDef, TMath::Abs(langle[ipad]), TMath::Abs(tgl), static_cast(ncont), static_cast(ipad) }; if (ipad==0) {xxx[0]=vecIROCTot[4]/medianMIP0;} if (ipad==1) {xxx[0]=vecOROC0Tot[4]/medianMIP0;} if (ipad==2) {xxx[0]=vecOROC1Tot[4]/medianMIP0;} @@ -1541,7 +1541,7 @@ void AliTPCcalibGainMult::ProcessCosmic(const AliESDEvent * event) { for (Int_t irow=0; irow<159; irow++){ AliTPCclusterMI *cluster0=seed0->GetClusterPointer(irow); if (cluster0 &&cluster0->GetX()>10){ - Double_t x0[3]={cluster0->GetRow(),cluster0->GetPad(),cluster0->GetTimeBin()+deltaTimeCluster}; + Double_t x0[3]={ static_cast(cluster0->GetRow()),cluster0->GetPad(),cluster0->GetTimeBin()+deltaTimeCluster}; Int_t index0[1]={cluster0->GetDetector()}; transform->Transform(x0,index0,0,1); cluster0->SetX(x0[0]); @@ -1551,7 +1551,7 @@ void AliTPCcalibGainMult::ProcessCosmic(const AliESDEvent * event) { } AliTPCclusterMI *cluster1=seed1->GetClusterPointer(irow); if (cluster1&&cluster1->GetX()>10){ - Double_t x1[3]={cluster1->GetRow(),cluster1->GetPad(),cluster1->GetTimeBin()+deltaTimeCluster}; + Double_t x1[3]={ static_cast(cluster1->GetRow()),cluster1->GetPad(),cluster1->GetTimeBin()+deltaTimeCluster}; Int_t index1[1]={cluster1->GetDetector()}; transform->Transform(x1,index1,0,1); cluster1->SetX(x1[0]); diff --git a/TPC/Calib/AliTPCcalibLaser.cxx b/TPC/Calib/AliTPCcalibLaser.cxx index 0eee70d8271..cac5c4a668f 100644 --- a/TPC/Calib/AliTPCcalibLaser.cxx +++ b/TPC/Calib/AliTPCcalibLaser.cxx @@ -825,7 +825,7 @@ void AliTPCcalibLaser::FitDriftV(){ }else{ fdriftC.AddPoint(xxx,mdrift,1); } - Double_t xxx2[3] = {ltrp->GetSide(), ldrift,lxyz[1]*ldrift/(zlength*250.)}; + Double_t xxx2[3] = { static_cast(ltrp->GetSide()), ldrift,lxyz[1]*ldrift/(zlength*250.)}; fdriftAC.AddPoint(xxx2,mdrift,1); } // @@ -1134,7 +1134,7 @@ Bool_t AliTPCcalibLaser::FitDriftV(Float_t minFraction){ }else{ fdriftC.AddPoint(xxx,mdrift,1); } - Double_t xxx2[3] = {ltrp->GetSide(), ldrift,lxyz[1]*ldrift/(zlength*250.)}; + Double_t xxx2[3] = { static_cast(ltrp->GetSide()), ldrift,lxyz[1]*ldrift/(zlength*250.)}; fdriftAC.AddPoint(xxx2,mdrift,1); } // @@ -2279,7 +2279,7 @@ void AliTPCcalibLaser::RefitLaserJW(Int_t id){ Double_t deltaY=c->GetY()-(*ltrp->GetVecLY())[irow]; Double_t deltaZ=c->GetZ()-(*ltrp->GetVecLZ())[irow]; //TString axisName[6]={"Delta","bin", "rms shape", "Q", "row","trackID"} - Double_t xyz[6]={0, 0, 0,TMath::Sqrt(c->GetMax()),irow,id}; + Double_t xyz[6]={0, 0, 0,TMath::Sqrt(c->GetMax()), static_cast(irow), static_cast(id)}; xyz[0]=deltaY; xyz[1]=c->GetPad(); xyz[2]=TMath::Sqrt(TMath::Abs(c->GetSigmaY2())); diff --git a/TPC/Calib/AliTPCcalibTime.cxx b/TPC/Calib/AliTPCcalibTime.cxx index 8a63bc51588..6df9bf499df 100644 --- a/TPC/Calib/AliTPCcalibTime.cxx +++ b/TPC/Calib/AliTPCcalibTime.cxx @@ -492,8 +492,8 @@ void AliTPCcalibTime::ProcessLaser(AliESDEvent *event){ if (vdriftA[1]>1.-kMaxDeltaV) driftA = 1./vdriftA[1]-1.; if (vdriftC[1]>1.-kMaxDeltaV) driftC = 1./vdriftC[1]-1.; // - Double_t vecDriftLaserA[4]={fTime,(ptrelative0+ptrelative1)/2.0,driftA,event->GetRunNumber()}; - Double_t vecDriftLaserC[4]={fTime,(ptrelative0+ptrelative1)/2.0,driftC,event->GetRunNumber()}; + Double_t vecDriftLaserA[4]={static_cast(fTime),(ptrelative0+ptrelative1)/2.0,driftA,static_cast(event->GetRunNumber())}; + Double_t vecDriftLaserC[4]={static_cast(fTime),(ptrelative0+ptrelative1)/2.0,driftC,static_cast(event->GetRunNumber())}; // Double_t vecDrift[4] ={fTime,(ptrelative0+ptrelative1)/2.0,1./((*(fLaser->fFitACside))[1])-1,event->GetRunNumber()}; for (Int_t icalib=0;icalib<3;icalib++){ @@ -678,7 +678,7 @@ void AliTPCcalibTime::ProcessCosmic(const AliESDEvent *const event){ TTimeStamp tstamp(fTime); Double_t ptrelative0 = AliTPCcalibDB::GetPTRelative(tstamp,fRun,0); Double_t ptrelative1 = AliTPCcalibDB::GetPTRelative(tstamp,fRun,1); - Double_t vecDrift[4]={fTime,(ptrelative0+ptrelative1)/2.0,fDz/500.0,event->GetRunNumber()}; + Double_t vecDrift[4]={static_cast(fTime),(ptrelative0+ptrelative1)/2.0,fDz/500.0,static_cast(event->GetRunNumber())}; THnSparse* curHist=NULL; TString name=""; @@ -907,7 +907,7 @@ void AliTPCcalibTime::ProcessBeam(const AliESDEvent *const event){ if ( flags==0 && cumulVertexC.GetNDF()>kMinTracksVertex&&cumulVertexA.GetNDF()>kMinTracksVertex){ - Double_t cont[2]={0,fTime}; + Double_t cont[2]={0,static_cast(fTime)}; // cont[0]= cumulVertexA.X(); fTPCVertex[0]->Fill(cont); @@ -1459,7 +1459,7 @@ void AliTPCcalibTime::ProcessSame(const AliESDtrack *const track, AliESDfriendT TTimeStamp tstamp(fTime); Double_t ptrelative0 = AliTPCcalibDB::GetPTRelative(tstamp,fRun,0); Double_t ptrelative1 = AliTPCcalibDB::GetPTRelative(tstamp,fRun,1); - Double_t vecDrift[4]={fTime,(ptrelative0+ptrelative1)/2.0,fDz/500.0,event->GetRunNumber()}; + Double_t vecDrift[4]={static_cast(fTime),(ptrelative0+ptrelative1)/2.0,fDz/500.0,static_cast(event->GetRunNumber())}; // // fill histograms per trigger class and itegrated // diff --git a/TPC/Calib/AliTPCcalibTimeGain.cxx b/TPC/Calib/AliTPCcalibTimeGain.cxx index 8c161a493ca..22454961338 100644 --- a/TPC/Calib/AliTPCcalibTimeGain.cxx +++ b/TPC/Calib/AliTPCcalibTimeGain.cxx @@ -254,9 +254,9 @@ AliTPCcalibTimeGain::AliTPCcalibTimeGain(const Text_t *name, const Text_t *title // main histogram for time dependence: dE/dx, time, type (1-muon cosmic,2-pion beam data, 3&4 - proton points at higher dE/dx), meanDriftlength, momenta (only filled if enough space is available), run number, eta Int_t timeBins = TMath::Nint(deltaTime/deltaIntegrationTimeGain); - Int_t binsGainTime[7] = {150, timeBins, 4, 25, 200, 10000000, 20}; - Double_t xminGainTime[7] = {0.5, StartTime, 0.5, 0, 0.1, -0.5, -1}; - Double_t xmaxGainTime[7] = { 8, EndTime, 4.5, 250, 50, 9999999.5, 1}; + Int_t binsGainTime[7] = {150, static_cast(timeBins), 4, 25, 200, 10000000, 20}; + Double_t xminGainTime[7] = {0.5, static_cast(StartTime), 0.5, 0, 0.1, -0.5, -1}; + Double_t xmaxGainTime[7] = { 8, static_cast(EndTime), 4.5, 250, 50, 9999999.5, 1}; fHistGainTime = new THnSparseF("HistGainTime","dEdx time dep.;dEdx,time,type,driftlength,momenta,run number, eta;dEdx",7,binsGainTime,xminGainTime,xmaxGainTime); BinLogX(fHistGainTime, 4); // @@ -387,7 +387,7 @@ void AliTPCcalibTimeGain::ProcessCosmicEvent(AliESDEvent *event) { meanP = 30; // set all momenta to one in order to save memory } //dE/dx, time, type (1-muon cosmic,2-pion beam data), momenta - Double_t vec[6] = {tpcSignal,time,1,meanDrift,meanP,runNumber}; + Double_t vec[6] = {tpcSignal,static_cast(time),1,meanDrift,meanP,static_cast(runNumber)}; fHistGainTime->Fill(vec); } @@ -479,7 +479,7 @@ void AliTPCcalibTimeGain::ProcessBeamEvent(AliESDEvent *event) { fHistDeDxTotal->Fill(meanP, tpcSignal); // //dE/dx, time, type (1-muon cosmic,2-pion beam data, 3&4 protons), momenta, runNumner, eta - Double_t vec[7] = {tpcSignal,time,particleCase,meanDrift,meanP,runNumber, eta}; + Double_t vec[7] = {tpcSignal,static_cast(time),static_cast(particleCase),meanDrift,meanP,static_cast(runNumber), eta}; fHistGainTime->Fill(vec); } @@ -526,7 +526,7 @@ void AliTPCcalibTimeGain::ProcessBeamEvent(AliESDEvent *event) { } Double_t tpcSignal = GetTPCdEdx(seed); //dE/dx, time, type (1-muon cosmic,2-pion beam data), momenta - Double_t vec[6] = {tpcSignal,time,1,meanDrift,meanP,runNumber}; + Double_t vec[6] = {tpcSignal,static_cast(time),1,meanDrift,meanP,static_cast(runNumber)}; fHistGainTime->Fill(vec); } } diff --git a/TPC/Calib/AliTPCcalibV0.cxx b/TPC/Calib/AliTPCcalibV0.cxx index 64573af5475..2cfad025feb 100644 --- a/TPC/Calib/AliTPCcalibV0.cxx +++ b/TPC/Calib/AliTPCcalibV0.cxx @@ -474,7 +474,7 @@ void AliTPCcalibV0::MakeFitTreeTrack(const TObjArray * corrArray, Double_t ptCut for (Int_t irow=0; irow<159; irow++){ AliTPCclusterMI *cluster=seed->GetClusterPointer(irow); if (cluster &&cluster->GetX()>10){ - Double_t x0[3]={cluster->GetRow(),cluster->GetPad(),cluster->GetTimeBin()}; + Double_t x0[3]={ static_cast(cluster->GetRow()),cluster->GetPad(),cluster->GetTimeBin()}; Int_t index0[1]={cluster->GetDetector()}; transform->Transform(x0,index0,0,1); cluster->SetX(x0[0]); @@ -628,7 +628,7 @@ void AliTPCcalibV0::MakeFitTreeV0(const TObjArray * corrArray, Double_t ptCut, I for (Int_t irow=0; irow<159; irow++){ AliTPCclusterMI *cluster=seed->GetClusterPointer(irow); if (cluster &&cluster->GetX()>10){ - Double_t x0[3]={cluster->GetRow(),cluster->GetPad(),cluster->GetTimeBin()}; + Double_t x0[3]={ static_cast(cluster->GetRow()),cluster->GetPad(),cluster->GetTimeBin()}; Int_t index0[1]={cluster->GetDetector()}; transform->Transform(x0,index0,0,1); cluster->SetX(x0[0]); diff --git a/TPC/Rec/AliTPCClusterParam.cxx b/TPC/Rec/AliTPCClusterParam.cxx index 1e652b98877..94da4ccb59f 100644 --- a/TPC/Rec/AliTPCClusterParam.cxx +++ b/TPC/Rec/AliTPCClusterParam.cxx @@ -1952,7 +1952,7 @@ Float_t AliTPCClusterParam::GetWaveCorrection(Int_t Type, Float_t Z, Int_t QMax, if( fWaveCorrectionMirroredAngle && (angleY<0) ){ // Angle axis is mirrored at 0 angleY = -angleY; } - double var[5] = { Type, Z, QMax, Pad, angleY }; + double var[5] = { static_cast(Type), Z, static_cast(QMax), Pad, angleY }; Long64_t bin = fWaveCorrectionMap->GetBin(var, kFALSE ); if( bin<0 ) return 0; Double_t dY = fWaveCorrectionMap->GetBinContent(bin); diff --git a/TPC/Rec/AliTPCclusterer.cxx b/TPC/Rec/AliTPCclusterer.cxx index a8afecdd90b..83ca7ca1293 100644 --- a/TPC/Rec/AliTPCclusterer.cxx +++ b/TPC/Rec/AliTPCclusterer.cxx @@ -611,7 +611,7 @@ void AliTPCclusterer::AddCluster(AliTPCclusterMI &c, Float_t * /*matrix*/, Int_t return; } transform->SetCurrentRecoParam((AliTPCRecoParam*)fRecoParam); - Double_t x[3]={c.GetRow(),c.GetPad(),c.GetTimeBin()}; + Double_t x[3]={static_cast(c.GetRow()),static_cast(c.GetPad()),static_cast(c.GetTimeBin())}; Int_t i[1]={fSector}; transform->Transform(x,i,0,1); c.SetX(x[0]); @@ -873,7 +873,7 @@ void AliTPCclusterer::ProcessSectorData(){ Int_t bin = iPad*fMaxTime+iTimeBin; Float_t signal = fAllBins[iRow][bin]; if (AliTPCReconstructor::StreamLevel()>3 && signal>3) { - Double_t x[]={iRow,iPad-3,iTimeBin-3}; + Double_t x[]={static_cast(iRow),static_cast(iPad-3),static_cast(iTimeBin-3)}; Int_t i[]={fSector}; AliTPCTransform trafo; trafo.Transform(x,i,0,1); diff --git a/TPC/Rec/AliTPCclustererKr.cxx b/TPC/Rec/AliTPCclustererKr.cxx index c6fa655bd82..e8800f94867 100644 --- a/TPC/Rec/AliTPCclustererKr.cxx +++ b/TPC/Rec/AliTPCclustererKr.cxx @@ -710,7 +710,7 @@ Int_t AliTPCclustererKr::FindClusterKrIO() //insert maximum, default values and set flags //Double_t xCord,yCord; //GetXY(iSec,iRow,iPad,xCord,yCord); - Double_t x[]={iRow,iPad,iTimeBin}; + Double_t x[]={static_cast(iRow),static_cast(iPad),static_cast(iTimeBin)}; Int_t i[]={iSec}; AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ; @@ -759,7 +759,7 @@ Int_t AliTPCclustererKr::FindClusterKrIO() //insert maximum, default values and set flags //Double_t xCord,yCord; //GetXY(iSec,iRow,iPad,xCord,yCord); - Double_t x[]={iRow,iPad,iTimeBin}; + Double_t x[]={static_cast(iRow),static_cast(iPad),static_cast(iTimeBin)}; Int_t i[]={iSec}; //AliTPCTransform trafo; //trafo.Transform(x,i,0,1); diff --git a/TPC/Rec/AliTPCtracker.cxx b/TPC/Rec/AliTPCtracker.cxx index 756281d823d..df7fcc978b6 100644 --- a/TPC/Rec/AliTPCtracker.cxx +++ b/TPC/Rec/AliTPCtracker.cxx @@ -1435,7 +1435,7 @@ void AliTPCtracker::Transform(AliTPCclusterMI * cluster){ return; } transform->SetCurrentRecoParam((AliTPCRecoParam*)AliTPCReconstructor::GetRecoParam()); - Double_t x[3]={cluster->GetRow(),cluster->GetPad(),cluster->GetTimeBin()}; + Double_t x[3]={static_cast(cluster->GetRow()),static_cast(cluster->GetPad()),static_cast(cluster->GetTimeBin())}; Int_t i[1]={cluster->GetDetector()}; transform->Transform(x,i,0,1); // if (cluster->GetDetector()%36>17){ @@ -5382,7 +5382,7 @@ void AliTPCtracker::FindKinks(TObjArray * array, AliESDEvent *esd) kink->SetDaughter(paramd); kink->Update(); - Float_t x[3] = { kink->GetPosition()[0],kink->GetPosition()[1],kink->GetPosition()[2]}; + Float_t x[3] = { static_cast(kink->GetPosition()[0]),static_cast(kink->GetPosition()[1]),static_cast(kink->GetPosition()[2])}; Int_t index[4]; fkParam->Transform0to1(x,index); fkParam->Transform1to2(x,index); @@ -6104,7 +6104,7 @@ void AliTPCtracker::FindKinks(TObjArray * array, AliESDEvent *esd) kink->SetDaughter(paramd); kink->Update(); - Float_t x[3] = { kink->GetPosition()[0],kink->GetPosition()[1],kink->GetPosition()[2]}; + Float_t x[3] = { static_cast(kink->GetPosition()[0]),static_cast(kink->GetPosition()[1]),static_cast(kink->GetPosition()[2])}; Int_t index[4]; fkParam->Transform0to1(x,index); fkParam->Transform1to2(x,index); diff --git a/TPC/Sim/AliTPCLaser.cxx b/TPC/Sim/AliTPCLaser.cxx index b590202d646..640f6ab8a1f 100644 --- a/TPC/Sim/AliTPCLaser.cxx +++ b/TPC/Sim/AliTPCLaser.cxx @@ -44,35 +44,35 @@ void AliTPCLaser::StepManager() // laser tracks are particles with PID fLaserPID (default PID=13) // stopped in the the TPC inner containment vessel (14) - if (gMC->TrackPid() != fLaserPID) { + if (TVirtualMC::GetMC()->TrackPid() != fLaserPID) { // in this way we can prevent delta-electrons - gMC->StopTrack(); + TVirtualMC::GetMC()->StopTrack(); return; } Int_t copy; Int_t vol[2]; - vol[0] = gMC->CurrentVolID(copy); + vol[0] = TVirtualMC::GetMC()->CurrentVolID(copy); - if (gMC->TrackPid() == fLaserPID + if (TVirtualMC::GetMC()->TrackPid() == fLaserPID && vol[0] == 14) {// 14 = TIIN (inner containment vessel) - gMC->StopTrack(); + TVirtualMC::GetMC()->StopTrack(); return; } TLorentzVector p; Float_t hits[5]={0,0,0,0,0}; - gMC->TrackPosition(p); + TVirtualMC::GetMC()->TrackPosition(p); hits[0]=p[0]; hits[1]=p[1]; hits[2]=p[2]; hits[3]=fNelPerCollision; - hits[4]=gMC->TrackTime(); + hits[4]=TVirtualMC::GetMC()->TrackTime(); Int_t index[3]; vol[0]=fTPCParam->Transform0to1(hits,index); AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits); - Double_t rnd = gMC->GetRandom()->Rndm(); - gMC->SetMaxStep(-TMath::Log(rnd)/fCollisionsPerCm); + Double_t rnd = TVirtualMC::GetMC()->GetRandom()->Rndm(); + TVirtualMC::GetMC()->SetMaxStep(-TMath::Log(rnd)/fCollisionsPerCm); } diff --git a/TPC/Sim/AliTPCv2.cxx b/TPC/Sim/AliTPCv2.cxx index 18337b67319..d8f4f4e0262 100644 --- a/TPC/Sim/AliTPCv2.cxx +++ b/TPC/Sim/AliTPCv2.cxx @@ -2106,26 +2106,26 @@ void AliTPCv2::Init() AliTPC::Init(); - fIdSens=gMC->VolId("TPC_Strip"); // one strip is always selected... + fIdSens=TVirtualMC::GetMC()->VolId("TPC_Strip"); // one strip is always selected... - fIDrift=gMC->VolId("TPC_Drift"); + fIDrift=TVirtualMC::GetMC()->VolId("TPC_Drift"); fSecOld=-100; // fake number - gMC->SetMaxNStep(-120000); // max. number of steps increased + TVirtualMC::GetMC()->SetMaxNStep(-120000); // max. number of steps increased if (fPrimaryIonisation) { // for FLUKA - gMC->Gstpar(idtmed[2],"PRIMIO_E", 20.77); // 1st ionisation potential + TVirtualMC::GetMC()->Gstpar(idtmed[2],"PRIMIO_E", 20.77); // 1st ionisation potential - gMC->Gstpar(idtmed[2],"PRIMIO_N", 14.35); - gMC->Gstpar(idtmed[2],"LOSS", 14); // specific energy loss - gMC->Gstpar(idtmed[2],"STRA",4); + TVirtualMC::GetMC()->Gstpar(idtmed[2],"PRIMIO_N", 14.35); + TVirtualMC::GetMC()->Gstpar(idtmed[2],"LOSS", 14); // specific energy loss + TVirtualMC::GetMC()->Gstpar(idtmed[2],"STRA",4); } // specific energy loss for geant3 is now defined in galice.cuts AliDebug(1,"*** TPC version 2 initialized ***"); - AliDebug(1,Form("Maximum number of steps = %d",gMC->GetMaxNStep())); + AliDebug(1,Form("Maximum number of steps = %d",TVirtualMC::GetMC()->GetMaxNStep())); // @@ -2160,29 +2160,29 @@ void AliTPCv2::StepManager() vol[1]=0; // preset row number to 0 // - if (!fPrimaryIonisation) gMC->SetMaxStep(kbig); + if (!fPrimaryIonisation) TVirtualMC::GetMC()->SetMaxStep(kbig); - if(!gMC->IsTrackAlive()) return; // particle has disappeared + if(!TVirtualMC::GetMC()->IsTrackAlive()) return; // particle has disappeared - Float_t charge = gMC->TrackCharge(); + Float_t charge = TVirtualMC::GetMC()->TrackCharge(); if(TMath::Abs(charge)<=0.) return; // take only charged particles // check the sensitive volume - id = gMC->CurrentVolID(copy); // vol ID and copy number (starts from 1!) + id = TVirtualMC::GetMC()->CurrentVolID(copy); // vol ID and copy number (starts from 1!) if(id != fIDrift && id != fIdSens) return; // not in the sensitive folume if ( fPrimaryIonisation && id == fIDrift ) { - Double_t rnd = gMC->GetRandom()->Rndm(); - gMC->SetMaxStep(0.2+(2.*rnd-1.)*0.05); // 2 mm +- rndm*0.5mm step + Double_t rnd = TVirtualMC::GetMC()->GetRandom()->Rndm(); + TVirtualMC::GetMC()->SetMaxStep(0.2+(2.*rnd-1.)*0.05); // 2 mm +- rndm*0.5mm step } - //if ( fPrimaryIonisation && id == fIDrift && gMC->IsTrackEntering()) { - // gMC->SetMaxStep(0.2); // 2 mm + //if ( fPrimaryIonisation && id == fIDrift && TVirtualMC::GetMC()->IsTrackEntering()) { + // TVirtualMC::GetMC()->SetMaxStep(0.2); // 2 mm //} - gMC->TrackPosition(p); + TVirtualMC::GetMC()->TrackPosition(p); Double_t r = TMath::Sqrt(p[0]*p[0]+p[1]*p[1]); // @@ -2230,7 +2230,7 @@ void AliTPCv2::StepManager() // track is in the sensitive strip if(id == fIdSens){ // track is entering the strip - if (gMC->IsTrackEntering()){ + if (TVirtualMC::GetMC()->IsTrackEntering()){ Int_t totrows = fTPCParam->GetNRowLow()+fTPCParam->GetNRowUp(); vol[1] = (copy<=totrows) ? copy-1 : copy-1-totrows; // row numbers are autonomous for lower and upper sectors @@ -2242,25 +2242,25 @@ void AliTPCv2::StepManager() // lower sector, row 0, because Jouri wants to have this - gMC->TrackMomentum(p); + TVirtualMC::GetMC()->TrackMomentum(p); hits[0]=p[0]; hits[1]=p[1]; hits[2]=p[2]; hits[3]=0.; // this hit has no energy loss // Get also the track time for pileup simulation - hits[4]=gMC->TrackTime(); + hits[4]=TVirtualMC::GetMC()->TrackTime(); AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits); } // - gMC->TrackPosition(p); + TVirtualMC::GetMC()->TrackPosition(p); hits[0]=p[0]; hits[1]=p[1]; hits[2]=p[2]; hits[3]=0.; // this hit has no energy loss // Get also the track time for pileup simulation - hits[4]=gMC->TrackTime(); + hits[4]=TVirtualMC::GetMC()->TrackTime(); AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits); @@ -2270,31 +2270,31 @@ void AliTPCv2::StepManager() //----------------------------------------------------------------- // charged particle is in the sensitive drift volume //----------------------------------------------------------------- - if(gMC->TrackStep() > 0) { + if(TVirtualMC::GetMC()->TrackStep() > 0) { Int_t nel=0; if (!fPrimaryIonisation) { - nel = (Int_t)(((gMC->Edep())-poti)/wIon) + 1; + nel = (Int_t)(((TVirtualMC::GetMC()->Edep())-poti)/wIon) + 1; } else { /* static Double_t deForNextStep = 0.; // Geant4 (the meaning of Edep as in Geant3) - wrong - //nel = (Int_t)(((gMC->Edep())-poti)/wIon) + 1; + //nel = (Int_t)(((TVirtualMC::GetMC()->Edep())-poti)/wIon) + 1; // Geant4 (the meaning of Edep as in Geant3) - NEW - Double_t eAvailable = gMC->Edep() + deForNextStep; + Double_t eAvailable = TVirtualMC::GetMC()->Edep() + deForNextStep; nel = (Int_t)(eAvailable/wIon); deForNextStep = eAvailable - nel*wIon; */ //new Geant4-approach - Double_t meanIon = gMC->Edep()/(wIon*kScalewIonG4); + Double_t meanIon = TVirtualMC::GetMC()->Edep()/(wIon*kScalewIonG4); nel = (Int_t) ( kFanoFactorG4*AliMathBase::Gamma(meanIon/kFanoFactorG4)); // smear nel using gamma distr w mean = meanIon and variance = meanIon/kFanoFactorG4 } nel=TMath::Min(nel,300); // 300 electrons corresponds to 10 keV // - gMC->TrackPosition(p); + TVirtualMC::GetMC()->TrackPosition(p); hits[0]=p[0]; hits[1]=p[1]; hits[2]=p[2]; @@ -2304,14 +2304,14 @@ void AliTPCv2::StepManager() // if (fHitType&&2){ if(fHitType){ - gMC->TrackMomentum(p); + TVirtualMC::GetMC()->TrackMomentum(p); Float_t momentum = TMath::Sqrt(p[0]*p[0]+p[1]*p[1]); Float_t precision = (momentum>0.1) ? 0.002 :0.01; fTrackHits->SetHitPrecision(precision); } // Get also the track time for pileup simulation - hits[4]=gMC->TrackTime(); + hits[4]=TVirtualMC::GetMC()->TrackTime(); AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits); if (fDebugStreamer){ @@ -2319,9 +2319,9 @@ void AliTPCv2::StepManager() // function CreateDebugStremer() to be called in the Config.C macro // if you want to enable it // By default debug streaemer is OFF - Float_t edep = gMC->Edep(); - Float_t tstep = gMC->TrackStep(); - Int_t pid=gMC->TrackPid(); + Float_t edep = TVirtualMC::GetMC()->Edep(); + Float_t tstep = TVirtualMC::GetMC()->TrackStep(); + Int_t pid=TVirtualMC::GetMC()->TrackPid(); (*fDebugStreamer)<<"hit"<< "x="<VolId("TPC_Strip"); // one strip is always selected... - fIDrift=gMC->VolId("TPC_Drift"); + fIDrift=TVirtualMC::GetMC()->VolId("TPC_Drift"); fSecOld=-100; // fake number - gMC->SetMaxNStep(-30000); // max. number of steps increased + TVirtualMC::GetMC()->SetMaxNStep(-30000); // max. number of steps increased // specific energy loss set in galice.cuts AliInfo("*** TPC version 4 initialized ***"); - AliInfo(Form("Maximum number of steps = %d",gMC->GetMaxNStep())); + AliInfo(Form("Maximum number of steps = %d",TVirtualMC::GetMC()->GetMaxNStep())); // @@ -2011,20 +2011,20 @@ void AliTPCv4::StepManager() vol[1]=0; // preset row number to 0 // - gMC->SetMaxStep(kbig); + TVirtualMC::GetMC()->SetMaxStep(kbig); - Float_t charge = gMC->TrackCharge(); + Float_t charge = TVirtualMC::GetMC()->TrackCharge(); if(TMath::Abs(charge)<=0.) return; // take only charged particles // check the sensitive volume - id = gMC->CurrentVolID(copy); // vol ID and copy number (starts from 1!) + id = TVirtualMC::GetMC()->CurrentVolID(copy); // vol ID and copy number (starts from 1!) if(id != fIDrift && id != fIdSens) return; // not in the sensitive folume - gMC->TrackPosition(p); + TVirtualMC::GetMC()->TrackPosition(p); Double_t r = TMath::Sqrt(p[0]*p[0]+p[1]*p[1]); // @@ -2065,7 +2065,7 @@ void AliTPCv4::StepManager() // track is in the sensitive strip if(id == fIdSens){ // track is entering the strip - if (gMC->IsTrackEntering()){ + if (TVirtualMC::GetMC()->IsTrackEntering()){ Int_t totrows = fTPCParam->GetNRowLow()+fTPCParam->GetNRowUp(); vol[1] = (copy<=totrows) ? copy-1 : copy-1-totrows; // row numbers are autonomous for lower and upper sectors @@ -2077,25 +2077,25 @@ void AliTPCv4::StepManager() // lower sector, row 0, because Jouri wants to have this - gMC->TrackMomentum(p); + TVirtualMC::GetMC()->TrackMomentum(p); hits[0]=p[0]; hits[1]=p[1]; hits[2]=p[2]; hits[3]=0.; // this hit has no energy loss // Get also the track time for pileup simulation - hits[4]=gMC->TrackTime(); + hits[4]=TVirtualMC::GetMC()->TrackTime(); AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits); } // - gMC->TrackPosition(p); + TVirtualMC::GetMC()->TrackPosition(p); hits[0]=p[0]; hits[1]=p[1]; hits[2]=p[2]; hits[3]=0.; // this hit has no energy loss // Get also the track time for pileup simulation - hits[4]=gMC->TrackTime(); + hits[4]=TVirtualMC::GetMC()->TrackTime(); AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits); @@ -2106,12 +2106,12 @@ void AliTPCv4::StepManager() // charged particle is in the sensitive drift volume //----------------------------------------------------------------- - if(gMC->TrackStep() > 0){ + if(TVirtualMC::GetMC()->TrackStep() > 0){ - Int_t nel = (Int_t)(((gMC->Edep())-poti)/wIon) + 1; + Int_t nel = (Int_t)(((TVirtualMC::GetMC()->Edep())-poti)/wIon) + 1; nel=TMath::Min(nel,30); // 30 electrons corresponds to 1 keV // - gMC->TrackPosition(p); + TVirtualMC::GetMC()->TrackPosition(p); hits[0]=p[0]; hits[1]=p[1]; hits[2]=p[2]; @@ -2121,28 +2121,28 @@ void AliTPCv4::StepManager() //if (fHitType&&2){ if(fHitType){ - gMC->TrackMomentum(p); + TVirtualMC::GetMC()->TrackMomentum(p); Float_t momentum = TMath::Sqrt(p[0]*p[0]+p[1]*p[1]); Float_t precision = (momentum>0.1) ? 0.002 :0.01; fTrackHits->SetHitPrecision(precision); } // Get also the track time for pileup simulation - hits[4]=gMC->TrackTime(); + hits[4]=TVirtualMC::GetMC()->TrackTime(); AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits); } // step>0 } //within sector's limits // Stemax calculation for the next step - if(!gMC->IsTrackAlive()) return; // particle has disappeared + if(!TVirtualMC::GetMC()->IsTrackAlive()) return; // particle has disappeared Float_t pp; TLorentzVector mom; - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackMomentum(mom); Float_t ptot=mom.Rho(); - Float_t betaGamma = ptot/gMC->TrackMass(); + Float_t betaGamma = ptot/TVirtualMC::GetMC()->TrackMass(); - Int_t pid=gMC->TrackPid(); + Int_t pid=TVirtualMC::GetMC()->TrackPid(); // if((pid==kElectron || pid==kPositron) && ptot > 0.002) // { // pp = prim*1.58; // electrons above 20 MeV/c are on the plateau! @@ -2156,9 +2156,9 @@ void AliTPCv4::StepManager() if(TMath::Abs(charge) > 1.) pp *= (charge*charge); // } - Double_t rnd = gMC->GetRandom()->Rndm(); + Double_t rnd = TVirtualMC::GetMC()->GetRandom()->Rndm(); - gMC->SetMaxStep(-TMath::Log(rnd)/pp); + TVirtualMC::GetMC()->SetMaxStep(-TMath::Log(rnd)/pp); } diff --git a/TPC/Upgrade/AliToyMCDrawer.cxx b/TPC/Upgrade/AliToyMCDrawer.cxx index 6ce6cec0bab..1aa9a1605ef 100644 --- a/TPC/Upgrade/AliToyMCDrawer.cxx +++ b/TPC/Upgrade/AliToyMCDrawer.cxx @@ -490,7 +490,7 @@ void AliToyMCDrawer::DrawTrack(const AliToyMCTrack *track, Double_t centerTime, Double_t zp = track->GetSpacePoint(iPoint)->GetZ(); Double_t zDrifted = zp+(zp/TMath::Abs(zp))*currentEventTimeRelToCentral * fDriftVel; //Double_t zDrifted = (zp/TMath::Abs(zp))*fMaxZ0 -(zp/TMath::Abs(zp))* fDriftVel*(track->GetSpacePoint(iPoint)->GetTimeBin() -centerTime ); - Float_t xyzp[3] = {xp,yp,zp}; + Float_t xyzp[3] = {static_cast(xp),static_cast(yp),static_cast(zp)}; AliTrackPoint p; p.SetXYZ(xyzp); Float_t tempcov[6] = {0}; @@ -521,7 +521,7 @@ void AliToyMCDrawer::DrawTrack(const AliToyMCTrack *track, Double_t centerTime, Double_t zpdist = track->GetDistortedSpacePoint(iPoint)->GetZ(); //std::cout << zpdist << std::endl; - Float_t xyzpdist[3] = {xpdist,ypdist,zpdist}; + Float_t xyzpdist[3] = {static_cast(xpdist),static_cast(ypdist),static_cast(zpdist)}; AliTrackPoint pdist; pdist.SetXYZ(xyzpdist); Float_t tempcovdist[6] = {0}; @@ -673,7 +673,7 @@ void AliToyMCDrawer::DrawTrack2D(const AliToyMCTrack *track, Double_t centerTim Double_t zDrifted = zp+(zp/TMath::Abs(zp))*currentEventTimeRelToCentral * fDriftVel; //Double_t zDrifted = (zp/TMath::Abs(zp))*fMaxZ0 -(zp/TMath::Abs(zp))* fDriftVel*(track->GetSpacePoint(iPoint)->GetTimeBin() -centerTime ); - Float_t xyzp[3] = {xp,yp,zp}; + Float_t xyzp[3] = {static_cast(xp),static_cast(yp),static_cast(zp)}; AliTrackPoint p; p.SetXYZ(xyzp); Float_t tempcov[6] = {0}; @@ -720,7 +720,7 @@ void AliToyMCDrawer::DrawTrack2D(const AliToyMCTrack *track, Double_t centerTim //std::cout << zpdist << std::endl; - Float_t xyzpdist[3] = {xpdist,ypdist,zpdist}; + Float_t xyzpdist[3] = {static_cast(xpdist),static_cast(ypdist),static_cast(zpdist)}; AliTrackPoint pdist; pdist.SetXYZ(xyzpdist); Float_t tempcovdist[6] = {0}; @@ -1193,4 +1193,4 @@ Bool_t AliToyMCDrawer::ConnectInputTree() fInputTree->SetBranchAddress("event",&fEvent); return kTRUE; -} \ No newline at end of file +} diff --git a/TPC/Upgrade/AliToyMCEventGenerator.cxx b/TPC/Upgrade/AliToyMCEventGenerator.cxx index 344a39aa4f2..78bcfbea394 100644 --- a/TPC/Upgrade/AliToyMCEventGenerator.cxx +++ b/TPC/Upgrade/AliToyMCEventGenerator.cxx @@ -150,7 +150,7 @@ void AliToyMCEventGenerator::MakeITSClusters(AliToyMCTrack &trackIn/*, Double_t xyz[1]+=gRandom->Gaus(0,sigmaY); xyz[2]+=gRandom->Gaus(0,sigmaZ); - Float_t xyzf[3]={xyz[0],xyz[1],xyz[2]}; + Float_t xyzf[3]={static_cast(xyz[0]),static_cast(xyz[1]),static_cast(xyz[2])}; SetPoint(xyzf,sigmaY,sigmaZ,point); @@ -201,7 +201,7 @@ void AliToyMCEventGenerator::MakeTRDClusters(AliToyMCTrack &trackIn/*, Double_t xyz[1]+=gRandom->Gaus(0,sigmaY); xyz[2]+=gRandom->Gaus(0,sigmaZ); - Float_t xyzf[3]={xyz[0],xyz[1],xyz[2]}; + Float_t xyzf[3]={static_cast(xyz[0]),static_cast(xyz[1]),static_cast(xyz[2])}; SetPoint(xyzf,sigmaY,sigmaZ,point); @@ -290,7 +290,7 @@ void AliToyMCEventGenerator::CreateSpacePoints(AliToyMCTrack &trackIn, Int_t sector=pUdist.GetVolumeID(); // set distorted point - Float_t distPoint[3]={xyz[0],xyz[1],xyz[2]}; + Float_t distPoint[3]={static_cast(xyz[0]),static_cast(xyz[1]),static_cast(xyz[2])}; Float_t dxyz[3]={0.,0.,0.}; if (!fUseStepCorrection){ fTPCCorrection->DistortPoint(distPoint, sector); @@ -446,7 +446,7 @@ void AliToyMCEventGenerator::ConvertTrackPointsToLocalClusters(AliTrackPointArra // const Double_t localZ=splXZ->Eval(localX/*,0x0,"S"*/); const Double_t localY=grXY->Eval(localX/*,0x0,"S"*/); const Double_t localZ=grXZ->Eval(localX/*,0x0,"S"*/); - Float_t xyz[3]={localX,localY,localZ}; + Float_t xyz[3]={static_cast(localX),static_cast(localY),static_cast(localZ)}; if (!SetupCluster(tempCl,xyz,sec,t0)) continue; tempCl.SetLabel(tr.GetUniqueID(), 0); diff --git a/TPC/Upgrade/AliToyMCReconstruction.cxx b/TPC/Upgrade/AliToyMCReconstruction.cxx index 41fe303f72d..9c511a2ff68 100644 --- a/TPC/Upgrade/AliToyMCReconstruction.cxx +++ b/TPC/Upgrade/AliToyMCReconstruction.cxx @@ -2076,7 +2076,7 @@ Int_t AliToyMCReconstruction::GetSector(AliExternalTrackParam *track) { //track->Local2GlobalPosition(xd,track->GetAlpha()); // use TPCParams to get the sector number - Float_t xyz[3] = {xd[0],xd[1],xd[2]}; + Float_t xyz[3] = {static_cast(xd[0]),static_cast(xd[1]),static_cast(xd[2])}; Int_t i[3] = {0,0,0}; if(fTPCParam){ sector = fTPCParam->Transform0to1(xyz,i); diff --git a/TRD/AliTRDCalibChamberStatus.cxx b/TRD/AliTRDCalibChamberStatus.cxx index 3dde09eec72..02d1de785d4 100644 --- a/TRD/AliTRDCalibChamberStatus.cxx +++ b/TRD/AliTRDCalibChamberStatus.cxx @@ -303,7 +303,7 @@ void AliTRDCalibChamberStatus::ProcessTrack(const AliTRDtrackV1 * trdTrack) Double_t rphi = 0.5; if(iMcm > 3) rphi = 1.5; - Double_t val[4] = {sm,layer,stac,rphi}; + Double_t val[4] = {static_cast(sm),static_cast(layer),static_cast(stac),static_cast(rphi)}; if(fHnSparseI->GetBinContent((const Int_t*)val)<2147483646) fHnSparseI->Fill(&val[0]); } @@ -355,7 +355,7 @@ void AliTRDCalibChamberStatus::ProcessEvent(AliRawReader * rawReader, Int_t neve Double_t rphi = 0.5; if(iMcm > 3) rphi = 1.5; - Double_t val[4] = {sm,layer,stac,rphi}; + Double_t val[4] = {static_cast(sm),static_cast(layer),static_cast(stac),static_cast(rphi)}; fHnSparseI->Fill(&val[0]); notEmpty = kTRUE; @@ -363,7 +363,7 @@ void AliTRDCalibChamberStatus::ProcessEvent(AliRawReader * rawReader, Int_t neve // Debug // if(fDebugLevel > 0) { Int_t detector = AliTRDgeometry::GetDetector(layer,stac,sm); - Double_t valu[3] = {nevents_physics,detector,rphi}; + Double_t valu[3] = {static_cast(nevents_physics),static_cast(detector),rphi}; fHnSparseEvtDet->Fill(&valu[0]); } // Debug // @@ -398,7 +398,7 @@ Bool_t AliTRDCalibChamberStatus::TestEventHisto(Int_t nevent) /*FOLD00*/ for (Int_t icol=0; icol 72) side = 1; - Double_t val[4] = {ism,ipl,istack,side}; + Double_t val[4] = {static_cast(ism),static_cast(ipl),static_cast(istack),static_cast(side)}; fHnSparseI->Fill(&val[0]); } } @@ -537,14 +537,14 @@ void AliTRDCalibChamberStatus::CheckEORStatus(const AliTRDCalDCSv2 *calDCS) /*FO ((fCalChamberStatus->GetStatus(det) == 4) && (stateB==0 || stateB==1)) ) { //printf(" Different half chamber status in DCS and DATA!!\n"); - Double_t val[4] = {sm,lay,stac,1}; + Double_t val[4] = {static_cast(sm),static_cast(lay),static_cast(stac),1}; fHnSparseDebug->Fill(&val[0]); // Fill MCM status map for(Int_t ii = 0; ii < 8; ii++) { //ROB loop for(Int_t i = 0; i < 18; i++) { //MCM loop - Double_t valss[6] = {sm,lay,stac,ii,i - ,calDCSFEEEOR->GetMCMGlobalState(ii,i)}; + Double_t valss[6] = {static_cast(sm),static_cast(lay),static_cast(stac),static_cast(ii),static_cast(i) + ,static_cast(calDCSFEEEOR->GetMCMGlobalState(ii,i))}; fHnSparseMCM->Fill(&valss[0]); } diff --git a/TRD/AliTRDdEdxCalibHistArray.cxx b/TRD/AliTRDdEdxCalibHistArray.cxx index c67c16f8932..1242d85bd40 100644 --- a/TRD/AliTRDdEdxCalibHistArray.cxx +++ b/TRD/AliTRDdEdxCalibHistArray.cxx @@ -46,7 +46,7 @@ AliTRDdEdxCalibHistArray::AliTRDdEdxCalibHistArray(const Bool_t kNoInv): const Int_t nbin[2]={AliTRDdEdxBaseUtils::NTRDtimebin(), 200}; const Double_t xmin[2]={0, 0.01}; - const Double_t xmax[2]={nbin[0], 10}; + const Double_t xmax[2]={static_cast(nbin[0]), 10}; const TString aname[2]={"globalTimeBin", "trdqovertpc"}; const TString atitle[2]={"det * AliTRDseedV1::kNtb + itb", "TRD-Cluster-Q / TPC-Signal"}; diff --git a/TRD/AliTRDgeometry.cxx b/TRD/AliTRDgeometry.cxx index 4d894291f39..86238e7f170 100644 --- a/TRD/AliTRDgeometry.cxx +++ b/TRD/AliTRDgeometry.cxx @@ -185,12 +185,12 @@ ClassImp(AliTRDgeometry) const Int_t AliTRDgeometry::fgkRowmaxC1 = 16; const Double_t AliTRDgeometry::fgkTime0Base = 300.65; - const Float_t AliTRDgeometry::fgkTime0[6] = { fgkTime0Base + 0 * (Cheight() + Cspace()) - , fgkTime0Base + 1 * (Cheight() + Cspace()) - , fgkTime0Base + 2 * (Cheight() + Cspace()) - , fgkTime0Base + 3 * (Cheight() + Cspace()) - , fgkTime0Base + 4 * (Cheight() + Cspace()) - , fgkTime0Base + 5 * (Cheight() + Cspace())}; +const Float_t AliTRDgeometry::fgkTime0[6] = { static_cast(fgkTime0Base + 0 * (Cheight() + Cspace())) + , static_cast(fgkTime0Base + 1 * (Cheight() + Cspace())) + , static_cast(fgkTime0Base + 2 * (Cheight() + Cspace())) + , static_cast(fgkTime0Base + 3 * (Cheight() + Cspace())) + , static_cast(fgkTime0Base + 4 * (Cheight() + Cspace())) + , static_cast(fgkTime0Base + 5 * (Cheight() + Cspace()))}; const Double_t AliTRDgeometry::fgkXtrdBeg = 288.43; // Values depend on position of TRD const Double_t AliTRDgeometry::fgkXtrdEnd = 366.33; // mother volume inside space frame !!! @@ -522,26 +522,26 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) parTrd[1] = fgkSwidth2/2.0; parTrd[2] = fgkSlength/2.0; parTrd[3] = fgkSheight/2.0; - gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd); - gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd); - gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd); // The outer aluminum plates of the super module (Al) parTrd[0] = fgkSwidth1/2.0; parTrd[1] = fgkSwidth2/2.0; parTrd[2] = fgkSlength/2.0; parTrd[3] = fgkSheight/2.0; - gMC->Gsvolu("UTS1","TRD1",idtmed[1301-1],parTrd,kNparTrd); - gMC->Gsvolu("UTS2","TRD1",idtmed[1301-1],parTrd,kNparTrd); - gMC->Gsvolu("UTS3","TRD1",idtmed[1301-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTS1","TRD1",idtmed[1301-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTS2","TRD1",idtmed[1301-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTS3","TRD1",idtmed[1301-1],parTrd,kNparTrd); // The inner part of the TRD mother volume for one sector (Air), // full length in z-direction parTrd[0] = fgkSwidth1/2.0 - fgkSMpltT; parTrd[1] = fgkSwidth2/2.0 - fgkSMpltT; parTrd[2] = fgkSlength/2.0; parTrd[3] = fgkSheight/2.0 - fgkSMpltT; - gMC->Gsvolu("UTI1","TRD1",idtmed[1302-1],parTrd,kNparTrd); - gMC->Gsvolu("UTI2","TRD1",idtmed[1302-1],parTrd,kNparTrd); - gMC->Gsvolu("UTI3","TRD1",idtmed[1302-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTI1","TRD1",idtmed[1302-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTI2","TRD1",idtmed[1302-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTI3","TRD1",idtmed[1302-1],parTrd,kNparTrd); // The inner part of the TRD mother volume for services in front // of the supermodules (Air), @@ -549,8 +549,8 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) parTrd[1] = fgkSwidth2/2.0; parTrd[2] = fgkFlength/2.0; parTrd[3] = fgkSheight/2.0; - gMC->Gsvolu("UTF1","TRD1",idtmed[1302-1],parTrd,kNparTrd); - gMC->Gsvolu("UTF2","TRD1",idtmed[1302-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTF1","TRD1",idtmed[1302-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTF2","TRD1",idtmed[1302-1],parTrd,kNparTrd); for (Int_t istack = 0; istack < kNstack; istack++) { for (Int_t ilayer = 0; ilayer < kNlayer; ilayer++) { @@ -563,7 +563,7 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) parCha[0] = fgkCwidth[ilayer]/2.0; parCha[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0; parCha[2] = fgkCraH/2.0 + fgkCdrH/2.0; - gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha); // The additional aluminum on the frames // This part has not the correct shape but is just supposed to // represent the missing material. The correct form of the L-shaped @@ -572,31 +572,31 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) parCha[0] = fgkCalWmod/2.0; parCha[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0; parCha[2] = fgkCalHmod/2.0; - gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha); // The additional Wacosit on the frames snprintf(cTagV,kTag,"UP%02d",iDet); parCha[0] = fgkCwsW/2.0; parCha[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0; parCha[2] = fgkCwsH/2.0; - gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha); // The Wacosit frames snprintf(cTagV,kTag,"UB%02d",iDet); parCha[0] = fgkCwidth[ilayer]/2.0 - fgkCalT; parCha[1] = -1.0; parCha[2] = -1.0; - gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha); // The glue around the radiator snprintf(cTagV,kTag,"UX%02d",iDet); parCha[0] = fgkCwidth[ilayer]/2.0 - fgkCalT - fgkCclsT; parCha[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0 - fgkCclfT; parCha[2] = fgkCraH/2.0; - gMC->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha); // The inner part of radiator (air) snprintf(cTagV,kTag,"UC%02d",iDet); parCha[0] = fgkCwidth[ilayer]/2.0 - fgkCalT - fgkCclsT - fgkCglT; parCha[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0 - fgkCclfT - fgkCglT; parCha[2] = -1.0; - gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha); // The upper part of the readout chambers (amplification volume) // The Wacosit frames @@ -604,13 +604,13 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) parCha[0] = fgkCwidth[ilayer]/2.0 + fgkCroW; parCha[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0; parCha[2] = fgkCamH/2.0; - gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha); // The inner part of the Wacosit frame (air) snprintf(cTagV,kTag,"UE%02d",iDet); parCha[0] = fgkCwidth[ilayer]/2.0 + fgkCroW - fgkCcuTb; parCha[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0 - fgkCcuTa; parCha[2] = -1.; - gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha); // The back panel, including pad plane and readout boards // The aluminum frames @@ -618,13 +618,13 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) parCha[0] = fgkCwidth[ilayer]/2.0 + fgkCroW; parCha[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0; parCha[2] = fgkCroH/2.0; - gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha); // The inner part of the aluminum frames snprintf(cTagV,kTag,"UG%02d",iDet); parCha[0] = fgkCwidth[ilayer]/2.0 + fgkCroW - fgkCauT; parCha[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0 - fgkCauT; parCha[2] = -1.0; - gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha); // // The material layers inside the chambers @@ -635,100 +635,100 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) parCha[1] = -1.0; parCha[2] = fgkRMyThick/2.0; snprintf(cTagV,kTag,"URMY%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1327-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1327-1],parCha,kNparCha); // Carbon layer (radiator) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkRCbThick/2.0; snprintf(cTagV,kTag,"URCB%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1326-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1326-1],parCha,kNparCha); // Araldite layer (radiator) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkRGlThick/2.0; snprintf(cTagV,kTag,"URGL%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha); // Rohacell layer (radiator) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkRRhThick/2.0; snprintf(cTagV,kTag,"URRH%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha); // Fiber layer (radiator) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkRFbThick/2.0; snprintf(cTagV,kTag,"URFB%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1328-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1328-1],parCha,kNparCha); // Xe/Isobutane layer (drift volume) parCha[0] = fgkCwidth[ilayer]/2.0 - fgkCalT - fgkCclsT; parCha[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0 - fgkCclfT; parCha[2] = fgkDrThick/2.0; snprintf(cTagV,kTag,"UJ%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha); // Xe/Isobutane layer (amplification volume) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkAmThick/2.0; snprintf(cTagV,kTag,"UK%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha); // Cu layer (wire plane) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkWrThick/2.0; snprintf(cTagV,kTag,"UW%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1303-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1303-1],parCha,kNparCha); // Cu layer (pad plane) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkPPdThick/2.0; snprintf(cTagV,kTag,"UPPD%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha); // G10 layer (pad plane) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkPPpThick/2.0; snprintf(cTagV,kTag,"UPPP%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha); // Araldite layer (glue) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkPGlThick/2.0; snprintf(cTagV,kTag,"UPGL%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha); // Carbon layer (carbon fiber mats) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkPCbThick/2.0; snprintf(cTagV,kTag,"UPCB%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1326-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1326-1],parCha,kNparCha); // Aramide layer (honeycomb) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkPHcThick/2.0; snprintf(cTagV,kTag,"UPHC%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1310-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1310-1],parCha,kNparCha); // G10 layer (PCB readout board) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkPPcThick/2; snprintf(cTagV,kTag,"UPPC%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha); // Cu layer (traces in readout board) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkPRbThick/2.0; snprintf(cTagV,kTag,"UPRB%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1306-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1306-1],parCha,kNparCha); // Cu layer (other material on in readout board, incl. screws) parCha[0] = -1.0; parCha[1] = -1.0; parCha[2] = fgkPElThick/2.0; snprintf(cTagV,kTag,"UPEL%02d",iDet); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1304-1],parCha,kNparCha); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1304-1],parCha,kNparCha); // // Position the layers in the chambers @@ -741,111 +741,111 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) zpos = fgkRMyThick/2.0 - fgkCraH/2.0; snprintf(cTagV,kTag,"URMY%02d",iDet); snprintf(cTagM,kTag,"UC%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); zpos = -fgkRMyThick/2.0 + fgkCraH/2.0; snprintf(cTagV,kTag,"URMY%02d",iDet); snprintf(cTagM,kTag,"UC%02d",iDet); - gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); // Carbon layers (radiator) zpos = fgkRCbThick/2.0 + fgkRMyThick - fgkCraH/2.0; snprintf(cTagV,kTag,"URCB%02d",iDet); snprintf(cTagM,kTag,"UC%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); zpos = -fgkRCbThick/2.0 - fgkRMyThick + fgkCraH/2.0; snprintf(cTagV,kTag,"URCB%02d",iDet); snprintf(cTagM,kTag,"UC%02d",iDet); - gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); // Carbon layers (radiator) zpos = fgkRGlThick/2.0 + fgkRCbThick + fgkRMyThick - fgkCraH/2.0; snprintf(cTagV,kTag,"URGL%02d",iDet); snprintf(cTagM,kTag,"UC%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); zpos = -fgkRGlThick/2.0 - fgkRCbThick - fgkRMyThick + fgkCraH/2.0; snprintf(cTagV,kTag,"URGL%02d",iDet); snprintf(cTagM,kTag,"UC%02d",iDet); - gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); // Rohacell layers (radiator) zpos = fgkRRhThick/2.0 + fgkRGlThick + fgkRCbThick + fgkRMyThick - fgkCraH/2.0; snprintf(cTagV,kTag,"URRH%02d",iDet); snprintf(cTagM,kTag,"UC%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); zpos = -fgkRRhThick/2.0 - fgkRGlThick - fgkRCbThick - fgkRMyThick + fgkCraH/2.0; snprintf(cTagV,kTag,"URRH%02d",iDet); snprintf(cTagM,kTag,"UC%02d",iDet); - gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); // Fiber layers (radiator) zpos = 0.0; snprintf(cTagV,kTag,"URFB%02d",iDet); snprintf(cTagM,kTag,"UC%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // Xe/Isobutane layer (drift volume) zpos = fgkDrZpos; snprintf(cTagV,kTag,"UJ%02d",iDet); snprintf(cTagM,kTag,"UB%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // Upper part // Xe/Isobutane layer (amplification volume) zpos = fgkAmZpos; snprintf(cTagV,kTag,"UK%02d",iDet); snprintf(cTagM,kTag,"UE%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // Cu layer (wire planes inside amplification volume) zpos = fgkWrZposA; snprintf(cTagV,kTag,"UW%02d",iDet); snprintf(cTagM,kTag,"UK%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); zpos = fgkWrZposB; snprintf(cTagV,kTag,"UW%02d",iDet); snprintf(cTagM,kTag,"UK%02d",iDet); - gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); // Back panel + pad plane + readout part // Cu layer (pad plane) zpos = fgkPPdThick/2.0 - fgkCroH/2.0; snprintf(cTagV,kTag,"UPPD%02d",iDet); snprintf(cTagM,kTag,"UG%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // G10 layer (pad plane) zpos = fgkPPpThick/2.0 + fgkPPdThick - fgkCroH/2.0; snprintf(cTagV,kTag,"UPPP%02d",iDet); snprintf(cTagM,kTag,"UG%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // Araldite layer (glue) zpos = fgkPGlThick/2.0 + fgkPPpThick + fgkPPdThick - fgkCroH/2.0; snprintf(cTagV,kTag,"UPGL%02d",iDet); snprintf(cTagM,kTag,"UG%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // Carbon layers (carbon fiber mats) zpos = fgkPCbThick/2.0 + fgkPGlThick + fgkPPpThick + fgkPPdThick - fgkCroH/2.0; snprintf(cTagV,kTag,"UPCB%02d",iDet); snprintf(cTagM,kTag,"UG%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); zpos = -fgkPCbThick/2.0 - fgkPPcThick - fgkPRbThick - fgkPElThick + fgkCroH/2.0; snprintf(cTagV,kTag,"UPCB%02d",iDet); snprintf(cTagM,kTag,"UG%02d",iDet); - gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); // Aramide layer (honeycomb) zpos = fgkPHcThick/2.0 + fgkPCbThick + fgkPGlThick + fgkPPpThick + fgkPPdThick - fgkCroH/2.0; snprintf(cTagV,kTag,"UPHC%02d",iDet); snprintf(cTagM,kTag,"UG%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // G10 layer (PCB readout board) zpos = -fgkPPcThick/2.0 - fgkPRbThick - fgkPElThick + fgkCroH/2.0; snprintf(cTagV,kTag,"UPPC%02d",iDet); snprintf(cTagM,kTag,"UG%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // Cu layer (traces in readout board) zpos = -fgkPRbThick/2.0 - fgkPElThick + fgkCroH/2.0; snprintf(cTagV,kTag,"UPRB%02d",iDet); snprintf(cTagM,kTag,"UG%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // Cu layer (other materials on readout board, incl. screws) zpos = -fgkPElThick/2.0 + fgkCroH/2.0; snprintf(cTagV,kTag,"UPEL%02d",iDet); snprintf(cTagM,kTag,"UG%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // Position the inner volumes of the chambers in the frames xpos = 0.0; @@ -855,29 +855,29 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) zpos = 0.0; snprintf(cTagV,kTag,"UC%02d",iDet); snprintf(cTagM,kTag,"UX%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // The glue around the radiator zpos = fgkCraH/2.0 - fgkCdrH/2.0 - fgkCraH/2.0; snprintf(cTagV,kTag,"UX%02d",iDet); snprintf(cTagM,kTag,"UB%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // The lower Wacosit frame inside the aluminum frame zpos = 0.0; snprintf(cTagV,kTag,"UB%02d",iDet); snprintf(cTagM,kTag,"UA%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // The inside of the upper Wacosit frame zpos = 0.0; snprintf(cTagV,kTag,"UE%02d",iDet); snprintf(cTagM,kTag,"UD%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); // The inside of the upper aluminum frame zpos = 0.0; snprintf(cTagV,kTag,"UG%02d",iDet); snprintf(cTagM,kTag,"UF%02d",iDet); - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); } } @@ -897,16 +897,16 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTI1",1,"UTS1",xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTI2",1,"UTS2",xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTI3",1,"UTS3",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTI1",1,"UTS1",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTI2",1,"UTS2",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTI3",1,"UTS3",xpos,ypos,zpos,0,"ONLY"); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTS1",1,"UTR1",xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTS2",1,"UTR2",xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTS3",1,"UTR3",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTS1",1,"UTR1",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTS2",1,"UTR2",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTS3",1,"UTR3",xpos,ypos,zpos,0,"ONLY"); // Put the TRD volumes into the space frame mother volumes // if enabled via status flag @@ -921,16 +921,16 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) case 14: case 15: // Double carbon, w/o middle stack - gMC->Gspos("UTR3",1,cTagV,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTR3",1,cTagV,xpos,ypos,zpos,0,"ONLY"); break; case 11: case 12: // Double carbon, all stacks - gMC->Gspos("UTR2",1,cTagV,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTR2",1,cTagV,xpos,ypos,zpos,0,"ONLY"); break; default: // Standard supermodule - gMC->Gspos("UTR1",1,cTagV,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTR1",1,cTagV,xpos,ypos,zpos,0,"ONLY"); }; } } @@ -943,8 +943,8 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed) for (Int_t isector = 0; isector < kNsector; isector++) { if (GetSMstatus(isector)) { snprintf(cTagV,kTag,"BTRD%d",isector); - gMC->Gspos("UTF1",1,cTagV,xpos, ypos,zpos,0,"ONLY"); - gMC->Gspos("UTF2",1,cTagV,xpos,-ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTF1",1,cTagV,xpos, ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTF2",1,cTagV,xpos,-ypos,zpos,0,"ONLY"); } } @@ -984,13 +984,13 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) // The rotation matrices const Int_t kNmatrix = 7; Int_t matrix[kNmatrix]; - gMC->Matrix(matrix[0], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0); - gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0, 180.0); - gMC->Matrix(matrix[2], 90.0, 0.0, 0.0, 0.0, 90.0, 90.0); - gMC->Matrix(matrix[3], 90.0, 180.0, 0.0, 180.0, 90.0, 90.0); - gMC->Matrix(matrix[4], 170.0, 0.0, 80.0, 0.0, 90.0, 90.0); - gMC->Matrix(matrix[5], 170.0, 180.0, 80.0, 180.0, 90.0, 90.0); - gMC->Matrix(matrix[6], 180.0, 180.0, 90.0, 180.0, 90.0, 90.0); + TVirtualMC::GetMC()->Matrix(matrix[0], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0); + TVirtualMC::GetMC()->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0, 180.0); + TVirtualMC::GetMC()->Matrix(matrix[2], 90.0, 0.0, 0.0, 0.0, 90.0, 90.0); + TVirtualMC::GetMC()->Matrix(matrix[3], 90.0, 180.0, 0.0, 180.0, 90.0, 90.0); + TVirtualMC::GetMC()->Matrix(matrix[4], 170.0, 0.0, 80.0, 0.0, 90.0, 90.0); + TVirtualMC::GetMC()->Matrix(matrix[5], 170.0, 180.0, 80.0, 180.0, 90.0, 90.0); + TVirtualMC::GetMC()->Matrix(matrix[6], 180.0, 180.0, 90.0, 180.0, 90.0, 90.0); // // The carbon inserts in the top/bottom aluminum plates @@ -1001,7 +1001,7 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parCrb[0] = 0.0; parCrb[1] = 0.0; parCrb[2] = 0.0; - gMC->Gsvolu("USCR","BOX ",idtmed[1326-1],parCrb,0); + TVirtualMC::GetMC()->Gsvolu("USCR","BOX ",idtmed[1326-1],parCrb,0); // Bottom 1 (all sectors) parCrb[0] = 77.49/2.0; parCrb[1] = 104.60/2.0; @@ -1009,9 +1009,9 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) xpos = 0.0; ypos = 0.0; zpos = fgkSMpltT/2.0 - fgkSheight/2.0; - gMC->Gsposp("USCR", 1,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR", 2,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR", 3,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR", 1,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR", 2,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR", 3,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); // Bottom 2 (all sectors) parCrb[0] = 77.49/2.0; parCrb[1] = 55.80/2.0; @@ -1019,12 +1019,12 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) xpos = 0.0; ypos = 85.6; zpos = fgkSMpltT/2.0 - fgkSheight/2.0; - gMC->Gsposp("USCR", 4,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR", 5,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR", 6,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR", 7,"UTS1", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR", 8,"UTS2", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR", 9,"UTS3", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR", 4,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR", 5,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR", 6,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR", 7,"UTS1", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR", 8,"UTS2", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR", 9,"UTS3", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); // Bottom 3 (all sectors) parCrb[0] = 77.49/2.0; parCrb[1] = 56.00/2.0; @@ -1032,12 +1032,12 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) xpos = 0.0; ypos = 148.5; zpos = fgkSMpltT/2.0 - fgkSheight/2.0; - gMC->Gsposp("USCR",10,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",11,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",12,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",13,"UTS1", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",14,"UTS2", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",15,"UTS3", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",10,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",11,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",12,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",13,"UTS1", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",14,"UTS2", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",15,"UTS3", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); // Bottom 4 (all sectors) parCrb[0] = 77.49/2.0; parCrb[1] = 118.00/2.0; @@ -1045,12 +1045,12 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) xpos = 0.0; ypos = 240.5; zpos = fgkSMpltT/2.0 - fgkSheight/2.0; - gMC->Gsposp("USCR",16,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",17,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",18,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",19,"UTS1", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",20,"UTS2", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",21,"UTS3", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",16,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",17,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",18,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",19,"UTS1", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",20,"UTS2", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",21,"UTS3", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); // Top 1 (only in front of PHOS) parCrb[0] = 111.48/2.0; parCrb[1] = 105.00/2.0; @@ -1058,8 +1058,8 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) xpos = 0.0; ypos = 0.0; zpos = fgkSMpltT/2.0 - fgkSheight/2.0; - gMC->Gsposp("USCR",22,"UTS2", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",23,"UTS3", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",22,"UTS2", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",23,"UTS3", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); // Top 2 (only in front of PHOS) parCrb[0] = 111.48/2.0; parCrb[1] = 56.00/2.0; @@ -1067,10 +1067,10 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) xpos = 0.0; ypos = 85.5; zpos = fgkSMpltT/2.0 - fgkSheight/2.0; - gMC->Gsposp("USCR",24,"UTS2", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",25,"UTS3", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",26,"UTS2", xpos,-ypos,-zpos,0,"ONLY",parCrb,kNparCrb); - gMC->Gsposp("USCR",27,"UTS3", xpos,-ypos,-zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",24,"UTS2", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",25,"UTS3", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",26,"UTS2", xpos,-ypos,-zpos,0,"ONLY",parCrb,kNparCrb); + TVirtualMC::GetMC()->Gsposp("USCR",27,"UTS3", xpos,-ypos,-zpos,0,"ONLY",parCrb,kNparCrb); // // The chamber support rails @@ -1094,7 +1094,7 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parSRL[ 8] = kSRLwidB /2.0; parSRL[ 9] = kSRLwidA /2.0; parSRL[10] = 5.0; - gMC->Gsvolu("USRL","TRAP",idtmed[1301-1],parSRL,kNparSRL); + TVirtualMC::GetMC()->Gsvolu("USRL","TRAP",idtmed[1301-1],parSRL,kNparSRL); xpos = 0.0; ypos = 0.0; @@ -1105,12 +1105,12 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) zpos = fgkVrocsm + fgkSMpltT - fgkCalZpos - fgkSheight/2.0 + fgkCraH + fgkCdrH - fgkCalH - kSRLhgt/2.0 + ilayer * (fgkCH + fgkVspace); - gMC->Gspos("USRL",ilayer+1 ,"UTI1", xpos,ypos,zpos,matrix[2],"ONLY"); - gMC->Gspos("USRL",ilayer+1+ kNlayer,"UTI1",-xpos,ypos,zpos,matrix[3],"ONLY"); - gMC->Gspos("USRL",ilayer+1+2*kNlayer,"UTI2", xpos,ypos,zpos,matrix[2],"ONLY"); - gMC->Gspos("USRL",ilayer+1+3*kNlayer,"UTI2",-xpos,ypos,zpos,matrix[3],"ONLY"); - gMC->Gspos("USRL",ilayer+1+4*kNlayer,"UTI3", xpos,ypos,zpos,matrix[2],"ONLY"); - gMC->Gspos("USRL",ilayer+1+5*kNlayer,"UTI3",-xpos,ypos,zpos,matrix[3],"ONLY"); + TVirtualMC::GetMC()->Gspos("USRL",ilayer+1 ,"UTI1", xpos,ypos,zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USRL",ilayer+1+ kNlayer,"UTI1",-xpos,ypos,zpos,matrix[3],"ONLY"); + TVirtualMC::GetMC()->Gspos("USRL",ilayer+1+2*kNlayer,"UTI2", xpos,ypos,zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USRL",ilayer+1+3*kNlayer,"UTI2",-xpos,ypos,zpos,matrix[3],"ONLY"); + TVirtualMC::GetMC()->Gspos("USRL",ilayer+1+4*kNlayer,"UTI3", xpos,ypos,zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USRL",ilayer+1+5*kNlayer,"UTI3",-xpos,ypos,zpos,matrix[3],"ONLY"); } // @@ -1138,7 +1138,7 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) // The aluminum of the cross bars parSCB[0] = fgkCwidth[ilayer]/2.0 + kSRLdst/2.0; snprintf(cTagV,kTag,"USF%01d",ilayer); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB); // The empty regions in the cross bars Float_t thkSCB = kSCBthk; @@ -1148,20 +1148,20 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parSCI[2] = parSCB[2] - thkSCB; parSCI[0] = parSCB[0]/4.0 - kSCBthk; snprintf(cTagV,kTag,"USI%01d",ilayer); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parSCI,kNparSCI); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parSCI,kNparSCI); snprintf(cTagV,kTag,"USI%01d",ilayer); snprintf(cTagM,kTag,"USF%01d",ilayer); ypos = 0.0; zpos = 0.0; xpos = parSCI[0] + thkSCB/2.0; - gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); xpos = - parSCI[0] - thkSCB/2.0; - gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); xpos = 3.0 * parSCI[0] + 1.5 * thkSCB; - gMC->Gspos(cTagV,3,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,3,cTagM,xpos,ypos,zpos,0,"ONLY"); xpos = - 3.0 * parSCI[0] - 1.5 * thkSCB; - gMC->Gspos(cTagV,4,cTagM,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,4,cTagM,xpos,ypos,zpos,0,"ONLY"); snprintf(cTagV,kTag,"USF%01d",ilayer); xpos = 0.0; @@ -1169,14 +1169,14 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) + ilayer * (fgkCH + fgkVspace); ypos = fgkClength[ilayer][2]/2.0 + fgkClength[ilayer][1]; - gMC->Gspos(cTagV, 1,"UTI1", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos(cTagV, 3,"UTI2", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos(cTagV, 5,"UTI3", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV, 1,"UTI1", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV, 3,"UTI2", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV, 5,"UTI3", xpos,ypos,zpos,0,"ONLY"); ypos = - fgkClength[ilayer][2]/2.0 - fgkClength[ilayer][1]; - gMC->Gspos(cTagV, 2,"UTI1", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos(cTagV, 4,"UTI2", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos(cTagV, 6,"UTI3", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV, 2,"UTI1", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV, 4,"UTI2", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV, 6,"UTI3", xpos,ypos,zpos,0,"ONLY"); } @@ -1195,18 +1195,18 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parSCH[2] = kSCHhgt/2.0; snprintf(cTagV,kTag,"USH%01d",ilayer); - gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCH,kNparSCH); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCH,kNparSCH); xpos = 0.0; ypos = fgkClength[ilayer][2]/2.0 + fgkClength[ilayer][1] + parSCH[1]; zpos = fgkVrocsm + fgkSMpltT - kSCHhgt/2.0 - fgkSheight/2.0 + (ilayer+1) * (fgkCH + fgkVspace); - gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos(cTagV,3,"UTI2", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos(cTagV,5,"UTI3", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,3,"UTI2", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,5,"UTI3", xpos,ypos,zpos,0,"ONLY"); ypos = -ypos; - gMC->Gspos(cTagV,2,"UTI1", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos(cTagV,4,"UTI2", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos(cTagV,6,"UTI3", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,2,"UTI1", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,4,"UTI2", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos(cTagV,6,"UTI3", xpos,ypos,zpos,0,"ONLY"); } @@ -1219,7 +1219,7 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parTRD[1] = 114.00/2.0; parTRD[2] = 1.20/2.0; parTRD[3] = 71.30/2.0; - gMC->Gsvolu("USDB","TRD1",idtmed[1301-1],parTRD,kNparTRD); + TVirtualMC::GetMC()->Gsvolu("USDB","TRD1",idtmed[1301-1],parTRD,kNparTRD); // Empty spaces (air) parTRP[ 0] = 1.20/2.0; parTRP[ 1] = 0.0; @@ -1232,11 +1232,11 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parTRP[ 8] = 50.60/2.0; parTRP[ 9] = 5.00/2.0; parTRP[10] = 3.5; - gMC->Gsvolu("USD1","TRAP",idtmed[1302-1],parTRP,kNparTRP); + TVirtualMC::GetMC()->Gsvolu("USD1","TRAP",idtmed[1302-1],parTRP,kNparTRP); xpos = 18.0; ypos = 0.0; zpos = 27.00/2.0 - 71.3/2.0; - gMC->Gspos("USD1",1,"USDB", xpos, ypos, zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USD1",1,"USDB", xpos, ypos, zpos,matrix[2],"ONLY"); // Empty spaces (air) parTRP[ 0] = 1.20/2.0; parTRP[ 1] = 0.0; @@ -1249,20 +1249,20 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parTRP[ 8] = 5.00/2.0; parTRP[ 9] = 62.10/2.0; parTRP[10] = 3.5; - gMC->Gsvolu("USD2","TRAP",idtmed[1302-1],parTRP,kNparTRP); + TVirtualMC::GetMC()->Gsvolu("USD2","TRAP",idtmed[1302-1],parTRP,kNparTRP); xpos = 21.0; ypos = 0.0; zpos = 71.3/2.0 - 33.0/2.0; - gMC->Gspos("USD2",1,"USDB", xpos, ypos, zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USD2",1,"USDB", xpos, ypos, zpos,matrix[2],"ONLY"); // Empty spaces (air) parBOX[ 0] = 22.50/2.0; parBOX[ 1] = 1.20/2.0; parBOX[ 2] = 70.50/2.0; - gMC->Gsvolu("USD3","BOX ",idtmed[1302-1],parBOX,kNparBOX); + TVirtualMC::GetMC()->Gsvolu("USD3","BOX ",idtmed[1302-1],parBOX,kNparBOX); xpos = -25.75; ypos = 0.0; zpos = 0.4; - gMC->Gspos("USD3",1,"USDB", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD3",1,"USDB", xpos, ypos, zpos, 0,"ONLY"); // Empty spaces (air) parTRP[ 0] = 1.20/2.0; parTRP[ 1] = 0.0; @@ -1275,11 +1275,11 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parTRP[ 8] = 5.00/2.0; parTRP[ 9] = 65.00/2.0; parTRP[10] = -1.0; - gMC->Gsvolu("USD4","TRAP",idtmed[1302-1],parTRP,kNparTRP); + TVirtualMC::GetMC()->Gsvolu("USD4","TRAP",idtmed[1302-1],parTRP,kNparTRP); xpos = 2.0; ypos = 0.0; zpos = -1.6; - gMC->Gspos("USD4",1,"USDB", xpos, ypos, zpos,matrix[6],"ONLY"); + TVirtualMC::GetMC()->Gspos("USD4",1,"USDB", xpos, ypos, zpos,matrix[6],"ONLY"); // Empty spaces (air) parTRP[ 0] = 1.20/2.0; parTRP[ 1] = 0.0; @@ -1292,11 +1292,11 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parTRP[ 8] = 63.50/2.0; parTRP[ 9] = 5.00/2.0; parTRP[10] = 16.0; - gMC->Gsvolu("USD5","TRAP",idtmed[1302-1],parTRP,kNparTRP); + TVirtualMC::GetMC()->Gsvolu("USD5","TRAP",idtmed[1302-1],parTRP,kNparTRP); xpos = 36.5; ypos = 0.0; zpos = -1.5; - gMC->Gspos("USD5",1,"USDB", xpos, ypos, zpos,matrix[5],"ONLY"); + TVirtualMC::GetMC()->Gspos("USD5",1,"USDB", xpos, ypos, zpos,matrix[5],"ONLY"); // Empty spaces (air) parTRP[ 0] = 1.20/2.0; parTRP[ 1] = 0.0; @@ -1309,62 +1309,62 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parTRP[ 8] = 4.50/2.0; parTRP[ 9] = 16.50/2.0; parTRP[10] = -5.0; - gMC->Gsvolu("USD6","TRAP",idtmed[1302-1],parTRP,kNparTRP); + TVirtualMC::GetMC()->Gsvolu("USD6","TRAP",idtmed[1302-1],parTRP,kNparTRP); xpos = -43.7; ypos = 0.0; zpos = 0.4; - gMC->Gspos("USD6",1,"USDB", xpos, ypos, zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USD6",1,"USDB", xpos, ypos, zpos,matrix[2],"ONLY"); xpos = 0.0; ypos = fgkClength[5][2]/2.0; zpos = 0.04; - gMC->Gspos("USDB",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USDB",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USDB",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USDB",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USDB",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USDB",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USDB",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USDB",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USDB",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USDB",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USDB",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USDB",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); // Upper bar (aluminum) parBOX[0] = 95.00/2.0; parBOX[1] = 1.20/2.0; parBOX[2] = 3.00/2.0; - gMC->Gsvolu("USD7","BOX ",idtmed[1301-1],parBOX,kNparBOX); + TVirtualMC::GetMC()->Gsvolu("USD7","BOX ",idtmed[1301-1],parBOX,kNparBOX); xpos = 0.0; ypos = fgkClength[5][2]/2.0; zpos = fgkSheight/2.0 - fgkSMpltT - 3.00/2.0; - gMC->Gspos("USD7",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD7",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD7",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD7",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD7",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD7",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD7",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD7",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD7",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD7",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD7",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD7",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); // Lower bar (aluminum) parBOX[0] = 90.22/2.0; parBOX[1] = 1.20/2.0; parBOX[2] = 1.74/2.0; - gMC->Gsvolu("USD8","BOX ",idtmed[1301-1],parBOX,kNparBOX); + TVirtualMC::GetMC()->Gsvolu("USD8","BOX ",idtmed[1301-1],parBOX,kNparBOX); xpos = 0.0; ypos = fgkClength[5][2]/2.0 - 0.1; zpos = -fgkSheight/2.0 + fgkSMpltT + 2.27; - gMC->Gspos("USD8",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD8",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD8",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD8",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD8",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD8",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD8",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD8",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD8",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD8",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD8",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD8",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); // Lower bar (aluminum) parBOX[0] = 82.60/2.0; parBOX[1] = 1.20/2.0; parBOX[2] = 1.40/2.0; - gMC->Gsvolu("USD9","BOX ",idtmed[1301-1],parBOX,kNparBOX); + TVirtualMC::GetMC()->Gsvolu("USD9","BOX ",idtmed[1301-1],parBOX,kNparBOX); xpos = 0.0; ypos = fgkClength[5][2]/2.0; zpos = -fgkSheight/2.0 + fgkSMpltT + 1.40/2.0; - gMC->Gspos("USD9",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD9",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD9",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD9",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD9",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USD9",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD9",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD9",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD9",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD9",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD9",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USD9",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); // Front sheet (aluminum) parTRP[ 0] = 0.10/2.0; parTRP[ 1] = 0.0; @@ -1377,16 +1377,16 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parTRP[ 8] = 31.70/2.0; parTRP[ 9] = 44.00/2.0; parTRP[10] = -5.0; - gMC->Gsvolu("USDF","TRAP",idtmed[1302-1],parTRP,kNparTRP); + TVirtualMC::GetMC()->Gsvolu("USDF","TRAP",idtmed[1302-1],parTRP,kNparTRP); xpos = -32.0; ypos = fgkClength[5][2]/2.0 + 1.20/2.0 + 0.10/2.0; zpos = 0.0; - gMC->Gspos("USDF",1,"UTI1", xpos, ypos, zpos,matrix[2],"ONLY"); - gMC->Gspos("USDF",2,"UTI1", xpos,-ypos, zpos,matrix[2],"ONLY"); - gMC->Gspos("USDF",3,"UTI2", xpos, ypos, zpos,matrix[2],"ONLY"); - gMC->Gspos("USDF",4,"UTI2", xpos,-ypos, zpos,matrix[2],"ONLY"); - gMC->Gspos("USDF",5,"UTI3", xpos, ypos, zpos,matrix[2],"ONLY"); - gMC->Gspos("USDF",6,"UTI3", xpos,-ypos, zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USDF",1,"UTI1", xpos, ypos, zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USDF",2,"UTI1", xpos,-ypos, zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USDF",3,"UTI2", xpos, ypos, zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USDF",4,"UTI2", xpos,-ypos, zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USDF",5,"UTI3", xpos, ypos, zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USDF",6,"UTI3", xpos,-ypos, zpos,matrix[2],"ONLY"); // // The flat frame in front of the chambers @@ -1397,27 +1397,27 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parTRD[1] = 114.00/2.0 - 0.1; parTRD[2] = 1.50/2.0; parTRD[3] = 70.30/2.0; - gMC->Gsvolu("USCB","TRD1",idtmed[1301-1],parTRD,kNparTRD); + TVirtualMC::GetMC()->Gsvolu("USCB","TRD1",idtmed[1301-1],parTRD,kNparTRD); // Empty spaces (air) parTRD[0] = 87.00/2.0; parTRD[1] = 10.00/2.0; parTRD[2] = 1.50/2.0; parTRD[3] = 26.35/2.0; - gMC->Gsvolu("USC1","TRD1",idtmed[1302-1],parTRD,kNparTRD); + TVirtualMC::GetMC()->Gsvolu("USC1","TRD1",idtmed[1302-1],parTRD,kNparTRD); xpos = 0.0; ypos = 0.0; zpos = 26.35/2.0 - 70.3/2.0; - gMC->Gspos("USC1",1,"USCB",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC1",1,"USCB",xpos,ypos,zpos,0,"ONLY"); // Empty spaces (air) parTRD[0] = 10.00/2.0; parTRD[1] = 111.00/2.0; parTRD[2] = 1.50/2.0; parTRD[3] = 35.05/2.0; - gMC->Gsvolu("USC2","TRD1",idtmed[1302-1],parTRD,kNparTRD); + TVirtualMC::GetMC()->Gsvolu("USC2","TRD1",idtmed[1302-1],parTRD,kNparTRD); xpos = 0.0; ypos = 0.0; zpos = 70.3/2.0 - 35.05/2.0; - gMC->Gspos("USC2",1,"USCB",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC2",1,"USCB",xpos,ypos,zpos,0,"ONLY"); // Empty spaces (air) parTRP[ 0] = 1.50/2.0; parTRP[ 1] = 0.0; @@ -1430,63 +1430,63 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parTRP[ 8] = 63.90/2.0; parTRP[ 9] = 8.86/2.0; parTRP[10] = 16.0; - gMC->Gsvolu("USC3","TRAP",idtmed[1302-1],parTRP,kNparTRP); + TVirtualMC::GetMC()->Gsvolu("USC3","TRAP",idtmed[1302-1],parTRP,kNparTRP); xpos = -30.5; ypos = 0.0; zpos = -2.0; - gMC->Gspos("USC3",1,"USCB", xpos, ypos, zpos,matrix[4],"ONLY"); - gMC->Gspos("USC3",2,"USCB",-xpos, ypos, zpos,matrix[5],"ONLY"); + TVirtualMC::GetMC()->Gspos("USC3",1,"USCB", xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("USC3",2,"USCB",-xpos, ypos, zpos,matrix[5],"ONLY"); xpos = 0.0; ypos = fgkClength[5][2]/2.0 + fgkClength[5][1] + fgkClength[5][0]; zpos = 0.0; - gMC->Gspos("USCB",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USCB",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USCB",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USCB",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USCB",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USCB",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USCB",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USCB",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USCB",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USCB",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USCB",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USCB",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); // Upper bar (aluminum) parBOX[0] = 95.00/2.0; parBOX[1] = 1.50/2.0; parBOX[2] = 3.00/2.0; - gMC->Gsvolu("USC4","BOX ",idtmed[1301-1],parBOX,kNparBOX); + TVirtualMC::GetMC()->Gsvolu("USC4","BOX ",idtmed[1301-1],parBOX,kNparBOX); xpos = 0.0; ypos = fgkClength[5][2]/2.0 + fgkClength[5][1] + fgkClength[5][0]; zpos = fgkSheight/2.0 - fgkSMpltT - 3.00/2.0; - gMC->Gspos("USC4",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC4",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC4",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC4",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC4",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC4",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC4",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC4",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC4",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC4",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC4",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC4",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); // Lower bar (aluminum) parBOX[0] = 90.22/2.0; parBOX[1] = 1.50/2.0; parBOX[2] = 2.00/2.0; - gMC->Gsvolu("USC5","BOX ",idtmed[1301-1],parBOX,kNparBOX); + TVirtualMC::GetMC()->Gsvolu("USC5","BOX ",idtmed[1301-1],parBOX,kNparBOX); xpos = 0.0; ypos = fgkClength[5][2]/2.0 + fgkClength[5][1] + fgkClength[5][0]; zpos = -fgkSheight/2.0 + fgkSMpltT + 2.60; - gMC->Gspos("USC5",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC5",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC5",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC5",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC5",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC5",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC5",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC5",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC5",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC5",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC5",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC5",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); // Lower bar (aluminum) parBOX[0] = 82.60/2.0; parBOX[1] = 1.50/2.0; parBOX[2] = 1.60/2.0; - gMC->Gsvolu("USC6","BOX ",idtmed[1301-1],parBOX,kNparBOX); + TVirtualMC::GetMC()->Gsvolu("USC6","BOX ",idtmed[1301-1],parBOX,kNparBOX); xpos = 0.0; ypos = fgkClength[5][2]/2.0 + fgkClength[5][1] + fgkClength[5][0]; zpos = -fgkSheight/2.0 + fgkSMpltT + 1.60/2.0; - gMC->Gspos("USC6",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC6",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC6",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC6",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC6",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("USC6",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC6",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC6",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC6",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC6",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC6",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USC6",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); // // The long corner ledges @@ -1513,28 +1513,28 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parSCL[0] = kSCLthkUa /2.0; parSCL[1] = fgkSlength/2.0; parSCL[2] = kSCLwidUa /2.0; - gMC->Gsvolu("USL1","BOX ",idtmed[1301-1],parSCL,kNparSCL); + TVirtualMC::GetMC()->Gsvolu("USL1","BOX ",idtmed[1301-1],parSCL,kNparSCL); xpos = fgkSwidth2/2.0 - fgkSMpltT - kSCLposxUa; ypos = 0.0; zpos = fgkSheight/2.0 - fgkSMpltT - kSCLposzUa; - gMC->Gspos("USL1",1,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY"); + TVirtualMC::GetMC()->Gspos("USL1",1,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY"); xpos = -xpos; - gMC->Gspos("USL1",2,"UTI1", xpos,ypos,zpos,matrix[1],"ONLY"); + TVirtualMC::GetMC()->Gspos("USL1",2,"UTI1", xpos,ypos,zpos,matrix[1],"ONLY"); // Horizontal parSCL[0] = kSCLwidUb /2.0; parSCL[1] = fgkSlength/2.0; parSCL[2] = kSCLthkUb /2.0; - gMC->Gsvolu("USL2","BOX ",idtmed[1301-1],parSCL,kNparSCL); + TVirtualMC::GetMC()->Gsvolu("USL2","BOX ",idtmed[1301-1],parSCL,kNparSCL); xpos = fgkSwidth2/2.0 - fgkSMpltT - kSCLposxUb; ypos = 0.0; zpos = fgkSheight/2.0 - fgkSMpltT - kSCLposzUb; - gMC->Gspos("USL2",1,"UTI1", xpos,ypos,zpos, 0,"ONLY"); - gMC->Gspos("USL2",3,"UTI2", xpos,ypos,zpos, 0,"ONLY"); - gMC->Gspos("USL2",5,"UTI3", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL2",1,"UTI1", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL2",3,"UTI2", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL2",5,"UTI3", xpos,ypos,zpos, 0,"ONLY"); xpos = -xpos; - gMC->Gspos("USL2",2,"UTI1", xpos,ypos,zpos, 0,"ONLY"); - gMC->Gspos("USL2",4,"UTI2", xpos,ypos,zpos, 0,"ONLY"); - gMC->Gspos("USL2",6,"UTI3", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL2",2,"UTI1", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL2",4,"UTI2", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL2",6,"UTI3", xpos,ypos,zpos, 0,"ONLY"); // Lower ledges // Thickness of the corner ledges @@ -1561,32 +1561,32 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parSCLb[ 8] = kSCLthkLb /2.0; parSCLb[ 9] = kSCLthkLa /2.0; parSCLb[10] = 5.0; - gMC->Gsvolu("USL3","TRAP",idtmed[1301-1],parSCLb,kNparSCLb); + TVirtualMC::GetMC()->Gsvolu("USL3","TRAP",idtmed[1301-1],parSCLb,kNparSCLb); xpos = fgkSwidth1/2.0 - fgkSMpltT - kSCLposxLa; ypos = 0.0; zpos = - fgkSheight/2.0 + fgkSMpltT + kSCLposzLa; - gMC->Gspos("USL3",1,"UTI1", xpos,ypos,zpos,matrix[2],"ONLY"); - gMC->Gspos("USL3",3,"UTI2", xpos,ypos,zpos,matrix[2],"ONLY"); - gMC->Gspos("USL3",5,"UTI3", xpos,ypos,zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USL3",1,"UTI1", xpos,ypos,zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USL3",3,"UTI2", xpos,ypos,zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("USL3",5,"UTI3", xpos,ypos,zpos,matrix[2],"ONLY"); xpos = -xpos; - gMC->Gspos("USL3",2,"UTI1", xpos,ypos,zpos,matrix[3],"ONLY"); - gMC->Gspos("USL3",4,"UTI2", xpos,ypos,zpos,matrix[3],"ONLY"); - gMC->Gspos("USL3",6,"UTI3", xpos,ypos,zpos,matrix[3],"ONLY"); + TVirtualMC::GetMC()->Gspos("USL3",2,"UTI1", xpos,ypos,zpos,matrix[3],"ONLY"); + TVirtualMC::GetMC()->Gspos("USL3",4,"UTI2", xpos,ypos,zpos,matrix[3],"ONLY"); + TVirtualMC::GetMC()->Gspos("USL3",6,"UTI3", xpos,ypos,zpos,matrix[3],"ONLY"); // Horizontal part parSCL[0] = kSCLwidLb /2.0; parSCL[1] = fgkSlength/2.0; parSCL[2] = kSCLthkLb /2.0; - gMC->Gsvolu("USL4","BOX ",idtmed[1301-1],parSCL,kNparSCL); + TVirtualMC::GetMC()->Gsvolu("USL4","BOX ",idtmed[1301-1],parSCL,kNparSCL); xpos = fgkSwidth1/2.0 - fgkSMpltT - kSCLposxLb; ypos = 0.0; zpos = - fgkSheight/2.0 + fgkSMpltT + kSCLposzLb; - gMC->Gspos("USL4",1,"UTI1", xpos,ypos,zpos, 0,"ONLY"); - gMC->Gspos("USL4",3,"UTI2", xpos,ypos,zpos, 0,"ONLY"); - gMC->Gspos("USL4",5,"UTI3", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL4",1,"UTI1", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL4",3,"UTI2", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL4",5,"UTI3", xpos,ypos,zpos, 0,"ONLY"); xpos = -xpos; - gMC->Gspos("USL4",2,"UTI1", xpos,ypos,zpos, 0,"ONLY"); - gMC->Gspos("USL4",4,"UTI2", xpos,ypos,zpos, 0,"ONLY"); - gMC->Gspos("USL4",6,"UTI3", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL4",2,"UTI1", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL4",4,"UTI2", xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("USL4",6,"UTI3", xpos,ypos,zpos, 0,"ONLY"); // // Aluminum plates in the front part of the super modules @@ -1598,26 +1598,26 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parTrd[1] = fgkSwidth2/2.0 - 2.5; parTrd[2] = fgkSMpltT /2.0; parTrd[3] = fgkSheight/2.0 - 1.0; - gMC->Gsvolu("UTA1","TRD1",idtmed[1301-1],parTrd,kNparTrd); + TVirtualMC::GetMC()->Gsvolu("UTA1","TRD1",idtmed[1301-1],parTrd,kNparTrd); xpos = 0.0; ypos = fgkSMpltT/2.0 - fgkFlength/2.0; zpos = -0.5; - gMC->Gspos("UTA1",1,"UTF1",xpos, ypos,zpos, 0,"ONLY"); - gMC->Gspos("UTA1",2,"UTF2",xpos,-ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTA1",1,"UTF1",xpos, ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTA1",2,"UTF2",xpos,-ypos,zpos, 0,"ONLY"); const Int_t kNparPlt = 3; Float_t parPlt[kNparPlt]; parPlt[0] = 0.0; parPlt[1] = 0.0; parPlt[2] = 0.0; - gMC->Gsvolu("UTA2","BOX ",idtmed[1301-1],parPlt,0); + TVirtualMC::GetMC()->Gsvolu("UTA2","BOX ",idtmed[1301-1],parPlt,0); xpos = 0.0; ypos = 0.0; zpos = fgkSheight/2.0 - fgkSMpltT/2.0; parPlt[0] = fgkSwidth2/2.0 - 0.2; parPlt[1] = fgkFlength/2.0; parPlt[2] = fgkSMpltT /2.0; - gMC->Gsposp("UTA2",1,"UTF2",xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTA2",1,"UTF2",xpos,ypos,zpos , 0,"ONLY",parPlt,kNparPlt); xpos = (fgkSwidth1 + fgkSwidth2)/4.0 - fgkSMpltT/2.0 - 0.0016; ypos = 0.0; @@ -1625,21 +1625,21 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed) parPlt[0] = fgkSMpltT /2.0; parPlt[1] = fgkFlength/2.0; parPlt[2] = fgkSheight/2.0; - gMC->Gsposp("UTA2",2,"UTF2", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTA2",2,"UTF2", xpos,ypos,zpos ,matrix[0],"ONLY",parPlt,kNparPlt); - gMC->Gsposp("UTA2",3,"UTF2",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTA2",3,"UTF2",-xpos,ypos,zpos ,matrix[1],"ONLY",parPlt,kNparPlt); // Additional aluminum bar parBOX[0] = 80.0/2.0; parBOX[1] = 1.0/2.0; parBOX[2] = 10.0/2.0; - gMC->Gsvolu("UTA3","BOX ",idtmed[1301-1],parBOX,kNparBOX); + TVirtualMC::GetMC()->Gsvolu("UTA3","BOX ",idtmed[1301-1],parBOX,kNparBOX); xpos = 0.0; ypos = 1.0/2.0 + fgkSMpltT - fgkFlength/2.0; zpos = fgkSheight/2.0 - 1.5 - 10.0/2.0; - gMC->Gspos("UTA3",1,"UTF1", xpos, ypos, zpos, 0,"ONLY"); - gMC->Gspos("UTA3",2,"UTF2", xpos,-ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTA3",1,"UTF1", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTA3",2,"UTF2", xpos,-ypos, zpos, 0,"ONLY"); } @@ -1690,16 +1690,16 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) // The rotation matrices const Int_t kNmatrix = 10; Int_t matrix[kNmatrix]; - gMC->Matrix(matrix[0], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0); // rotation around y-axis - gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0, 180.0); // rotation around y-axis - gMC->Matrix(matrix[2], 0.0, 0.0, 90.0, 90.0, 90.0, 0.0); - gMC->Matrix(matrix[3], 180.0, 0.0, 90.0, 90.0, 90.0, 180.0); - gMC->Matrix(matrix[4], 90.0, 0.0, 0.0, 0.0, 90.0, 90.0); - gMC->Matrix(matrix[5], 100.0, 0.0, 90.0, 270.0, 10.0, 0.0); - gMC->Matrix(matrix[6], 80.0, 0.0, 90.0, 270.0, 10.0, 180.0); - gMC->Matrix(matrix[7], 90.0, 10.0, 90.0, 100.0, 0.0, 0.0); // rotation around z-axis - gMC->Matrix(matrix[8], 90.0, 350.0, 90.0, 80.0, 0.0, 0.0); // rotation around z-axis - gMC->Matrix(matrix[9], 90.0, 90.0, 90.0, 180.0, 0.0, 0.0); // rotation around z-axis + TVirtualMC::GetMC()->Matrix(matrix[0], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0); // rotation around y-axis + TVirtualMC::GetMC()->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0, 180.0); // rotation around y-axis + TVirtualMC::GetMC()->Matrix(matrix[2], 0.0, 0.0, 90.0, 90.0, 90.0, 0.0); + TVirtualMC::GetMC()->Matrix(matrix[3], 180.0, 0.0, 90.0, 90.0, 90.0, 180.0); + TVirtualMC::GetMC()->Matrix(matrix[4], 90.0, 0.0, 0.0, 0.0, 90.0, 90.0); + TVirtualMC::GetMC()->Matrix(matrix[5], 100.0, 0.0, 90.0, 270.0, 10.0, 0.0); + TVirtualMC::GetMC()->Matrix(matrix[6], 80.0, 0.0, 90.0, 270.0, 10.0, 180.0); + TVirtualMC::GetMC()->Matrix(matrix[7], 90.0, 10.0, 90.0, 100.0, 0.0, 0.0); // rotation around z-axis + TVirtualMC::GetMC()->Matrix(matrix[8], 90.0, 350.0, 90.0, 80.0, 0.0, 0.0); // rotation around z-axis + TVirtualMC::GetMC()->Matrix(matrix[9], 90.0, 90.0, 90.0, 180.0, 0.0, 0.0); // rotation around z-axis // // The cooling arterias @@ -1719,19 +1719,19 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parCOL[0] = 0.0; parCOL[1] = 0.0; parCOL[2] = 0.0; - gMC->Gsvolu("UTC1","BOX ",idtmed[1308-1],parCOL,0); - gMC->Gsvolu("UTC3","BOX ",idtmed[1308-1],parCOL,0); + TVirtualMC::GetMC()->Gsvolu("UTC1","BOX ",idtmed[1308-1],parCOL,0); + TVirtualMC::GetMC()->Gsvolu("UTC3","BOX ",idtmed[1308-1],parCOL,0); parCOL[0] = kCOLwid/2.0 - kCOLthk; parCOL[1] = -1.0; parCOL[2] = kCOLhgt/2.0 - kCOLthk; - gMC->Gsvolu("UTC2","BOX ",idtmed[1314-1],parCOL,kNparCOL); - gMC->Gsvolu("UTC4","BOX ",idtmed[1314-1],parCOL,kNparCOL); + TVirtualMC::GetMC()->Gsvolu("UTC2","BOX ",idtmed[1314-1],parCOL,kNparCOL); + TVirtualMC::GetMC()->Gsvolu("UTC4","BOX ",idtmed[1314-1],parCOL,kNparCOL); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTC2",1,"UTC1", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTC4",1,"UTC3", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTC2",1,"UTC1", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTC4",1,"UTC3", xpos,ypos,zpos,0,"ONLY"); for (ilayer = 1; ilayer < kNlayer; ilayer++) { @@ -1744,17 +1744,17 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parCOL[0] = kCOLwid /2.0; parCOL[1] = fgkSlength/2.0; parCOL[2] = kCOLhgt /2.0; - gMC->Gsposp("UTC1",ilayer ,"UTI1", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",ilayer ,"UTI1", xpos,ypos,zpos ,matrix[0],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC1",ilayer+ kNlayer,"UTI1",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",ilayer+ kNlayer,"UTI1",-xpos,ypos,zpos ,matrix[1],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC1",ilayer+6*kNlayer,"UTI2", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",ilayer+6*kNlayer,"UTI2", xpos,ypos,zpos ,matrix[0],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC1",ilayer+7*kNlayer,"UTI2",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",ilayer+7*kNlayer,"UTI2",-xpos,ypos,zpos ,matrix[1],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC1",ilayer+8*kNlayer ,"UTI3", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",ilayer+8*kNlayer ,"UTI3", xpos,ypos,zpos ,matrix[0],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC1",ilayer+9*kNlayer,"UTI3",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",ilayer+9*kNlayer,"UTI3",-xpos,ypos,zpos ,matrix[1],"ONLY",parCOL,kNparCOL); // Front of supermodules @@ -1766,13 +1766,13 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parCOL[0] = kCOLwid /2.0; parCOL[1] = fgkFlength/2.0; parCOL[2] = kCOLhgt /2.0; - gMC->Gsposp("UTC3",ilayer+2*kNlayer,"UTF1", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",ilayer+2*kNlayer,"UTF1", xpos,ypos,zpos ,matrix[0],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC3",ilayer+3*kNlayer,"UTF1",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",ilayer+3*kNlayer,"UTF1",-xpos,ypos,zpos ,matrix[1],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC3",ilayer+4*kNlayer,"UTF2", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",ilayer+4*kNlayer,"UTF2", xpos,ypos,zpos ,matrix[0],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC3",ilayer+5*kNlayer,"UTF2",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",ilayer+5*kNlayer,"UTF2",-xpos,ypos,zpos ,matrix[1],"ONLY",parCOL,kNparCOL); } @@ -1788,9 +1788,9 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parCOL[0] = kCOLwid/2.0; parCOL[1] = kBBSdz /2.0; parCOL[2] = kCOLhgt/2.0; - gMC->Gsposp("UTC3",ilayer+6*kNlayer,"BBTRD", xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTC3",ilayer+6*kNlayer,"BBTRD", xpos, ypos, zpos ,matrix[0],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC3",ilayer+7*kNlayer,"BBTRD",-xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTC3",ilayer+7*kNlayer,"BBTRD",-xpos, ypos, zpos ,matrix[1],"ONLY",parCOL,kNparCOL); } @@ -1806,9 +1806,9 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parCOL[0] = kCOLwid/2.0; parCOL[1] = kBFSdz /2.0; parCOL[2] = kCOLhgt/2.0; - gMC->Gsposp("UTC3",ilayer+6*kNlayer,"BFTRD", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",ilayer+6*kNlayer,"BFTRD", xpos,ypos,zpos ,matrix[0],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC3",ilayer+7*kNlayer,"BFTRD",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",ilayer+7*kNlayer,"BFTRD",-xpos,ypos,zpos ,matrix[1],"ONLY",parCOL,kNparCOL); } @@ -1821,17 +1821,17 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parCOL[0] = kCOLwid /2.0; parCOL[1] = fgkSlength/2.0; parCOL[2] = kCOLhgt /2.0; - gMC->Gsposp("UTC1",6 ,"UTI1", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",6 ,"UTI1", xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC1",6+ kNlayer,"UTI1",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",6+ kNlayer,"UTI1",-xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC1",6+6*kNlayer,"UTI2", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",6+6*kNlayer,"UTI2", xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC1",6+7*kNlayer,"UTI2",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",6+7*kNlayer,"UTI2",-xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC1",6+8*kNlayer,"UTI3", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",6+8*kNlayer,"UTI3", xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC1",6+9*kNlayer,"UTI3",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC1",6+9*kNlayer,"UTI3",-xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); // Front of supermodules xpos = fgkCwidth[5]/2.0 - kCOLhgt/2.0 - 1.3; @@ -1840,13 +1840,13 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parCOL[0] = kCOLwid /2.0; parCOL[1] = fgkFlength/2.0; parCOL[2] = kCOLhgt /2.0; - gMC->Gsposp("UTC3",6+2*kNlayer,"UTF1", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",6+2*kNlayer,"UTF1", xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC3",6+3*kNlayer,"UTF1",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",6+3*kNlayer,"UTF1",-xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC3",6+4*kNlayer,"UTF2", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",6+4*kNlayer,"UTF2", xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC3",6+5*kNlayer,"UTF2",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",6+5*kNlayer,"UTF2",-xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); // In baby frame xpos = fgkCwidth[5]/2.0 - kCOLhgt/2.0 - 3.1; @@ -1855,9 +1855,9 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parCOL[0] = kCOLwid/2.0; parCOL[1] = kBBSdz /2.0; parCOL[2] = kCOLhgt/2.0; - gMC->Gsposp("UTC3",6+6*kNlayer,"BBTRD", xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTC3",6+6*kNlayer,"BBTRD", xpos, ypos, zpos ,matrix[3],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC3",6+7*kNlayer,"BBTRD",-xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTC3",6+7*kNlayer,"BBTRD",-xpos, ypos, zpos ,matrix[3],"ONLY",parCOL,kNparCOL); // In back frame xpos = fgkCwidth[5]/2.0 - kCOLhgt/2.0 - 1.3; @@ -1866,9 +1866,9 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parCOL[0] = kCOLwid/2.0; parCOL[1] = kBFSdz /2.0; parCOL[2] = kCOLhgt/2.0; - gMC->Gsposp("UTC3",6+6*kNlayer,"BFTRD", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",6+6*kNlayer,"BFTRD", xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); - gMC->Gsposp("UTC3",6+7*kNlayer,"BFTRD",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTC3",6+7*kNlayer,"BFTRD",-xpos,ypos,zpos ,matrix[3],"ONLY",parCOL,kNparCOL); // @@ -1887,8 +1887,8 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parPWR[0] = 0.0; parPWR[1] = 0.0; parPWR[2] = 0.0; - gMC->Gsvolu("UTP1","BOX ",idtmed[1325-1],parPWR,0); - gMC->Gsvolu("UTP3","BOX ",idtmed[1325-1],parPWR,0); + TVirtualMC::GetMC()->Gsvolu("UTP1","BOX ",idtmed[1325-1],parPWR,0); + TVirtualMC::GetMC()->Gsvolu("UTP3","BOX ",idtmed[1325-1],parPWR,0); for (ilayer = 1; ilayer < kNlayer; ilayer++) { @@ -1901,17 +1901,17 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parPWR[0] = kPWRwid /2.0; parPWR[1] = fgkSlength/2.0; parPWR[2] = kPWRhgtA /2.0; - gMC->Gsposp("UTP1",ilayer ,"UTI1", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",ilayer ,"UTI1", xpos,ypos,zpos ,matrix[0],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP1",ilayer+ kNlayer,"UTI1",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",ilayer+ kNlayer,"UTI1",-xpos,ypos,zpos ,matrix[1],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP1",ilayer+6*kNlayer,"UTI2", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",ilayer+6*kNlayer,"UTI2", xpos,ypos,zpos ,matrix[0],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP1",ilayer+7*kNlayer,"UTI2",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",ilayer+7*kNlayer,"UTI2",-xpos,ypos,zpos ,matrix[1],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP1",ilayer+8*kNlayer,"UTI3", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",ilayer+8*kNlayer,"UTI3", xpos,ypos,zpos ,matrix[0],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP1",ilayer+9*kNlayer,"UTI3",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",ilayer+9*kNlayer,"UTI3",-xpos,ypos,zpos ,matrix[1],"ONLY",parPWR,kNparPWR); // Front of supermodule @@ -1923,13 +1923,13 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parPWR[0] = kPWRwid /2.0; parPWR[1] = fgkFlength/2.0; parPWR[2] = kPWRhgtA /2.0; - gMC->Gsposp("UTP3",ilayer+2*kNlayer,"UTF1", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",ilayer+2*kNlayer,"UTF1", xpos,ypos,zpos ,matrix[0],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP3",ilayer+3*kNlayer,"UTF1",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",ilayer+3*kNlayer,"UTF1",-xpos,ypos,zpos ,matrix[1],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP3",ilayer+4*kNlayer,"UTF2", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",ilayer+4*kNlayer,"UTF2", xpos,ypos,zpos ,matrix[0],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP3",ilayer+5*kNlayer,"UTF2",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",ilayer+5*kNlayer,"UTF2",-xpos,ypos,zpos ,matrix[1],"ONLY",parPWR,kNparPWR); } @@ -1945,9 +1945,9 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parPWR[0] = kPWRwid /2.0; parPWR[1] = kBBSdz /2.0; parPWR[2] = kPWRhgtB/2.0; - gMC->Gsposp("UTP3",ilayer+6*kNlayer,"BBTRD", xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTP3",ilayer+6*kNlayer,"BBTRD", xpos, ypos, zpos ,matrix[0],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP3",ilayer+7*kNlayer,"BBTRD",-xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTP3",ilayer+7*kNlayer,"BBTRD",-xpos, ypos, zpos ,matrix[1],"ONLY",parPWR,kNparPWR); } @@ -1963,9 +1963,9 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parPWR[0] = kPWRwid /2.0; parPWR[1] = kBFSdz /2.0; parPWR[2] = kPWRhgtB/2.0; - gMC->Gsposp("UTP3",ilayer+8*kNlayer,"BFTRD", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",ilayer+8*kNlayer,"BFTRD", xpos,ypos,zpos ,matrix[0],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP3",ilayer+9*kNlayer,"BFTRD",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",ilayer+9*kNlayer,"BFTRD",-xpos,ypos,zpos ,matrix[1],"ONLY",parPWR,kNparPWR); } @@ -1978,17 +1978,17 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parPWR[0] = kPWRwid /2.0; parPWR[1] = fgkSlength/2.0; parPWR[2] = kPWRhgtB /2.0 ; - gMC->Gsposp("UTP1",6 ,"UTI1", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",6 ,"UTI1", xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP1",6+ kNlayer,"UTI1",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",6+ kNlayer,"UTI1",-xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP1",6+6*kNlayer,"UTI2", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",6+6*kNlayer,"UTI2", xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP1",6+7*kNlayer,"UTI2",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",6+7*kNlayer,"UTI2",-xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP1",6+8*kNlayer,"UTI3", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",6+8*kNlayer,"UTI3", xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP1",6+9*kNlayer,"UTI3",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP1",6+9*kNlayer,"UTI3",-xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); // Front of supermodules xpos = fgkCwidth[5]/2.0 + kPWRhgtB/2.0 - 1.3; @@ -1997,13 +1997,13 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parPWR[0] = kPWRwid /2.0; parPWR[1] = fgkFlength/2.0; parPWR[2] = kPWRhgtB /2.0; - gMC->Gsposp("UTP3",6+2*kNlayer,"UTF1", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",6+2*kNlayer,"UTF1", xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP3",6+3*kNlayer,"UTF1",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",6+3*kNlayer,"UTF1",-xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP3",6+4*kNlayer,"UTF2", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",6+4*kNlayer,"UTF2", xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP3",6+5*kNlayer,"UTF2",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",6+5*kNlayer,"UTF2",-xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); // In baby frame xpos = fgkCwidth[5]/2.0 + kPWRhgtB/2.0 - 3.0; @@ -2012,9 +2012,9 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parPWR[0] = kPWRwid /2.0; parPWR[1] = kBBSdz /2.0; parPWR[2] = kPWRhgtB/2.0; - gMC->Gsposp("UTP3",6+6*kNlayer,"BBTRD", xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTP3",6+6*kNlayer,"BBTRD", xpos, ypos, zpos ,matrix[3],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP3",6+7*kNlayer,"BBTRD",-xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTP3",6+7*kNlayer,"BBTRD",-xpos, ypos, zpos ,matrix[3],"ONLY",parPWR,kNparPWR); // In back frame xpos = fgkCwidth[5]/2.0 + kPWRhgtB/2.0 - 1.3; @@ -2023,9 +2023,9 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parPWR[0] = kPWRwid /2.0; parPWR[1] = kBFSdz /2.0; parPWR[2] = kPWRhgtB/2.0; - gMC->Gsposp("UTP3",6+8*kNlayer,"BFTRD", xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",6+8*kNlayer,"BFTRD", xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); - gMC->Gsposp("UTP3",6+9*kNlayer,"BFTRD",-xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTP3",6+9*kNlayer,"BFTRD",-xpos,ypos,zpos ,matrix[3],"ONLY",parPWR,kNparPWR); // @@ -2036,22 +2036,22 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parTube[0] = 0.0; parTube[1] = 2.2/2.0; parTube[2] = fgkClength[5][2]/2.0 - fgkHspace/2.0; - gMC->Gsvolu("UTG1","TUBE",idtmed[1308-1],parTube,kNparTube); + TVirtualMC::GetMC()->Gsvolu("UTG1","TUBE",idtmed[1308-1],parTube,kNparTube); parTube[0] = 0.0; parTube[1] = 2.1/2.0; parTube[2] = fgkClength[5][2]/2.0 - fgkHspace/2.0; - gMC->Gsvolu("UTG2","TUBE",idtmed[1309-1],parTube,kNparTube); + TVirtualMC::GetMC()->Gsvolu("UTG2","TUBE",idtmed[1309-1],parTube,kNparTube); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTG2",1,"UTG1",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTG2",1,"UTG1",xpos,ypos,zpos,0,"ONLY"); for (ilayer = 0; ilayer < kNlayer; ilayer++) { xpos = fgkCwidth[ilayer]/2.0 + kCOLwid/2.0 - 1.5; ypos = 0.0; zpos = fgkVrocsm + fgkSMpltT + kCOLhgt/2.0 - fgkSheight/2.0 + 5.0 + ilayer * (fgkCH + fgkVspace); - gMC->Gspos("UTG1",1+ilayer,"UTI3", xpos, ypos, zpos,matrix[4],"ONLY"); - gMC->Gspos("UTG1",7+ilayer,"UTI3",-xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTG1",1+ilayer,"UTI3", xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTG1",7+ilayer,"UTI3",-xpos, ypos, zpos,matrix[4],"ONLY"); } // @@ -2070,7 +2070,7 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parServ[0] = fgkCwidth[ilayer] /2.0; parServ[1] = fgkClength[ilayer][istack]/2.0 - fgkHspace/2.0; parServ[2] = fgkCsvH /2.0; - gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ); + TVirtualMC::GetMC()->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ); } } @@ -2083,17 +2083,17 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parTube[0] = 0.0; parTube[1] = 0.0; parTube[2] = 0.0; - gMC->Gsvolu("UTCP","TUBE",idtmed[1324-1],parTube,0); + TVirtualMC::GetMC()->Gsvolu("UTCP","TUBE",idtmed[1324-1],parTube,0); // The cooling water parTube[0] = 0.0; parTube[1] = 0.2/2.0; parTube[2] = -1.0; - gMC->Gsvolu("UTCH","TUBE",idtmed[1314-1],parTube,kNparTube); + TVirtualMC::GetMC()->Gsvolu("UTCH","TUBE",idtmed[1314-1],parTube,kNparTube); // Water inside the cooling pipe xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTCH",1,"UTCP",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCH",1,"UTCP",xpos,ypos,zpos,0,"ONLY"); // Position the cooling pipes in the mother volume for (istack = 0; istack < kNstack; istack++) { @@ -2113,7 +2113,7 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parTube[0] = 0.0; parTube[1] = 0.3/2.0; // Thickness of the cooling pipes parTube[2] = fgkCwidth[ilayer]/2.0; - gMC->Gsposp("UTCP",iCopy+iMCMrow,cTagV,xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTCP",iCopy+iMCMrow,cTagV,xpos,ypos,zpos ,matrix[2],"ONLY",parTube,kNparTube); } } @@ -2127,7 +2127,7 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parTube[0] = 0.0; parTube[1] = 0.0; parTube[2] = 0.0; - gMC->Gsvolu("UTPL","TUBE",idtmed[1305-1],parTube,0); + TVirtualMC::GetMC()->Gsvolu("UTPL","TUBE",idtmed[1305-1],parTube,0); // Position the power lines in the mother volume for (istack = 0; istack < kNstack; istack++) { @@ -2146,7 +2146,7 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parTube[0] = 0.0; parTube[1] = 0.2/2.0; // Thickness of the power lines parTube[2] = fgkCwidth[ilayer]/2.0; - gMC->Gsposp("UTPL",iCopy+iMCMrow,cTagV,xpos,ypos,zpos + TVirtualMC::GetMC()->Gsposp("UTPL",iCopy+iMCMrow,cTagV,xpos,ypos,zpos ,matrix[2],"ONLY",parTube,kNparTube); } } @@ -2171,40 +2171,40 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parMCM[0] = kMCMx /2.0; parMCM[1] = kMCMy /2.0; parMCM[2] = kMCMz /2.0; - gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parMCM,kNparMCM); + TVirtualMC::GetMC()->Gsvolu("UMCM","BOX",idtmed[1302-1],parMCM,kNparMCM); // The MCM carrier G10 layer parMCM[0] = kMCMx /2.0; parMCM[1] = kMCMy /2.0; parMCM[2] = kMCMpcTh/2.0; - gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parMCM,kNparMCM); + TVirtualMC::GetMC()->Gsvolu("UMC1","BOX",idtmed[1319-1],parMCM,kNparMCM); // The MCM carrier Cu layer parMCM[0] = kMCMx /2.0; parMCM[1] = kMCMy /2.0; parMCM[2] = kMCMcuTh/2.0; - gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parMCM,kNparMCM); + TVirtualMC::GetMC()->Gsvolu("UMC2","BOX",idtmed[1318-1],parMCM,kNparMCM); // The silicon of the chips parMCM[0] = kMCMx /2.0; parMCM[1] = kMCMy /2.0; parMCM[2] = kMCMsiTh/2.0; - gMC->Gsvolu("UMC3","BOX",idtmed[1320-1],parMCM,kNparMCM); + TVirtualMC::GetMC()->Gsvolu("UMC3","BOX",idtmed[1320-1],parMCM,kNparMCM); // The aluminum of the cooling plates parMCM[0] = kMCMx /2.0; parMCM[1] = kMCMy /2.0; parMCM[2] = kMCMcoTh/2.0; - gMC->Gsvolu("UMC4","BOX",idtmed[1324-1],parMCM,kNparMCM); + TVirtualMC::GetMC()->Gsvolu("UMC4","BOX",idtmed[1324-1],parMCM,kNparMCM); // Put the MCM material inside the MCM mother volume xpos = 0.0; ypos = 0.0; zpos = -kMCMz /2.0 + kMCMpcTh/2.0; - gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); zpos += kMCMpcTh/2.0 + kMCMcuTh/2.0; - gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); zpos += kMCMcuTh/2.0 + kMCMsiTh/2.0; - gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); zpos += kMCMsiTh/2.0 + kMCMcoTh/2.0; - gMC->Gspos("UMC4",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UMC4",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); // Position the MCMs in the mother volume for (istack = 0; istack < kNstack; istack++) { @@ -2226,7 +2226,7 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) ypos = (0.5 + iMCMrow) * ySize + 1.0 - fgkClength[ilayer][istack]/2.0 + fgkHspace/2.0; zpos = -0.4 + 0.742/2.0; - gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV + TVirtualMC::GetMC()->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV ,xpos,ypos,zpos,0,"ONLY"); // Add two additional smaller cooling pipes on top of the MCMs // to mimic the meandering structure @@ -2238,10 +2238,10 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parTube[0] = 0.0; parTube[1] = 0.3/2.0; // Thickness of the cooling pipes parTube[2] = kMCMx/2.0; - gMC->Gsposp("UTCP",iCopy+iMCMrow*10+iMCMcol+ 50,cTagV + TVirtualMC::GetMC()->Gsposp("UTCP",iCopy+iMCMrow*10+iMCMcol+ 50,cTagV ,xpos,ypos+1.0,zpos ,matrix[2],"ONLY",parTube,kNparTube); - gMC->Gsposp("UTCP",iCopy+iMCMrow*10+iMCMcol+500,cTagV + TVirtualMC::GetMC()->Gsposp("UTCP",iCopy+iMCMrow*10+iMCMcol+500,cTagV ,xpos,ypos+2.0,zpos ,matrix[2],"ONLY",parTube,kNparTube); @@ -2269,33 +2269,33 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parDCS[0] = kDCSx /2.0; parDCS[1] = kDCSy /2.0; parDCS[2] = kDCSz /2.0; - gMC->Gsvolu("UDCS","BOX",idtmed[1302-1],parDCS,kNparDCS); + TVirtualMC::GetMC()->Gsvolu("UDCS","BOX",idtmed[1302-1],parDCS,kNparDCS); // The DCS carrier G10 layer parDCS[0] = kDCSx /2.0; parDCS[1] = kDCSy /2.0; parDCS[2] = kDCSpcTh/2.0; - gMC->Gsvolu("UDC1","BOX",idtmed[1319-1],parDCS,kNparDCS); + TVirtualMC::GetMC()->Gsvolu("UDC1","BOX",idtmed[1319-1],parDCS,kNparDCS); // The DCS carrier Cu layer parDCS[0] = kDCSx /2.0; parDCS[1] = kDCSy /2.0; parDCS[2] = kDCScuTh/2.0; - gMC->Gsvolu("UDC2","BOX",idtmed[1318-1],parDCS,kNparDCS); + TVirtualMC::GetMC()->Gsvolu("UDC2","BOX",idtmed[1318-1],parDCS,kNparDCS); // The aluminum of the cooling plates parDCS[0] = 5.0 /2.0; parDCS[1] = 5.0 /2.0; parDCS[2] = kDCScoTh/2.0; - gMC->Gsvolu("UDC3","BOX",idtmed[1324-1],parDCS,kNparDCS); + TVirtualMC::GetMC()->Gsvolu("UDC3","BOX",idtmed[1324-1],parDCS,kNparDCS); // Put the DCS material inside the DCS mother volume xpos = 0.0; ypos = 0.0; zpos = -kDCSz /2.0 + kDCSpcTh/2.0; - gMC->Gspos("UDC1",1,"UDCS",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UDC1",1,"UDCS",xpos,ypos,zpos,0,"ONLY"); zpos += kDCSpcTh/2.0 + kDCScuTh/2.0; - gMC->Gspos("UDC2",1,"UDCS",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UDC2",1,"UDCS",xpos,ypos,zpos,0,"ONLY"); zpos += kDCScuTh/2.0 + kDCScoTh/2.0; - gMC->Gspos("UDC3",1,"UDCS",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UDC3",1,"UDCS",xpos,ypos,zpos,0,"ONLY"); // Put the DCS board in the chamber services mother volume for (istack = 0; istack < kNstack; istack++) { @@ -2307,7 +2307,7 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) ypos = 0.05 * fgkClength[ilayer][istack]; zpos = kDCSz/2.0 - fgkCsvH/2.0; snprintf(cTagV,kTag,"UU%02d",iDet); - gMC->Gspos("UDCS",iCopy,cTagV,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UDCS",iCopy,cTagV,xpos,ypos,zpos,0,"ONLY"); } } @@ -2329,33 +2329,33 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parORI[0] = kORIx /2.0; parORI[1] = kORIy /2.0; parORI[2] = kORIz /2.0; - gMC->Gsvolu("UORI","BOX",idtmed[1302-1],parORI,kNparORI); + TVirtualMC::GetMC()->Gsvolu("UORI","BOX",idtmed[1302-1],parORI,kNparORI); // The ORI carrier G10 layer parORI[0] = kORIx /2.0; parORI[1] = kORIy /2.0; parORI[2] = kORIpcTh/2.0; - gMC->Gsvolu("UOR1","BOX",idtmed[1319-1],parORI,kNparORI); + TVirtualMC::GetMC()->Gsvolu("UOR1","BOX",idtmed[1319-1],parORI,kNparORI); // The ORI carrier Cu layer parORI[0] = kORIx /2.0; parORI[1] = kORIy /2.0; parORI[2] = kORIcuTh/2.0; - gMC->Gsvolu("UOR2","BOX",idtmed[1318-1],parORI,kNparORI); + TVirtualMC::GetMC()->Gsvolu("UOR2","BOX",idtmed[1318-1],parORI,kNparORI); // The aluminum of the cooling plates parORI[0] = kORIx /2.0; parORI[1] = kORIy /2.0; parORI[2] = kORIcoTh/2.0; - gMC->Gsvolu("UOR3","BOX",idtmed[1324-1],parORI,kNparORI); + TVirtualMC::GetMC()->Gsvolu("UOR3","BOX",idtmed[1324-1],parORI,kNparORI); // Put the ORI material inside the ORI mother volume xpos = 0.0; ypos = 0.0; zpos = -kORIz /2.0 + kORIpcTh/2.0; - gMC->Gspos("UOR1",1,"UORI",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UOR1",1,"UORI",xpos,ypos,zpos,0,"ONLY"); zpos += kORIpcTh/2.0 + kORIcuTh/2.0; - gMC->Gspos("UOR2",1,"UORI",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UOR2",1,"UORI",xpos,ypos,zpos,0,"ONLY"); zpos += kORIcuTh/2.0 + kORIcoTh/2.0; - gMC->Gspos("UOR3",1,"UORI",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UOR3",1,"UORI",xpos,ypos,zpos,0,"ONLY"); // Put the ORI board in the chamber services mother volume for (istack = 0; istack < kNstack; istack++) { @@ -2367,13 +2367,13 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) ypos = -16.0; zpos = kORIz/2.0 - fgkCsvH/2.0; snprintf(cTagV,kTag,"UU%02d",iDet); - gMC->Gspos("UORI",iCopy ,cTagV,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UORI",iCopy ,cTagV,xpos,ypos,zpos,0,"ONLY"); xpos = -fgkCwidth[ilayer]/2.0 + 3.8 * (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW) / ((Float_t) GetRowMax(ilayer,istack,0)); ypos = -16.0; zpos = kORIz/2.0 - fgkCsvH/2.0; snprintf(cTagV,kTag,"UU%02d",iDet); - gMC->Gspos("UORI",iCopy+kNdet,cTagV,xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UORI",iCopy+kNdet,cTagV,xpos,ypos,zpos,0,"ONLY"); } } @@ -2385,16 +2385,16 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parTube[0] = 0.0; parTube[1] = 0.0; parTube[2] = 0.0; - gMC->Gsvolu("UTG3","TUBE",idtmed[1308-1],parTube,0); + TVirtualMC::GetMC()->Gsvolu("UTG3","TUBE",idtmed[1308-1],parTube,0); // The gas inside the in-/outlet pipes (Xe) parTube[0] = 0.0; parTube[1] = 1.2/2.0; parTube[2] = -1.0; - gMC->Gsvolu("UTG4","TUBE",idtmed[1309-1],parTube,kNparTube); + TVirtualMC::GetMC()->Gsvolu("UTG4","TUBE",idtmed[1309-1],parTube,kNparTube); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTG4",1,"UTG3",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTG4",1,"UTG3",xpos,ypos,zpos,0,"ONLY"); for (ilayer = 0; ilayer < kNlayer-1; ilayer++) { xpos = 0.0; ypos = fgkClength[ilayer][2]/2.0 @@ -2405,17 +2405,17 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parTube[0] = 0.0; parTube[1] = 1.5/2.0; parTube[2] = fgkCwidth[ilayer]/2.0 - 2.5; - gMC->Gsposp("UTG3",ilayer+1 ,"UTI1", xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTG3",ilayer+1 ,"UTI1", xpos, ypos, zpos ,matrix[2],"ONLY",parTube,kNparTube); - gMC->Gsposp("UTG3",ilayer+1+1*kNlayer,"UTI1", xpos,-ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTG3",ilayer+1+1*kNlayer,"UTI1", xpos,-ypos, zpos ,matrix[2],"ONLY",parTube,kNparTube); - gMC->Gsposp("UTG3",ilayer+1+2*kNlayer,"UTI2", xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTG3",ilayer+1+2*kNlayer,"UTI2", xpos, ypos, zpos ,matrix[2],"ONLY",parTube,kNparTube); - gMC->Gsposp("UTG3",ilayer+1+3*kNlayer,"UTI2", xpos,-ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTG3",ilayer+1+3*kNlayer,"UTI2", xpos,-ypos, zpos ,matrix[2],"ONLY",parTube,kNparTube); - gMC->Gsposp("UTG3",ilayer+1+4*kNlayer,"UTI3", xpos, ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTG3",ilayer+1+4*kNlayer,"UTI3", xpos, ypos, zpos ,matrix[2],"ONLY",parTube,kNparTube); - gMC->Gsposp("UTG3",ilayer+1+5*kNlayer,"UTI3", xpos,-ypos, zpos + TVirtualMC::GetMC()->Gsposp("UTG3",ilayer+1+5*kNlayer,"UTI3", xpos,-ypos, zpos ,matrix[2],"ONLY",parTube,kNparTube); } @@ -2423,129 +2423,129 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parBox[0] = 14.50/2.0; parBox[1] = 4.52/2.0; parBox[2] = 5.00/2.0; - gMC->Gsvolu("UTGD","BOX ",idtmed[1308-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTGD","BOX ",idtmed[1308-1],parBox,kNparBox); parBox[0] = 14.50/2.0; parBox[1] = 4.00/2.0; parBox[2] = 4.40/2.0; - gMC->Gsvolu("UTGI","BOX ",idtmed[1309-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTGI","BOX ",idtmed[1309-1],parBox,kNparBox); parTube[0] = 0.0; parTube[1] = 4.0/2.0; parTube[2] = 8.0/2.0; - gMC->Gsvolu("UTGT","TUBE",idtmed[1308-1],parTube,kNparTube); + TVirtualMC::GetMC()->Gsvolu("UTGT","TUBE",idtmed[1308-1],parTube,kNparTube); parTube[0] = 0.0; parTube[1] = 3.4/2.0; parTube[2] = 8.0/2.0; - gMC->Gsvolu("UTGG","TUBE",idtmed[1309-1],parTube,kNparTube); + TVirtualMC::GetMC()->Gsvolu("UTGG","TUBE",idtmed[1309-1],parTube,kNparTube); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTGI",1,"UTGD",xpos,ypos,zpos, 0,"ONLY"); - gMC->Gspos("UTGG",1,"UTGT",xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTGI",1,"UTGD",xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTGG",1,"UTGT",xpos,ypos,zpos, 0,"ONLY"); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTGD",1,"UTF1",xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTGD",1,"UTF1",xpos,ypos,zpos, 0,"ONLY"); xpos = -3.0; ypos = 0.0; zpos = 6.5; - gMC->Gspos("UTGT",1,"UTF1",xpos,ypos,zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTGT",1,"UTF1",xpos,ypos,zpos, 0,"ONLY"); xpos = -11.25; ypos = 0.0; zpos = 0.5; - gMC->Gspos("UTGT",3,"UTF1",xpos,ypos,zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTGT",3,"UTF1",xpos,ypos,zpos,matrix[2],"ONLY"); xpos = 11.25; ypos = 0.0; zpos = 0.5; - gMC->Gspos("UTGT",5,"UTF1",xpos,ypos,zpos,matrix[2],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTGT",5,"UTF1",xpos,ypos,zpos,matrix[2],"ONLY"); // Cooling manifolds parBox[0] = 5.0/2.0; parBox[1] = 23.0/2.0; parBox[2] = 70.0/2.0; - gMC->Gsvolu("UTCM","BOX ",idtmed[1302-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTCM","BOX ",idtmed[1302-1],parBox,kNparBox); parBox[0] = 5.0/2.0; parBox[1] = 5.0/2.0; parBox[2] = 70.0/2.0; - gMC->Gsvolu("UTCA","BOX ",idtmed[1308-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTCA","BOX ",idtmed[1308-1],parBox,kNparBox); parBox[0] = 5.0/2.0 - 0.3; parBox[1] = 5.0/2.0 - 0.3; parBox[2] = 70.0/2.0 - 0.3; - gMC->Gsvolu("UTCW","BOX ",idtmed[1314-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTCW","BOX ",idtmed[1314-1],parBox,kNparBox); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTCW",1,"UTCA", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCW",1,"UTCA", xpos, ypos, zpos, 0,"ONLY"); xpos = 0.0; ypos = 5.0/2.0 - 23.0/2.0; zpos = 0.0; - gMC->Gspos("UTCA",1,"UTCM", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCA",1,"UTCM", xpos, ypos, zpos, 0,"ONLY"); parTube[0] = 0.0; parTube[1] = 3.0/2.0; parTube[2] = 18.0/2.0; - gMC->Gsvolu("UTCO","TUBE",idtmed[1308-1],parTube,kNparTube); + TVirtualMC::GetMC()->Gsvolu("UTCO","TUBE",idtmed[1308-1],parTube,kNparTube); parTube[0] = 0.0; parTube[1] = 3.0/2.0 - 0.3; parTube[2] = 18.0/2.0; - gMC->Gsvolu("UTCL","TUBE",idtmed[1314-1],parTube,kNparTube); + TVirtualMC::GetMC()->Gsvolu("UTCL","TUBE",idtmed[1314-1],parTube,kNparTube); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTCL",1,"UTCO", xpos, ypos, zpos, 0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCL",1,"UTCO", xpos, ypos, zpos, 0,"ONLY"); xpos = 0.0; ypos = 2.5; zpos = -70.0/2.0 + 7.0; - gMC->Gspos("UTCO",1,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCO",1,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); zpos += 7.0; - gMC->Gspos("UTCO",2,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCO",2,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); zpos += 7.0; - gMC->Gspos("UTCO",3,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCO",3,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); zpos += 7.0; - gMC->Gspos("UTCO",4,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCO",4,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); zpos += 7.0; - gMC->Gspos("UTCO",5,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCO",5,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); zpos += 7.0; - gMC->Gspos("UTCO",6,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCO",6,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); zpos += 7.0; - gMC->Gspos("UTCO",7,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCO",7,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); zpos += 7.0; - gMC->Gspos("UTCO",8,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCO",8,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); xpos = 40.0; ypos = fgkFlength/2.0 - 23.0/2.0; zpos = 0.0; - gMC->Gspos("UTCM",1,"UTF1", xpos, ypos, zpos,matrix[0],"ONLY"); - gMC->Gspos("UTCM",2,"UTF1",-xpos, ypos, zpos,matrix[1],"ONLY"); - gMC->Gspos("UTCM",3,"UTF2", xpos,-ypos, zpos,matrix[5],"ONLY"); - gMC->Gspos("UTCM",4,"UTF2",-xpos,-ypos, zpos,matrix[6],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCM",1,"UTF1", xpos, ypos, zpos,matrix[0],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCM",2,"UTF1",-xpos, ypos, zpos,matrix[1],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCM",3,"UTF2", xpos,-ypos, zpos,matrix[5],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTCM",4,"UTF2",-xpos,-ypos, zpos,matrix[6],"ONLY"); // Power connection boards (Cu) parBox[0] = 0.5/2.0; parBox[1] = 15.0/2.0; parBox[2] = 7.0/2.0; - gMC->Gsvolu("UTPC","BOX ",idtmed[1325-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTPC","BOX ",idtmed[1325-1],parBox,kNparBox); for (ilayer = 0; ilayer < kNlayer-1; ilayer++) { xpos = fgkCwidth[ilayer]/2.0 + kPWRwid/2.0; ypos = 0.0; zpos = fgkVrocsm + fgkSMpltT + kPWRhgtA/2.0 - fgkSheight/2.0 + kPWRposz + (ilayer+1) * (fgkCH + fgkVspace); - gMC->Gspos("UTPC",ilayer ,"UTF1", xpos,ypos,zpos,matrix[0],"ONLY"); - gMC->Gspos("UTPC",ilayer+kNlayer,"UTF1",-xpos,ypos,zpos,matrix[1],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTPC",ilayer ,"UTF1", xpos,ypos,zpos,matrix[0],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTPC",ilayer+kNlayer,"UTF1",-xpos,ypos,zpos,matrix[1],"ONLY"); } xpos = fgkCwidth[5]/2.0 + kPWRhgtA/2.0 - 2.0; ypos = 0.0; zpos = fgkSheight/2.0 - fgkSMpltT - 2.0; - gMC->Gspos("UTPC",5 ,"UTF1", xpos,ypos,zpos,matrix[3],"ONLY"); - gMC->Gspos("UTPC",5+kNlayer,"UTF1",-xpos,ypos,zpos,matrix[3],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTPC",5 ,"UTF1", xpos,ypos,zpos,matrix[3],"ONLY"); + TVirtualMC::GetMC()->Gspos("UTPC",5+kNlayer,"UTF1",-xpos,ypos,zpos,matrix[3],"ONLY"); // Power connection panel (Al) parBox[0] = 60.0/2.0; parBox[1] = 10.0/2.0; parBox[2] = 3.0/2.0; - gMC->Gsvolu("UTPP","BOX ",idtmed[1301-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTPP","BOX ",idtmed[1301-1],parBox,kNparBox); xpos = 0.0; ypos = 0.0; zpos = 18.0; - gMC->Gspos("UTPP",1,"UTF1", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTPP",1,"UTF1", xpos,ypos,zpos,0,"ONLY"); // // Electronics boxes @@ -2555,68 +2555,68 @@ void AliTRDgeometry::CreateServices(Int_t *idtmed) parBox[0] = 60.0/2.0; parBox[1] = 10.0/2.0; parBox[2] = 6.0/2.0; - gMC->Gsvolu("UTE1","BOX ",idtmed[1308-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTE1","BOX ",idtmed[1308-1],parBox,kNparBox); // Interior (air) parBox[0] = parBox[0] - 0.5; parBox[1] = parBox[1] - 0.5; parBox[2] = parBox[2] - 0.5; - gMC->Gsvolu("UTE2","BOX ",idtmed[1302-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTE2","BOX ",idtmed[1302-1],parBox,kNparBox); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTE2",1,"UTE1",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE2",1,"UTE1",xpos,ypos,zpos,0,"ONLY"); xpos = 0.0; ypos = fgkSlength/2.0 - 10.0/2.0 - 3.0; zpos = -fgkSheight/2.0 + 6.0/2.0 + 1.0; - gMC->Gspos("UTE1",1,"UTI1", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTE1",2,"UTI2", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTE1",3,"UTI3", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE1",1,"UTI1", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE1",2,"UTI2", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE1",3,"UTI3", xpos,ypos,zpos,0,"ONLY"); // Casing (INOX) parBox[0] = 50.0/2.0; parBox[1] = 15.0/2.0; parBox[2] = 20.0/2.0; - gMC->Gsvolu("UTE3","BOX ",idtmed[1308-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTE3","BOX ",idtmed[1308-1],parBox,kNparBox); // Interior (air) parBox[0] = parBox[0] - 0.5; parBox[1] = parBox[1] - 0.5; parBox[2] = parBox[2] - 0.5; - gMC->Gsvolu("UTE4","BOX ",idtmed[1302-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTE4","BOX ",idtmed[1302-1],parBox,kNparBox); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTE4",1,"UTE3",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE4",1,"UTE3",xpos,ypos,zpos,0,"ONLY"); xpos = 0.0; ypos = -fgkSlength/2.0 + 15.0/2.0 + 3.0; zpos = -fgkSheight/2.0 + 20.0/2.0 + 1.0; - gMC->Gspos("UTE3",1,"UTI1", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTE3",2,"UTI2", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTE3",3,"UTI3", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE3",1,"UTI1", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE3",2,"UTI2", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE3",3,"UTI3", xpos,ypos,zpos,0,"ONLY"); // Casing (INOX) parBox[0] = 20.0/2.0; parBox[1] = 7.0/2.0; parBox[2] = 20.0/2.0; - gMC->Gsvolu("UTE5","BOX ",idtmed[1308-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTE5","BOX ",idtmed[1308-1],parBox,kNparBox); // Interior (air) parBox[0] = parBox[0] - 0.5; parBox[1] = parBox[1] - 0.5; parBox[2] = parBox[2] - 0.5; - gMC->Gsvolu("UTE6","BOX ",idtmed[1302-1],parBox,kNparBox); + TVirtualMC::GetMC()->Gsvolu("UTE6","BOX ",idtmed[1302-1],parBox,kNparBox); xpos = 0.0; ypos = 0.0; zpos = 0.0; - gMC->Gspos("UTE6",1,"UTE5",xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE6",1,"UTE5",xpos,ypos,zpos,0,"ONLY"); xpos = 20.0; ypos = -fgkSlength/2.0 + 7.0/2.0 + 3.0; zpos = 0.0; - gMC->Gspos("UTE5",1,"UTI1", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTE5",2,"UTI2", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTE5",3,"UTI3", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE5",1,"UTI1", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE5",2,"UTI2", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE5",3,"UTI3", xpos,ypos,zpos,0,"ONLY"); xpos = -xpos; - gMC->Gspos("UTE5",4,"UTI1", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTE5",5,"UTI2", xpos,ypos,zpos,0,"ONLY"); - gMC->Gspos("UTE5",6,"UTI3", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE5",4,"UTI1", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE5",5,"UTI2", xpos,ypos,zpos,0,"ONLY"); + TVirtualMC::GetMC()->Gspos("UTE5",6,"UTI3", xpos,ypos,zpos,0,"ONLY"); } diff --git a/TRD/AliTRDsimTR.cxx b/TRD/AliTRDsimTR.cxx index 8a5726ce80b..24bea907edb 100644 --- a/TRD/AliTRDsimTR.cxx +++ b/TRD/AliTRDsimTR.cxx @@ -463,10 +463,10 @@ Int_t AliTRDsimTR::TrPhotons(Float_t p, Float_t mass Int_t nPhCand = gRandom->Poisson(nTr); // Link the MC stack and get info about parent electron - TVirtualMCStack *stack = gMC->GetStack(); + TVirtualMCStack *stack = TVirtualMC::GetMC()->GetStack(); Int_t track = stack->GetCurrentTrackNumber(); Double_t px, py, pz, ptot; - gMC->TrackMomentum(px,py,pz,ptot); + TVirtualMC::GetMC()->TrackMomentum(px,py,pz,ptot); ptot = TMath::Sqrt(px*px+py*py+pz*pz); px /= ptot; py /= ptot; @@ -476,8 +476,8 @@ Int_t AliTRDsimTR::TrPhotons(Float_t p, Float_t mass Double_t x; Double_t y; Double_t z; - gMC->TrackPosition(x,y,z); - Double_t t = gMC->TrackTime(); + TVirtualMC::GetMC()->TrackPosition(x,y,z); + Double_t t = TVirtualMC::GetMC()->TrackTime(); // Counter for TR analysed in custom code (e < 15keV) nPhoton = 0; diff --git a/TRD/AliTRDv1.cxx b/TRD/AliTRDv1.cxx index 3669e67034a..91b34dcd75d 100644 --- a/TRD/AliTRDv1.cxx +++ b/TRD/AliTRDv1.cxx @@ -266,7 +266,7 @@ void AliTRDv1::CreateTRhit(Int_t det) Int_t nTR; // Create TR photons - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackMomentum(mom); Float_t pTot = mom.Rho(); fTR->CreatePhotons(11,pTot,nTR,eTR); if (nTR > kNTR) { @@ -323,7 +323,7 @@ void AliTRDv1::CreateTRhit(Int_t det) // The position of the absorbtion Float_t posHit[3]; - gMC->TrackPosition(pos); + TVirtualMC::GetMC()->TrackPosition(pos); posHit[0] = pos[0] + mom[0] / pTot * absLength; posHit[1] = pos[1] + mom[1] / pTot * absLength; posHit[2] = pos[2] + mom[2] / pTot * absLength; @@ -337,7 +337,7 @@ void AliTRDv1::CreateTRhit(Int_t det) ,det ,posHit ,-q - ,gMC->TrackTime()*1.0e06 + ,TVirtualMC::GetMC()->TrackTime()*1.0e06 ,kTRUE); } @@ -415,16 +415,16 @@ void AliTRDv1::StepManager() // Set the maximum step size to a very large number for all // neutral particles and those outside the driftvolume - if (!fPrimaryIonisation) gMC->SetMaxStep(kBig); + if (!fPrimaryIonisation) TVirtualMC::GetMC()->SetMaxStep(kBig); // If not charged track or already stopped or disappeared, just return. - if ((!gMC->TrackCharge()) || - gMC->IsTrackDisappeared()) { + if ((!TVirtualMC::GetMC()->TrackCharge()) || + TVirtualMC::GetMC()->IsTrackDisappeared()) { return; } // Inside a sensitive volume? - cIdCurrent = gMC->CurrentVolName(); + cIdCurrent = TVirtualMC::GetMC()->CurrentVolName(); if (cIdSensDr == cIdCurrent[1]) { drRegion = kTRUE; @@ -439,7 +439,7 @@ void AliTRDv1::StepManager() } // The hit coordinates and charge - gMC->TrackPosition(pos); + TVirtualMC::GetMC()->TrackPosition(pos); hits[0] = pos[0]; hits[1] = pos[1]; hits[2] = pos[2]; @@ -465,11 +465,11 @@ void AliTRDv1::StepManager() // Special hits only in the drift region if ((drRegion) && - (gMC->IsTrackEntering())) { + (TVirtualMC::GetMC()->IsTrackEntering())) { // Create a track reference at the entrance of each // chamber that contains the momentum components of the particle - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackMomentum(mom); AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kTRD); trkStat = 1; @@ -477,17 +477,17 @@ void AliTRDv1::StepManager() // entering the drift volume if ((fTR) && (fTRon) && - (TMath::Abs(gMC->TrackPid()) == kPdgElectron)) { + (TMath::Abs(TVirtualMC::GetMC()->TrackPid()) == kPdgElectron)) { CreateTRhit(det); } } else if ((amRegion) && - (gMC->IsTrackExiting())) { + (TVirtualMC::GetMC()->IsTrackExiting())) { // Create a track reference at the exit of each // chamber that contains the momentum components of the particle - gMC->TrackMomentum(mom); + TVirtualMC::GetMC()->TrackMomentum(mom); AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kTRD); trkStat = 2; @@ -495,7 +495,7 @@ void AliTRDv1::StepManager() // Calculate the charge according to GEANT Edep // Create a new dEdx hit - eDep = TMath::Max(gMC->Edep(),0.0) * 1.0e+09; + eDep = TMath::Max(TVirtualMC::GetMC()->Edep(),0.0) * 1.0e+09; qTot = (Int_t) (eDep / fWion); if ((qTot) || (trkStat)) { @@ -503,15 +503,15 @@ void AliTRDv1::StepManager() ,det ,hits ,qTot - ,gMC->TrackTime()*1.0e06 + ,TVirtualMC::GetMC()->TrackTime()*1.0e06 ,drRegion); } // Set Maximum Step Size // Produce only one hit if Ekin is below cutoff - if ((gMC->Etot() - gMC->TrackMass()) < kEkinMinStep) { + if ((TVirtualMC::GetMC()->Etot() - TVirtualMC::GetMC()->TrackMass()) < kEkinMinStep) { return; } - if (!fPrimaryIonisation) gMC->SetMaxStep(fStepSize); + if (!fPrimaryIonisation) TVirtualMC::GetMC()->SetMaxStep(fStepSize); } diff --git a/VZERO/AliVZEROv7.cxx b/VZERO/AliVZEROv7.cxx index d1c637ff288..f8d3a62722d 100644 --- a/VZERO/AliVZEROv7.cxx +++ b/VZERO/AliVZEROv7.cxx @@ -2936,147 +2936,147 @@ void AliVZEROv7::StepManager() numStep += 1; // We keep only charged tracks : - if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return; + if ( !TVirtualMC::GetMC()->TrackCharge() || !TVirtualMC::GetMC()->IsTrackAlive() ) return; - vol[0] = gMC->CurrentVolOffID(1, vol[1]); - vol[2] = gMC->CurrentVolID(copy); + vol[0] = TVirtualMC::GetMC()->CurrentVolOffID(1, vol[1]); + vol[2] = TVirtualMC::GetMC()->CurrentVolID(copy); vol[3] = copy; - static Int_t idV0R1 = gMC->VolId("V0R1"); - - static Int_t idV0L11 = gMC->VolId("V0L1Sec1"); - static Int_t idV0L12 = gMC->VolId("V0L1Sec2"); - static Int_t idV0L13 = gMC->VolId("V0L1Sec3"); - static Int_t idV0L14 = gMC->VolId("V0L1Sec4"); - static Int_t idV0L15 = gMC->VolId("V0L15"); - static Int_t idV0L16 = gMC->VolId("V0L16"); - static Int_t idV0L17 = gMC->VolId("V0L17"); - static Int_t idV0L18 = gMC->VolId("V0L18"); - static Int_t idV0R2 = gMC->VolId("V0R2"); - - static Int_t idV0L21 = gMC->VolId("V0L2Sec1"); - static Int_t idV0L22 = gMC->VolId("V0L2Sec2"); - static Int_t idV0L23 = gMC->VolId("V0L2Sec3"); - static Int_t idV0L24 = gMC->VolId("V0L2Sec4"); - static Int_t idV0L25 = gMC->VolId("V0L25"); - static Int_t idV0L26 = gMC->VolId("V0L26"); - static Int_t idV0L27 = gMC->VolId("V0L27"); - static Int_t idV0L28 = gMC->VolId("V0L28"); - static Int_t idV0R3 = gMC->VolId("V0R3"); - - static Int_t idV0L31 = gMC->VolId("V0L3Sec1"); - static Int_t idV0L32 = gMC->VolId("V0L3Sec2"); - static Int_t idV0L33 = gMC->VolId("V0L3Sec3"); - static Int_t idV0L34 = gMC->VolId("V0L3Sec4"); - static Int_t idV0L35 = gMC->VolId("V0L35"); - static Int_t idV0L36 = gMC->VolId("V0L36"); - static Int_t idV0L37 = gMC->VolId("V0L37"); - static Int_t idV0L38 = gMC->VolId("V0L38"); - static Int_t idV0R4 = gMC->VolId("V0R4"); - - static Int_t idV0L41 = gMC->VolId("V0L4Sec1"); - static Int_t idV0L42 = gMC->VolId("V0L4Sec2"); - static Int_t idV0L43 = gMC->VolId("V0L4Sec3"); - static Int_t idV0L44 = gMC->VolId("V0L4Sec4"); - static Int_t idV0L45 = gMC->VolId("V0L45"); - static Int_t idV0L46 = gMC->VolId("V0L46"); - static Int_t idV0L47 = gMC->VolId("V0L47"); - static Int_t idV0L48 = gMC->VolId("V0L48"); - static Int_t idV0R5 = gMC->VolId("V0R5"); - static Int_t idV0R6 = gMC->VolId("V0R6"); + static Int_t idV0R1 = TVirtualMC::GetMC()->VolId("V0R1"); + + static Int_t idV0L11 = TVirtualMC::GetMC()->VolId("V0L1Sec1"); + static Int_t idV0L12 = TVirtualMC::GetMC()->VolId("V0L1Sec2"); + static Int_t idV0L13 = TVirtualMC::GetMC()->VolId("V0L1Sec3"); + static Int_t idV0L14 = TVirtualMC::GetMC()->VolId("V0L1Sec4"); + static Int_t idV0L15 = TVirtualMC::GetMC()->VolId("V0L15"); + static Int_t idV0L16 = TVirtualMC::GetMC()->VolId("V0L16"); + static Int_t idV0L17 = TVirtualMC::GetMC()->VolId("V0L17"); + static Int_t idV0L18 = TVirtualMC::GetMC()->VolId("V0L18"); + static Int_t idV0R2 = TVirtualMC::GetMC()->VolId("V0R2"); + + static Int_t idV0L21 = TVirtualMC::GetMC()->VolId("V0L2Sec1"); + static Int_t idV0L22 = TVirtualMC::GetMC()->VolId("V0L2Sec2"); + static Int_t idV0L23 = TVirtualMC::GetMC()->VolId("V0L2Sec3"); + static Int_t idV0L24 = TVirtualMC::GetMC()->VolId("V0L2Sec4"); + static Int_t idV0L25 = TVirtualMC::GetMC()->VolId("V0L25"); + static Int_t idV0L26 = TVirtualMC::GetMC()->VolId("V0L26"); + static Int_t idV0L27 = TVirtualMC::GetMC()->VolId("V0L27"); + static Int_t idV0L28 = TVirtualMC::GetMC()->VolId("V0L28"); + static Int_t idV0R3 = TVirtualMC::GetMC()->VolId("V0R3"); + + static Int_t idV0L31 = TVirtualMC::GetMC()->VolId("V0L3Sec1"); + static Int_t idV0L32 = TVirtualMC::GetMC()->VolId("V0L3Sec2"); + static Int_t idV0L33 = TVirtualMC::GetMC()->VolId("V0L3Sec3"); + static Int_t idV0L34 = TVirtualMC::GetMC()->VolId("V0L3Sec4"); + static Int_t idV0L35 = TVirtualMC::GetMC()->VolId("V0L35"); + static Int_t idV0L36 = TVirtualMC::GetMC()->VolId("V0L36"); + static Int_t idV0L37 = TVirtualMC::GetMC()->VolId("V0L37"); + static Int_t idV0L38 = TVirtualMC::GetMC()->VolId("V0L38"); + static Int_t idV0R4 = TVirtualMC::GetMC()->VolId("V0R4"); + + static Int_t idV0L41 = TVirtualMC::GetMC()->VolId("V0L4Sec1"); + static Int_t idV0L42 = TVirtualMC::GetMC()->VolId("V0L4Sec2"); + static Int_t idV0L43 = TVirtualMC::GetMC()->VolId("V0L4Sec3"); + static Int_t idV0L44 = TVirtualMC::GetMC()->VolId("V0L4Sec4"); + static Int_t idV0L45 = TVirtualMC::GetMC()->VolId("V0L45"); + static Int_t idV0L46 = TVirtualMC::GetMC()->VolId("V0L46"); + static Int_t idV0L47 = TVirtualMC::GetMC()->VolId("V0L47"); + static Int_t idV0L48 = TVirtualMC::GetMC()->VolId("V0L48"); + static Int_t idV0R5 = TVirtualMC::GetMC()->VolId("V0R5"); + static Int_t idV0R6 = TVirtualMC::GetMC()->VolId("V0R6"); bool hitOnV0C = true; double lightYield; double lightAttenuation; double nMeters; double fibToPhot; - if ( gMC->CurrentVolID(copy) == idV0R1 || - gMC->CurrentVolID(copy) == idV0L11 || - gMC->CurrentVolID(copy) == idV0L12 || - gMC->CurrentVolID(copy) == idV0L13 || - gMC->CurrentVolID(copy) == idV0L14 || - gMC->CurrentVolID(copy) == idV0L15 || - gMC->CurrentVolID(copy) == idV0L16 || - gMC->CurrentVolID(copy) == idV0L17 || - gMC->CurrentVolID(copy) == idV0L18 + if ( TVirtualMC::GetMC()->CurrentVolID(copy) == idV0R1 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L11 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L12 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L13 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L14 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L15 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L16 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L17 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L18 ) ringNumber = 1; - else if ( gMC->CurrentVolID(copy) == idV0R2 || - gMC->CurrentVolID(copy) == idV0L21 || - gMC->CurrentVolID(copy) == idV0L22 || - gMC->CurrentVolID(copy) == idV0L23 || - gMC->CurrentVolID(copy) == idV0L24 || - gMC->CurrentVolID(copy) == idV0L25 || - gMC->CurrentVolID(copy) == idV0L26 || - gMC->CurrentVolID(copy) == idV0L27 || - gMC->CurrentVolID(copy) == idV0L28 + else if ( TVirtualMC::GetMC()->CurrentVolID(copy) == idV0R2 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L21 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L22 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L23 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L24 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L25 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L26 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L27 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L28 ) ringNumber = 2; - else if ( gMC->CurrentVolID(copy) == idV0R3 || - gMC->CurrentVolID(copy) == idV0R4 || - gMC->CurrentVolID(copy) == idV0L31 || - gMC->CurrentVolID(copy) == idV0L32 || - gMC->CurrentVolID(copy) == idV0L33 || - gMC->CurrentVolID(copy) == idV0L34 || - gMC->CurrentVolID(copy) == idV0L35 || - gMC->CurrentVolID(copy) == idV0L36 || - gMC->CurrentVolID(copy) == idV0L37 || - gMC->CurrentVolID(copy) == idV0L38 + else if ( TVirtualMC::GetMC()->CurrentVolID(copy) == idV0R3 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0R4 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L31 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L32 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L33 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L34 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L35 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L36 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L37 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L38 ) ringNumber = 3; - else if ( gMC->CurrentVolID(copy) == idV0R5 || - gMC->CurrentVolID(copy) == idV0R6 || - gMC->CurrentVolID(copy) == idV0L41 || - gMC->CurrentVolID(copy) == idV0L42 || - gMC->CurrentVolID(copy) == idV0L43 || - gMC->CurrentVolID(copy) == idV0L44 || - gMC->CurrentVolID(copy) == idV0L45 || - gMC->CurrentVolID(copy) == idV0L46 || - gMC->CurrentVolID(copy) == idV0L47 || - gMC->CurrentVolID(copy) == idV0L48 + else if ( TVirtualMC::GetMC()->CurrentVolID(copy) == idV0R5 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0R6 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L41 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L42 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L43 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L44 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L45 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L46 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L47 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L48 ) ringNumber = 4; else ringNumber = 0; if (ringNumber) { if ( - gMC->CurrentVolID(copy) == idV0L11 || - gMC->CurrentVolID(copy) == idV0L12 || - gMC->CurrentVolID(copy) == idV0L13 || - gMC->CurrentVolID(copy) == idV0L14 || - gMC->CurrentVolID(copy) == idV0L15 || - gMC->CurrentVolID(copy) == idV0L16 || - gMC->CurrentVolID(copy) == idV0L17 || - gMC->CurrentVolID(copy) == idV0L18 || - gMC->CurrentVolID(copy) == idV0L21 || - gMC->CurrentVolID(copy) == idV0L22 || - gMC->CurrentVolID(copy) == idV0L23 || - gMC->CurrentVolID(copy) == idV0L24 || - gMC->CurrentVolID(copy) == idV0L25 || - gMC->CurrentVolID(copy) == idV0L26 || - gMC->CurrentVolID(copy) == idV0L27 || - gMC->CurrentVolID(copy) == idV0L28 || - gMC->CurrentVolID(copy) == idV0L31 || - gMC->CurrentVolID(copy) == idV0L32 || - gMC->CurrentVolID(copy) == idV0L33 || - gMC->CurrentVolID(copy) == idV0L34 || - gMC->CurrentVolID(copy) == idV0L35 || - gMC->CurrentVolID(copy) == idV0L36 || - gMC->CurrentVolID(copy) == idV0L37 || - gMC->CurrentVolID(copy) == idV0L38 || - gMC->CurrentVolID(copy) == idV0L41 || - gMC->CurrentVolID(copy) == idV0L42 || - gMC->CurrentVolID(copy) == idV0L43 || - gMC->CurrentVolID(copy) == idV0L44 || - gMC->CurrentVolID(copy) == idV0L45 || - gMC->CurrentVolID(copy) == idV0L46 || - gMC->CurrentVolID(copy) == idV0L47 || - gMC->CurrentVolID(copy) == idV0L48 + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L11 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L12 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L13 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L14 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L15 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L16 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L17 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L18 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L21 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L22 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L23 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L24 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L25 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L26 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L27 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L28 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L31 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L32 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L33 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L34 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L35 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L36 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L37 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L38 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L41 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L42 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L43 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L44 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L45 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L46 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L47 || + TVirtualMC::GetMC()->CurrentVolID(copy) == idV0L48 ) hitOnV0C = false; - destep = gMC->Edep(); - step = gMC->TrackStep(); + destep = TVirtualMC::GetMC()->Edep(); + step = TVirtualMC::GetMC()->TrackStep(); if (hitOnV0C) { lightYield = fV0CLightYield; lightAttenuation = fV0CLightAttenuation; @@ -3092,19 +3092,19 @@ void AliVZEROv7::StepManager() nPhotonsInStep = gRandom->Poisson(nPhotonsInStep); eloss += destep; tlength += step; - if ( gMC->IsTrackEntering() ) { + if ( TVirtualMC::GetMC()->IsTrackEntering() ) { nPhotons = nPhotonsInStep; - gMC->TrackPosition(fTrackPosition); - gMC->TrackMomentum(fTrackMomentum); + TVirtualMC::GetMC()->TrackPosition(fTrackPosition); + TVirtualMC::GetMC()->TrackMomentum(fTrackMomentum); Float_t pt = TMath::Sqrt( fTrackMomentum.Px() * fTrackMomentum.Px() + fTrackMomentum.Py() * fTrackMomentum.Py() ); TParticle *par = gAlice->GetMCApp()->Particle(gAlice->GetMCApp()->GetCurrentTrackNumber()); hits[0] = fTrackPosition.X(); hits[1] = fTrackPosition.Y(); hits[2] = fTrackPosition.Z(); - hits[3] = Float_t (gMC->TrackPid()); - hits[4] = gMC->TrackTime(); - hits[5] = gMC->TrackCharge(); + hits[3] = Float_t (TVirtualMC::GetMC()->TrackPid()); + hits[4] = TVirtualMC::GetMC()->TrackTime(); + hits[5] = TVirtualMC::GetMC()->TrackCharge(); hits[6] = fTrackMomentum.Theta()*TMath::RadToDeg(); hits[7] = fTrackMomentum.Phi()*TMath::RadToDeg(); hits[8] = ringNumber; @@ -3131,7 +3131,7 @@ void AliVZEROv7::StepManager() ////////////////////////// } nPhotons = nPhotons + nPhotonsInStep; - if( gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared()){ + if( TVirtualMC::GetMC()->IsTrackExiting() || TVirtualMC::GetMC()->IsTrackStop() || TVirtualMC::GetMC()->IsTrackDisappeared()){ nPhotons = nPhotons - Int_t((Float_t(nPhotons) * lightAttenuation * nMeters)); nPhotons = nPhotons - Int_t( Float_t(nPhotons) * fibToPhot); hits[17] = eloss; @@ -3145,7 +3145,7 @@ void AliVZEROv7::StepManager() nPhotonsInStep = 0; numStep = 0; } - if( gMC->IsTrackEntering() || gMC->IsTrackExiting() ) { + if( TVirtualMC::GetMC()->IsTrackEntering() || TVirtualMC::GetMC()->IsTrackExiting() ) { AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kVZERO); } } @@ -3202,56 +3202,56 @@ Int_t AliVZEROv7::GetCellId(Int_t *vol, Float_t *hits) if(ringNumber < 3) { index = (index - 7) + ( ( ringNumber - 1 ) * 8); } else if (ringNumber >= 3) { - if ( gMC->CurrentVolID(vol[1]) == gMC->VolId("V0R3") || gMC->CurrentVolID(vol[1]) - == gMC->VolId("V0R5") ) index = (index*2-14)+((ringNumber-2)*16); - if ( gMC->CurrentVolID(vol[1]) == gMC->VolId("V0R4") || gMC->CurrentVolID(vol[1]) - == gMC->VolId("V0R6") ) index = (index*2-13)+((ringNumber-2)*16); + if ( TVirtualMC::GetMC()->CurrentVolID(vol[1]) == TVirtualMC::GetMC()->VolId("V0R3") || TVirtualMC::GetMC()->CurrentVolID(vol[1]) + == TVirtualMC::GetMC()->VolId("V0R5") ) index = (index*2-14)+((ringNumber-2)*16); + if ( TVirtualMC::GetMC()->CurrentVolID(vol[1]) == TVirtualMC::GetMC()->VolId("V0R4") || TVirtualMC::GetMC()->CurrentVolID(vol[1]) + == TVirtualMC::GetMC()->VolId("V0R6") ) index = (index*2-13)+((ringNumber-2)*16); } fCellId = index; } else if (hits[2] > 0.0) { // cout << " vol[0] = " << vol[0] << " copy : " << vol[1] - // << " called " << gMC->VolName(vol[0]) << endl; + // << " called " << TVirtualMC::GetMC()->VolName(vol[0]) << endl; // cout << " vol[2] = " << vol[2] << " copy : " << vol[3] - // << " called " << gMC->VolName(vol[2]) << endl; + // << " called " << TVirtualMC::GetMC()->VolName(vol[2]) << endl; // upper half - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L1Sec1")) fCellId = 47 + 1; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L1Sec2")) fCellId = 47 + 2; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L1Sec3")) fCellId = 47 + 3; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L1Sec4")) fCellId = 47 + 4; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L1Sec1")) fCellId = 47 + 1; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L1Sec2")) fCellId = 47 + 2; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L1Sec3")) fCellId = 47 + 3; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L1Sec4")) fCellId = 47 + 4; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L2Sec1")) fCellId = 47 + 9; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L2Sec2")) fCellId = 47 + 10; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L2Sec3")) fCellId = 47 + 11; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L2Sec4")) fCellId = 47 + 12; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L2Sec1")) fCellId = 47 + 9; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L2Sec2")) fCellId = 47 + 10; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L2Sec3")) fCellId = 47 + 11; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L2Sec4")) fCellId = 47 + 12; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L3Sec1")) fCellId = 47 + 17; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L3Sec2")) fCellId = 47 + 18; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L3Sec3")) fCellId = 47 + 19; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L3Sec4")) fCellId = 47 + 20; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L3Sec1")) fCellId = 47 + 17; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L3Sec2")) fCellId = 47 + 18; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L3Sec3")) fCellId = 47 + 19; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L3Sec4")) fCellId = 47 + 20; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L4Sec1")) fCellId = 47 + 25; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L4Sec2")) fCellId = 47 + 26; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L4Sec3")) fCellId = 47 + 27; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L4Sec4")) fCellId = 47 + 28; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L4Sec1")) fCellId = 47 + 25; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L4Sec2")) fCellId = 47 + 26; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L4Sec3")) fCellId = 47 + 27; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L4Sec4")) fCellId = 47 + 28; // lower half - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L15")) fCellId = 48+4; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L16")) fCellId = 48+5; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L17")) fCellId = 48+6; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L18")) fCellId = 48+7; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L25")) fCellId = 8+48+4; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L26")) fCellId = 8+48+5; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L27")) fCellId = 8+48+6; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L28")) fCellId = 8+48+7; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L35")) fCellId = 16+48+4; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L36")) fCellId = 16+48+5; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L37")) fCellId = 16+48+6; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L38")) fCellId = 16+48+7; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L45")) fCellId = 24+48+4; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L46")) fCellId = 24+48+5; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L47")) fCellId = 24+48+6; - if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L48")) fCellId = 24+48+7; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L15")) fCellId = 48+4; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L16")) fCellId = 48+5; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L17")) fCellId = 48+6; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L18")) fCellId = 48+7; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L25")) fCellId = 8+48+4; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L26")) fCellId = 8+48+5; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L27")) fCellId = 8+48+6; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L28")) fCellId = 8+48+7; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L35")) fCellId = 16+48+4; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L36")) fCellId = 16+48+5; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L37")) fCellId = 16+48+6; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L38")) fCellId = 16+48+7; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L45")) fCellId = 24+48+4; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L46")) fCellId = 24+48+5; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L47")) fCellId = 24+48+6; + if (TVirtualMC::GetMC()->CurrentVolID(vol[2]) == TVirtualMC::GetMC()->VolId("V0L48")) fCellId = 24+48+7; } return fCellId; diff --git a/ZDC/AliZDCv3.cxx b/ZDC/AliZDCv3.cxx index 949d02b6af9..9bbf91622e8 100644 --- a/ZDC/AliZDCv3.cxx +++ b/ZDC/AliZDCv3.cxx @@ -241,8 +241,8 @@ void AliZDCv3::CreateBeamLine() //-- rotation matrices for the legs Int_t irotpipe1, irotpipe2; - gMC->Matrix(irotpipe1,90.-1.0027,0.,90.,90.,1.0027,180.); - gMC->Matrix(irotpipe2,90.+1.0027,0.,90.,90.,1.0027,0.); + TVirtualMC::GetMC()->Matrix(irotpipe1,90.-1.0027,0.,90.,90.,1.0027,180.); + TVirtualMC::GetMC()->Matrix(irotpipe2,90.+1.0027,0.,90.,90.,1.0027,0.); // Int_t *idtmed = fIdtmed->GetArray(); @@ -266,8 +266,8 @@ void AliZDCv3::CreateBeamLine() conpar[6] = -zd1; conpar[7] = 0.; conpar[8] = 55.; - gMC->Gsvolu("ZDCC", "PCON", idtmed[10], conpar, 9); - gMC->Gspos("ZDCC", 1, "ALIC", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("ZDCC", "PCON", idtmed[10], conpar, 9); + TVirtualMC::GetMC()->Gspos("ZDCC", 1, "ALIC", 0., 0., 0., 0, "ONLY"); // -- BEAM PIPE from compensator dipole to the beginning of D1) @@ -275,8 +275,8 @@ void AliZDCv3::CreateBeamLine() tubpar[1] = 6.7/2.; // From beginning of ZDC volumes to beginning of D1 tubpar[2] = (5838.3-zd1)/2.; - gMC->Gsvolu("QT01", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT01", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT01 TUBE pipe from z = %1.2f to z= %1.2f (D1 beg.)\n",-zd1,-2*tubpar[2]-zd1); @@ -290,8 +290,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 6.94/2.; tubpar[1] = 7.34/2.; tubpar[2] = (6909.8-zd1)/2.; - gMC->Gsvolu("QT02", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT02", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT02", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT02", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT02 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -300,8 +300,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 9./2.; tubpar[1] = 9.6/2.; tubpar[2] = (7022.8-zd1)/2.; - gMC->Gsvolu("QT03", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT03", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT03", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT03", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT03 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -312,8 +312,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 18.6/2.; conpar[3] = 9./2.; conpar[4] = 9.6/2.; - gMC->Gsvolu("QC01", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC01", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC01", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC01", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC01 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1); @@ -329,7 +329,7 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 18.6/2.; tubpar[1] = 7.6/2.; tubpar[2] = totLength1/2.; -// gMC->Gsvolu("QE01", "ELTU", idtmed[7], tubpar, 3); +// TVirtualMC::GetMC()->Gsvolu("QE01", "ELTU", idtmed[7], tubpar, 3); // temporary replace with a scaled tube (AG) TGeoTube *tubeQE01 = new TGeoTube(0.,tubpar[0],tubpar[2]); TGeoScale *scaleQE01 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.); @@ -339,15 +339,15 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 18.0/2.; tubpar[1] = 7.0/2.; tubpar[2] = totLength1/2.; -// gMC->Gsvolu("QE02", "ELTU", idtmed[10], tubpar, 3); +// TVirtualMC::GetMC()->Gsvolu("QE02", "ELTU", idtmed[10], tubpar, 3); // temporary replace with a scaled tube (AG) TGeoTube *tubeQE02 = new TGeoTube(0.,tubpar[0],tubpar[2]); TGeoScale *scaleQE02 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.); TGeoScaledShape *sshapeQE02 = new TGeoScaledShape(tubeQE02, scaleQE02); new TGeoVolume("QE02", sshapeQE02, gGeoManager->GetMedium(idtmed[10])); - gMC->Gspos("QE01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); - gMC->Gspos("QE02", 1, "QE01", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QE01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QE02", 1, "QE01", 0., 0., 0., 0, "ONLY"); // Ch.debug //printf(" QE01 ELTU from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -359,9 +359,9 @@ void AliZDCv3::CreateBeamLine() boxpar[2] = 124.4/2.; printf(" AliZDCv3 -> sideC VCollimator jaws: apertures +%1.2f/-%1.2f center %1.2f [cm]\n", fVCollSideCAperture, fVCollSideCApertureNeg,fVCollSideCCentreY); - gMC->Gsvolu("QCVC" , "BOX ", idtmed[13], boxpar, 3); - gMC->Gspos("QCVC", 1, "QE02", -boxpar[0], fVCollSideCAperture+fVCollSideCCentreY+boxpar[1], -totLength1/2.+160.8+78.+148./2., 0, "ONLY"); - gMC->Gspos("QCVC", 2, "QE02", -boxpar[0], -fVCollSideCApertureNeg+fVCollSideCCentreY-boxpar[1], -totLength1/2.+160.8+78.+148./2., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QCVC" , "BOX ", idtmed[13], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QCVC", 1, "QE02", -boxpar[0], fVCollSideCAperture+fVCollSideCCentreY+boxpar[1], -totLength1/2.+160.8+78.+148./2., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QCVC", 2, "QE02", -boxpar[0], -fVCollSideCApertureNeg+fVCollSideCCentreY-boxpar[1], -totLength1/2.+160.8+78.+148./2., 0, "ONLY"); } zd1 += tubpar[2] * 2.; @@ -372,8 +372,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 21.87/2.; conpar[3] = 18.0/2.; conpar[4] = 18.6/2.; - gMC->Gsvolu("QC02", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC02", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC02", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC02", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC02 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1); @@ -384,8 +384,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 21.2/2.; tubpar[1] = 21.9/2.; tubpar[2] = totLenght2/2.; - gMC->Gsvolu("QT04", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT04", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT04", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT04", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT04 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -398,8 +398,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 81.3/2.; conpar[3] = 21.27/2.; conpar[4] = 21.87/2.; - gMC->Gsvolu("QC03", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC03", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC03", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC03", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC03 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1); @@ -409,8 +409,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 79.7/2.; tubpar[1] = 81.3/2.; tubpar[2] = (5*475.2+97.)/2.; - gMC->Gsvolu("QT05", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT05", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT05", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT05", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT05 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -428,8 +428,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 76.42868/2.; // thickness 8 mm conpar[3] = 79.7/2.; conpar[4] = 81.3/2.; // thickness 8 mm - gMC->Gsvolu("QC04", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC04", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC04", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC04", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC04 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1); @@ -441,8 +441,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 23.79588/2.; // thickness 3 mm conpar[3] = 74.82868/2.; conpar[4] = 75.42868/2.; // thickness 3 mm - gMC->Gsvolu("QC05", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC05", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC05", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC05", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC05 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1); @@ -454,8 +454,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 21.2/2.;// thickness 8 mm conpar[3] = 23.19588/2.; conpar[4] = 24.79588/2.;// thickness 8 mm - gMC->Gsvolu("QC06", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC06", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC06", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC06", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC06 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1); @@ -465,8 +465,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 20.2/2.; tubpar[1] = 20.6/2.; tubpar[2] = 2.15/2.; - gMC->Gsvolu("QT06", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT06", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT06", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT06", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT06 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -477,8 +477,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 24.3/2.; conpar[3] = 20.2/2.; conpar[4] = 20.6/2.; - gMC->Gsvolu("QC07", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC07", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC07", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC07", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC07 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1); @@ -487,8 +487,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 23.9/2.; tubpar[1] = 25.5/2.; tubpar[2] = 17.0/2.; - gMC->Gsvolu("QT07", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT07", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT07", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT07", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT07 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -499,8 +499,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 20.6/2.; conpar[3] = 23.9/2.; conpar[4] = 24.3/2.; - gMC->Gsvolu("QC08", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC08", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC08", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC08", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC08 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1); @@ -509,8 +509,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 20.2/2.; tubpar[1] = 20.6/2.; tubpar[2] = 2.15/2.; - gMC->Gsvolu("QT08", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT08", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT08", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT08", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT08 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -520,8 +520,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 19.6/2.; tubpar[1] = 25.3/2.; tubpar[2] = 4.9/2.; - gMC->Gsvolu("QT09", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT09", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT09", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT09", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT09 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -533,8 +533,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 19.6/2.; tubpar[1] = 20.0/2.; tubpar[2] = 3.9/2.; - gMC->Gsvolu("QT10", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT10", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT10", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT10", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT10 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -546,8 +546,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 22.06/2.; conpar[3] = 19.6/2.; conpar[4] = 20.0/2.; - gMC->Gsvolu("QC09", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC09", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC09", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC09", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC09 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1); @@ -557,8 +557,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 21.66/2.; tubpar[1] = 22.06/2.; tubpar[2] = 28.6/2.; - gMC->Gsvolu("QT11", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT11", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT11", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT11", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT11 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -646,9 +646,9 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 5.4/2.; tubpar[1] = 5.8/2.; tubpar[2] = 40.0/2.; - gMC->Gsvolu("QT12", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT12", 1, "ZDCC", -15.8/2., 0., -tubpar[2]-zd1, 0, "ONLY"); - gMC->Gspos("QT12", 2, "ZDCC", 15.8/2., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT12", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT12", 1, "ZDCC", -15.8/2., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QT12", 2, "ZDCC", 15.8/2., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT12 TUBE from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -660,9 +660,9 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 7.0/2.; conpar[3] = 5.4/2.; conpar[4] = 5.8/2.; - gMC->Gsvolu("QC10", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC10", 1, "ZDCC", -7.9-0.175, 0., -conpar[0]-0.1-zd1, irotpipe1, "ONLY"); - gMC->Gspos("QC10", 2, "ZDCC", 7.9+0.175, 0., -conpar[0]-0.1-zd1, irotpipe2, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC10", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC10", 1, "ZDCC", -7.9-0.175, 0., -conpar[0]-0.1-zd1, irotpipe1, "ONLY"); + TVirtualMC::GetMC()->Gspos("QC10", 2, "ZDCC", 7.9+0.175, 0., -conpar[0]-0.1-zd1, irotpipe2, "ONLY"); //printf(" QC10 CONE from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-0.2-zd1); zd1 += 2.*conpar[0]+0.2; @@ -671,9 +671,9 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 6.3/2.; tubpar[1] = 7.0/2.; tubpar[2] = 639.8/2.; - gMC->Gsvolu("QT13", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT13", 1, "ZDCC", -16.5/2., 0., -tubpar[2]-zd1, 0, "ONLY"); - gMC->Gspos("QT13", 2, "ZDCC", 16.5/2., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT13", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT13", 1, "ZDCC", -16.5/2., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QT13", 2, "ZDCC", 16.5/2., 0., -tubpar[2]-zd1, 0, "ONLY"); //printf(" QT13 TUBE from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); zd1 += 2.*tubpar[2]; @@ -684,8 +684,8 @@ void AliZDCv3::CreateBeamLine() boxpar[0] = 8.0/2.; boxpar[1] = 8.0/2.; boxpar[2] = fLumiLength/2.; - gMC->Gsvolu("QLUC", "BOX ", idtmed[9], boxpar, 3); - gMC->Gspos("QLUC", 1, "ZDCC", 0., 0., fPosZNC[2]+66.+boxpar[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QLUC", "BOX ", idtmed[9], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QLUC", 1, "ZDCC", 0., 0., fPosZNC[2]+66.+boxpar[2], 0, "ONLY"); //printf(" QLUC LUMINOMETER from z = %1.2f to z= %1.2f\n", fPosZNC[2]+66., fPosZNC[2]+66.+2*boxpar[2]); // -- END OF BEAM PIPE VOLUME DEFINITION FOR SIDE C (RB26 SIDE) @@ -700,11 +700,11 @@ void AliZDCv3::CreateBeamLine() // Rotation Matrices definition Int_t irotpipe3, irotpipe4, irotpipe5; //-- rotation matrices for the tilted cone after the TDI to recenter vacuum chamber - gMC->Matrix(irotpipe3,90.-1.8934,0.,90.,90.,1.8934,180.); + TVirtualMC::GetMC()->Matrix(irotpipe3,90.-1.8934,0.,90.,90.,1.8934,180.); //-- rotation matrices for the tilted tube before and after the TDI - gMC->Matrix(irotpipe4,90.-3.8,0.,90.,90.,3.8,180.); + TVirtualMC::GetMC()->Matrix(irotpipe4,90.-3.8,0.,90.,90.,3.8,180.); //-- rotation matrix for the tilted cone after the TDI - gMC->Matrix(irotpipe5,90.+9.8,0.,90.,90.,9.8,0.); + TVirtualMC::GetMC()->Matrix(irotpipe5,90.+9.8,0.,90.,90.,9.8,0.); // -- Mother of the ZDCs (Vacuum PCON) zd2 = 1910.22;// zd2 initial value @@ -718,8 +718,8 @@ void AliZDCv3::CreateBeamLine() conpar[6] = 13500.; conpar[7] = 0.; conpar[8] = 55.; - gMC->Gsvolu("ZDCA", "PCON", idtmed[10], conpar, 9); - gMC->Gspos("ZDCA", 1, "ALIC", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("ZDCA", "PCON", idtmed[10], conpar, 9); + TVirtualMC::GetMC()->Gspos("ZDCA", 1, "ALIC", 0., 0., 0., 0, "ONLY"); // To avoid overlaps 1 micron are left between certain volumes! Double_t dxNoOverlap = 0.0; @@ -729,8 +729,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 6.0/2.; tubpar[1] = 6.4/2.; tubpar[2] = 386.28/2. - dxNoOverlap; - gMC->Gsvolu("QA01", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA01", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA01", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA01", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA01 TUBE centred in %f from z = %1.2f to z= %1.2f (IT begin)\n",tubpar[2]+zd2,zd2,2*tubpar[2]+zd2); @@ -741,8 +741,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 6.3/2.; tubpar[1] = 6.7/2.; tubpar[2] = 3541.8/2. - dxNoOverlap; - gMC->Gsvolu("QA02", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA02", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA02", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA02", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA02 TUBE from z = %1.2f to z= %1.2f (D1 begin)\n",zd2,2*tubpar[2]+zd2); @@ -761,8 +761,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 6.75/2.; tubpar[1] = 7.15/2.; tubpar[2] = (945.0+80.1)/2.; - gMC->Gsvolu("QA03", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA03", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA03", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA03", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA03 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -774,8 +774,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 7.15/2.; conpar[3] = 8.0/2.; conpar[4] = 8.4/2.; - gMC->Gsvolu("QA04", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA04", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA04", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA04", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QA04 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -783,8 +783,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 8.0/2.; tubpar[1] = 8.4/2.; tubpar[2] = (43.9+20.+28.5+28.5)/2.; - gMC->Gsvolu("QA05", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA05", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA05", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA05", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA05 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -796,8 +796,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 8.4/2.; conpar[3] = 9.8/2.; conpar[4] = 10.2/2.; - gMC->Gsvolu("QAV1", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QAV1", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QAV1", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QAV1", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QAV1 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -808,8 +808,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 10.2/2.; conpar[3] = 9.0/2.; conpar[4] = 9.4/2.; - gMC->Gsvolu("QAV2", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QAV2", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QAV2", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QAV2", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QAV2 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -818,8 +818,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 9.0/2.; tubpar[1] = 9.4/2.; tubpar[2] = 31.0/2.; - gMC->Gsvolu("QAV3", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QAV3", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QAV3", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QAV3", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QAV3 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -833,8 +833,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 13.0/2.; conpar[3] = 9.6/2.; conpar[4] = 13.0/2.; - gMC->Gsvolu("Q01T", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("Q01T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q01T", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("Q01T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" Q01T CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -843,8 +843,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 9.6/2.; tubpar[1] = 10.0/2.; tubpar[2] = 1.0/2.; - gMC->Gsvolu("Q02T", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("Q02T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q02T", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q02T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" Q02T TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -856,8 +856,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 10.0/2.; conpar[3] = 13.8/2.; conpar[4] = 14.2/2.; - gMC->Gsvolu("Q03T", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("Q03T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q03T", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("Q03T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" Q03T CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -866,8 +866,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 13.8/2.; tubpar[1] = 14.2/2.; tubpar[2] = 38.6/2.; - gMC->Gsvolu("Q04T", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("Q04T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q04T", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q04T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" Q04T TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -877,8 +877,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 21.0/2.; tubpar[1] = 21.4/2.; tubpar[2] = 100.12/2.; - gMC->Gsvolu("Q05T", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("Q05T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q05T", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q05T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" Q05T TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -888,8 +888,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 13.8/2.; tubpar[1] = 14.2/2.; tubpar[2] = 38.6/2.; - gMC->Gsvolu("Q06T", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("Q06T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q06T", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q06T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" Q06T TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -901,8 +901,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 14.2/2.; conpar[3] = 18.0/2.; conpar[4] = 18.4/2.; - gMC->Gsvolu("Q07T", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("Q07T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q07T", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("Q07T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" Q07T CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -916,7 +916,7 @@ void AliZDCv3::CreateBeamLine() tubspar[2] = 100.0/2.; tubspar[3] = 0.; tubspar[4] = 180.; - gMC->Gsvolu("Q08T", "TUBS", idtmed[7], tubspar, 5); + TVirtualMC::GetMC()->Gsvolu("Q08T", "TUBS", idtmed[7], tubspar, 5); // Ch.debug //printf(" upper part : one single phi segment of a tube (Q08T)\n"); @@ -924,9 +924,9 @@ void AliZDCv3::CreateBeamLine() boxpar[0] = 7.0/2.; boxpar[1] = 2.2/2.; boxpar[2] = 100./2.; - gMC->Gsvolu("Q09T", "BOX ", idtmed[10], boxpar, 3); + TVirtualMC::GetMC()->Gsvolu("Q09T", "BOX ", idtmed[10], boxpar, 3); // positioning vacuum box in the upper section of TCDD - gMC->Gspos("Q09T", 1, "Q08T", 0., 1.1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q09T", 1, "Q08T", 0., 1.1, 0., 0, "ONLY"); // lower section : one single phi segment of a tube tubspar[0] = 0.0/2.; @@ -934,18 +934,18 @@ void AliZDCv3::CreateBeamLine() tubspar[2] = 100.0/2.; tubspar[3] = 180.; tubspar[4] = 360.; - gMC->Gsvolu("Q10T", "TUBS", idtmed[7], tubspar, 5); + TVirtualMC::GetMC()->Gsvolu("Q10T", "TUBS", idtmed[7], tubspar, 5); // rectangular beam pipe inside TCDD lower section (Vacuum) boxpar[0] = 7.0/2.; boxpar[1] = 2.2/2.; boxpar[2] = 100./2.; - gMC->Gsvolu("Q11T", "BOX ", idtmed[10], boxpar, 3); + TVirtualMC::GetMC()->Gsvolu("Q11T", "BOX ", idtmed[10], boxpar, 3); // positioning vacuum box in the lower section of TCDD - gMC->Gspos("Q11T", 1, "Q10T", 0., -1.1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q11T", 1, "Q10T", 0., -1.1, 0., 0, "ONLY"); // positioning TCDD elements in ZDCA, (inside TCDD volume) - gMC->Gspos("Q08T", 1, "ZDCA", 0., fTCDDAperturePos, -100.+zd2, 0, "ONLY"); - gMC->Gspos("Q10T", 1, "ZDCA", 0., -fTCDDApertureNeg, -100.+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q08T", 1, "ZDCA", 0., fTCDDAperturePos, -100.+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q10T", 1, "ZDCA", 0., -fTCDDApertureNeg, -100.+zd2, 0, "ONLY"); printf(" AliZDCv3 -> TCDD apertures +%1.2f/-%1.2f cm\n", fTCDDAperturePos, fTCDDApertureNeg); @@ -953,10 +953,10 @@ void AliZDCv3::CreateBeamLine() boxpar[0] = 0.2/2.; boxpar[1] = 4.0/2.; boxpar[2] = 100./2.; - gMC->Gsvolu("Q12T", "BOX ", idtmed[7], boxpar, 3); + TVirtualMC::GetMC()->Gsvolu("Q12T", "BOX ", idtmed[7], boxpar, 3); // positioning RF screen at both sides of TCDD - gMC->Gspos("Q12T", 1, "ZDCA", tubspar[1]+boxpar[0], 0., -100.+zd2, 0, "ONLY"); - gMC->Gspos("Q12T", 2, "ZDCA", -tubspar[1]-boxpar[0], 0., -100.+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q12T", 1, "ZDCA", tubspar[1]+boxpar[0], 0., -100.+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q12T", 2, "ZDCA", -tubspar[1]-boxpar[0], 0., -100.+zd2, 0, "ONLY"); //---------------------------- TCDD end --------------------------------------- // The following elliptical tube 180 mm x 70 mm @@ -967,7 +967,7 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 18.4/2.; tubpar[1] = 7.4/2.; tubpar[2] = 313.3/2.; -// gMC->Gsvolu("QA06", "ELTU", idtmed[7], tubpar, 3); +// TVirtualMC::GetMC()->Gsvolu("QA06", "ELTU", idtmed[7], tubpar, 3); // temporary replace with a scaled tube (AG) TGeoTube *tubeQA06 = new TGeoTube(0.,tubpar[0],tubpar[2]); TGeoScale *scaleQA06 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.); @@ -978,15 +978,15 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 18.0/2.; tubpar[1] = 7.0/2.; tubpar[2] = 313.3/2.; -// gMC->Gsvolu("QA07", "ELTU", idtmed[10], tubpar, 3); +// TVirtualMC::GetMC()->Gsvolu("QA07", "ELTU", idtmed[10], tubpar, 3); // temporary replace with a scaled tube (AG) TGeoTube *tubeQA07 = new TGeoTube(0.,tubpar[0],tubpar[2]); TGeoScale *scaleQA07 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.); TGeoScaledShape *sshapeQA07 = new TGeoScaledShape(tubeQA07, scaleQA07); new TGeoVolume("QA07", sshapeQA07, gGeoManager->GetMedium(idtmed[10])); //printf(" QA07 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); - gMC->Gspos("QA06", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); - gMC->Gspos("QA07", 1, "QA06", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA06", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA07", 1, "QA06", 0., 0., 0., 0, "ONLY"); // Vertical collimator jaws (defined ONLY if fVCollAperture<3.5!) if(fVCollSideAAperture<3.5){ @@ -994,9 +994,9 @@ void AliZDCv3::CreateBeamLine() boxpar[1] = (3.5-fVCollSideAAperture-fVCollSideACentreY-0.7)/2.; if(boxpar[1]<0.) boxpar[1]=0.; boxpar[2] = 124.4/2.; - gMC->Gsvolu("QCVA" , "BOX ", idtmed[13], boxpar, 3); - gMC->Gspos("QCVA", 1, "QA07", -boxpar[0], fVCollSideAAperture+fVCollSideACentreY+boxpar[1], -313.3/2.+78.+148./2., 0, "ONLY"); - gMC->Gspos("QCVA", 2, "QA07", -boxpar[0], -fVCollSideAApertureNeg+fVCollSideACentreY-boxpar[1], -313.3/2.+78.+148./2., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QCVA" , "BOX ", idtmed[13], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QCVA", 1, "QA07", -boxpar[0], fVCollSideAAperture+fVCollSideACentreY+boxpar[1], -313.3/2.+78.+148./2., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QCVA", 2, "QA07", -boxpar[0], -fVCollSideAApertureNeg+fVCollSideACentreY-boxpar[1], -313.3/2.+78.+148./2., 0, "ONLY"); printf(" AliZDCv3 -> sideA VCollimator jaws: apertures +%1.2f/-%1.2f center %1.2f [cm]\n", fVCollSideAAperture, fVCollSideAApertureNeg,fVCollSideACentreY); } @@ -1009,8 +1009,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 18.6/2.; conpar[3] = 21.27/2.; conpar[4] = 21.87/2.; - gMC->Gsvolu("QA08", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA08", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA08", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA08", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA08 CONE from z = %Third part of VCTCR: tube (ID=196 mm) f to z = %f\n",zd2,2*conpar[0]+zd2); @@ -1022,8 +1022,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 21.27/2.; tubpar[1] = 21.87/2.; tubpar[2] = 195.7/2.; - gMC->Gsvolu("QA09", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA09", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA09", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA09", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); //printf(" QA09 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); zd2 += 2.*tubpar[2]; @@ -1034,8 +1034,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 21.87/2.; conpar[3] = 33.2/2.; conpar[4] = 33.8/2.; - gMC->Gsvolu("QA10", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA10", 1, "ZDCA", -1.66, 0., conpar[0]+0.73+zd2, irotpipe4, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA10", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA10", 1, "ZDCA", -1.66, 0., conpar[0]+0.73+zd2, irotpipe4, "ONLY"); // Ch.debug //printf(" QA10 skewed CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+0.73+1.13+zd2); @@ -1045,13 +1045,13 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 0.; tubpar[1] = 54.6/2.; tubpar[2] = 540.0/2.; - gMC->Gsvolu("Q13TM", "TUBE", idtmed[10], tubpar, 3); - gMC->Gspos("Q13TM", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q13TM", "TUBE", idtmed[10], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q13TM", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); tubpar[0] = 54.0/2.; tubpar[1] = 54.6/2.; tubpar[2] = 540.0/2.; - gMC->Gsvolu("Q13T", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("Q13T", 1, "Q13TM", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q13T", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q13T", 1, "Q13TM", 0., 0., 0., 0, "ONLY"); // Ch.debug //printf(" Q13T TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1061,21 +1061,21 @@ void AliZDCv3::CreateBeamLine() boxpar[0] = 11.0/2.; boxpar[1] = 9.0/2.; boxpar[2] = 540.0/2.; - gMC->Gsvolu("QTD1", "BOX ", idtmed[7], boxpar, 3); - gMC->Gspos("QTD1", 1, "Q13TM", -3.8, boxpar[1]+fTDIAperturePos, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTD1", "BOX ", idtmed[7], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QTD1", 1, "Q13TM", -3.8, boxpar[1]+fTDIAperturePos, 0., 0, "ONLY"); boxpar[0] = 11.0/2.; boxpar[1] = 9.0/2.; boxpar[2] = 540.0/2.; - gMC->Gsvolu("QTD2", "BOX ", idtmed[7], boxpar, 3); - gMC->Gspos("QTD2", 1, "Q13TM", -3.8, -boxpar[1]-fTDIApertureNeg, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTD2", "BOX ", idtmed[7], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QTD2", 1, "Q13TM", -3.8, -boxpar[1]-fTDIApertureNeg, 0., 0, "ONLY"); boxpar[0] = 5.1/2.; boxpar[1] = 0.2/2.; boxpar[2] = 540.0/2.; - gMC->Gsvolu("QTD3", "BOX ", idtmed[7], boxpar, 3); - gMC->Gspos("QTD3", 1, "Q13TM", -3.8+5.5+boxpar[0], fTDIAperturePos, 0., 0, "ONLY"); - gMC->Gspos("QTD3", 2, "Q13TM", -3.8+5.5+boxpar[0], -fTDIApertureNeg, 0., 0, "ONLY"); - gMC->Gspos("QTD3", 3, "Q13TM", -3.8-5.5-boxpar[0], fTDIAperturePos, 0., 0, "ONLY"); - gMC->Gspos("QTD3", 4, "Q13TM", -3.8-5.5-boxpar[0], -fTDIApertureNeg, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTD3", "BOX ", idtmed[7], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QTD3", 1, "Q13TM", -3.8+5.5+boxpar[0], fTDIAperturePos, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QTD3", 2, "Q13TM", -3.8+5.5+boxpar[0], -fTDIApertureNeg, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QTD3", 3, "Q13TM", -3.8-5.5-boxpar[0], fTDIAperturePos, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QTD3", 4, "Q13TM", -3.8-5.5-boxpar[0], -fTDIApertureNeg, 0., 0, "ONLY"); printf(" AliZDCv3 -> TDI apertures +%1.2f/-%1.2f cm\n\n", fTDIAperturePos, fTDIApertureNeg); // @@ -1084,15 +1084,15 @@ void AliZDCv3::CreateBeamLine() tubspar[2] = 540.0/2.; tubspar[3] = 90.; tubspar[4] = 270.; - gMC->Gsvolu("QTD4", "TUBS", idtmed[7], tubspar, 5); - gMC->Gspos("QTD4", 1, "Q13TM", -3.8-10.6, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTD4", "TUBS", idtmed[7], tubspar, 5); + TVirtualMC::GetMC()->Gspos("QTD4", 1, "Q13TM", -3.8-10.6, 0., 0., 0, "ONLY"); tubspar[0] = 12.0/2.; tubspar[1] = 12.4/2.; tubspar[2] = 540.0/2.; tubspar[3] = -90.; tubspar[4] = 90.; - gMC->Gsvolu("QTD5", "TUBS", idtmed[7], tubspar, 5); - gMC->Gspos("QTD5", 1, "Q13TM", -3.8+10.6, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTD5", "TUBS", idtmed[7], tubspar, 5); + TVirtualMC::GetMC()->Gspos("QTD5", 1, "Q13TM", -3.8+10.6, 0., 0., 0, "ONLY"); //---------------- END DEFINING TDI INSIDE Q13T ------------------------------- // VCTCG skewed transition piece (ID=332 mm to 212.7 mm) (after TDI) @@ -1101,8 +1101,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 33.8/2.; conpar[3] = 21.27/2.; conpar[4] = 21.87/2.; - gMC->Gsvolu("QA11", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA11", 1, "ZDCA", 4.32-3.8, 0., conpar[0]+2.92+zd2, irotpipe5, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA11", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA11", 1, "ZDCA", 4.32-3.8, 0., conpar[0]+2.92+zd2, irotpipe5, "ONLY"); // Ch.debug //printf(" QA11 skewed CONE from z = %f to z =%f\n",zd2,2*conpar[0]+2.92+1.89+zd2); @@ -1114,8 +1114,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 21.27/2.; tubpar[1] = 21.87/2.; tubpar[2] = 210.0/2.; - gMC->Gsvolu("QA12", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA12", 1, "ZDCA", 4., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA12", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA12", 1, "ZDCA", 4., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA12 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1128,8 +1128,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 21.87/2.; conpar[3] = 79.7/2.; conpar[4] = 81.3/2.; - gMC->Gsvolu("QA13", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA13", 1, "ZDCA", 4.-2., 0., conpar[0]+0.37+zd2, irotpipe3, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA13", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA13", 1, "ZDCA", 4.-2., 0., conpar[0]+0.37+zd2, irotpipe3, "ONLY"); // Ch.debug //printf(" QA13 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+0.37+1.35+zd2); @@ -1142,8 +1142,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 79.7/2.; tubpar[1] = 81.3/2.; tubpar[2] = 2221./2.; - gMC->Gsvolu("QA14", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA14", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA14", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA14", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA14 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1161,8 +1161,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 81.3/2.; // thickness 8 mm conpar[3] = 74.82868/2.; conpar[4] = 76.42868/2.; // thickness 8 mm - gMC->Gsvolu("QA15", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA15", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA15", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA15", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QA15 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -1173,8 +1173,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 75.42868/2.; // thickness 3 mm conpar[3] = 23.19588/2.; conpar[4] = 23.79588/2.; // thickness 3 mm - gMC->Gsvolu("QA16", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA16", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA16", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA16", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QA16 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -1185,8 +1185,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 24.79588/2.;// thickness 8 mm conpar[3] = 19.6/2.; conpar[4] = 21.2/2.;// thickness 8 mm - gMC->Gsvolu("QA17", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA17", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA17", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA17", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QA19 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -1195,8 +1195,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 19.6/2.; tubpar[1] = 21.2/2.; tubpar[2] = 9.55/2.; - gMC->Gsvolu("QA18", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA18", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA18", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA18", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA18 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1206,8 +1206,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 19.6/2.; tubpar[1] = 25.3/2.; tubpar[2] = 4.9/2.; - gMC->Gsvolu("QF01", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QF01", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QF01", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QF01", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QF01 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1217,8 +1217,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 20.2/2.; tubpar[1] = 20.6/2.; tubpar[2] = 2.15/2.; - gMC->Gsvolu("QA19", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA19", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA19", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA19", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA19 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1229,8 +1229,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 20.6/2.; conpar[3] = 23.9/2.; conpar[4] = 24.3/2.; - gMC->Gsvolu("QA20", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA20", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA20", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA20", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA20 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); @@ -1239,8 +1239,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 23.9/2.; tubpar[1] = 25.5/2.; tubpar[2] = 17.0/2.; - gMC->Gsvolu("QA21", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA21", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA21", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA21", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA21 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1251,8 +1251,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 24.3/2.; conpar[3] = 20.2/2.; conpar[4] = 20.6/2.; - gMC->Gsvolu("QA22", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA22", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA22", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA22", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA22 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); @@ -1261,8 +1261,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 20.2/2.; tubpar[1] = 20.6/2.; tubpar[2] = 2.15/2.; - gMC->Gsvolu("QA23", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA23", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA23", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA23", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA23 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1272,8 +1272,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 19.6/2.; tubpar[1] = 25.3/2.; tubpar[2] = 4.9/2.; - gMC->Gsvolu("QF02", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QF02", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QF02", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QF02", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QF02 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1283,8 +1283,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 19.6/2.; tubpar[1] = 20.0/2.; tubpar[2] = 3.9/2.; - gMC->Gsvolu("QA24", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA24", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA24", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA24", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA24 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1296,8 +1296,8 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 20.0/2.; conpar[3] = 21.66/2.; conpar[4] = 22.06/2.; - gMC->Gsvolu("QA25", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA25", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA25", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA25", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA25 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); @@ -1307,8 +1307,8 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 21.66/2.; tubpar[1] = 22.06/2.; tubpar[2] = 28.6/2.; - gMC->Gsvolu("QA26", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA26", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA26", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA26", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA26 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1391,9 +1391,9 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 5.4/2.; tubpar[1] = 5.8/2.; tubpar[2] = 40.0/2.; - gMC->Gsvolu("QA27", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA27", 1, "ZDCA", -15.8/2., 0., tubpar[2]+zd2, 0, "ONLY"); - gMC->Gspos("QA27", 2, "ZDCA", 15.8/2., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA27", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA27", 1, "ZDCA", -15.8/2., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA27", 2, "ZDCA", 15.8/2., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA27 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1405,9 +1405,9 @@ void AliZDCv3::CreateBeamLine() conpar[2] = 5.8/2.; conpar[3] = 6.3/2.; conpar[4] = 7.0/2.; - gMC->Gsvolu("QA28", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA28", 1, "ZDCA", -7.9-0.175, 0., conpar[0]+0.5+zd2, irotpipe1, "ONLY"); - gMC->Gspos("QA28", 2, "ZDCA", 7.9+0.175, 0., conpar[0]+0.5+zd2, irotpipe2, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA28", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA28", 1, "ZDCA", -7.9-0.175, 0., conpar[0]+0.5+zd2, irotpipe1, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA28", 2, "ZDCA", 7.9+0.175, 0., conpar[0]+0.5+zd2, irotpipe2, "ONLY"); //printf(" QA28 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+0.2+zd2); zd2 += 2.*conpar[0]+1.; @@ -1416,9 +1416,9 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 6.3/2.; tubpar[1] = 7.0/2.; tubpar[2] = (342.5+498.3)/2.; - gMC->Gsvolu("QA29", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA29", 1, "ZDCA", -16.5/2., 0., tubpar[2]+zd2, 0, "ONLY"); - gMC->Gspos("QA29", 2, "ZDCA", 16.5/2., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA29", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA29", 1, "ZDCA", -16.5/2., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA29", 2, "ZDCA", 16.5/2., 0., tubpar[2]+zd2, 0, "ONLY"); //printf(" QA29 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); zd2 += 2.*tubpar[2]; @@ -1427,8 +1427,8 @@ void AliZDCv3::CreateBeamLine() boxpar[0] = 8.0/2.; boxpar[1] = 8.0/2.; boxpar[2] = fLumiLength/2.; - gMC->Gsvolu("QLUA", "BOX ", idtmed[9], boxpar, 3); - gMC->Gspos("QLUA", 1, "ZDCA", 0., 0., fPosZNA[2]-66.-boxpar[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QLUA", "BOX ", idtmed[9], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QLUA", 1, "ZDCA", 0., 0., fPosZNA[2]-66.-boxpar[2], 0, "ONLY"); //printf(" QLUA LUMINOMETER from z = %1.2f to z= %1.2f\n\n", fPosZNA[2]-66., fPosZNA[2]-66.-2*boxpar[2]); //printf(" END OF BEAM PIPE VOLUME DEFINITION AT z = %f\n",zd2); @@ -1447,16 +1447,16 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 0.; tubpar[1] = 3.14; tubpar[2] = 153./2.; - gMC->Gsvolu("MBXW", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MBXW", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 4.5; tubpar[1] = 55.; tubpar[2] = 153./2.; - gMC->Gsvolu("YMBX", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YMBX", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("MBXW", 1, "ZDCC", 0., 0., -tubpar[2]-zCorrDip, 0, "ONLY"); - gMC->Gspos("YMBX", 1, "ZDCC", 0., 0., -tubpar[2]-zCorrDip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MBXW", 1, "ZDCC", 0., 0., -tubpar[2]-zCorrDip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMBX", 1, "ZDCC", 0., 0., -tubpar[2]-zCorrDip, 0, "ONLY"); // -- INNER TRIPLET @@ -1468,38 +1468,38 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 0.; tubpar[1] = 3.14; tubpar[2] = 637./2.; - gMC->Gsvolu("MQXL", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQXL", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 3.5; tubpar[1] = 22.; tubpar[2] = 637./2.; - gMC->Gsvolu("YMQL", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YMQL", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("MQXL", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip, 0, "ONLY"); - gMC->Gspos("YMQL", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQXL", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQL", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip, 0, "ONLY"); - gMC->Gspos("MQXL", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-2400., 0, "ONLY"); - gMC->Gspos("YMQL", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-2400., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQXL", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-2400., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQL", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-2400., 0, "ONLY"); // -- MQX // -- GAP (VACUUM WITH MAGNETIC FIELD) tubpar[0] = 0.; tubpar[1] = 3.14; tubpar[2] = 550./2.; - gMC->Gsvolu("MQX ", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQX ", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 3.5; tubpar[1] = 22.; tubpar[2] = 550./2.; - gMC->Gsvolu("YMQ ", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YMQ ", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("MQX ", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-908.5, 0, "ONLY"); - gMC->Gspos("YMQ ", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-908.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX ", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-908.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ ", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-908.5, 0, "ONLY"); - gMC->Gspos("MQX ", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-1558.5, 0, "ONLY"); - gMC->Gspos("YMQ ", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-1558.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX ", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-1558.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ ", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-1558.5, 0, "ONLY"); // -- SEPARATOR DIPOLE D1 zD1 = 5838.3001; @@ -1508,25 +1508,25 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 0.; tubpar[1] = 3.46; tubpar[2] = 945./2.; - gMC->Gsvolu("MD1 ", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MD1 ", "TUBE", idtmed[11], tubpar, 3); // -- Insert horizontal Cu plates inside D1 // -- (to simulate the vacuum chamber) boxpar[0] = TMath::Sqrt(tubpar[1]*tubpar[1]-(2.98+0.2)*(2.98+0.2)) - 0.05; boxpar[1] = 0.2/2.; boxpar[2] = 945./2.; - gMC->Gsvolu("MD1V", "BOX ", idtmed[6], boxpar, 3); - gMC->Gspos("MD1V", 1, "MD1 ", 0., 2.98+boxpar[1], 0., 0, "ONLY"); - gMC->Gspos("MD1V", 2, "MD1 ", 0., -2.98-boxpar[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("MD1V", "BOX ", idtmed[6], boxpar, 3); + TVirtualMC::GetMC()->Gspos("MD1V", 1, "MD1 ", 0., 2.98+boxpar[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD1V", 2, "MD1 ", 0., -2.98-boxpar[1], 0., 0, "ONLY"); // -- YOKE tubpar[0] = 3.68; tubpar[1] = 110./2.; tubpar[2] = 945./2.; - gMC->Gsvolu("YD1 ", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YD1 ", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("YD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD1, 0, "ONLY"); - gMC->Gspos("MD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD1, 0, "ONLY"); // Ch debug //printf(" MD1 from z = %1.2f to z= %1.2f cm\n",-zD1, -zD1-2*tubpar[2]); @@ -1536,20 +1536,20 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 0.; tubpar[1] = 7.5/2.; tubpar[2] = 945./2.; - gMC->Gsvolu("MD2 ", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MD2 ", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 0.; tubpar[1] = 55.; tubpar[2] = 945./2.; - gMC->Gsvolu("YD2 ", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YD2 ", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("YD2 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YD2 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD2, 0, "ONLY"); // Ch debug //printf(" YD2 from z = %1.2f to z= %1.2f cm\n",-zD2, -zD2-2*tubpar[2]); - gMC->Gspos("MD2 ", 1, "YD2 ", -9.4, 0., 0., 0, "ONLY"); - gMC->Gspos("MD2 ", 2, "YD2 ", 9.4, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD2 ", 1, "YD2 ", -9.4, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD2 ", 2, "YD2 ", 9.4, 0., 0., 0, "ONLY"); // *************************************************************** // SIDE A - RB24 @@ -1560,15 +1560,15 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 0.; tubpar[1] = 3.; tubpar[2] = 153./2.; - gMC->Gsvolu("MCBW", "TUBE", idtmed[11], tubpar, 3); - gMC->Gspos("MCBW", 1, "ZDCA", 0., 0., tubpar[2]+zCorrDip, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("MCBW", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gspos("MCBW", 1, "ZDCA", 0., 0., tubpar[2]+zCorrDip, 0, "ONLY"); // -- YOKE tubpar[0] = 4.5; tubpar[1] = 55.; tubpar[2] = 153./2.; - gMC->Gsvolu("YMCB", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("YMCB", 1, "ZDCA", 0., 0., tubpar[2]+zCorrDip, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("YMCB", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("YMCB", 1, "ZDCA", 0., 0., tubpar[2]+zCorrDip, 0, "ONLY"); // -- INNER TRIPLET // -- DEFINE MQX1 AND MQX2 QUADRUPOLE ELEMENT @@ -1577,50 +1577,50 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 0.; tubpar[1] = 3.14; tubpar[2] = 637./2.; - gMC->Gsvolu("MQX1", "TUBE", idtmed[11], tubpar, 3); - gMC->Gsvolu("MQX4", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQX1", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQX4", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 3.5; tubpar[1] = 22.; tubpar[2] = 637./2.; - gMC->Gsvolu("YMQ1", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YMQ1", "TUBE", idtmed[7], tubpar, 3); // -- Q1 - gMC->Gspos("MQX1", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip, 0, "ONLY"); - gMC->Gspos("YMQ1", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX1", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ1", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip, 0, "ONLY"); // -- BEAM SCREEN FOR Q1 tubpar[0] = 4.78/2.; tubpar[1] = 5.18/2.; tubpar[2] = 637./2.; - gMC->Gsvolu("QBS1", "TUBE", idtmed[6], tubpar, 3); - gMC->Gspos("QBS1", 1, "MQX1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBS1", "TUBE", idtmed[6], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QBS1", 1, "MQX1", 0., 0., 0., 0, "ONLY"); // INSERT VERTICAL PLATE INSIDE Q1 boxpar[0] = 0.2/2.0; boxpar[1] = TMath::Sqrt(tubpar[0]*tubpar[0]-(1.9+0.2)*(1.9+0.2)); boxpar[2] =637./2.; - gMC->Gsvolu("QBS2", "BOX ", idtmed[6], boxpar, 3); - gMC->Gspos("QBS2", 1, "MQX1", 1.9+boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("QBS2", 2, "MQX1", -1.9-boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBS2", "BOX ", idtmed[6], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QBS2", 1, "MQX1", 1.9+boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS2", 2, "MQX1", -1.9-boxpar[0], 0., 0., 0, "ONLY"); // -- Q3 - gMC->Gspos("MQX4", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+2400., 0, "ONLY"); - gMC->Gspos("YMQ1", 2, "ZDCA", 0., 0., tubpar[2]+zInnTrip+2400., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX4", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+2400., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ1", 2, "ZDCA", 0., 0., tubpar[2]+zInnTrip+2400., 0, "ONLY"); // -- BEAM SCREEN FOR Q3 tubpar[0] = 5.79/2.; tubpar[1] = 6.14/2.; tubpar[2] = 637./2.; - gMC->Gsvolu("QBS3", "TUBE", idtmed[6], tubpar, 3); - gMC->Gspos("QBS3", 1, "MQX4", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBS3", "TUBE", idtmed[6], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QBS3", 1, "MQX4", 0., 0., 0., 0, "ONLY"); // INSERT VERTICAL PLATE INSIDE Q3 boxpar[0] = 0.2/2.0; boxpar[1] = TMath::Sqrt(tubpar[0]*tubpar[0]-(2.405+0.2)*(2.405+0.2)); boxpar[2] =637./2.; - gMC->Gsvolu("QBS4", "BOX ", idtmed[6], boxpar, 3); - gMC->Gspos("QBS4", 1, "MQX4", 2.405+boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("QBS4", 2, "MQX4", -2.405-boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBS4", "BOX ", idtmed[6], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QBS4", 1, "MQX4", 2.405+boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS4", 2, "MQX4", -2.405-boxpar[0], 0., 0., 0, "ONLY"); @@ -1629,47 +1629,47 @@ void AliZDCv3::CreateBeamLine() tubpar[0] = 0.; tubpar[1] = 3.14; tubpar[2] = 550./2.; - gMC->Gsvolu("MQX2", "TUBE", idtmed[11], tubpar, 3); - gMC->Gsvolu("MQX3", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQX2", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQX3", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 3.5; tubpar[1] = 22.; tubpar[2] = 550./2.; - gMC->Gsvolu("YMQ2", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YMQ2", "TUBE", idtmed[7], tubpar, 3); // -- BEAM SCREEN FOR Q2 tubpar[0] = 5.79/2.; tubpar[1] = 6.14/2.; tubpar[2] = 550./2.; - gMC->Gsvolu("QBS5", "TUBE", idtmed[6], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("QBS5", "TUBE", idtmed[6], tubpar, 3); // VERTICAL PLATE INSIDE Q2 boxpar[0] = 0.2/2.0; boxpar[1] = TMath::Sqrt(tubpar[0]*tubpar[0]-(2.405+0.2)*(2.405+0.2)); boxpar[2] =550./2.; - gMC->Gsvolu("QBS6", "BOX ", idtmed[6], boxpar, 3); + TVirtualMC::GetMC()->Gsvolu("QBS6", "BOX ", idtmed[6], boxpar, 3); // -- Q2A - gMC->Gspos("MQX2", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+908.5, 0, "ONLY"); - gMC->Gspos("QBS5", 1, "MQX2", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("QBS6", 1, "MQX2", 2.405+boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("QBS6", 2, "MQX2", -2.405-boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("YMQ2", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+908.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX2", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+908.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS5", 1, "MQX2", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS6", 1, "MQX2", 2.405+boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS6", 2, "MQX2", -2.405-boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ2", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+908.5, 0, "ONLY"); // -- Q2B - gMC->Gspos("MQX3", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+1558.5, 0, "ONLY"); - gMC->Gspos("QBS5", 2, "MQX3", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("QBS6", 3, "MQX3", 2.405+boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("QBS6", 4, "MQX3", -2.405-boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("YMQ2", 2, "ZDCA", 0., 0., tubpar[2]+zInnTrip+1558.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX3", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+1558.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS5", 2, "MQX3", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS6", 3, "MQX3", 2.405+boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS6", 4, "MQX3", -2.405-boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ2", 2, "ZDCA", 0., 0., tubpar[2]+zInnTrip+1558.5, 0, "ONLY"); // -- SEPARATOR DIPOLE D1 // -- GAP (VACUUM WITH MAGNETIC FIELD) tubpar[0] = 0.; tubpar[1] = 6.75/2.;//3.375 tubpar[2] = 945./2.; - gMC->Gsvolu("MD1L", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MD1L", "TUBE", idtmed[11], tubpar, 3); // -- The beam screen tube is provided by the beam pipe in D1 (QA03 volume) // -- Insert the beam screen horizontal Cu plates inside D1 @@ -1677,36 +1677,36 @@ void AliZDCv3::CreateBeamLine() boxpar[0] = TMath::Sqrt(tubpar[1]*tubpar[1]-(2.885+0.2)*(2.885+0.2)); boxpar[1] = 0.2/2.; boxpar[2] =945./2.; - gMC->Gsvolu("QBS7", "BOX ", idtmed[6], boxpar, 3); - gMC->Gspos("QBS7", 1, "MD1L", 0., 2.885+boxpar[1],0., 0, "ONLY"); - gMC->Gspos("QBS7", 2, "MD1L", 0., -2.885-boxpar[1],0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBS7", "BOX ", idtmed[6], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QBS7", 1, "MD1L", 0., 2.885+boxpar[1],0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS7", 2, "MD1L", 0., -2.885-boxpar[1],0., 0, "ONLY"); // -- YOKE tubpar[0] = 3.68; tubpar[1] = 110./2; tubpar[2] = 945./2.; - gMC->Gsvolu("YD1L", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YD1L", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("YD1L", 1, "ZDCA", 0., 0., tubpar[2]+zD1, 0, "ONLY"); - gMC->Gspos("MD1L", 1, "ZDCA", 0., 0., tubpar[2]+zD1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YD1L", 1, "ZDCA", 0., 0., tubpar[2]+zD1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD1L", 1, "ZDCA", 0., 0., tubpar[2]+zD1, 0, "ONLY"); // -- DIPOLE D2 // -- GAP (VACUUM WITH MAGNETIC FIELD) tubpar[0] = 0.; tubpar[1] = 7.5/2.; // this has to be checked tubpar[2] = 945./2.; - gMC->Gsvolu("MD2L", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MD2L", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 0.; tubpar[1] = 55.; tubpar[2] = 945./2.; - gMC->Gsvolu("YD2L", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YD2L", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("YD2L", 1, "ZDCA", 0., 0., tubpar[2]+zD2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YD2L", 1, "ZDCA", 0., 0., tubpar[2]+zD2, 0, "ONLY"); - gMC->Gspos("MD2L", 1, "YD2L", -9.4, 0., 0., 0, "ONLY"); - gMC->Gspos("MD2L", 2, "YD2L", 9.4, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD2L", 1, "YD2L", -9.4, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD2L", 2, "YD2L", 9.4, 0., 0., 0, "ONLY"); // -- END OF MAGNET DEFINITION } @@ -1746,56 +1746,56 @@ void AliZDCv3::CreateZDC() // ------------------------------------------------------------------------------- //--> Neutron calorimeter (ZN) - gMC->Gsvolu("ZNEU", "BOX ", idtmed[1], fDimZN, 3); // Passive material - gMC->Gsvolu("ZNF1", "TUBE", idtmed[3], fFibZN, 3); // Active material - gMC->Gsvolu("ZNF2", "TUBE", idtmed[4], fFibZN, 3); - gMC->Gsvolu("ZNF3", "TUBE", idtmed[4], fFibZN, 3); - gMC->Gsvolu("ZNF4", "TUBE", idtmed[3], fFibZN, 3); - gMC->Gsvolu("ZNG1", "BOX ", idtmed[12], fGrvZN, 3); // Empty grooves - gMC->Gsvolu("ZNG2", "BOX ", idtmed[12], fGrvZN, 3); - gMC->Gsvolu("ZNG3", "BOX ", idtmed[12], fGrvZN, 3); - gMC->Gsvolu("ZNG4", "BOX ", idtmed[12], fGrvZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNEU", "BOX ", idtmed[1], fDimZN, 3); // Passive material + TVirtualMC::GetMC()->Gsvolu("ZNF1", "TUBE", idtmed[3], fFibZN, 3); // Active material + TVirtualMC::GetMC()->Gsvolu("ZNF2", "TUBE", idtmed[4], fFibZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNF3", "TUBE", idtmed[4], fFibZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNF4", "TUBE", idtmed[3], fFibZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNG1", "BOX ", idtmed[12], fGrvZN, 3); // Empty grooves + TVirtualMC::GetMC()->Gsvolu("ZNG2", "BOX ", idtmed[12], fGrvZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNG3", "BOX ", idtmed[12], fGrvZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNG4", "BOX ", idtmed[12], fGrvZN, 3); // Divide ZNEU in towers (for hits purposes) - gMC->Gsdvn("ZNTX", "ZNEU", fTowZN[0], 1); // x-tower - gMC->Gsdvn("ZN1 ", "ZNTX", fTowZN[1], 2); // y-tower + TVirtualMC::GetMC()->Gsdvn("ZNTX", "ZNEU", fTowZN[0], 1); // x-tower + TVirtualMC::GetMC()->Gsdvn("ZN1 ", "ZNTX", fTowZN[1], 2); // y-tower //-- Divide ZN1 in minitowers // fDivZN[0]= NUMBER OF FIBERS PER TOWER ALONG X-AXIS, // fDivZN[1]= NUMBER OF FIBERS PER TOWER ALONG Y-AXIS // (4 fibres per minitower) - gMC->Gsdvn("ZNSL", "ZN1 ", fDivZN[1], 2); // Slices - gMC->Gsdvn("ZNST", "ZNSL", fDivZN[0], 1); // Sticks + TVirtualMC::GetMC()->Gsdvn("ZNSL", "ZN1 ", fDivZN[1], 2); // Slices + TVirtualMC::GetMC()->Gsdvn("ZNST", "ZNSL", fDivZN[0], 1); // Sticks // --- Position the empty grooves in the sticks (4 grooves per stick) Float_t dx = fDimZN[0] / fDivZN[0] / 4.; Float_t dy = fDimZN[1] / fDivZN[1] / 4.; - gMC->Gspos("ZNG1", 1, "ZNST", 0.-dx, 0.+dy, 0., 0, "ONLY"); - gMC->Gspos("ZNG2", 1, "ZNST", 0.+dx, 0.+dy, 0., 0, "ONLY"); - gMC->Gspos("ZNG3", 1, "ZNST", 0.-dx, 0.-dy, 0., 0, "ONLY"); - gMC->Gspos("ZNG4", 1, "ZNST", 0.+dx, 0.-dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNG1", 1, "ZNST", 0.-dx, 0.+dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNG2", 1, "ZNST", 0.+dx, 0.+dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNG3", 1, "ZNST", 0.-dx, 0.-dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNG4", 1, "ZNST", 0.+dx, 0.-dy, 0., 0, "ONLY"); // --- Position the fibers in the grooves - gMC->Gspos("ZNF1", 1, "ZNG1", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZNF2", 1, "ZNG2", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZNF3", 1, "ZNG3", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZNF4", 1, "ZNG4", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNF1", 1, "ZNG1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNF2", 1, "ZNG2", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNF3", 1, "ZNG3", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNF4", 1, "ZNG4", 0., 0., 0., 0, "ONLY"); // --- Position the neutron calorimeter in ZDC // -- Rotation of ZDCs Int_t irotzdc; - gMC->Matrix(irotzdc, 90., 180., 90., 90., 180., 0.); + TVirtualMC::GetMC()->Matrix(irotzdc, 90., 180., 90., 90., 180., 0.); // - gMC->Gspos("ZNEU", 1, "ZDCC", fPosZNC[0], fPosZNC[1], fPosZNC[2]-fDimZN[2], irotzdc, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNEU", 1, "ZDCC", fPosZNC[0], fPosZNC[1], fPosZNC[2]-fDimZN[2], irotzdc, "ONLY"); //Ch debug //printf("\n ZN -> %f < z < %f cm\n",fPosZN[2],fPosZN[2]-2*fDimZN[2]); // --- Position the neutron calorimeter in ZDC2 (left line) // -- No Rotation of ZDCs - gMC->Gspos("ZNEU", 2, "ZDCA", fPosZNA[0], fPosZNA[1], fPosZNA[2]+fDimZN[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNEU", 2, "ZDCA", fPosZNA[0], fPosZNA[1], fPosZNA[2]+fDimZN[2], 0, "ONLY"); //Ch debug //printf("\n ZN left -> %f < z < %f cm\n",fPosZNl[2],fPosZNl[2]+2*fDimZN[2]); @@ -1803,20 +1803,20 @@ void AliZDCv3::CreateZDC() // ------------------------------------------------------------------------------- //--> Proton calorimeter (ZP) - gMC->Gsvolu("ZPRO", "BOX ", idtmed[2], fDimZP, 3); // Passive material - gMC->Gsvolu("ZPF1", "TUBE", idtmed[3], fFibZP, 3); // Active material - gMC->Gsvolu("ZPF2", "TUBE", idtmed[4], fFibZP, 3); - gMC->Gsvolu("ZPF3", "TUBE", idtmed[4], fFibZP, 3); - gMC->Gsvolu("ZPF4", "TUBE", idtmed[3], fFibZP, 3); - gMC->Gsvolu("ZPG1", "BOX ", idtmed[12], fGrvZP, 3); // Empty grooves - gMC->Gsvolu("ZPG2", "BOX ", idtmed[12], fGrvZP, 3); - gMC->Gsvolu("ZPG3", "BOX ", idtmed[12], fGrvZP, 3); - gMC->Gsvolu("ZPG4", "BOX ", idtmed[12], fGrvZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPRO", "BOX ", idtmed[2], fDimZP, 3); // Passive material + TVirtualMC::GetMC()->Gsvolu("ZPF1", "TUBE", idtmed[3], fFibZP, 3); // Active material + TVirtualMC::GetMC()->Gsvolu("ZPF2", "TUBE", idtmed[4], fFibZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPF3", "TUBE", idtmed[4], fFibZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPF4", "TUBE", idtmed[3], fFibZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPG1", "BOX ", idtmed[12], fGrvZP, 3); // Empty grooves + TVirtualMC::GetMC()->Gsvolu("ZPG2", "BOX ", idtmed[12], fGrvZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPG3", "BOX ", idtmed[12], fGrvZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPG4", "BOX ", idtmed[12], fGrvZP, 3); //-- Divide ZPRO in towers(for hits purposes) - gMC->Gsdvn("ZPTX", "ZPRO", fTowZP[0], 1); // x-tower - gMC->Gsdvn("ZP1 ", "ZPTX", fTowZP[1], 2); // y-tower + TVirtualMC::GetMC()->Gsdvn("ZPTX", "ZPRO", fTowZP[0], 1); // x-tower + TVirtualMC::GetMC()->Gsdvn("ZP1 ", "ZPTX", fTowZP[1], 2); // y-tower //-- Divide ZP1 in minitowers @@ -1824,33 +1824,33 @@ void AliZDCv3::CreateZDC() // fDivZP[1]= NUMBER OF FIBERS ALONG Y-AXIS PER MINITOWER // (4 fiber per minitower) - gMC->Gsdvn("ZPSL", "ZP1 ", fDivZP[1], 2); // Slices - gMC->Gsdvn("ZPST", "ZPSL", fDivZP[0], 1); // Sticks + TVirtualMC::GetMC()->Gsdvn("ZPSL", "ZP1 ", fDivZP[1], 2); // Slices + TVirtualMC::GetMC()->Gsdvn("ZPST", "ZPSL", fDivZP[0], 1); // Sticks // --- Position the empty grooves in the sticks (4 grooves per stick) dx = fDimZP[0] / fTowZP[0] / fDivZP[0] / 2.; dy = fDimZP[1] / fTowZP[1] / fDivZP[1] / 2.; - gMC->Gspos("ZPG1", 1, "ZPST", 0.-dx, 0.+dy, 0., 0, "ONLY"); - gMC->Gspos("ZPG2", 1, "ZPST", 0.+dx, 0.+dy, 0., 0, "ONLY"); - gMC->Gspos("ZPG3", 1, "ZPST", 0.-dx, 0.-dy, 0., 0, "ONLY"); - gMC->Gspos("ZPG4", 1, "ZPST", 0.+dx, 0.-dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPG1", 1, "ZPST", 0.-dx, 0.+dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPG2", 1, "ZPST", 0.+dx, 0.+dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPG3", 1, "ZPST", 0.-dx, 0.-dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPG4", 1, "ZPST", 0.+dx, 0.-dy, 0., 0, "ONLY"); // --- Position the fibers in the grooves - gMC->Gspos("ZPF1", 1, "ZPG1", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZPF2", 1, "ZPG2", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZPF3", 1, "ZPG3", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZPF4", 1, "ZPG4", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPF1", 1, "ZPG1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPF2", 1, "ZPG2", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPF3", 1, "ZPG3", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPF4", 1, "ZPG4", 0., 0., 0., 0, "ONLY"); // --- Position the proton calorimeter in ZDCC - gMC->Gspos("ZPRO", 1, "ZDCC", fPosZPC[0], fPosZPC[1], fPosZPC[2]-fDimZP[2], irotzdc, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPRO", 1, "ZDCC", fPosZPC[0], fPosZPC[1], fPosZPC[2]-fDimZP[2], irotzdc, "ONLY"); //Ch debug //printf("\n ZP -> %f < z < %f cm\n",fPosZP[2],fPosZP[2]-2*fDimZP[2]); // --- Position the proton calorimeter in ZDCA // --- No rotation - gMC->Gspos("ZPRO", 2, "ZDCA", fPosZPA[0], fPosZPA[1], fPosZPA[2]+fDimZP[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPRO", 2, "ZDCA", fPosZPA[0], fPosZPA[1], fPosZPA[2]+fDimZP[2], 0, "ONLY"); //Ch debug //printf("\n ZP left -> %f < z < %f cm\n",fPosZPl[2],fPosZPl[2]+2*fDimZP[2]); @@ -1858,16 +1858,16 @@ void AliZDCv3::CreateZDC() // ------------------------------------------------------------------------------- // -> EM calorimeter (ZEM) - gMC->Gsvolu("ZEM ", "PARA", idtmed[10], fDimZEM, 6); + TVirtualMC::GetMC()->Gsvolu("ZEM ", "PARA", idtmed[10], fDimZEM, 6); Int_t irot1, irot2; - gMC->Matrix(irot1,0.,0.,90.,90.,-90.,0.); // Rotation matrix 1 - gMC->Matrix(irot2,180.,0.,90.,fDimZEM[3]+90.,90.,fDimZEM[3]);// Rotation matrix 2 + TVirtualMC::GetMC()->Matrix(irot1,0.,0.,90.,90.,-90.,0.); // Rotation matrix 1 + TVirtualMC::GetMC()->Matrix(irot2,180.,0.,90.,fDimZEM[3]+90.,90.,fDimZEM[3]);// Rotation matrix 2 //printf("irot1 = %d, irot2 = %d \n", irot1, irot2); - gMC->Gsvolu("ZEMF", "TUBE", idtmed[3], fFibZEM, 3); // Active material + TVirtualMC::GetMC()->Gsvolu("ZEMF", "TUBE", idtmed[3], fFibZEM, 3); // Active material - gMC->Gsdvn("ZETR", "ZEM ", fDivZEM[2], 1); // Tranches + TVirtualMC::GetMC()->Gsdvn("ZETR", "ZEM ", fDivZEM[2], 1); // Tranches dimPb[0] = kDimZEMPb; // Lead slices dimPb[1] = fDimZEM[2]; @@ -1876,15 +1876,15 @@ void AliZDCv3::CreateZDC() dimPb[3] = 90.-fDimZEM[3]; //originale dimPb[4] = 0.; dimPb[5] = 0.; - gMC->Gsvolu("ZEL0", "PARA", idtmed[5], dimPb, 6); - gMC->Gsvolu("ZEL1", "PARA", idtmed[5], dimPb, 6); - gMC->Gsvolu("ZEL2", "PARA", idtmed[5], dimPb, 6); + TVirtualMC::GetMC()->Gsvolu("ZEL0", "PARA", idtmed[5], dimPb, 6); + TVirtualMC::GetMC()->Gsvolu("ZEL1", "PARA", idtmed[5], dimPb, 6); + TVirtualMC::GetMC()->Gsvolu("ZEL2", "PARA", idtmed[5], dimPb, 6); // --- Position the lead slices in the tranche Float_t zTran = fDimZEM[0]/fDivZEM[2]; Float_t zTrPb = -zTran+kDimZEMPb; - gMC->Gspos("ZEL0", 1, "ZETR", zTrPb, 0., 0., 0, "ONLY"); - gMC->Gspos("ZEL1", 1, "ZETR", kDimZEMPb, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEL0", 1, "ZETR", zTrPb, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEL1", 1, "ZETR", kDimZEMPb, 0., 0., 0, "ONLY"); // --- Vacuum zone (to be filled with fibres) dimVoid[0] = (zTran-2*kDimZEMPb)/2.; @@ -1893,32 +1893,32 @@ void AliZDCv3::CreateZDC() dimVoid[3] = 90.-fDimZEM[3]; dimVoid[4] = 0.; dimVoid[5] = 0.; - gMC->Gsvolu("ZEV0", "PARA", idtmed[10], dimVoid,6); - gMC->Gsvolu("ZEV1", "PARA", idtmed[10], dimVoid,6); + TVirtualMC::GetMC()->Gsvolu("ZEV0", "PARA", idtmed[10], dimVoid,6); + TVirtualMC::GetMC()->Gsvolu("ZEV1", "PARA", idtmed[10], dimVoid,6); // --- Divide the vacuum slice into sticks along x axis - gMC->Gsdvn("ZES0", "ZEV0", fDivZEM[0], 3); - gMC->Gsdvn("ZES1", "ZEV1", fDivZEM[0], 3); + TVirtualMC::GetMC()->Gsdvn("ZES0", "ZEV0", fDivZEM[0], 3); + TVirtualMC::GetMC()->Gsdvn("ZES1", "ZEV1", fDivZEM[0], 3); // --- Positioning the fibers into the sticks - gMC->Gspos("ZEMF", 1,"ZES0", 0., 0., 0., irot2, "ONLY"); - gMC->Gspos("ZEMF", 1,"ZES1", 0., 0., 0., irot2, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEMF", 1,"ZES0", 0., 0., 0., irot2, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEMF", 1,"ZES1", 0., 0., 0., irot2, "ONLY"); // --- Positioning the vacuum slice into the tranche //Float_t displFib = fDimZEM[1]/fDivZEM[0]; - gMC->Gspos("ZEV0", 1,"ZETR", -dimVoid[0], 0., 0., 0, "ONLY"); - gMC->Gspos("ZEV1", 1,"ZETR", -dimVoid[0]+zTran, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEV0", 1,"ZETR", -dimVoid[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEV1", 1,"ZETR", -dimVoid[0]+zTran, 0., 0., 0, "ONLY"); // --- Positioning the ZEM into the ZDC - rotation for 90 degrees // NB -> ZEM is positioned in ALIC (instead of in ZDC) volume - gMC->Gspos("ZEM ", 1,"ALIC", -fPosZEM[0], fPosZEM[1], fPosZEM[2]+fDimZEM[0], irot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEM ", 1,"ALIC", -fPosZEM[0], fPosZEM[1], fPosZEM[2]+fDimZEM[0], irot1, "ONLY"); // Second EM ZDC (same side w.r.t. IP, just on the other side w.r.t. beam pipe) - gMC->Gspos("ZEM ", 2,"ALIC", fPosZEM[0], fPosZEM[1], fPosZEM[2]+fDimZEM[0], irot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEM ", 2,"ALIC", fPosZEM[0], fPosZEM[1], fPosZEM[2]+fDimZEM[0], irot1, "ONLY"); // --- Adding last slice at the end of the EM calorimeter Float_t zLastSlice = fPosZEM[2]+kDimZEMPb+2*fDimZEM[0]; - gMC->Gspos("ZEL2", 1,"ALIC", fPosZEM[0], fPosZEM[1], zLastSlice, irot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEL2", 1,"ALIC", fPosZEM[0], fPosZEM[1], zLastSlice, irot1, "ONLY"); //Ch debug //printf("\n ZEM lenght = %f cm\n",2*fZEMLength); //printf("\n ZEM -> %f < z < %f cm\n",fPosZEM[2],fPosZEM[2]+2*fZEMLength+zLastSlice+kDimZEMPb); @@ -2261,15 +2261,15 @@ void AliZDCv3::StepManager() // // --- This part is for no shower developement in beam pipe, TDI, VColl // If particle interacts with beam pipe, TDI, VColl -> return - if(fNoShower==1 && ((gMC->CurrentMedium() == fMedSensPI) || (gMC->CurrentMedium() == fMedSensTDI) || - (gMC->CurrentMedium() == fMedSensVColl || (gMC->CurrentMedium() == fMedSensLumi)))){ + if(fNoShower==1 && ((TVirtualMC::GetMC()->CurrentMedium() == fMedSensPI) || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensTDI) || + (TVirtualMC::GetMC()->CurrentMedium() == fMedSensVColl || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensLumi)))){ // If option NoShower is set -> StopTrack Int_t ipr = 0; - gMC->TrackPosition(s[0],s[1],s[2]); - if(gMC->CurrentMedium() == fMedSensPI){ - knamed = gMC->CurrentVolName(); + TVirtualMC::GetMC()->TrackPosition(s[0],s[1],s[2]); + if(TVirtualMC::GetMC()->CurrentMedium() == fMedSensPI){ + knamed = TVirtualMC::GetMC()->CurrentVolName(); if(!strncmp(knamed,"YMQ",3)){ if(s[2]<0) fpLostITC += 1; else fpLostITA += 1; @@ -2281,8 +2281,8 @@ void AliZDCv3::StepManager() ipr=1; } } - else if(gMC->CurrentMedium() == fMedSensTDI){ - knamed = gMC->CurrentVolName(); + else if(TVirtualMC::GetMC()->CurrentMedium() == fMedSensTDI){ + knamed = TVirtualMC::GetMC()->CurrentVolName(); if(!strncmp(knamed,"MD1",3)){ if(s[2]<0) fpLostD1C += 1; else fpLostD1A += 1; @@ -2290,16 +2290,16 @@ void AliZDCv3::StepManager() } else if(!strncmp(knamed,"QTD",3)) fpLostTDI += 1; } - else if(gMC->CurrentMedium() == fMedSensVColl){ - knamed = gMC->CurrentVolName(); + else if(TVirtualMC::GetMC()->CurrentMedium() == fMedSensVColl){ + knamed = TVirtualMC::GetMC()->CurrentVolName(); if(!strncmp(knamed,"QCVC",4)) fpcVCollC++; else if(!strncmp(knamed,"QCVA",4)) fpcVCollA++; ipr=1; } // - //gMC->TrackMomentum(p[0], p[1], p[2], p[3]); + //TVirtualMC::GetMC()->TrackMomentum(p[0], p[1], p[2], p[3]); //printf("\t Particle: mass = %1.3f, E = %1.3f GeV, pz = %1.2f GeV -> stopped in volume %s\n", - // gMC->TrackMass(), p[3], p[2], gMC->CurrentVolName()); + // TVirtualMC::GetMC()->TrackMass(), p[3], p[2], TVirtualMC::GetMC()->CurrentVolName()); // if(ipr!=0){ printf("\n\t **********************************\n"); @@ -2314,24 +2314,24 @@ void AliZDCv3::StepManager() printf("\t # of particles in VColl = %d\n",fpcVCollA); printf("\t **********************************\n"); } - gMC->StopTrack(); + TVirtualMC::GetMC()->StopTrack(); return; } - if((gMC->CurrentMedium() == fMedSensZN) || (gMC->CurrentMedium() == fMedSensZP) || - (gMC->CurrentMedium() == fMedSensGR) || (gMC->CurrentMedium() == fMedSensF1) || - (gMC->CurrentMedium() == fMedSensF2) || (gMC->CurrentMedium() == fMedSensZEM)){ + if((TVirtualMC::GetMC()->CurrentMedium() == fMedSensZN) || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensZP) || + (TVirtualMC::GetMC()->CurrentMedium() == fMedSensGR) || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensF1) || + (TVirtualMC::GetMC()->CurrentMedium() == fMedSensF2) || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensZEM)){ //Particle coordinates - gMC->TrackPosition(s[0],s[1],s[2]); + TVirtualMC::GetMC()->TrackPosition(s[0],s[1],s[2]); for(j=0; j<=2; j++) x[j] = s[j]; hits[0] = x[0]; hits[1] = x[1]; hits[2] = x[2]; // Determine in which ZDC the particle is - knamed = gMC->CurrentVolName(); + knamed = TVirtualMC::GetMC()->CurrentVolName(); if(!strncmp(knamed,"ZN",2)){ if(x[2]<0.) vol[0]=1; // ZNC (dimuon side) else if(x[2]>0.) vol[0]=4; //ZNA @@ -2429,9 +2429,9 @@ void AliZDCv3::StepManager() // Store impact point and kinetic energy of the ENTERING particle - if(gMC->IsTrackEntering()){ + if(TVirtualMC::GetMC()->IsTrackEntering()){ //Particle energy - gMC->TrackMomentum(p[0],p[1],p[2],p[3]); + TVirtualMC::GetMC()->TrackMomentum(p[0],p[1],p[2],p[3]); hits[3] = p[3]; // Impact point on ZDC @@ -2462,7 +2462,7 @@ void AliZDCv3::StepManager() } else hits[11]=0; // - hits[12] = 1.0e09*gMC->TrackTime(); // in ns! + hits[12] = 1.0e09*TVirtualMC::GetMC()->TrackTime(); // in ns! //printf("\t TrackTime = %f\n", hits[12]); hits[13] = part->Eta(); @@ -2487,16 +2487,16 @@ void AliZDCv3::StepManager() } // //printf("\t Pc: x %1.2f y %1.2f z %1.2f E %1.2f GeV pz = %1.2f GeV in volume %s\n", - // x[0],x[1],x[3],p[3],p[2],gMC->CurrentVolName()); + // x[0],x[1],x[3],p[3],p[2],TVirtualMC::GetMC()->CurrentVolName()); // - gMC->StopTrack(); + TVirtualMC::GetMC()->StopTrack(); return; } } // Particle energy loss - if(gMC->Edep() != 0){ - hits[9] = gMC->Edep(); + if(TVirtualMC::GetMC()->Edep() != 0){ + hits[9] = TVirtualMC::GetMC()->Edep(); hits[7] = 0.; hits[8] = 0.; AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); @@ -2505,14 +2505,14 @@ void AliZDCv3::StepManager() // *** Light production in fibres - if((gMC->CurrentMedium() == fMedSensF1) || (gMC->CurrentMedium() == fMedSensF2)){ + if((TVirtualMC::GetMC()->CurrentMedium() == fMedSensF1) || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensF2)){ //Select charged particles - if((destep=gMC->Edep())){ + if((destep=TVirtualMC::GetMC()->Edep())){ // Particle velocity Float_t beta = 0.; - gMC->TrackMomentum(p[0],p[1],p[2],p[3]); + TVirtualMC::GetMC()->TrackMomentum(p[0],p[1],p[2],p[3]); Float_t ptot=TMath::Sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]); if(p[3] > 0.00001) beta = ptot/p[3]; else return; @@ -2527,7 +2527,7 @@ void AliZDCv3::StepManager() um[0] = p[0]/ptot; um[1] = p[1]/ptot; um[2] = p[2]/ptot; - gMC->Gmtod(um,ud,2); + TVirtualMC::GetMC()->Gmtod(um,ud,2); // 2 -> Angle < limit angle Double_t alfar = TMath::ACos(ud[2]); Double_t alfa = alfar*kRaddeg; @@ -2536,11 +2536,11 @@ void AliZDCv3::StepManager() ialfa = Int_t(1.+alfa/2.); // Distance between particle trajectory and fibre axis - gMC->TrackPosition(s[0],s[1],s[2]); + TVirtualMC::GetMC()->TrackPosition(s[0],s[1],s[2]); for(j=0; j<=2; j++){ x[j] = s[j]; } - gMC->Gmtod(x,xdet,1); + TVirtualMC::GetMC()->Gmtod(x,xdet,1); if(TMath::Abs(ud[0])>0.00001){ Float_t dcoeff = ud[1]/ud[0]; be = TMath::Abs((xdet[1]-dcoeff*xdet[0])/TMath::Sqrt(dcoeff*dcoeff+1.)); @@ -2552,7 +2552,7 @@ void AliZDCv3::StepManager() ibe = Int_t(be*1000.+1); //Looking into the light tables - Float_t charge = gMC->TrackCharge(); + Float_t charge = TVirtualMC::GetMC()->TrackCharge(); if(vol[0]==1 || vol[0]==4) { // (1) ZN fibres if(ibe>fNben) ibe=fNben; @@ -2561,7 +2561,7 @@ void AliZDCv3::StepManager() // Ch. debug //if(ibeta==3) printf("\t %f \t %f \t %f\n",alfa, be, out); //printf("\t ibeta = %d, ialfa = %d, ibe = %d -> nphe = %d\n\n",ibeta,ialfa,ibe,nphe); - if(gMC->CurrentMedium() == fMedSensF1){ + if(TVirtualMC::GetMC()->CurrentMedium() == fMedSensF1){ hits[7] = nphe; //fLightPMQ hits[8] = 0; hits[9] = 0; @@ -2578,7 +2578,7 @@ void AliZDCv3::StepManager() if(ibe>fNbep) ibe=fNbep; out = charge*charge*fTablep[ibeta][ialfa][ibe]; nphe = gRandom->Poisson(out); - if(gMC->CurrentMedium() == fMedSensF1){ + if(TVirtualMC::GetMC()->CurrentMedium() == fMedSensF1){ hits[7] = nphe; //fLightPMQ hits[8] = 0; hits[9] = 0; @@ -2594,7 +2594,7 @@ void AliZDCv3::StepManager() else if(vol[0]==3) { // (3) ZEM fibres if(ibe>fNbep) ibe=fNbep; out = charge*charge*fTablep[ibeta][ialfa][ibe]; - gMC->TrackPosition(s[0],s[1],s[2]); + TVirtualMC::GetMC()->TrackPosition(s[0],s[1],s[2]); Float_t xalic[3]; for(j=0; j<3; j++){ xalic[j] = s[j]; diff --git a/ZDC/AliZDCv4.cxx b/ZDC/AliZDCv4.cxx index f98cd50849c..70c5ce3f614 100644 --- a/ZDC/AliZDCv4.cxx +++ b/ZDC/AliZDCv4.cxx @@ -237,8 +237,8 @@ void AliZDCv4::CreateBeamLine() //-- rotation matrices for the legs Int_t irotpipe1, irotpipe2; - gMC->Matrix(irotpipe1,90.-1.0027,0.,90.,90.,1.0027,180.); - gMC->Matrix(irotpipe2,90.+1.0027,0.,90.,90.,1.0027,0.); + TVirtualMC::GetMC()->Matrix(irotpipe1,90.-1.0027,0.,90.,90.,1.0027,180.); + TVirtualMC::GetMC()->Matrix(irotpipe2,90.+1.0027,0.,90.,90.,1.0027,0.); Int_t *idtmed = fIdtmed->GetArray(); Double_t dx=0., dy=0., dz=0.; @@ -267,8 +267,8 @@ if(!fOnlyZEM){ conpar[6] = -zd1; conpar[7] = 0.; conpar[8] = 55.; - gMC->Gsvolu("ZDCC", "PCON", idtmed[10], conpar, 9); - gMC->Gspos("ZDCC", 1, "ALIC", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("ZDCC", "PCON", idtmed[10], conpar, 9); + TVirtualMC::GetMC()->Gspos("ZDCC", 1, "ALIC", 0., 0., 0., 0, "ONLY"); // -- BEAM PIPE from compensator dipole to the beginning of D1) @@ -276,8 +276,8 @@ if(!fOnlyZEM){ tubpar[1] = 6.7/2.; // From beginning of ZDC volumes to beginning of D1 tubpar[2] = (5838.3-zd1)/2.; - gMC->Gsvolu("QT01", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT01", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT01 TUBE pipe from z = %1.2f to z = %1.2f (D1 begin)\n",-zd1,-2*tubpar[2]-zd1); @@ -291,8 +291,8 @@ if(!fOnlyZEM){ tubpar[0] = 6.94/2.; tubpar[1] = 7.34/2.; tubpar[2] = (6909.8-zd1)/2.; - gMC->Gsvolu("QT02", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT02", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT02", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT02", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT02 TUBE pipe from z = %1.2f to z = %1.2f (D1 magnetic end)\n",-zd1,-2*tubpar[2]-zd1); @@ -301,8 +301,8 @@ if(!fOnlyZEM){ tubpar[0] = 8./2.; tubpar[1] = 8.6/2.; tubpar[2] = (6958.3-zd1)/2.; - gMC->Gsvolu("QT0B", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT0B", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT0B", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT0B", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT0B TUBE pipe from z = %1.2f to z = %1.2f \n",-zd1,-2*tubpar[2]-zd1); @@ -311,8 +311,8 @@ if(!fOnlyZEM){ tubpar[0] = 9./2.; tubpar[1] = 9.6/2.; tubpar[2] = (7022.8-zd1)/2.; - gMC->Gsvolu("QT03", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT03", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT03", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT03", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT03 TUBE pipe from z = %1.2f to z = %1.2f (D1 end)\n",-zd1,-2*tubpar[2]-zd1); @@ -323,8 +323,8 @@ if(!fOnlyZEM){ conpar[2] = 18.6/2.; conpar[3] = 9./2.; conpar[4] = 9.6/2.; - gMC->Gsvolu("QC01", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC01", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC01", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC01", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC01 CONE pipe from z = %1.2f to z= %1.2f (VCTCQ-I)\n",-zd1,-2*conpar[0]-zd1); @@ -341,7 +341,7 @@ if(!fOnlyZEM){ tubpar[0] = 18.6/2.; tubpar[1] = 7.6/2.; tubpar[2] = totLength1/2.; -// gMC->Gsvolu("QE01", "ELTU", idtmed[7], tubpar, 3); +// TVirtualMC::GetMC()->Gsvolu("QE01", "ELTU", idtmed[7], tubpar, 3); // temporary replace with a scaled tube (AG) TGeoTube *tubeQE01 = new TGeoTube(0.,tubpar[0],tubpar[2]); TGeoScale *scaleQE01 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.); @@ -351,15 +351,15 @@ if(!fOnlyZEM){ tubpar[0] = 18.0/2.; tubpar[1] = 7.0/2.; tubpar[2] = totLength1/2.; -// gMC->Gsvolu("QE02", "ELTU", idtmed[10], tubpar, 3); +// TVirtualMC::GetMC()->Gsvolu("QE02", "ELTU", idtmed[10], tubpar, 3); // temporary replace with a scaled tube (AG) TGeoTube *tubeQE02 = new TGeoTube(0.,tubpar[0],tubpar[2]); TGeoScale *scaleQE02 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.); TGeoScaledShape *sshapeQE02 = new TGeoScaledShape(tubeQE02, scaleQE02); new TGeoVolume("QE02", sshapeQE02, gGeoManager->GetMedium(idtmed[10])); - gMC->Gspos("QE01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); - gMC->Gspos("QE02", 1, "QE01", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QE01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QE02", 1, "QE01", 0., 0., 0., 0, "ONLY"); // Ch.debug //printf(" QE01 ELTU from z = %1.2f to z = %1.2f (VCTCQ-II+VAMTF+TCLIA+VAMTF+VCTCP-I)\n",-zd1,-2*tubpar[2]-zd1); @@ -371,9 +371,9 @@ if(!fOnlyZEM){ boxpar[2] = 124.4/2.; printf(" AliZDCv4 -> C side injection collimator jaws: apertures +%1.2f/-%1.2f center %1.2f [cm]\n", fVCollSideCAperture, fVCollSideCApertureNeg,fVCollSideCCentreY); - gMC->Gsvolu("QCVC" , "BOX ", idtmed[13], boxpar, 3); - gMC->Gspos("QCVC", 1, "QE02", -boxpar[0], fVCollSideCAperture+fVCollSideCCentreY+boxpar[1], -totLength1/2.+160.8+78.+148./2., 0, "ONLY"); - gMC->Gspos("QCVC", 2, "QE02", -boxpar[0], -fVCollSideCApertureNeg+fVCollSideCCentreY-boxpar[1], -totLength1/2.+160.8+78.+148./2., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QCVC" , "BOX ", idtmed[13], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QCVC", 1, "QE02", -boxpar[0], fVCollSideCAperture+fVCollSideCCentreY+boxpar[1], -totLength1/2.+160.8+78.+148./2., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QCVC", 2, "QE02", -boxpar[0], -fVCollSideCApertureNeg+fVCollSideCCentreY-boxpar[1], -totLength1/2.+160.8+78.+148./2., 0, "ONLY"); } zd1 += tubpar[2] * 2.; @@ -384,8 +384,8 @@ if(!fOnlyZEM){ conpar[2] = 21.87/2.; conpar[3] = 18.0/2.; conpar[4] = 18.6/2.; - gMC->Gsvolu("QC02", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC02", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC02", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC02", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC02 CONE pipe from z = %1.2f to z= %1.2f (VCTCP-II)\n",-zd1,-2*conpar[0]-zd1); @@ -397,8 +397,8 @@ if(!fOnlyZEM){ tubpar[0] = 21.2/2.; tubpar[1] = 21.9/2.; tubpar[2] = totLenght2/2.; - gMC->Gsvolu("QT04", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT04", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT04", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT04", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT04 TUBE pipe from z = %1.2f to z= %1.2f (VCTCP-III)\n",-zd1,-2*tubpar[2]-zd1); @@ -411,8 +411,8 @@ if(!fOnlyZEM){ conpar[2] = 81.3/2.; conpar[3] = 21.27/2.; conpar[4] = 21.87/2.; - gMC->Gsvolu("QC03", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC03", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC03", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC03", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC03 CONE pipe from z = %1.2f to z = %1.2f (VCTCD-I)\n",-zd1,-2*conpar[0]-zd1); @@ -423,8 +423,8 @@ if(!fOnlyZEM){ tubpar[0] = 79.7/2.; tubpar[1] = 81.3/2.; tubpar[2] = (5*475.2+97.-136)/2.; - gMC->Gsvolu("QT05", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT05", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT05", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT05", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT05 TUBE pipe from z = %1.2f to z = %1.2f (VCDGB+VCTCH-I)\n",-zd1,-2*tubpar[2]-zd1); @@ -442,8 +442,8 @@ if(!fOnlyZEM){ conpar[2] = 76.42868/2.; // thickness 8 mm conpar[3] = 79.7/2.; conpar[4] = 81.3/2.; // thickness 8 mm - gMC->Gsvolu("QC04", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC04", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC04", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC04", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC04 CONE pipe from z = %1.2f to z = %1.2f (VCTCH-II)\n",-zd1,-2*conpar[0]-zd1); @@ -455,8 +455,8 @@ if(!fOnlyZEM){ conpar[2] = 23.79588/2.; // thickness 3 mm conpar[3] = 74.82868/2.; conpar[4] = 75.42868/2.; // thickness 3 mm - gMC->Gsvolu("QC05", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC05", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC05", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC05", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC05 CONE pipe from z = %1.2f to z = %1.2f (VCTCH-III)\n",-zd1,-2*conpar[0]-zd1); @@ -468,8 +468,8 @@ if(!fOnlyZEM){ conpar[2] = 21.2/2.;// thickness 8 mm conpar[3] = 23.19588/2.; conpar[4] = 24.79588/2.;// thickness 8 mm - gMC->Gsvolu("QC06", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC06", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC06", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC06", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC06 CONE pipe from z = %1.2f to z = %1.2f (VCTCH-III)\n",-zd1,-2*conpar[0]-zd1); @@ -479,8 +479,8 @@ if(!fOnlyZEM){ tubpar[0] = 20.2/2.; tubpar[1] = 20.6/2.; tubpar[2] = 2.15/2.; - gMC->Gsvolu("QT06", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT06", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT06", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT06", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT06 TUBE pipe from z = %1.2f to z = %1.2f (VMZAR-I)\n",-zd1,-2*tubpar[2]-zd1); @@ -491,8 +491,8 @@ if(!fOnlyZEM){ conpar[2] = 24.3/2.; conpar[3] = 20.2/2.; conpar[4] = 20.6/2.; - gMC->Gsvolu("QC07", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC07", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC07", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC07", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC07 CONE pipe from z = %1.2f to z = %1.2f (VMZAR-II)\n",-zd1,-2*conpar[0]-zd1); @@ -501,8 +501,8 @@ if(!fOnlyZEM){ tubpar[0] = 23.9/2.; tubpar[1] = 25.5/2.; tubpar[2] = 17.0/2.; - gMC->Gsvolu("QT07", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT07", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT07", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT07", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT07 TUBE pipe from z = %1.2f to z = %1.2f (VMZAR-III)\n",-zd1,-2*tubpar[2]-zd1); @@ -513,8 +513,8 @@ if(!fOnlyZEM){ conpar[2] = 20.6/2.; conpar[3] = 23.9/2.; conpar[4] = 24.3/2.; - gMC->Gsvolu("QC08", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC08", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC08", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC08", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC08 CONE pipe from z = %1.2f to z = %1.2f (VMZAR-IV)\n",-zd1,-2*conpar[0]-zd1); @@ -523,8 +523,8 @@ if(!fOnlyZEM){ tubpar[0] = 20.2/2.; tubpar[1] = 20.6/2.; tubpar[2] = 2.15/2.; - gMC->Gsvolu("QT08", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT08", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT08", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT08", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT08 TUBE pipe from z = %1.2f to z = %1.2f (VMZAR-V)\n",-zd1,-2*tubpar[2]-zd1); @@ -534,8 +534,8 @@ if(!fOnlyZEM){ tubpar[0] = 19.6/2.; tubpar[1] = 25.3/2.; tubpar[2] = 4.9/2.; - gMC->Gsvolu("QT09", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT09", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT09", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT09", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT09 TUBE pipe from z = %1.2f to z = %1.2f (VMZAR-VI+VCTYB-I)\n",-zd1,-2*tubpar[2]-zd1); @@ -547,8 +547,8 @@ if(!fOnlyZEM){ tubpar[0] = 19.6/2.; tubpar[1] = 20.0/2.; tubpar[2] = 3.9/2.; - gMC->Gsvolu("QT10", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT10", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT10", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT10", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT10 TUBE pipe from z = %1.2f to z = %1.2f (VCTYB-II)\n",-zd1,-2*tubpar[2]-zd1); @@ -560,8 +560,8 @@ if(!fOnlyZEM){ conpar[2] = 22.06/2.; conpar[3] = 19.6/2.; conpar[4] = 20.0/2.; - gMC->Gsvolu("QC09", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC09", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC09", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC09", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY"); // Ch.debug //printf(" QC09 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1); @@ -571,8 +571,8 @@ if(!fOnlyZEM){ tubpar[0] = 21.66/2.; tubpar[1] = 22.06/2.; tubpar[2] = 28.6/2.; - gMC->Gsvolu("QT11", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT11", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT11", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT11", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT11 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1); @@ -658,9 +658,9 @@ if(!fOnlyZEM){ tubpar[0] = 5.4/2.; tubpar[1] = 5.8/2.; tubpar[2] = 40.0/2.; - gMC->Gsvolu("QT12", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT12", 1, "ZDCC", -15.8/2., 0., -tubpar[2]-zd1, 0, "ONLY"); - gMC->Gspos("QT12", 2, "ZDCC", 15.8/2., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT12", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT12", 1, "ZDCC", -15.8/2., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QT12", 2, "ZDCC", 15.8/2., 0., -tubpar[2]-zd1, 0, "ONLY"); // Ch.debug //printf(" QT12 TUBE from z = %1.2f to z = %1.2f (separate beam pipes)\n",-zd1,-2*tubpar[2]-zd1); @@ -672,9 +672,9 @@ if(!fOnlyZEM){ conpar[2] = 7.0/2.; conpar[3] = 5.4/2.; conpar[4] = 5.8/2.; - gMC->Gsvolu("QC10", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QC10", 1, "ZDCC", -7.9-0.175, 0., -conpar[0]-0.1-zd1, irotpipe1, "ONLY"); - gMC->Gspos("QC10", 2, "ZDCC", 7.9+0.175, 0., -conpar[0]-0.1-zd1, irotpipe2, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QC10", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QC10", 1, "ZDCC", -7.9-0.175, 0., -conpar[0]-0.1-zd1, irotpipe1, "ONLY"); + TVirtualMC::GetMC()->Gspos("QC10", 2, "ZDCC", 7.9+0.175, 0., -conpar[0]-0.1-zd1, irotpipe2, "ONLY"); //printf(" QC10 CONE from z = %1.2f to z = %1.2f (transition X2ZDC)\n",-zd1,-2*conpar[0]-0.2-zd1); zd1 += 2.*conpar[0]+0.2; @@ -683,9 +683,9 @@ if(!fOnlyZEM){ tubpar[0] = 6.3/2.; tubpar[1] = 7.0/2.; tubpar[2] = 639.8/2.; - gMC->Gsvolu("QT13", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QT13", 1, "ZDCC", -16.5/2., 0., -tubpar[2]-zd1, 0, "ONLY"); - gMC->Gspos("QT13", 2, "ZDCC", 16.5/2., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QT13", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QT13", 1, "ZDCC", -16.5/2., 0., -tubpar[2]-zd1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QT13", 2, "ZDCC", 16.5/2., 0., -tubpar[2]-zd1, 0, "ONLY"); //printf(" QT13 TUBE from z = %1.2f to z = %1.2f (separate beam pipes)\n",-zd1,-2*tubpar[2]-zd1); zd1 += 2.*tubpar[2]; @@ -697,8 +697,8 @@ if(!fOnlyZEM){ boxpar[0] = 8.0/2.; boxpar[1] = 8.0/2.; boxpar[2] = fLumiLength/2.; - gMC->Gsvolu("QLUC", "BOX ", idtmed[9], boxpar, 3); - gMC->Gspos("QLUC", 1, "ZDCC", 0., 0., fPosZNC[2]+66.+boxpar[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QLUC", "BOX ", idtmed[9], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QLUC", 1, "ZDCC", 0., 0., fPosZNC[2]+66.+boxpar[2], 0, "ONLY"); printf(" C SIDE LUMINOMETER %1.2f < z < %1.2f\n", fPosZNC[2]+66., fPosZNC[2]+66.+2*boxpar[2]); } } @@ -714,11 +714,11 @@ if(!fOnlyZEM){ // Rotation Matrices definition Int_t irotpipe3, irotpipe4, irotpipe5; //-- rotation matrices for the tilted cone after the TDI to recenter vacuum chamber - gMC->Matrix(irotpipe3,90.-1.8934,0.,90.,90.,1.8934,180.); + TVirtualMC::GetMC()->Matrix(irotpipe3,90.-1.8934,0.,90.,90.,1.8934,180.); //-- rotation matrices for the tilted tube before and after the TDI - gMC->Matrix(irotpipe4,90.-3.8,0.,90.,90.,3.8,180.); + TVirtualMC::GetMC()->Matrix(irotpipe4,90.-3.8,0.,90.,90.,3.8,180.); //-- rotation matrix for the tilted cone after the TDI - gMC->Matrix(irotpipe5,90.+9.8,0.,90.,90.,9.8,0.); + TVirtualMC::GetMC()->Matrix(irotpipe5,90.+9.8,0.,90.,90.,9.8,0.); // -- Mother of the ZDCs (Vacuum PCON) zd2 = 1910.22;// zd2 initial value @@ -732,8 +732,8 @@ if(!fOnlyZEM){ conpar[6] = 13500.; conpar[7] = 0.; conpar[8] = 55.; - gMC->Gsvolu("ZDCA", "PCON", idtmed[10], conpar, 9); - gMC->Gspos("ZDCA", 1, "ALIC", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("ZDCA", "PCON", idtmed[10], conpar, 9); + TVirtualMC::GetMC()->Gspos("ZDCA", 1, "ALIC", 0., 0., 0., 0, "ONLY"); // To avoid overlaps 1 micron are left between certain volumes! Double_t dxNoOverlap = 0.0; @@ -743,8 +743,8 @@ if(!fOnlyZEM){ tubpar[0] = 6.0/2.; tubpar[1] = 6.4/2.; tubpar[2] = 386.28/2. - dxNoOverlap; - gMC->Gsvolu("QA01", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA01", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA01", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA01", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA01 TUBE centred in %f from z = %1.2f to z = %1.2f (IT begin)\n",tubpar[2]+zd2,zd2,2*tubpar[2]+zd2); @@ -755,8 +755,8 @@ if(!fOnlyZEM){ tubpar[0] = 6.3/2.; tubpar[1] = 6.7/2.; tubpar[2] = 3541.8/2. - dxNoOverlap; - gMC->Gsvolu("QA02", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA02", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA02", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA02", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA02 TUBE from z = %1.2f to z= %1.2f (D1 begin)\n",zd2,2*tubpar[2]+zd2); @@ -775,8 +775,8 @@ if(!fOnlyZEM){ tubpar[0] = 6.75/2.; tubpar[1] = 7.15/2.; tubpar[2] = (945.0+80.1)/2.; - gMC->Gsvolu("QA03", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA03", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA03", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA03", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA03 TUBE from z = %1.2f to z = %1.2f (D1 end)\n",zd2,2*tubpar[2]+zd2); @@ -788,8 +788,8 @@ if(!fOnlyZEM){ conpar[2] = 7.15/2.; conpar[3] = 8.0/2.; conpar[4] = 8.4/2.; - gMC->Gsvolu("QA04", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA04", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA04", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA04", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QA04 CONE from z = %1.2f to z = %1.2f (transition cone)\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -797,8 +797,8 @@ if(!fOnlyZEM){ tubpar[0] = 8.0/2.; tubpar[1] = 8.4/2.; tubpar[2] = (43.9+20.+28.5+28.5)/2.; - gMC->Gsvolu("QA05", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA05", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA05", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA05", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA05 TUBE from z = %1.2f to z = %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -810,8 +810,8 @@ if(!fOnlyZEM){ conpar[2] = 8.4/2.; conpar[3] = 9.8/2.; conpar[4] = 10.2/2.; - gMC->Gsvolu("QAV1", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QAV1", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QAV1", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QAV1", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QAV1 CONE from z = %1.2f to z = %1.2f (VAEHI-I)\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -822,8 +822,8 @@ if(!fOnlyZEM){ conpar[2] = 10.2/2.; conpar[3] = 9.0/2.; conpar[4] = 9.4/2.; - gMC->Gsvolu("QAV2", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QAV2", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QAV2", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QAV2", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QAV2 CONE from z = %1.2f to z = %1.2f (VAEHI-II)\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -832,8 +832,8 @@ if(!fOnlyZEM){ tubpar[0] = 9.0/2.; tubpar[1] = 9.4/2.; tubpar[2] = 31.0/2.; - gMC->Gsvolu("QAV3", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QAV3", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QAV3", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QAV3", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QAV3 TUBE from z = %1.2f to z = %1.2f (VAEHI-III)\n",zd2,2*tubpar[2]+zd2); @@ -847,8 +847,8 @@ if(!fOnlyZEM){ conpar[2] = 13.0/2.; conpar[3] = 9.6/2.; conpar[4] = 13.0/2.; - gMC->Gsvolu("Q01T", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("Q01T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q01T", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("Q01T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" Q01T CONE from z = %1.2f to z = %1.2f (TCDD-I)\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -857,8 +857,8 @@ if(!fOnlyZEM){ tubpar[0] = 9.6/2.; tubpar[1] = 10.0/2.; tubpar[2] = 1.0/2.; - gMC->Gsvolu("Q02T", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("Q02T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q02T", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q02T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" Q02T TUBE from z = %1.2f to z= %1.2f (TCDD-II)\n",zd2,2*tubpar[2]+zd2); @@ -870,8 +870,8 @@ if(!fOnlyZEM){ conpar[2] = 10.0/2.; conpar[3] = 13.8/2.; conpar[4] = 14.2/2.; - gMC->Gsvolu("Q03T", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("Q03T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q03T", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("Q03T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" Q03T CONE from z = %1.2f to z= %1.2f (TCDD-III)\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -880,8 +880,8 @@ if(!fOnlyZEM){ tubpar[0] = 13.8/2.; tubpar[1] = 14.2/2.; tubpar[2] = 38.6/2.; - gMC->Gsvolu("Q04T", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("Q04T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q04T", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q04T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" Q04T TUBE from z = %1.2f to z= %1.2f (TCDD-IV)\n",zd2,2*tubpar[2]+zd2); @@ -891,8 +891,8 @@ if(!fOnlyZEM){ tubpar[0] = 21.0/2.; tubpar[1] = 21.4/2.; tubpar[2] = 100.12/2.; - gMC->Gsvolu("Q05T", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("Q05T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q05T", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q05T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" Q05T TUBE from z = %1.2f to z= %1.2f (TCDD-V)\n",zd2,2*tubpar[2]+zd2); @@ -902,8 +902,8 @@ if(!fOnlyZEM){ tubpar[0] = 13.8/2.; tubpar[1] = 14.2/2.; tubpar[2] = 38.6/2.; - gMC->Gsvolu("Q06T", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("Q06T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q06T", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q06T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" Q06T TUBE from z = %1.2f to z= %1.2f (TCDD-VI)\n",zd2,2*tubpar[2]+zd2); @@ -915,8 +915,8 @@ if(!fOnlyZEM){ conpar[2] = 14.2/2.; conpar[3] = 18.0/2.; conpar[4] = 18.4/2.; - gMC->Gsvolu("Q07T", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("Q07T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q07T", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("Q07T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" Q07T CONE from z = %1.2f to z= %1.2f (TCDD-VII)\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -930,15 +930,15 @@ if(!fOnlyZEM){ tubspar[2] = 100.0/2.; tubspar[3] = 0.; tubspar[4] = 180.; - gMC->Gsvolu("Q08T", "TUBS", idtmed[7], tubspar, 5); + TVirtualMC::GetMC()->Gsvolu("Q08T", "TUBS", idtmed[7], tubspar, 5); // rectangular beam pipe inside TCDD upper section (Vacuum) boxpar[0] = 7.0/2.; boxpar[1] = 2.2/2.; boxpar[2] = 100./2.; - gMC->Gsvolu("Q09T", "BOX ", idtmed[10], boxpar, 3); + TVirtualMC::GetMC()->Gsvolu("Q09T", "BOX ", idtmed[10], boxpar, 3); // positioning vacuum box in the upper section of TCDD - gMC->Gspos("Q09T", 1, "Q08T", 0., 1.1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q09T", 1, "Q08T", 0., 1.1, 0., 0, "ONLY"); // lower section : one single phi segment of a tube tubspar[0] = 0.0/2.; @@ -946,18 +946,18 @@ if(!fOnlyZEM){ tubspar[2] = 100.0/2.; tubspar[3] = 180.; tubspar[4] = 360.; - gMC->Gsvolu("Q10T", "TUBS", idtmed[7], tubspar, 5); + TVirtualMC::GetMC()->Gsvolu("Q10T", "TUBS", idtmed[7], tubspar, 5); // rectangular beam pipe inside TCDD lower section (Vacuum) boxpar[0] = 7.0/2.; boxpar[1] = 2.2/2.; boxpar[2] = 100./2.; - gMC->Gsvolu("Q11T", "BOX ", idtmed[10], boxpar, 3); + TVirtualMC::GetMC()->Gsvolu("Q11T", "BOX ", idtmed[10], boxpar, 3); // positioning vacuum box in the lower section of TCDD - gMC->Gspos("Q11T", 1, "Q10T", 0., -1.1, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q11T", 1, "Q10T", 0., -1.1, 0., 0, "ONLY"); // positioning TCDD elements in ZDCA, (inside TCDD volume) - gMC->Gspos("Q08T", 1, "ZDCA", 0., fTCDDAperturePos, -100.+zd2, 0, "ONLY"); - gMC->Gspos("Q10T", 1, "ZDCA", 0., -fTCDDApertureNeg, -100.+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q08T", 1, "ZDCA", 0., fTCDDAperturePos, -100.+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q10T", 1, "ZDCA", 0., -fTCDDApertureNeg, -100.+zd2, 0, "ONLY"); printf(" AliZDCv4 -> TCDD apertures +%1.2f/-%1.2f cm\n", fTCDDAperturePos, fTCDDApertureNeg); @@ -965,10 +965,10 @@ if(!fOnlyZEM){ boxpar[0] = 0.2/2.; boxpar[1] = 4.0/2.; boxpar[2] = 100./2.; - gMC->Gsvolu("Q12T", "BOX ", idtmed[7], boxpar, 3); + TVirtualMC::GetMC()->Gsvolu("Q12T", "BOX ", idtmed[7], boxpar, 3); // positioning RF screen at both sides of TCDD - gMC->Gspos("Q12T", 1, "ZDCA", tubspar[1]+boxpar[0], 0., -100.+zd2, 0, "ONLY"); - gMC->Gspos("Q12T", 2, "ZDCA", -tubspar[1]-boxpar[0], 0., -100.+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q12T", 1, "ZDCA", tubspar[1]+boxpar[0], 0., -100.+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("Q12T", 2, "ZDCA", -tubspar[1]-boxpar[0], 0., -100.+zd2, 0, "ONLY"); //---------------------------- TCDD end --------------------------------------- // The following elliptical tube 180 mm x 70 mm @@ -979,7 +979,7 @@ if(!fOnlyZEM){ tubpar[0] = 18.4/2.; tubpar[1] = 7.4/2.; tubpar[2] = (78+9.3)/2.; -// gMC->Gsvolu("QA06", "ELTU", idtmed[7], tubpar, 3); +// TVirtualMC::GetMC()->Gsvolu("QA06", "ELTU", idtmed[7], tubpar, 3); // temporary replace with a scaled tube (AG) TGeoTube *tubeQA06 = new TGeoTube(0.,tubpar[0],tubpar[2]); TGeoScale *scaleQA06 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.); @@ -990,15 +990,15 @@ if(!fOnlyZEM){ tubpar[0] = 18.0/2.; tubpar[1] = 7.0/2.; tubpar[2] = (78+9.3)/2.; -// gMC->Gsvolu("QA07", "ELTU", idtmed[10], tubpar, 3); +// TVirtualMC::GetMC()->Gsvolu("QA07", "ELTU", idtmed[10], tubpar, 3); // temporary replace with a scaled tube (AG) TGeoTube *tubeQA07 = new TGeoTube(0.,tubpar[0],tubpar[2]); TGeoScale *scaleQA07 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.); TGeoScaledShape *sshapeQA07 = new TGeoScaledShape(tubeQA07, scaleQA07); new TGeoVolume("QA07", sshapeQA07, gGeoManager->GetMedium(idtmed[10])); ////printf(" QA07 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); - gMC->Gspos("QA06", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); - gMC->Gspos("QA07", 1, "QA06", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA06", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA07", 1, "QA06", 0., 0., 0., 0, "ONLY"); zd2 += 2.*tubpar[2]; @@ -1008,8 +1008,8 @@ if(!fOnlyZEM){ conpar[2] = 18.6/2.; conpar[3] = 21.27/2.; conpar[4] = 21.87/2.; - gMC->Gsvolu("QA08", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA08", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA08", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA08", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA08 CONE from z = %f to z = %f (VCTCP-II)\n",zd2,2*conpar[0]+zd2); @@ -1022,8 +1022,8 @@ if(!fOnlyZEM){ tubpar[0] = 21.27/2.; tubpar[1] = 21.87/2.; tubpar[2] = (195.7+148.+78.)/2.; - gMC->Gsvolu("QA09", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA09", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA09", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA09", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); //printf(" QA09 TUBE from z = %1.2f to z= %1.2f (VCTCP-III+VCDWB+VMBGA+VCDWE+VMBGA)\n",zd2,2*tubpar[2]+zd2); zd2 += 2.*tubpar[2]; @@ -1034,8 +1034,8 @@ if(!fOnlyZEM){ conpar[2] = 21.87/2.; conpar[3] = 33.2/2.; conpar[4] = 33.8/2.; - gMC->Gsvolu("QA10", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA10", 1, "ZDCA", -1.66, 0., conpar[0]+0.73+zd2, irotpipe4, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA10", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA10", 1, "ZDCA", -1.66, 0., conpar[0]+0.73+zd2, irotpipe4, "ONLY"); // Ch.debug //printf(" QA10 skewed CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+0.73+1.13+zd2); @@ -1045,13 +1045,13 @@ if(!fOnlyZEM){ tubpar[0] = 0.; tubpar[1] = 54.6/2.; tubpar[2] = 540.0/2.; - gMC->Gsvolu("Q13TM", "TUBE", idtmed[10], tubpar, 3); - gMC->Gspos("Q13TM", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q13TM", "TUBE", idtmed[10], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q13TM", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); tubpar[0] = 54.0/2.; tubpar[1] = 54.6/2.; tubpar[2] = 540.0/2.; - gMC->Gsvolu("Q13T", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("Q13T", 1, "Q13TM", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("Q13T", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("Q13T", 1, "Q13TM", 0., 0., 0., 0, "ONLY"); // Ch.debug //printf(" Q13T TUBE from z = %1.2f to z= %1.2f (TDI vacuum chamber)\n",zd2,2*tubpar[2]+zd2); @@ -1061,21 +1061,21 @@ if(!fOnlyZEM){ boxpar[0] = 11.0/2.; boxpar[1] = 9.0/2.; boxpar[2] = 540.0/2.; - gMC->Gsvolu("QTD1", "BOX ", idtmed[7], boxpar, 3); - gMC->Gspos("QTD1", 1, "Q13TM", -3.8, boxpar[1]+fTDIAperturePos, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTD1", "BOX ", idtmed[7], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QTD1", 1, "Q13TM", -3.8, boxpar[1]+fTDIAperturePos, 0., 0, "ONLY"); boxpar[0] = 11.0/2.; boxpar[1] = 9.0/2.; boxpar[2] = 540.0/2.; - gMC->Gsvolu("QTD2", "BOX ", idtmed[7], boxpar, 3); - gMC->Gspos("QTD2", 1, "Q13TM", -3.8, -boxpar[1]-fTDIApertureNeg, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTD2", "BOX ", idtmed[7], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QTD2", 1, "Q13TM", -3.8, -boxpar[1]-fTDIApertureNeg, 0., 0, "ONLY"); boxpar[0] = 5.1/2.; boxpar[1] = 0.2/2.; boxpar[2] = 540.0/2.; - gMC->Gsvolu("QTD3", "BOX ", idtmed[7], boxpar, 3); - gMC->Gspos("QTD3", 1, "Q13TM", -3.8+5.5+boxpar[0], fTDIAperturePos, 0., 0, "ONLY"); - gMC->Gspos("QTD3", 2, "Q13TM", -3.8+5.5+boxpar[0], -fTDIApertureNeg, 0., 0, "ONLY"); - gMC->Gspos("QTD3", 3, "Q13TM", -3.8-5.5-boxpar[0], fTDIAperturePos, 0., 0, "ONLY"); - gMC->Gspos("QTD3", 4, "Q13TM", -3.8-5.5-boxpar[0], -fTDIApertureNeg, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTD3", "BOX ", idtmed[7], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QTD3", 1, "Q13TM", -3.8+5.5+boxpar[0], fTDIAperturePos, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QTD3", 2, "Q13TM", -3.8+5.5+boxpar[0], -fTDIApertureNeg, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QTD3", 3, "Q13TM", -3.8-5.5-boxpar[0], fTDIAperturePos, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QTD3", 4, "Q13TM", -3.8-5.5-boxpar[0], -fTDIApertureNeg, 0., 0, "ONLY"); printf(" AliZDCv4 -> TDI apertures +%1.2f/-%1.2f cm\n", fTDIAperturePos, fTDIApertureNeg); // @@ -1084,15 +1084,15 @@ if(!fOnlyZEM){ tubspar[2] = 540.0/2.; tubspar[3] = 90.; tubspar[4] = 270.; - gMC->Gsvolu("QTD4", "TUBS", idtmed[7], tubspar, 5); - gMC->Gspos("QTD4", 1, "Q13TM", -3.8-10.6, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTD4", "TUBS", idtmed[7], tubspar, 5); + TVirtualMC::GetMC()->Gspos("QTD4", 1, "Q13TM", -3.8-10.6, 0., 0., 0, "ONLY"); tubspar[0] = 12.0/2.; tubspar[1] = 12.4/2.; tubspar[2] = 540.0/2.; tubspar[3] = -90.; tubspar[4] = 90.; - gMC->Gsvolu("QTD5", "TUBS", idtmed[7], tubspar, 5); - gMC->Gspos("QTD5", 1, "Q13TM", -3.8+10.6, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QTD5", "TUBS", idtmed[7], tubspar, 5); + TVirtualMC::GetMC()->Gspos("QTD5", 1, "Q13TM", -3.8+10.6, 0., 0., 0, "ONLY"); //---------------- END DEFINING TDI INSIDE Q13T ------------------------------- // VCTCG skewed transition piece (ID=332 mm to 212.7 mm) (after TDI) @@ -1101,8 +1101,8 @@ if(!fOnlyZEM){ conpar[2] = 33.8/2.; conpar[3] = 21.27/2.; conpar[4] = 21.87/2.; - gMC->Gsvolu("QA11", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA11", 1, "ZDCA", 4.32-3.8, 0., conpar[0]+2.92+zd2, irotpipe5, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA11", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA11", 1, "ZDCA", 4.32-3.8, 0., conpar[0]+2.92+zd2, irotpipe5, "ONLY"); // Ch.debug //printf(" QA11 skewed CONE from z = %f to z =%f (VCTCG)\n",zd2,2*conpar[0]+2.92+1.89+zd2); @@ -1114,8 +1114,8 @@ if(!fOnlyZEM){ tubpar[0] = 21.27/2.; tubpar[1] = 21.87/2.; tubpar[2] = 210.0/2.; - gMC->Gsvolu("QA12", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA12", 1, "ZDCA", 4., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA12", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA12", 1, "ZDCA", 4., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA12 TUBE from z = %1.2f to z= %1.2f (VMBGA+VCDWE+VMBGA+BTVTS+VMLGB)\n",zd2,2*tubpar[2]+zd2); @@ -1128,8 +1128,8 @@ if(!fOnlyZEM){ conpar[2] = 21.87/2.; conpar[3] = 79.7/2.; conpar[4] = 81.3/2.; - gMC->Gsvolu("QA13", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA13", 1, "ZDCA", 4.-2., 0., conpar[0]+0.37+zd2, irotpipe3, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA13", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA13", 1, "ZDCA", 4.-2., 0., conpar[0]+0.37+zd2, irotpipe3, "ONLY"); // Ch.debug //printf(" QA13 CONE from z = %1.2f to z = %1.2f (VCTCC-I)\n",zd2,2*conpar[0]+0.37+1.35+zd2); @@ -1143,8 +1143,8 @@ if(!fOnlyZEM){ tubpar[0] = 79.7/2.; tubpar[1] = 81.3/2.; tubpar[2] = (2221.-136.)/2.; - gMC->Gsvolu("QA14", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA14", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA14", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA14", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA14 TUBE from z = %1.2f to z = %1.2f (VCTCC-II)\n",zd2,2*tubpar[2]+zd2); @@ -1162,8 +1162,8 @@ if(!fOnlyZEM){ conpar[2] = 81.3/2.; // thickness 8 mm conpar[3] = 74.82868/2.; conpar[4] = 76.42868/2.; // thickness 8 mm - gMC->Gsvolu("QA15", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA15", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA15", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA15", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QA15 CONE from z = %1.2f to z= %1.2f (VCTCR-I)\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -1174,8 +1174,8 @@ if(!fOnlyZEM){ conpar[2] = 75.42868/2.; // thickness 3 mm conpar[3] = 23.19588/2.; conpar[4] = 23.79588/2.; // thickness 3 mm - gMC->Gsvolu("QA16", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA16", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA16", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA16", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QA16 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -1186,8 +1186,8 @@ if(!fOnlyZEM){ conpar[2] = 24.79588/2.;// thickness 8 mm conpar[3] = 19.6/2.; conpar[4] = 21.2/2.;// thickness 8 mm - gMC->Gsvolu("QA17", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA17", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA17", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA17", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); //printf(" QA17 CONE from z = %1.2f to z= %1.2f (VCTCR-II)\n",zd2,2*conpar[0]+zd2); zd2 += 2.*conpar[0]; @@ -1196,8 +1196,8 @@ if(!fOnlyZEM){ tubpar[0] = 19.6/2.; tubpar[1] = 21.2/2.; tubpar[2] = 9.55/2.; - gMC->Gsvolu("QA18", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA18", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA18", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA18", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA18 TUBE from z = %1.2f to z= %1.2f (VCTCR-III)\n",zd2,2*tubpar[2]+zd2); @@ -1207,8 +1207,8 @@ if(!fOnlyZEM){ tubpar[0] = 19.6/2.; tubpar[1] = 25.3/2.; tubpar[2] = 4.9/2.; - gMC->Gsvolu("QF01", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QF01", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QF01", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QF01", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QF01 TUBE from z = %1.2f to z= %1.2f (VMZAR-I)\n",zd2,2*tubpar[2]+zd2); @@ -1218,8 +1218,8 @@ if(!fOnlyZEM){ tubpar[0] = 20.2/2.; tubpar[1] = 20.6/2.; tubpar[2] = 2.15/2.; - gMC->Gsvolu("QA19", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA19", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA19", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA19", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA19 TUBE from z = %1.2f to z = %1.2f (VMZAR-II)\n",zd2,2*tubpar[2]+zd2); @@ -1230,8 +1230,8 @@ if(!fOnlyZEM){ conpar[2] = 20.6/2.; conpar[3] = 23.9/2.; conpar[4] = 24.3/2.; - gMC->Gsvolu("QA20", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA20", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA20", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA20", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA20 CONE from z = %1.2f to z = %1.2f (VMZAR-III)\n",zd2,2*conpar[0]+zd2); @@ -1240,8 +1240,8 @@ if(!fOnlyZEM){ tubpar[0] = 23.9/2.; tubpar[1] = 25.5/2.; tubpar[2] = 17.0/2.; - gMC->Gsvolu("QA21", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA21", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA21", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA21", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA21 TUBE from z = %1.2f to z = %1.2f (VMZAR-IV)\n",zd2,2*tubpar[2]+zd2); @@ -1252,8 +1252,8 @@ if(!fOnlyZEM){ conpar[2] = 24.3/2.; conpar[3] = 20.2/2.; conpar[4] = 20.6/2.; - gMC->Gsvolu("QA22", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA22", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA22", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA22", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA22 CONE from z = %1.2f to z = %1.2f (VMZAR-V)\n",zd2,2*conpar[0]+zd2); @@ -1262,8 +1262,8 @@ if(!fOnlyZEM){ tubpar[0] = 20.2/2.; tubpar[1] = 20.6/2.; tubpar[2] = 2.15/2.; - gMC->Gsvolu("QA23", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA23", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA23", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA23", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA23 TUBE from z = %1.2f to z= %1.2f (VMZAR-VI)\n",zd2,2*tubpar[2]+zd2); @@ -1273,8 +1273,8 @@ if(!fOnlyZEM){ tubpar[0] = 19.6/2.; tubpar[1] = 25.3/2.; tubpar[2] = 4.9/2.; - gMC->Gsvolu("QF02", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QF02", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QF02", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QF02", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QF02 TUBE from z = %1.2f to z= %1.2f (VMZAR-VII)\n",zd2,2*tubpar[2]+zd2); @@ -1284,8 +1284,8 @@ if(!fOnlyZEM){ tubpar[0] = 19.6/2.; tubpar[1] = 20.0/2.; tubpar[2] = 3.9/2.; - gMC->Gsvolu("QA24", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA24", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA24", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA24", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA24 TUBE from z = %1.2f to z= %1.2f (VCTYB)\n",zd2,2*tubpar[2]+zd2); @@ -1297,8 +1297,8 @@ if(!fOnlyZEM){ conpar[2] = 20.0/2.; conpar[3] = 21.66/2.; conpar[4] = 22.06/2.; - gMC->Gsvolu("QA25", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA25", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA25", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA25", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA25 CONE from z = %1.2f to z= %1.2f (transition cone)\n",zd2,2*conpar[0]+zd2); @@ -1308,8 +1308,8 @@ if(!fOnlyZEM){ tubpar[0] = 21.66/2.; tubpar[1] = 22.06/2.; tubpar[2] = 28.6/2.; - gMC->Gsvolu("QA26", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA26", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA26", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA26", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA26 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2); @@ -1397,9 +1397,9 @@ if(!fOnlyZEM){ tubpar[0] = 5.4/2.; tubpar[1] = 5.8/2.; tubpar[2] = 40.0/2.; - gMC->Gsvolu("QA27", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA27", 1, "ZDCA", -15.8/2., 0., tubpar[2]+zd2, 0, "ONLY"); - gMC->Gspos("QA27", 2, "ZDCA", 15.8/2., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA27", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA27", 1, "ZDCA", -15.8/2., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA27", 2, "ZDCA", 15.8/2., 0., tubpar[2]+zd2, 0, "ONLY"); // Ch.debug //printf(" QA27 TUBE from z = %1.2f to z= %1.2f (separate pipes)\n",zd2,2*tubpar[2]+zd2); @@ -1411,9 +1411,9 @@ if(!fOnlyZEM){ conpar[2] = 5.8/2.; conpar[3] = 6.3/2.; conpar[4] = 7.0/2.; - gMC->Gsvolu("QA28", "CONE", idtmed[7], conpar, 5); - gMC->Gspos("QA28", 1, "ZDCA", -7.9-0.175, 0., conpar[0]+0.5+zd2, irotpipe1, "ONLY"); - gMC->Gspos("QA28", 2, "ZDCA", 7.9+0.175, 0., conpar[0]+0.5+zd2, irotpipe2, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA28", "CONE", idtmed[7], conpar, 5); + TVirtualMC::GetMC()->Gspos("QA28", 1, "ZDCA", -7.9-0.175, 0., conpar[0]+0.5+zd2, irotpipe1, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA28", 2, "ZDCA", 7.9+0.175, 0., conpar[0]+0.5+zd2, irotpipe2, "ONLY"); //printf(" QA28 CONE from z = %1.2f to z= %1.2f (transition X2ZDC)\n",zd2,2*conpar[0]+0.2+zd2); zd2 += 2.*conpar[0]+1.; @@ -1422,9 +1422,9 @@ if(!fOnlyZEM){ tubpar[0] = 6.3/2.; tubpar[1] = 7.0/2.; tubpar[2] = (342.5+498.3)/2.; - gMC->Gsvolu("QA29", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("QA29", 1, "ZDCA", -16.5/2., 0., tubpar[2]+zd2, 0, "ONLY"); - gMC->Gspos("QA29", 2, "ZDCA", 16.5/2., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QA29", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QA29", 1, "ZDCA", -16.5/2., 0., tubpar[2]+zd2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QA29", 2, "ZDCA", 16.5/2., 0., tubpar[2]+zd2, 0, "ONLY"); //printf(" QA29 TUBE from z = %1.2f to z= %1.2f (separate pipes)\n",zd2,2*tubpar[2]+zd2); zd2 += 2.*tubpar[2]; @@ -1434,8 +1434,8 @@ if(!fOnlyZEM){ boxpar[0] = 8.0/2.; boxpar[1] = 8.0/2.; boxpar[2] = fLumiLength/2.; - gMC->Gsvolu("QLUA", "BOX ", idtmed[9], boxpar, 3); - gMC->Gspos("QLUA", 1, "ZDCA", 0., 0., fPosZNA[2]-66.-boxpar[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QLUA", "BOX ", idtmed[9], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QLUA", 1, "ZDCA", 0., 0., fPosZNA[2]-66.-boxpar[2], 0, "ONLY"); printf(" A SIDE LUMINOMETER %1.2f < z < %1.2f\n\n", fPosZNA[2]-66., fPosZNA[2]-66.-2*boxpar[2]); } printf(" END OF A SIDE BEAM PIPE VOLUME DEFINITION AT z = %f m from IP2\n",zd2/100.); @@ -1454,16 +1454,16 @@ if(!fOnlyZEM){ tubpar[0] = 0.; tubpar[1] = 3.14; tubpar[2] = 153./2.; - gMC->Gsvolu("MBXW", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MBXW", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 4.5; tubpar[1] = 55.; tubpar[2] = 153./2.; - gMC->Gsvolu("YMBX", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YMBX", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("MBXW", 1, "ZDCC", 0., 0., -tubpar[2]-zCorrDip, 0, "ONLY"); - gMC->Gspos("YMBX", 1, "ZDCC", 0., 0., -tubpar[2]-zCorrDip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MBXW", 1, "ZDCC", 0., 0., -tubpar[2]-zCorrDip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMBX", 1, "ZDCC", 0., 0., -tubpar[2]-zCorrDip, 0, "ONLY"); // -- INNER TRIPLET @@ -1475,38 +1475,38 @@ if(!fOnlyZEM){ tubpar[0] = 0.; tubpar[1] = 3.14; tubpar[2] = 637./2.; - gMC->Gsvolu("MQXL", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQXL", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 3.5; tubpar[1] = 22.; tubpar[2] = 637./2.; - gMC->Gsvolu("YMQL", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YMQL", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("MQXL", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip, 0, "ONLY"); - gMC->Gspos("YMQL", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQXL", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQL", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip, 0, "ONLY"); - gMC->Gspos("MQXL", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-2400., 0, "ONLY"); - gMC->Gspos("YMQL", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-2400., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQXL", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-2400., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQL", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-2400., 0, "ONLY"); // -- MQX // -- GAP (VACUUM WITH MAGNETIC FIELD) tubpar[0] = 0.; tubpar[1] = 3.14; tubpar[2] = 550./2.; - gMC->Gsvolu("MQX ", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQX ", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 3.5; tubpar[1] = 22.; tubpar[2] = 550./2.; - gMC->Gsvolu("YMQ ", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YMQ ", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("MQX ", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-908.5, 0, "ONLY"); - gMC->Gspos("YMQ ", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-908.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX ", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-908.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ ", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-908.5, 0, "ONLY"); - gMC->Gspos("MQX ", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-1558.5, 0, "ONLY"); - gMC->Gspos("YMQ ", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-1558.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX ", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-1558.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ ", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-1558.5, 0, "ONLY"); // -- SEPARATOR DIPOLE D1 zD1 = 5838.3001; @@ -1515,25 +1515,25 @@ if(!fOnlyZEM){ tubpar[0] = 0.; tubpar[1] = 3.46; tubpar[2] = 945./2.; - gMC->Gsvolu("MD1 ", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MD1 ", "TUBE", idtmed[11], tubpar, 3); // -- Insert horizontal Cu plates inside D1 // -- (to simulate the vacuum chamber) boxpar[0] = TMath::Sqrt(tubpar[1]*tubpar[1]-(2.98+0.2)*(2.98+0.2)) - 0.05; boxpar[1] = 0.2/2.; boxpar[2] = 945./2.; - gMC->Gsvolu("MD1V", "BOX ", idtmed[6], boxpar, 3); - gMC->Gspos("MD1V", 1, "MD1 ", 0., 2.98+boxpar[1], 0., 0, "ONLY"); - gMC->Gspos("MD1V", 2, "MD1 ", 0., -2.98-boxpar[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("MD1V", "BOX ", idtmed[6], boxpar, 3); + TVirtualMC::GetMC()->Gspos("MD1V", 1, "MD1 ", 0., 2.98+boxpar[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD1V", 2, "MD1 ", 0., -2.98-boxpar[1], 0., 0, "ONLY"); // -- YOKE tubpar[0] = 3.68; tubpar[1] = 110./2.; tubpar[2] = 945./2.; - gMC->Gsvolu("YD1 ", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YD1 ", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("YD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD1, 0, "ONLY"); - gMC->Gspos("MD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD1, 0, "ONLY"); // Ch debug //printf(" MD1 from z = %1.2f to z= %1.2f cm\n",-zD1, -zD1-2*tubpar[2]); @@ -1543,20 +1543,20 @@ if(!fOnlyZEM){ tubpar[0] = 0.; tubpar[1] = 7.5/2.; tubpar[2] = 945./2.; - gMC->Gsvolu("MD2 ", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MD2 ", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 0.; tubpar[1] = 55.; tubpar[2] = 945./2.; - gMC->Gsvolu("YD2 ", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YD2 ", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("YD2 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YD2 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD2, 0, "ONLY"); // Ch debug //printf(" YD2 from z = %1.2f to z= %1.2f cm\n",-zD2, -zD2-2*tubpar[2]); - gMC->Gspos("MD2 ", 1, "YD2 ", -9.4, 0., 0., 0, "ONLY"); - gMC->Gspos("MD2 ", 2, "YD2 ", 9.4, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD2 ", 1, "YD2 ", -9.4, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD2 ", 2, "YD2 ", 9.4, 0., 0., 0, "ONLY"); */ // *************************************************************** // SIDE A - RB24 @@ -1567,15 +1567,15 @@ if(!fOnlyZEM){ tubpar[0] = 0.; tubpar[1] = 3.; tubpar[2] = 153./2.; - gMC->Gsvolu("MCBW", "TUBE", idtmed[11], tubpar, 3); - gMC->Gspos("MCBW", 1, "ZDCA", 0., 0., tubpar[2]+zCorrDip, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("MCBW", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gspos("MCBW", 1, "ZDCA", 0., 0., tubpar[2]+zCorrDip, 0, "ONLY"); // -- YOKE tubpar[0] = 4.5; tubpar[1] = 55.; tubpar[2] = 153./2.; - gMC->Gsvolu("YMCB", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("YMCB", 1, "ZDCA", 0., 0., tubpar[2]+zCorrDip, 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("YMCB", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gspos("YMCB", 1, "ZDCA", 0., 0., tubpar[2]+zCorrDip, 0, "ONLY"); // -- INNER TRIPLET // -- DEFINE MQX1 AND MQX2 QUADRUPOLE ELEMENT @@ -1584,50 +1584,50 @@ if(!fOnlyZEM){ tubpar[0] = 0.; tubpar[1] = 3.14; tubpar[2] = 637./2.; - gMC->Gsvolu("MQX1", "TUBE", idtmed[11], tubpar, 3); - gMC->Gsvolu("MQX4", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQX1", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQX4", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 3.5; tubpar[1] = 22.; tubpar[2] = 637./2.; - gMC->Gsvolu("YMQ1", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YMQ1", "TUBE", idtmed[7], tubpar, 3); // -- Q1 - gMC->Gspos("MQX1", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip, 0, "ONLY"); - gMC->Gspos("YMQ1", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX1", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ1", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip, 0, "ONLY"); // -- BEAM SCREEN FOR Q1 tubpar[0] = 4.78/2.; tubpar[1] = 5.18/2.; tubpar[2] = 637./2.; - gMC->Gsvolu("QBS1", "TUBE", idtmed[6], tubpar, 3); - gMC->Gspos("QBS1", 1, "MQX1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBS1", "TUBE", idtmed[6], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QBS1", 1, "MQX1", 0., 0., 0., 0, "ONLY"); // INSERT VERTICAL PLATE INSIDE Q1 boxpar[0] = 0.2/2.0; boxpar[1] = TMath::Sqrt(tubpar[0]*tubpar[0]-(1.9+0.2)*(1.9+0.2)); boxpar[2] =637./2.; - gMC->Gsvolu("QBS2", "BOX ", idtmed[6], boxpar, 3); - gMC->Gspos("QBS2", 1, "MQX1", 1.9+boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("QBS2", 2, "MQX1", -1.9-boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBS2", "BOX ", idtmed[6], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QBS2", 1, "MQX1", 1.9+boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS2", 2, "MQX1", -1.9-boxpar[0], 0., 0., 0, "ONLY"); // -- Q3 - gMC->Gspos("MQX4", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+2400., 0, "ONLY"); - gMC->Gspos("YMQ1", 2, "ZDCA", 0., 0., tubpar[2]+zInnTrip+2400., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX4", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+2400., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ1", 2, "ZDCA", 0., 0., tubpar[2]+zInnTrip+2400., 0, "ONLY"); // -- BEAM SCREEN FOR Q3 tubpar[0] = 5.79/2.; tubpar[1] = 6.14/2.; tubpar[2] = 637./2.; - gMC->Gsvolu("QBS3", "TUBE", idtmed[6], tubpar, 3); - gMC->Gspos("QBS3", 1, "MQX4", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBS3", "TUBE", idtmed[6], tubpar, 3); + TVirtualMC::GetMC()->Gspos("QBS3", 1, "MQX4", 0., 0., 0., 0, "ONLY"); // INSERT VERTICAL PLATE INSIDE Q3 boxpar[0] = 0.2/2.0; boxpar[1] = TMath::Sqrt(tubpar[0]*tubpar[0]-(2.405+0.2)*(2.405+0.2)); boxpar[2] =637./2.; - gMC->Gsvolu("QBS4", "BOX ", idtmed[6], boxpar, 3); - gMC->Gspos("QBS4", 1, "MQX4", 2.405+boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("QBS4", 2, "MQX4", -2.405-boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBS4", "BOX ", idtmed[6], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QBS4", 1, "MQX4", 2.405+boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS4", 2, "MQX4", -2.405-boxpar[0], 0., 0., 0, "ONLY"); @@ -1636,47 +1636,47 @@ if(!fOnlyZEM){ tubpar[0] = 0.; tubpar[1] = 3.14; tubpar[2] = 550./2.; - gMC->Gsvolu("MQX2", "TUBE", idtmed[11], tubpar, 3); - gMC->Gsvolu("MQX3", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQX2", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MQX3", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 3.5; tubpar[1] = 22.; tubpar[2] = 550./2.; - gMC->Gsvolu("YMQ2", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YMQ2", "TUBE", idtmed[7], tubpar, 3); // -- BEAM SCREEN FOR Q2 tubpar[0] = 5.79/2.; tubpar[1] = 6.14/2.; tubpar[2] = 550./2.; - gMC->Gsvolu("QBS5", "TUBE", idtmed[6], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("QBS5", "TUBE", idtmed[6], tubpar, 3); // VERTICAL PLATE INSIDE Q2 boxpar[0] = 0.2/2.0; boxpar[1] = TMath::Sqrt(tubpar[0]*tubpar[0]-(2.405+0.2)*(2.405+0.2)); boxpar[2] =550./2.; - gMC->Gsvolu("QBS6", "BOX ", idtmed[6], boxpar, 3); + TVirtualMC::GetMC()->Gsvolu("QBS6", "BOX ", idtmed[6], boxpar, 3); // -- Q2A - gMC->Gspos("MQX2", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+908.5, 0, "ONLY"); - gMC->Gspos("QBS5", 1, "MQX2", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("QBS6", 1, "MQX2", 2.405+boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("QBS6", 2, "MQX2", -2.405-boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("YMQ2", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+908.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX2", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+908.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS5", 1, "MQX2", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS6", 1, "MQX2", 2.405+boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS6", 2, "MQX2", -2.405-boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ2", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+908.5, 0, "ONLY"); // -- Q2B - gMC->Gspos("MQX3", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+1558.5, 0, "ONLY"); - gMC->Gspos("QBS5", 2, "MQX3", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("QBS6", 3, "MQX3", 2.405+boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("QBS6", 4, "MQX3", -2.405-boxpar[0], 0., 0., 0, "ONLY"); - gMC->Gspos("YMQ2", 2, "ZDCA", 0., 0., tubpar[2]+zInnTrip+1558.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MQX3", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+1558.5, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS5", 2, "MQX3", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS6", 3, "MQX3", 2.405+boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS6", 4, "MQX3", -2.405-boxpar[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YMQ2", 2, "ZDCA", 0., 0., tubpar[2]+zInnTrip+1558.5, 0, "ONLY"); // -- SEPARATOR DIPOLE D1 // -- GAP (VACUUM WITH MAGNETIC FIELD) tubpar[0] = 0.; tubpar[1] = 6.75/2.;//3.375 tubpar[2] = 945./2.; - gMC->Gsvolu("MD1L", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MD1L", "TUBE", idtmed[11], tubpar, 3); // -- The beam screen tube is provided by the beam pipe in D1 (QA03 volume) // -- Insert the beam screen horizontal Cu plates inside D1 @@ -1684,36 +1684,36 @@ if(!fOnlyZEM){ boxpar[0] = TMath::Sqrt(tubpar[1]*tubpar[1]-(2.885+0.2)*(2.885+0.2)); boxpar[1] = 0.2/2.; boxpar[2] =945./2.; - gMC->Gsvolu("QBS7", "BOX ", idtmed[6], boxpar, 3); - gMC->Gspos("QBS7", 1, "MD1L", 0., 2.885+boxpar[1],0., 0, "ONLY"); - gMC->Gspos("QBS7", 2, "MD1L", 0., -2.885-boxpar[1],0., 0, "ONLY"); + TVirtualMC::GetMC()->Gsvolu("QBS7", "BOX ", idtmed[6], boxpar, 3); + TVirtualMC::GetMC()->Gspos("QBS7", 1, "MD1L", 0., 2.885+boxpar[1],0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("QBS7", 2, "MD1L", 0., -2.885-boxpar[1],0., 0, "ONLY"); // -- YOKE tubpar[0] = 3.68; tubpar[1] = 110./2; tubpar[2] = 945./2.; - gMC->Gsvolu("YD1L", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YD1L", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("YD1L", 1, "ZDCA", 0., 0., tubpar[2]+zD1, 0, "ONLY"); - gMC->Gspos("MD1L", 1, "ZDCA", 0., 0., tubpar[2]+zD1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YD1L", 1, "ZDCA", 0., 0., tubpar[2]+zD1, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD1L", 1, "ZDCA", 0., 0., tubpar[2]+zD1, 0, "ONLY"); // -- DIPOLE D2 // -- GAP (VACUUM WITH MAGNETIC FIELD) /* tubpar[0] = 0.; tubpar[1] = 7.5/2.; // this has to be checked tubpar[2] = 945./2.; - gMC->Gsvolu("MD2L", "TUBE", idtmed[11], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("MD2L", "TUBE", idtmed[11], tubpar, 3); // -- YOKE tubpar[0] = 0.; tubpar[1] = 55.; tubpar[2] = 945./2.; - gMC->Gsvolu("YD2L", "TUBE", idtmed[7], tubpar, 3); + TVirtualMC::GetMC()->Gsvolu("YD2L", "TUBE", idtmed[7], tubpar, 3); - gMC->Gspos("YD2L", 1, "ZDCA", 0., 0., tubpar[2]+zD2, 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("YD2L", 1, "ZDCA", 0., 0., tubpar[2]+zD2, 0, "ONLY"); - gMC->Gspos("MD2L", 1, "YD2L", -9.4, 0., 0., 0, "ONLY"); - gMC->Gspos("MD2L", 2, "YD2L", 9.4, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD2L", 1, "YD2L", -9.4, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("MD2L", 2, "YD2L", 9.4, 0., 0., 0, "ONLY"); */ // -- END OF MAGNET DEFINITION } @@ -1755,56 +1755,56 @@ if(!fOnlyZEM){ // ------------------------------------------------------------------------------- //--> Neutron calorimeter (ZN) - gMC->Gsvolu("ZNEU", "BOX ", idtmed[1], fDimZN, 3); // Passive material - gMC->Gsvolu("ZNF1", "TUBE", idtmed[3], fFibZN, 3); // Active material - gMC->Gsvolu("ZNF2", "TUBE", idtmed[4], fFibZN, 3); - gMC->Gsvolu("ZNF3", "TUBE", idtmed[4], fFibZN, 3); - gMC->Gsvolu("ZNF4", "TUBE", idtmed[3], fFibZN, 3); - gMC->Gsvolu("ZNG1", "BOX ", idtmed[12], fGrvZN, 3); // Empty grooves - gMC->Gsvolu("ZNG2", "BOX ", idtmed[12], fGrvZN, 3); - gMC->Gsvolu("ZNG3", "BOX ", idtmed[12], fGrvZN, 3); - gMC->Gsvolu("ZNG4", "BOX ", idtmed[12], fGrvZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNEU", "BOX ", idtmed[1], fDimZN, 3); // Passive material + TVirtualMC::GetMC()->Gsvolu("ZNF1", "TUBE", idtmed[3], fFibZN, 3); // Active material + TVirtualMC::GetMC()->Gsvolu("ZNF2", "TUBE", idtmed[4], fFibZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNF3", "TUBE", idtmed[4], fFibZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNF4", "TUBE", idtmed[3], fFibZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNG1", "BOX ", idtmed[12], fGrvZN, 3); // Empty grooves + TVirtualMC::GetMC()->Gsvolu("ZNG2", "BOX ", idtmed[12], fGrvZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNG3", "BOX ", idtmed[12], fGrvZN, 3); + TVirtualMC::GetMC()->Gsvolu("ZNG4", "BOX ", idtmed[12], fGrvZN, 3); // Divide ZNEU in towers (for hits purposes) - gMC->Gsdvn("ZNTX", "ZNEU", fTowZN[0], 1); // x-tower - gMC->Gsdvn("ZN1 ", "ZNTX", fTowZN[1], 2); // y-tower + TVirtualMC::GetMC()->Gsdvn("ZNTX", "ZNEU", fTowZN[0], 1); // x-tower + TVirtualMC::GetMC()->Gsdvn("ZN1 ", "ZNTX", fTowZN[1], 2); // y-tower //-- Divide ZN1 in minitowers // fDivZN[0]= NUMBER OF FIBERS PER TOWER ALONG X-AXIS, // fDivZN[1]= NUMBER OF FIBERS PER TOWER ALONG Y-AXIS // (4 fibres per minitower) - gMC->Gsdvn("ZNSL", "ZN1 ", fDivZN[1], 2); // Slices - gMC->Gsdvn("ZNST", "ZNSL", fDivZN[0], 1); // Sticks + TVirtualMC::GetMC()->Gsdvn("ZNSL", "ZN1 ", fDivZN[1], 2); // Slices + TVirtualMC::GetMC()->Gsdvn("ZNST", "ZNSL", fDivZN[0], 1); // Sticks // --- Position the empty grooves in the sticks (4 grooves per stick) Float_t dx = fDimZN[0] / fDivZN[0] / 4.; Float_t dy = fDimZN[1] / fDivZN[1] / 4.; - gMC->Gspos("ZNG1", 1, "ZNST", 0.-dx, 0.+dy, 0., 0, "ONLY"); - gMC->Gspos("ZNG2", 1, "ZNST", 0.+dx, 0.+dy, 0., 0, "ONLY"); - gMC->Gspos("ZNG3", 1, "ZNST", 0.-dx, 0.-dy, 0., 0, "ONLY"); - gMC->Gspos("ZNG4", 1, "ZNST", 0.+dx, 0.-dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNG1", 1, "ZNST", 0.-dx, 0.+dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNG2", 1, "ZNST", 0.+dx, 0.+dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNG3", 1, "ZNST", 0.-dx, 0.-dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNG4", 1, "ZNST", 0.+dx, 0.-dy, 0., 0, "ONLY"); // --- Position the fibers in the grooves - gMC->Gspos("ZNF1", 1, "ZNG1", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZNF2", 1, "ZNG2", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZNF3", 1, "ZNG3", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZNF4", 1, "ZNG4", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNF1", 1, "ZNG1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNF2", 1, "ZNG2", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNF3", 1, "ZNG3", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNF4", 1, "ZNG4", 0., 0., 0., 0, "ONLY"); // --- Position the neutron calorimeter in ZDC // -- Rotation of ZDCs Int_t irotzdc; - gMC->Matrix(irotzdc, 90., 180., 90., 90., 180., 0.); + TVirtualMC::GetMC()->Matrix(irotzdc, 90., 180., 90., 90., 180., 0.); // - gMC->Gspos("ZNEU", 1, "ZDCC", fPosZNC[0], fPosZNC[1], fPosZNC[2]-fDimZN[2], irotzdc, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNEU", 1, "ZDCC", fPosZNC[0], fPosZNC[1], fPosZNC[2]-fDimZN[2], irotzdc, "ONLY"); //Ch debug //printf("\n ZN -> %f < z < %f cm\n",fPosZN[2],fPosZN[2]-2*fDimZN[2]); // --- Position the neutron calorimeter in ZDC2 (left line) // -- No Rotation of ZDCs - gMC->Gspos("ZNEU", 2, "ZDCA", fPosZNA[0], fPosZNA[1], fPosZNA[2]+fDimZN[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZNEU", 2, "ZDCA", fPosZNA[0], fPosZNA[1], fPosZNA[2]+fDimZN[2], 0, "ONLY"); //Ch debug //printf("\n ZN left -> %f < z < %f cm\n",fPosZNl[2],fPosZNl[2]+2*fDimZN[2]); @@ -1812,20 +1812,20 @@ if(!fOnlyZEM){ // ------------------------------------------------------------------------------- //--> Proton calorimeter (ZP) - gMC->Gsvolu("ZPRO", "BOX ", idtmed[2], fDimZP, 3); // Passive material - gMC->Gsvolu("ZPF1", "TUBE", idtmed[3], fFibZP, 3); // Active material - gMC->Gsvolu("ZPF2", "TUBE", idtmed[4], fFibZP, 3); - gMC->Gsvolu("ZPF3", "TUBE", idtmed[4], fFibZP, 3); - gMC->Gsvolu("ZPF4", "TUBE", idtmed[3], fFibZP, 3); - gMC->Gsvolu("ZPG1", "BOX ", idtmed[12], fGrvZP, 3); // Empty grooves - gMC->Gsvolu("ZPG2", "BOX ", idtmed[12], fGrvZP, 3); - gMC->Gsvolu("ZPG3", "BOX ", idtmed[12], fGrvZP, 3); - gMC->Gsvolu("ZPG4", "BOX ", idtmed[12], fGrvZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPRO", "BOX ", idtmed[2], fDimZP, 3); // Passive material + TVirtualMC::GetMC()->Gsvolu("ZPF1", "TUBE", idtmed[3], fFibZP, 3); // Active material + TVirtualMC::GetMC()->Gsvolu("ZPF2", "TUBE", idtmed[4], fFibZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPF3", "TUBE", idtmed[4], fFibZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPF4", "TUBE", idtmed[3], fFibZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPG1", "BOX ", idtmed[12], fGrvZP, 3); // Empty grooves + TVirtualMC::GetMC()->Gsvolu("ZPG2", "BOX ", idtmed[12], fGrvZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPG3", "BOX ", idtmed[12], fGrvZP, 3); + TVirtualMC::GetMC()->Gsvolu("ZPG4", "BOX ", idtmed[12], fGrvZP, 3); //-- Divide ZPRO in towers(for hits purposes) - gMC->Gsdvn("ZPTX", "ZPRO", fTowZP[0], 1); // x-tower - gMC->Gsdvn("ZP1 ", "ZPTX", fTowZP[1], 2); // y-tower + TVirtualMC::GetMC()->Gsdvn("ZPTX", "ZPRO", fTowZP[0], 1); // x-tower + TVirtualMC::GetMC()->Gsdvn("ZP1 ", "ZPTX", fTowZP[1], 2); // y-tower //-- Divide ZP1 in minitowers @@ -1833,33 +1833,33 @@ if(!fOnlyZEM){ // fDivZP[1]= NUMBER OF FIBERS ALONG Y-AXIS PER MINITOWER // (4 fiber per minitower) - gMC->Gsdvn("ZPSL", "ZP1 ", fDivZP[1], 2); // Slices - gMC->Gsdvn("ZPST", "ZPSL", fDivZP[0], 1); // Sticks + TVirtualMC::GetMC()->Gsdvn("ZPSL", "ZP1 ", fDivZP[1], 2); // Slices + TVirtualMC::GetMC()->Gsdvn("ZPST", "ZPSL", fDivZP[0], 1); // Sticks // --- Position the empty grooves in the sticks (4 grooves per stick) dx = fDimZP[0] / fTowZP[0] / fDivZP[0] / 2.; dy = fDimZP[1] / fTowZP[1] / fDivZP[1] / 2.; - gMC->Gspos("ZPG1", 1, "ZPST", 0.-dx, 0.+dy, 0., 0, "ONLY"); - gMC->Gspos("ZPG2", 1, "ZPST", 0.+dx, 0.+dy, 0., 0, "ONLY"); - gMC->Gspos("ZPG3", 1, "ZPST", 0.-dx, 0.-dy, 0., 0, "ONLY"); - gMC->Gspos("ZPG4", 1, "ZPST", 0.+dx, 0.-dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPG1", 1, "ZPST", 0.-dx, 0.+dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPG2", 1, "ZPST", 0.+dx, 0.+dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPG3", 1, "ZPST", 0.-dx, 0.-dy, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPG4", 1, "ZPST", 0.+dx, 0.-dy, 0., 0, "ONLY"); // --- Position the fibers in the grooves - gMC->Gspos("ZPF1", 1, "ZPG1", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZPF2", 1, "ZPG2", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZPF3", 1, "ZPG3", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("ZPF4", 1, "ZPG4", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPF1", 1, "ZPG1", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPF2", 1, "ZPG2", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPF3", 1, "ZPG3", 0., 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPF4", 1, "ZPG4", 0., 0., 0., 0, "ONLY"); // --- Position the proton calorimeter in ZDCC - gMC->Gspos("ZPRO", 1, "ZDCC", fPosZPC[0], fPosZPC[1], fPosZPC[2]-fDimZP[2], irotzdc, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPRO", 1, "ZDCC", fPosZPC[0], fPosZPC[1], fPosZPC[2]-fDimZP[2], irotzdc, "ONLY"); //Ch debug //printf("\n ZP -> %f < z < %f cm\n",fPosZP[2],fPosZP[2]-2*fDimZP[2]); // --- Position the proton calorimeter in ZDCA // --- No rotation - gMC->Gspos("ZPRO", 2, "ZDCA", fPosZPA[0], fPosZPA[1], fPosZPA[2]+fDimZP[2], 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZPRO", 2, "ZDCA", fPosZPA[0], fPosZPA[1], fPosZPA[2]+fDimZP[2], 0, "ONLY"); //Ch debug //printf("\n ZP left -> %f < z < %f cm\n",fPosZPl[2],fPosZPl[2]+2*fDimZP[2]); } @@ -1867,16 +1867,16 @@ if(!fOnlyZEM){ // ------------------------------------------------------------------------------- // -> EM calorimeter (ZEM) - gMC->Gsvolu("ZEM ", "PARA", idtmed[10], fDimZEM, 6); + TVirtualMC::GetMC()->Gsvolu("ZEM ", "PARA", idtmed[10], fDimZEM, 6); Int_t irot1, irot2; - gMC->Matrix(irot1,0.,0.,90.,90.,-90.,0.); // Rotation matrix 1 - gMC->Matrix(irot2,180.,0.,90.,fDimZEM[3]+90.,90.,fDimZEM[3]);// Rotation matrix 2 + TVirtualMC::GetMC()->Matrix(irot1,0.,0.,90.,90.,-90.,0.); // Rotation matrix 1 + TVirtualMC::GetMC()->Matrix(irot2,180.,0.,90.,fDimZEM[3]+90.,90.,fDimZEM[3]);// Rotation matrix 2 //printf("irot1 = %d, irot2 = %d \n", irot1, irot2); - gMC->Gsvolu("ZEMF", "TUBE", idtmed[3], fFibZEM, 3); // Active material + TVirtualMC::GetMC()->Gsvolu("ZEMF", "TUBE", idtmed[3], fFibZEM, 3); // Active material - gMC->Gsdvn("ZETR", "ZEM ", fDivZEM[2], 1); // Tranches + TVirtualMC::GetMC()->Gsdvn("ZETR", "ZEM ", fDivZEM[2], 1); // Tranches dimPb[0] = kDimZEMPb; // Lead slices dimPb[1] = fDimZEM[2]; @@ -1885,15 +1885,15 @@ if(!fOnlyZEM){ dimPb[3] = 90.-fDimZEM[3]; //originale dimPb[4] = 0.; dimPb[5] = 0.; - gMC->Gsvolu("ZEL0", "PARA", idtmed[5], dimPb, 6); - gMC->Gsvolu("ZEL1", "PARA", idtmed[5], dimPb, 6); - gMC->Gsvolu("ZEL2", "PARA", idtmed[5], dimPb, 6); + TVirtualMC::GetMC()->Gsvolu("ZEL0", "PARA", idtmed[5], dimPb, 6); + TVirtualMC::GetMC()->Gsvolu("ZEL1", "PARA", idtmed[5], dimPb, 6); + TVirtualMC::GetMC()->Gsvolu("ZEL2", "PARA", idtmed[5], dimPb, 6); // --- Position the lead slices in the tranche Float_t zTran = fDimZEM[0]/fDivZEM[2]; Float_t zTrPb = -zTran+kDimZEMPb; - gMC->Gspos("ZEL0", 1, "ZETR", zTrPb, 0., 0., 0, "ONLY"); - gMC->Gspos("ZEL1", 1, "ZETR", kDimZEMPb, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEL0", 1, "ZETR", zTrPb, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEL1", 1, "ZETR", kDimZEMPb, 0., 0., 0, "ONLY"); // --- Vacuum zone (to be filled with fibres) dimVoid[0] = (zTran-2*kDimZEMPb)/2.; @@ -1902,32 +1902,32 @@ if(!fOnlyZEM){ dimVoid[3] = 90.-fDimZEM[3]; dimVoid[4] = 0.; dimVoid[5] = 0.; - gMC->Gsvolu("ZEV0", "PARA", idtmed[10], dimVoid,6); - gMC->Gsvolu("ZEV1", "PARA", idtmed[10], dimVoid,6); + TVirtualMC::GetMC()->Gsvolu("ZEV0", "PARA", idtmed[10], dimVoid,6); + TVirtualMC::GetMC()->Gsvolu("ZEV1", "PARA", idtmed[10], dimVoid,6); // --- Divide the vacuum slice into sticks along x axis - gMC->Gsdvn("ZES0", "ZEV0", fDivZEM[0], 3); - gMC->Gsdvn("ZES1", "ZEV1", fDivZEM[0], 3); + TVirtualMC::GetMC()->Gsdvn("ZES0", "ZEV0", fDivZEM[0], 3); + TVirtualMC::GetMC()->Gsdvn("ZES1", "ZEV1", fDivZEM[0], 3); // --- Positioning the fibers into the sticks - gMC->Gspos("ZEMF", 1,"ZES0", 0., 0., 0., irot2, "ONLY"); - gMC->Gspos("ZEMF", 1,"ZES1", 0., 0., 0., irot2, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEMF", 1,"ZES0", 0., 0., 0., irot2, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEMF", 1,"ZES1", 0., 0., 0., irot2, "ONLY"); // --- Positioning the vacuum slice into the tranche //Float_t displFib = fDimZEM[1]/fDivZEM[0]; - gMC->Gspos("ZEV0", 1,"ZETR", -dimVoid[0], 0., 0., 0, "ONLY"); - gMC->Gspos("ZEV1", 1,"ZETR", -dimVoid[0]+zTran, 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEV0", 1,"ZETR", -dimVoid[0], 0., 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEV1", 1,"ZETR", -dimVoid[0]+zTran, 0., 0., 0, "ONLY"); // --- Positioning the ZEM into the ZDC - rotation for 90 degrees // NB -> ZEM is positioned in ALIC (instead of in ZDC) volume - gMC->Gspos("ZEM ", 1,"ALIC", -fPosZEM[0], fPosZEM[1], fPosZEM[2]+fDimZEM[0], irot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEM ", 1,"ALIC", -fPosZEM[0], fPosZEM[1], fPosZEM[2]+fDimZEM[0], irot1, "ONLY"); // Second EM ZDC (same side w.r.t. IP, just on the other side w.r.t. beam pipe) - gMC->Gspos("ZEM ", 2,"ALIC", fPosZEM[0], fPosZEM[1], fPosZEM[2]+fDimZEM[0], irot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEM ", 2,"ALIC", fPosZEM[0], fPosZEM[1], fPosZEM[2]+fDimZEM[0], irot1, "ONLY"); // --- Adding last slice at the end of the EM calorimeter Float_t zLastSlice = fPosZEM[2]+kDimZEMPb+2*fDimZEM[0]; - gMC->Gspos("ZEL2", 1,"ALIC", fPosZEM[0], fPosZEM[1], zLastSlice, irot1, "ONLY"); + TVirtualMC::GetMC()->Gspos("ZEL2", 1,"ALIC", fPosZEM[0], fPosZEM[1], zLastSlice, irot1, "ONLY"); //Ch debug //printf("\n ZEM lenght = %f cm\n",2*fZEMLength); //printf("\n ZEM -> %f < z < %f cm\n",fPosZEM[2],fPosZEM[2]+2*fZEMLength+zLastSlice+kDimZEMPb); @@ -2272,15 +2272,15 @@ void AliZDCv4::StepManager() // // --- This part is for no shower developement in beam pipe, TDI, VColl // If particle interacts with beam pipe, TDI, VColl -> return - if(fNoShower==1 && ((gMC->CurrentMedium() == fMedSensPI) || (gMC->CurrentMedium() == fMedSensTDI) || - (gMC->CurrentMedium() == fMedSensVColl || (gMC->CurrentMedium() == fMedSensLumi)))){ + if(fNoShower==1 && ((TVirtualMC::GetMC()->CurrentMedium() == fMedSensPI) || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensTDI) || + (TVirtualMC::GetMC()->CurrentMedium() == fMedSensVColl || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensLumi)))){ // If option NoShower is set -> StopTrack Int_t ipr = 0; - gMC->TrackPosition(s[0],s[1],s[2]); - if(gMC->CurrentMedium() == fMedSensPI){ - knamed = gMC->CurrentVolName(); + TVirtualMC::GetMC()->TrackPosition(s[0],s[1],s[2]); + if(TVirtualMC::GetMC()->CurrentMedium() == fMedSensPI){ + knamed = TVirtualMC::GetMC()->CurrentVolName(); if(!strncmp(knamed,"YMQ",3)){ if(s[2]<0) fpLostITC += 1; else fpLostITA += 1; @@ -2292,8 +2292,8 @@ void AliZDCv4::StepManager() ipr=1; } } - else if(gMC->CurrentMedium() == fMedSensTDI){ - knamed = gMC->CurrentVolName(); + else if(TVirtualMC::GetMC()->CurrentMedium() == fMedSensTDI){ + knamed = TVirtualMC::GetMC()->CurrentVolName(); if(!strncmp(knamed,"MD1",3)){ if(s[2]<0) fpLostD1C += 1; else fpLostD1A += 1; @@ -2301,16 +2301,16 @@ void AliZDCv4::StepManager() } else if(!strncmp(knamed,"QTD",3)) fpLostTDI += 1; } - else if(gMC->CurrentMedium() == fMedSensVColl){ - knamed = gMC->CurrentVolName(); + else if(TVirtualMC::GetMC()->CurrentMedium() == fMedSensVColl){ + knamed = TVirtualMC::GetMC()->CurrentVolName(); if(!strncmp(knamed,"QCVC",4)) fpcVCollC++; else if(!strncmp(knamed,"QCVA",4)) fpcVCollA++; ipr=1; } // - //gMC->TrackMomentum(p[0], p[1], p[2], p[3]); + //TVirtualMC::GetMC()->TrackMomentum(p[0], p[1], p[2], p[3]); //printf("\t Particle: mass = %1.3f, E = %1.3f GeV, pz = %1.2f GeV -> stopped in volume %s\n", - // gMC->TrackMass(), p[3], p[2], gMC->CurrentVolName()); + // TVirtualMC::GetMC()->TrackMass(), p[3], p[2], TVirtualMC::GetMC()->CurrentVolName()); // /*if(ipr!=0){ printf("\n\t **********************************\n"); @@ -2325,24 +2325,24 @@ void AliZDCv4::StepManager() printf("\t # of particles in VColl = %d\n",fpcVCollA); printf("\t **********************************\n"); }*/ - gMC->StopTrack(); + TVirtualMC::GetMC()->StopTrack(); return; } - if((gMC->CurrentMedium() == fMedSensZN) || (gMC->CurrentMedium() == fMedSensZP) || - (gMC->CurrentMedium() == fMedSensGR) || (gMC->CurrentMedium() == fMedSensF1) || - (gMC->CurrentMedium() == fMedSensF2) || (gMC->CurrentMedium() == fMedSensZEM)){ + if((TVirtualMC::GetMC()->CurrentMedium() == fMedSensZN) || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensZP) || + (TVirtualMC::GetMC()->CurrentMedium() == fMedSensGR) || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensF1) || + (TVirtualMC::GetMC()->CurrentMedium() == fMedSensF2) || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensZEM)){ //Particle coordinates - gMC->TrackPosition(s[0],s[1],s[2]); + TVirtualMC::GetMC()->TrackPosition(s[0],s[1],s[2]); for(j=0; j<=2; j++) x[j] = s[j]; hits[0] = x[0]; hits[1] = x[1]; hits[2] = x[2]; // Determine in which ZDC the particle is - knamed = gMC->CurrentVolName(); + knamed = TVirtualMC::GetMC()->CurrentVolName(); if(!strncmp(knamed,"ZN",2)){ if(x[2]<0.) vol[0]=1; // ZNC (dimuon side) else if(x[2]>0.) vol[0]=4; //ZNA @@ -2440,9 +2440,9 @@ void AliZDCv4::StepManager() // Store impact point and kinetic energy of the ENTERING particle - if(gMC->IsTrackEntering()){ + if(TVirtualMC::GetMC()->IsTrackEntering()){ //Particle energy - gMC->TrackMomentum(p[0],p[1],p[2],p[3]); + TVirtualMC::GetMC()->TrackMomentum(p[0],p[1],p[2],p[3]); hits[3] = p[3]; // Impact point on ZDC @@ -2465,7 +2465,7 @@ void AliZDCv4::StepManager() TParticle *part = gAlice->GetMCApp()->Particle(curTrackN); hits[10] = part->GetPdgCode(); hits[11] = 0; - hits[12] = 1.0e09*gMC->TrackTime(); // in ns! + hits[12] = 1.0e09*TVirtualMC::GetMC()->TrackTime(); // in ns! hits[13] = part->Eta(); // if(fFindMother){ @@ -2516,16 +2516,16 @@ void AliZDCv4::StepManager() } // //printf("\t Pc: x %1.2f y %1.2f z %1.2f E %1.2f GeV pz = %1.2f GeV in volume %s\n", - // x[0],x[1],x[3],p[3],p[2],gMC->CurrentVolName()); + // x[0],x[1],x[3],p[3],p[2],TVirtualMC::GetMC()->CurrentVolName()); // - gMC->StopTrack(); + TVirtualMC::GetMC()->StopTrack(); return; } } // Particle energy loss - if(gMC->Edep() != 0){ - hits[9] = gMC->Edep(); + if(TVirtualMC::GetMC()->Edep() != 0){ + hits[9] = TVirtualMC::GetMC()->Edep(); hits[7] = 0.; hits[8] = 0.; AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); @@ -2534,14 +2534,14 @@ void AliZDCv4::StepManager() // *** Light production in fibres - if((gMC->CurrentMedium() == fMedSensF1) || (gMC->CurrentMedium() == fMedSensF2)){ + if((TVirtualMC::GetMC()->CurrentMedium() == fMedSensF1) || (TVirtualMC::GetMC()->CurrentMedium() == fMedSensF2)){ //Select charged particles - if((destep=gMC->Edep())){ + if((destep=TVirtualMC::GetMC()->Edep())){ // Particle velocity Float_t beta = 0.; - gMC->TrackMomentum(p[0],p[1],p[2],p[3]); + TVirtualMC::GetMC()->TrackMomentum(p[0],p[1],p[2],p[3]); Float_t ptot=TMath::Sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]); if(p[3] > 0.00001) beta = ptot/p[3]; else return; @@ -2556,7 +2556,7 @@ void AliZDCv4::StepManager() um[0] = p[0]/ptot; um[1] = p[1]/ptot; um[2] = p[2]/ptot; - gMC->Gmtod(um,ud,2); + TVirtualMC::GetMC()->Gmtod(um,ud,2); // 2 -> Angle < limit angle Double_t alfar = TMath::ACos(ud[2]); Double_t alfa = alfar*kRaddeg; @@ -2565,11 +2565,11 @@ void AliZDCv4::StepManager() ialfa = Int_t(1.+alfa/2.); // Distance between particle trajectory and fibre axis - gMC->TrackPosition(s[0],s[1],s[2]); + TVirtualMC::GetMC()->TrackPosition(s[0],s[1],s[2]); for(j=0; j<=2; j++){ x[j] = s[j]; } - gMC->Gmtod(x,xdet,1); + TVirtualMC::GetMC()->Gmtod(x,xdet,1); if(TMath::Abs(ud[0])>0.00001){ Float_t dcoeff = ud[1]/ud[0]; be = TMath::Abs((xdet[1]-dcoeff*xdet[0])/TMath::Sqrt(dcoeff*dcoeff+1.)); @@ -2585,7 +2585,7 @@ void AliZDCv4::StepManager() Int_t curTrackN = gAlice->GetMCApp()->GetCurrentTrackNumber(); TParticle *part = gAlice->GetMCApp()->Particle(curTrackN); Int_t pdgCode = part->GetPdgCode(); - if(pdgCode<10000) charge = gMC->TrackCharge(); + if(pdgCode<10000) charge = TVirtualMC::GetMC()->TrackCharge(); else{ float z = (pdgCode/10000-100000); charge = TMath::Abs(z); @@ -2599,7 +2599,7 @@ void AliZDCv4::StepManager() // Ch. debug //if(ibeta==3) printf("\t %f \t %f \t %f\n",alfa, be, out); //printf("\t ibeta = %d, ialfa = %d, ibe = %d -> nphe = %d\n\n",ibeta,ialfa,ibe,nphe); - if(gMC->CurrentMedium() == fMedSensF1){ + if(TVirtualMC::GetMC()->CurrentMedium() == fMedSensF1){ hits[7] = nphe; //fLightPMQ hits[8] = 0; hits[9] = 0; @@ -2616,7 +2616,7 @@ void AliZDCv4::StepManager() if(ibe>fNbep) ibe=fNbep; out = charge*charge*fTablep[ibeta][ialfa][ibe]; nphe = gRandom->Poisson(out); - if(gMC->CurrentMedium() == fMedSensF1){ + if(TVirtualMC::GetMC()->CurrentMedium() == fMedSensF1){ hits[7] = nphe; //fLightPMQ hits[8] = 0; hits[9] = 0; @@ -2632,7 +2632,7 @@ void AliZDCv4::StepManager() else if(vol[0]==3) { // (3) ZEM fibres if(ibe>fNbep) ibe=fNbep; out = charge*charge*fTablep[ibeta][ialfa][ibe]; - gMC->TrackPosition(s[0],s[1],s[2]); + TVirtualMC::GetMC()->TrackPosition(s[0],s[1],s[2]); Float_t xalic[3]; for(j=0; j<3; j++){ xalic[j] = s[j]; -- 2.43.0