#include "AliTrackReference.h"
#include "AliLog.h"
-#include <TRandom.h>
+#include <TClonesArray.h>
#include <TF1.h>
#include <TF2.h>
-#include <TClonesArray.h>
+#include <TGeoGlobalMagField.h>
+#include <TGeoMatrix.h>
+#include <TRandom.h>
#include <TRandom.h>
#include <TVirtualMC.h>
-#include <TGeoMatrix.h>
#include <string>
fGeometryBuilder->CreateMaterials();
}
+//________________________________________________________________
+void AliMUONv1::UpdateInternalGeometry()
+{
+/// Update geometry after applying mis-alignment
+
+ // Load mapping
+ if ( ! AliMpCDB::LoadMpSegmentation() ) {
+ AliFatal("Could not access mapping from OCDB !");
+ }
+
+ fGeometryBuilder->UpdateInternalGeometry();
+}
+
//________________________________________________________________
void AliMUONv1::AddAlignableVolumes() const
{
if( gMC->IsTrackEntering() ) {
Float_t theta = fTrackMomentum.Theta();
- if ((TMath::Pi()-theta)*kRaddeg>=15.) gMC->SetMaxStep(fStepMaxInActiveGas); // We use Pi-theta because z is negative
+ if ( fIsMaxStep && (TMath::Pi()-theta)*kRaddeg>=15. ) {
+ gMC->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
}
gMC->IsTrackDisappeared()||
(fStepSum[idvol]>fStepMaxInActiveGas) ) {
- if ( gMC->IsTrackExiting() ||
- gMC->IsTrackStop() ||
- gMC->IsTrackDisappeared() ) gMC->SetMaxStep(kBig);
+ if ( fIsMaxStep &&
+ ( gMC->IsTrackExiting() ||
+ gMC->IsTrackStop() ||
+ gMC->IsTrackDisappeared() ) ) gMC->SetMaxStep(kBig);
if (fDestepSum[idvol] == 0) {
// AZ - no energy release
fStepSum[idvol] = 0; // Reset for the next event
Float_t thetawires = TMath::ASin( TMath::Sin(TMath::Pi()-theta) * TMath::Sin(phi) ) ;// We use Pi-theta because z is negative
Double_t bField[3] = {0};
fTrackPosition.Vect().GetXYZ(tmp);
- gAlice->Field(tmp,bField);
+ TGeoGlobalMagField::Instance()->Field(tmp,bField);
if (fAngleEffect && !fMagEffect){
thetawires = TMath::Abs(thetawires);