#include <EveBase/AliEveEventManager.h>
#include <AliMagF.h>
-#include <AliMagFMaps.h>
#include <AliLog.h>
#include <AliESDMuonTrack.h>
#include <AliESDEvent.h>
#include <AliMUONVCluster.h>
#include <TClonesArray.h>
-#include <TStyle.h>
-#include <TROOT.h>
+#include <TGeoGlobalMagField.h>
#include <TParticle.h>
#include <TParticlePDG.h>
+#include <TROOT.h>
+#include <TStyle.h>
#include <Riostream.h>
ClassImp(AliEveMUONTrack)
-AliMagF* AliEveMUONTrack::fgFieldMap = 0;
//______________________________________________________________________________
AliEveMUONTrack::AliEveMUONTrack(TEveRecTrack* t, TEveTrackPropagator* rs) :
//
// constructor
//
-
- if (fgFieldMap == 0)
- fgFieldMap = AliEveEventManager::AssertMagField();
}
//______________________________________________________________________________
if (fIsMUONTrack) {
if (mtrack->GetMatchTrigger()) {
- sprintf(form,"MUONTrack %2d (MT)", fLabel);
+ snprintf(form,1000,"MUONTrack %2d (MT)", fLabel);
} else {
- sprintf(form,"MUONTrack %2d ", fLabel);
+ snprintf(form,1000,"MUONTrack %2d ", fLabel);
}
SetName(form);
SetLineStyle(1);
char form[1000];
- sprintf(form,"MUONTriggerTrack %2d",mtrack->GetLoTrgNum());
+ snprintf(form,1000,"MUONTriggerTrack %2d",mtrack->GetLoTrgNum());
SetName(form);
SetLineStyle(1);
char form[1000];
if (mtrack->GetMatchTrigger()) {
- sprintf(form,"ESDTrack %2d (MT)", fLabel);
+ snprintf(form,1000,"ESDTrack %2d (MT)", fLabel);
} else {
- sprintf(form,"ESDTrack %2d ", fLabel);
+ snprintf(form,1000,"ESDTrack %2d ", fLabel);
}
SetName(form);
SetLineStyle(3);
fPart = new TParticle(*part);
char form[1000];
- sprintf(form,"TEveMCTrack %2d ", fLabel);
+ snprintf(form,1000,"TEveMCTrack %2d ", fLabel);
SetName(form);
SetLineStyle(2);
SetLineColor(8);
fIsRefTrack = kTRUE;
char form[1000];
- sprintf(form,"RefTrack %2d ", fLabel);
+ snprintf(form,1000,"RefTrack %2d ", fLabel);
SetName(form);
SetLineStyle(2);
SetLineColor(0);
}
-//______________________________________________________________________________
-void AliEveMUONTrack::GetField(Double_t *position, Double_t *field)
-{
- //
- // returns field components at position, for a give field map
- //
-
- /// interface for arguments in double precision (Why ? ChF)
- Float_t x[3], b[3];
-
- x[0] = position[0]; x[1] = position[1]; x[2] = position[2];
-
- if (fgFieldMap) {
- fgFieldMap->Field(x,b);
- }
- else {
- AliWarning("No field map");
- field[0] = field[1] = field[2] = 0.0;
- return;
- }
-
- // force components
- //b[1] = 0.0;
- //b[2] = 0.0;
-
- field[0] = b[0]; field[1] = b[1]; field[2] = b[2];
-
- return;
-
-}
-
//______________________________________________________________________________
void AliEveMUONTrack::OneStepRungekutta(Double_t charge, Double_t step,
Double_t* vect, Double_t* vout)
rest = step - tl;
if (TMath::Abs(h) > TMath::Abs(rest)) h = rest;
//cmodif: call gufld(vout,f) changed into:
-
- GetField(vout,f);
+ TGeoGlobalMagField::Instance()->Field(vout,f);
// *
// * start of integration
xyzt[2] = zt;
//cmodif: call gufld(xyzt,f) changed into:
- GetField(xyzt,f);
+ TGeoGlobalMagField::Instance()->Field(xyzt,f);
at = a + secxs[0];
bt = b + secys[0];
xyzt[2] = zt;
//cmodif: call gufld(xyzt,f) changed into:
- GetField(xyzt,f);
+ TGeoGlobalMagField::Instance()->Field(xyzt,f);
z = z + (c + (seczs[0] + seczs[1] + seczs[2]) * kthird) * h;
y = y + (b + (secys[0] + secys[1] + secys[2]) * kthird) * h;