]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
ApplyDisplacements method renamed to ApplyAlignObjsToGeom. Automatic check of overlap...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 17 Mar 2006 15:51:20 +0000 (15:51 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 17 Mar 2006 15:51:20 +0000 (15:51 +0000)
STEER/AliRun.cxx
STEER/AliRun.h
STEER/AliSimulation.cxx
STEER/AliSimulation.h

index a92be230e4d0bd243db29c5a1e43bea705bebe6f..ddd0042009a84c1046822f50dc86c2f52a0a037e 100644 (file)
@@ -49,6 +49,7 @@
 #include <TRandom3.h>
 #include <TSystem.h>
 #include <TVirtualMC.h>
+#include <TGeoManager.h>
 // 
 #include "AliLog.h"
 #include "AliDetector.h"
@@ -959,7 +960,7 @@ void AliRun::AddModule(AliModule* mod)
 }
 
 //_____________________________________________________________________________
-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
@@ -974,6 +975,12 @@ Bool_t AliRun::ApplyDisplacements(TClonesArray* AlObjArray)
        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;
 
 }
index e5ccc59139b4f2441f278e3e3d4fd81f2217f749..b62c249375b6d24089b032a2474597adee08c177 100644 (file)
@@ -141,7 +141,7 @@ public:
 
   // Method to introduce the detector misliagnment
   // It is called by AliSimulation
-  static Bool_t  ApplyDisplacements(TClonesArray* AlObjArray);
+  static Bool_t  ApplyAlignObjsToGeom(TClonesArray* AlObjArray);
 
 protected:
   virtual  void  Tree2Tree(Option_t *option, const char *detector=0);
index 15b4a4f57291f2b2fabce7f77e556f9813e71816..898db856c31108289dfed3e6c5116ab5e2d8e75f 100644 (file)
@@ -269,7 +269,7 @@ void AliSimulation::SetEventsPerFile(const char* detector, const char* type,
 }
 
 //_____________________________________________________________________________
-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
@@ -289,12 +289,12 @@ Bool_t AliSimulation::ApplyDisplacements(const char* fileName, const char* clArr
     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
@@ -306,12 +306,12 @@ Bool_t AliSimulation::ApplyDisplacements(AliCDBParam* param, AliCDBId& Id)
   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
@@ -322,7 +322,7 @@ Bool_t AliSimulation::ApplyDisplacements(const char* uri, const char* path, Int_
   AliCDBParam* param = AliCDBManager::Instance()->CreateParameter(uri);
   AliCDBId id(path, runnum, runnum, version, sversion);
 
-  return ApplyDisplacements(param, id);
+  return ApplyAlignObjsToGeom(param, id);
 
 }
 
@@ -511,7 +511,7 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents)
   // 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;
       }
index 7e4e6d228157e2da163008c4e1949734a40c8ed6..0a0f303242edb2ea8d3e1eda83be5ca22307cd22 100644 (file)
@@ -56,11 +56,11 @@ public:
                    {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)