// Author: A.Morsch
//------------------------------------------------------------------------
+#include <TSystem.h>
+
#include "AliFRAMEv2.h"
#include "AliMagF.h"
#include "AliRun.h"
-#include "TSystem.h"
ClassImp(AliFRAMEv2)
ppgon[2] = 18.;
ppgon[3] = 2.;
-
ppgon[4] = -376.;
ppgon[5] = 280.;
ppgon[6] = 421.;
// gMC->Gsvolu("B077", "TUBE", kAir, ptube, 3);
gMC->Gspos("B077", 1, "ALIC", 0., 0., 0., 0, "ONLY");
//
+// Reference plane for TRD
+//
+ ppgon[6] = ppgon[5] + 0.1;
+ ppgon[9] = ppgon[6];
+ gMC->Gsvolu("BREF", "PGON", kAir, ppgon, 10);
+ gMC->Gspos("BREF", 1, "B077", 0., 0., 0., 0, "ONLY");
+//
// The outer Frame
//
dx = rd * TMath::Sin(phi*kdeg2rad);
dy = rd * TMath::Cos(phi*kdeg2rad);
-// gMC->Gspos("B047", 1, "B076", -dx, dy, dz, idrotm[2004], "ONLY");
-// gMC->Gspos("B047", 2, "B076", -dx, dy, -dz, idrotm[2003], "ONLY");
-// gMC->Gspos("B047", 3, "B076", dx, dy, dz, idrotm[2017], "ONLY");
-// gMC->Gspos("B047", 4, "B076", dx, dy, -dz, idrotm[2018], "ONLY");
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");
-// gMC->Gspos("BM49", 1, "B076", dx, dy, 0., idrotm[2020], "ONLY");
-// gMC->Gspos("BM49", 2, "B076", -dx, dy, 0., idrotm[2019], "ONLY");
//
// phi = 60
phi = 60;
dx = rd * TMath::Sin(phi*kdeg2rad);
dy = rd * TMath::Cos(phi*kdeg2rad);
-// gMC->Gspos("B047", 5, "B076", -dx, dy, dz, idrotm[2005], "ONLY");
-// gMC->Gspos("B047", 6, "B076", -dx, dy, -dz, idrotm[2006], "ONLY");
-// gMC->Gspos("B047", 7, "B076", dx, dy, dz, idrotm[2016], "ONLY");
-// gMC->Gspos("B047", 8, "B076", dx, dy, -dz, idrotm[2015], "ONLY");
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");
-// gMC->Gspos("BM49", 3, "B076", dx, dy, 0., idrotm[2022], "ONLY");
-// gMC->Gspos("BM49", 4, "B076", -dx, dy, 0., idrotm[2021], "ONLY");
//
// phi = 80
//
phi = 80;
dx = rd * TMath::Sin(phi*kdeg2rad);
dy = rd * TMath::Cos(phi*kdeg2rad);
-// gMC->Gspos("B047", 9, "B076", -dx, dy, dz, idrotm[2009], "ONLY");
-// gMC->Gspos("B047", 10, "B076", -dx, dy, -dz, idrotm[2007], "ONLY");
-// gMC->Gspos("B047", 11, "B076", dx, dy, dz, idrotm[2013], "ONLY");
-// gMC->Gspos("B047", 12, "B076", dx, dy, -dz, idrotm[2014], "ONLY");
gMC->Gspos("B047", 13, "B076", -dx, -dy, dz, idrotm[2008], "ONLY");
gMC->Gspos("B047", 14, "B076", -dx, -dy, -dz, idrotm[2010], "ONLY");
gMC->Gspos("B045", 15, "B076", dx, -dy, dz2, idrotm[2025], "ONLY");
gMC->Gspos("B045", 16, "B076", dx, -dy, -dz2, idrotm[2033], "ONLY");
-// gMC->Gspos("BM49", 5, "B076", dx, dy, 0., idrotm[2026], "ONLY");
-// gMC->Gspos("BM49", 6, "B076", -dx, dy, 0., idrotm[2023], "ONLY");
gMC->Gspos("BM49", 7, "B076", dx, -dy, 0., idrotm[2025], "ONLY");
gMC->Gspos("BM49", 8, "B076", -dx, -dy, 0., idrotm[2024], "ONLY");
" FRAME "
"**************************************\n",ClassName());
}
+//
+// The reference volume id
+ fRefVolumeId = gMC->VolId("BREF");
}
Int_t AliFRAMEv2::IsVersion() const
return version;
}
+void AliFRAMEv2::StepManager()
+{
+//
+// Stepmanager of AliFRAMEv2.cxx
+// Used for recording of reference tracks entering the spaceframe mother volume
+//
+ Int_t copy, id;
+
+ //
+ // Only charged tracks
+ if( !(gMC->TrackCharge()) ) return;
+ //
+ // Only tracks entering mother volume
+ //
+
+ id=gMC->CurrentVolID(copy);
+
+ if (id != fRefVolumeId) return;
+ if(!gMC->IsTrackEntering()) return;
+ //
+ // Add the reference track
+ //
+ AddTrackReference(gAlice->GetCurrentTrackNumber());
+}
+