fChargeDispersion(0),
fSingleStepForChargeDispersion(0),
fNStepForChargeDispersion(0),
- fDensitySiOverSupport(10)
+ fDensitySupportOverSi(0.1)
{
// default constructor
fChargeDispersion(0),
fSingleStepForChargeDispersion(0),
fNStepForChargeDispersion(0),
- fDensitySiOverSupport(10)
+ fDensitySupportOverSi(0.1)
{
fNameGeomFile = "AliMFTGeometry.root";
fChargeDispersion(0),
fSingleStepForChargeDispersion(0),
fNStepForChargeDispersion(0),
- fDensitySiOverSupport(10)
+ fDensitySupportOverSi(0.1)
{
fNameGeomFile = nameGeomFile;
AliMaterial(++matId, "Readout", aSi, zSi, dSi, radSi, absSi );
AliMedium(kReadout, "Readout", matId, unsens, isxfld, sxmgmx, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi);
- AliMaterial(++matId, "Support", aSi, zSi, dSi/fDensitySiOverSupport, fDensitySiOverSupport*radSi, fDensitySiOverSupport*absSi);
+ AliMaterial(++matId, "Support", aSi, zSi, dSi*fDensitySupportOverSi, radSi/fDensitySupportOverSi, absSi/fDensitySupportOverSi);
AliMedium(kSupport, "Support", matId, unsens, isxfld, sxmgmx, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi);
AliInfo("End MFT materials");
// Full Step Manager
+ AliDebug(2, Form("Entering StepManager: gMC->CurrentVolName() = %s", gMC->CurrentVolName()));
+
if (!fSegmentation) AliFatal("No segmentation available"); // DO WE HAVE A SEGMENTATION???
if (!(this->IsActive())) return;
gMC->TrackPosition(position);
gMC->TrackMomentum(momentum);
- AliDebug(1, Form("AliMFT::StepManager()->%s Hit #%06d (z=%f) belongs to track %02d\n",
- gMC->CurrentVolName(), fNhits, position.Z(), gAlice->GetMCApp()->GetCurrentTrackNumber()));
+ 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()));
hit.SetPosition(position);
hit.SetTOF(gMC->TrackTime());
plane->GetRMaxSupport(),
0.5*(plane->GetSupportElement(0)->GetAxis(2)->GetXmax() -
plane->GetSupportElement(0)->GetAxis(2)->GetXmin()) );
+ AliDebug(2, Form("Created vol %s", supportElem->GetName()));
+ supportElem->SetLineColor(kCyan-9);
vol -> AddNode(supportElem, 0, new TGeoTranslation(origin[0], origin[1], origin[2]));
AliDebug(1, "support elements created!");
for (Int_t iSlice=0; iSlice<fNSlices; iSlice++) {
origin[2] = -0.5*(plane->GetActiveElement(iActive)->GetAxis(2)->GetXmin() + 2*dz*(iSlice+1) + plane->GetActiveElement(iActive)->GetAxis(2)->GetXmin() + 2*dz*(iSlice) );
TGeoVolume *activeElem = gGeoManager->MakeBox(Form("MFT_plane%02d_active%03d_slice%02d", iPlane, iActive, iSlice), silicon, dx, dy, dz);
+ AliDebug(2, Form("Created vol %s", activeElem->GetName()));
+ activeElem->SetLineColor(kGreen);
vol -> AddNode(activeElem, 0, new TGeoTranslation(origin[0], origin[1], origin[2]));
}
origin[2] = -0.5*(plane->GetReadoutElement(iReadout)->GetAxis(2)->GetXmax() + plane->GetReadoutElement(iReadout)->GetAxis(2)->GetXmin());
TGeoVolume *readoutElem = gGeoManager->MakeBox(Form("MFT_plane%02d_readout%03d", iPlane, iReadout), readout, dx, dy, dz);
+ AliDebug(2, Form("Created vol %s", readoutElem->GetName()));
+ readoutElem->SetLineColor(kRed);
vol -> AddNode(readoutElem, 0, new TGeoTranslation(origin[0], origin[1], origin[2]));
}
}
for (Int_t iSideDigit=0; iSideDigit<fSideDigits->GetEntries(); iSideDigit++) {
- AliMFTDigit *newDigit = (AliMFTDigit*) fSideDigits->At(iSideDigit);
- new ((*pSDigList[sDigit.GetPlane()])[pSDigList[sDigit.GetPlane()]->GetEntries()]) AliMFTDigit(*newDigit);
+ AliMFTDigit *newSDigit = (AliMFTDigit*) fSideDigits->At(iSideDigit);
+ new ((*pSDigList[sDigit.GetPlane()])[pSDigList[sDigit.GetPlane()]->GetEntries()]) AliMFTDigit(*newSDigit);
}
- fSideDigits->Clear();
+ fSideDigits->Delete();
}
+
+ // ------------ In case we should simulate a rectangular pattern of pixel...
+
+ for (Int_t iPlane=0; iPlane<fNPlanes; iPlane++) {
+ if (fSegmentation->GetPlane(iPlane)->HasPixelRectangularPatternAlongY()) {
+ Int_t nSDigits = pSDigList[iPlane]->GetEntries();
+ for (Int_t iSDigit=0; iSDigit<nSDigits; iSDigit++) {
+ AliMFTDigit *mySDig = (AliMFTDigit*) (pSDigList[iPlane]->At(iSDigit));
+ if (mySDig->GetPixelX()%2 == mySDig->GetPixelY()%2) { // both pair or both odd
+ Int_t xPixelNew = mySDig->GetPixelX();
+ Int_t yPixelNew = mySDig->GetPixelY()+1;
+ if (fSegmentation->DoesPixelExist(mySDig->GetDetElemID(), xPixelNew, yPixelNew)) {
+ AliMFTDigit newSDigit;
+ newSDigit.SetEloss(0.);
+ newSDigit.SetDetElemID(mySDig->GetDetElemID());
+ newSDigit.SetPlane(iPlane);
+ newSDigit.SetPixID(xPixelNew, yPixelNew, 0);
+ newSDigit.SetPixWidth(fSegmentation->GetPixelSizeX(newSDigit.GetDetElemID()),
+ fSegmentation->GetPixelSizeY(newSDigit.GetDetElemID()),
+ fSegmentation->GetPixelSizeZ(newSDigit.GetDetElemID()));
+ newSDigit.SetPixCenter(fSegmentation->GetPixelCenterX(newSDigit.GetDetElemID(), xPixelNew),
+ fSegmentation->GetPixelCenterY(newSDigit.GetDetElemID(), yPixelNew),
+ fSegmentation->GetPixelCenterZ(newSDigit.GetDetElemID(), 0));
+ new ((*pSDigList[iPlane])[pSDigList[iPlane]->GetEntries()]) AliMFTDigit(newSDigit);
+ }
+ }
+ else { // pair-odd
+ Int_t xPixelNew = mySDig->GetPixelX();
+ Int_t yPixelNew = mySDig->GetPixelY()-1;
+ if (fSegmentation->DoesPixelExist(mySDig->GetDetElemID(), xPixelNew, yPixelNew)) {
+ AliMFTDigit newSDigit;
+ newSDigit.SetEloss(0.);
+ newSDigit.SetDetElemID(mySDig->GetDetElemID());
+ newSDigit.SetPlane(iPlane);
+ newSDigit.SetPixID(xPixelNew, yPixelNew, 0);
+ newSDigit.SetPixWidth(fSegmentation->GetPixelSizeX(newSDigit.GetDetElemID()),
+ fSegmentation->GetPixelSizeY(newSDigit.GetDetElemID()),
+ fSegmentation->GetPixelSizeZ(newSDigit.GetDetElemID()));
+ newSDigit.SetPixCenter(fSegmentation->GetPixelCenterX(newSDigit.GetDetElemID(), xPixelNew),
+ fSegmentation->GetPixelCenterY(newSDigit.GetDetElemID(), yPixelNew),
+ fSegmentation->GetPixelCenterZ(newSDigit.GetDetElemID(), 0));
+ new ((*pSDigList[iPlane])[pSDigList[iPlane]->GetEntries()]) AliMFTDigit(newSDigit);
+ }
+ }
+ }
+ }
+ }
+
+ //------------------------------------------------------------------------
AliDebug(1,"Stop Hits2SDigitsLocal");