#include <TVector.h>
#include <TVirtualMC.h>
#include <TGeoManager.h>
+#include <TGeoPhysicalNode.h>
#include "AliConst.h"
#include "AliLog.h"
gGeoManager->SetAlignableEntry(symName.Data(),volPath.Data());
+ // Add the tracking to local matrix following the TPC example
+ TGeoPNEntry *alignableEntry = gGeoManager->GetAlignableEntry(symName.Data());
+ const char *path = alignableEntry->GetTitle();
+ if (!gGeoManager->cd(path)) {
+ AliFatal(Form("Volume path %s not valid!",path));
+ }
+ TGeoHMatrix *globMatrix = gGeoManager->GetCurrentMatrix();
+ Double_t sectorAngle = 20.0 * (isect % 18) + 10.0;
+ TGeoHMatrix *t2lMatrix = new TGeoHMatrix();
+ t2lMatrix->RotateZ(sectorAngle);
+ t2lMatrix->MultiplyLeft(&(globMatrix->Inverse()));
+ alignableEntry->SetMatrix(t2lMatrix);
+
}
}
}
// Add the hit to the array. TR photon hits are marked
// by negative charge
- // The hit time is needed for pile-up events
AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber()
,det
,posHit
,-q
- ,gMC->TrackTime()*1.0e06
+ ,gMC->TrackTime()*1.0e06
,kTRUE);
}
qTot = ((Int_t) (eDelta / kWion) + 1);
// Create a new dEdx hit
- // The hit time is needed for pile-up events
AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber()
,det
,hits
,qTot
- ,gMC->TrackTime()*1.0e06
+ ,gMC->TrackTime()*1.0e06
,drRegion);
}
qTot = ((Int_t) (eDelta / kWion) + 1);
// Create a new dEdx hit
- // The hit time is needed for pile-up events
if (drRegion) {
AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber()
,det
,hits
,qTot
- ,gMC->TrackTime()*1.0e06
+ ,gMC->TrackTime()*1.0e06
,kTRUE);
}
else {
,det
,hits
,qTot
- ,gMC->TrackTime()*1.0e06
+ ,gMC->TrackTime()*1.0e06
,kFALSE);
}
// The detector number
det = fGeometry->GetDetector(pla,cha,sec);
- // 0:InFlight 1:Entering 2:Exiting
+ // 0: InFlight 1:Entering 2:Exiting
Int_t trkStat = 0;
// Special hits only in the drift region
// Calculate the charge according to GEANT Edep
// Create a new dEdx hit
- // The hit time is needed for pile-up events
eDep = TMath::Max(gMC->Edep(),0.0) * 1.0e+09;
qTot = (Int_t) (eDep / kWion);
if ((qTot) ||
,det
,hits
,qTot
- ,gMC->TrackTime()*1.0e06
+ ,gMC->TrackTime()*1.0e06
,drRegion);
}