#include <TRandom3.h>
#include <TSystem.h>
#include <TVirtualMC.h>
+#include <TGeoManager.h>
//
#include "AliLog.h"
#include "AliDetector.h"
}
//_____________________________________________________________________________
-Bool_t AliRun::ApplyDisplacements(TClonesArray* AlObjArray)
+Bool_t AliRun::ApplyAlignObjsToGeom(TClonesArray* AlObjArray)
{
// Read collection of alignment objects (AliAlignObj derived) saved
// in the TClonesArray ClArrayName and apply them to the geometry
return kFALSE;
}
+ gGeoManager->CheckOverlaps(50);
+ TObjArray* ovexlist = gGeoManager->GetListOfOverlaps();
+ if(ovexlist->GetEntriesFast()){
+ AliErrorClass("The application of alignment objects to the geometry caused huge overlaps/extrusions!");
+ }
+
return kTRUE;
}
}
//_____________________________________________________________________________
-Bool_t AliSimulation::ApplyDisplacements(const char* fileName, const char* clArrayName)
+Bool_t AliSimulation::ApplyAlignObjsToGeom(const char* fileName, const char* clArrayName)
{
// read collection of alignment objects (AliAlignObj derived) saved
// in the TClonesArray ClArrayName in the file fileName and apply
return kFALSE;
}
- return gAlice->ApplyDisplacements(alObjArray);
+ return gAlice->ApplyAlignObjsToGeom(alObjArray);
}
//_____________________________________________________________________________
-Bool_t AliSimulation::ApplyDisplacements(AliCDBParam* param, AliCDBId& Id)
+Bool_t AliSimulation::ApplyAlignObjsToGeom(AliCDBParam* param, AliCDBId& Id)
{
// read collection of alignment objects (AliAlignObj derived) saved
// in the TClonesArray ClArrayName in the AliCDBEntry identified by
AliCDBEntry* entry = storage->Get(Id);
TClonesArray* AlObjArray = ((TClonesArray*) entry->GetObject());
- return gAlice->ApplyDisplacements(AlObjArray);
+ return gAlice->ApplyAlignObjsToGeom(AlObjArray);
}
//_____________________________________________________________________________
-Bool_t AliSimulation::ApplyDisplacements(const char* uri, const char* path, Int_t runnum, Int_t version, Int_t sversion)
+Bool_t AliSimulation::ApplyAlignObjsToGeom(const char* uri, const char* path, Int_t runnum, Int_t version, Int_t sversion)
{
// read collection of alignment objects (AliAlignObj derived) saved
// in the TClonesArray ClArrayName in the AliCDBEntry identified by
AliCDBParam* param = AliCDBManager::Instance()->CreateParameter(uri);
AliCDBId id(path, runnum, runnum, version, sversion);
- return ApplyDisplacements(param, id);
+ return ApplyAlignObjsToGeom(param, id);
}
// to the present TGeo geometry
if (fAlignObjArray) {
if (gGeoManager && gGeoManager->IsClosed()) {
- if (gAlice->ApplyDisplacements(fAlignObjArray) == kFALSE) {
+ if (gAlice->ApplyAlignObjsToGeom(fAlignObjArray) == kFALSE) {
AliError("The application of misalignment failed! Restart aliroot and try again. ");
return kFALSE;
}
{fWriteRawData = detectors; fRawDataFileName = fileName;
fDeleteIntermediateFiles = deleteIntermediateFiles;};
- static Bool_t ApplyDisplacements(const char* fileName,
+ static Bool_t ApplyAlignObjsToGeom(const char* fileName,
const char* clArrayName);
- static Bool_t ApplyDisplacements(AliCDBParam* param,
+ static Bool_t ApplyAlignObjsToGeom(AliCDBParam* param,
AliCDBId& Id);
- static Bool_t ApplyDisplacements(const char* uri, const char* path,
+ static Bool_t ApplyAlignObjsToGeom(const char* uri, const char* path,
Int_t runnum, Int_t version,
Int_t sversion);
void SetAlignObjArray(TClonesArray *array)