**************************************************************************/
// $Id$
-//
+
+// ----------------------------------
// Class AliMUONGeometryEnvelopeStore
// ----------------------------------
// Class for definititon of the temporary volume envelopes
// used in geometry construction
-//
// Author: Ivana Hrivnacova, IPN Orsay
-#include <TVirtualMC.h>
-#include <TGeoMatrix.h>
-#include <TObjArray.h>
-#include <TArrayI.h>
-#include <Riostream.h>
-
#include "AliMUONGeometryEnvelopeStore.h"
#include "AliMUONGeometryEnvelope.h"
#include "AliMUONGeometryDetElement.h"
-#include "AliMUONGeometryStore.h"
-#include "AliMUONConstants.h"
+#include "AliMUONGeometryBuilder.h"
+
+#include "AliMpExMap.h"
+
#include "AliLog.h"
+#include <TGeoMatrix.h>
+#include <TObjArray.h>
+#include <Riostream.h>
+#include <TString.h>
+
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryEnvelopeStore)
+/// \endcond
//______________________________________________________________________________
AliMUONGeometryEnvelopeStore::AliMUONGeometryEnvelopeStore(
- AliMUONGeometryStore* detElements)
+ AliMpExMap* detElements)
: TObject(),
fEnvelopes(0),
fDetElements(detElements),
+ fReferenceFrame(),
fDebug(false),
fAlign(false)
{
: TObject(),
fEnvelopes(0),
fDetElements(0),
+ fReferenceFrame(),
fDebug(false),
fAlign(false)
{
}
-//______________________________________________________________________________
-AliMUONGeometryEnvelopeStore::AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs)
- : TObject(rhs)
-{
- AliFatal("Copy constructor is not implemented.");
-}
-
//______________________________________________________________________________
AliMUONGeometryEnvelopeStore::~AliMUONGeometryEnvelopeStore()
{
}
}
-//______________________________________________________________________________
-AliMUONGeometryEnvelopeStore&
-AliMUONGeometryEnvelopeStore::operator = (const AliMUONGeometryEnvelopeStore& rhs)
-{
-/// Protected assignement operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
//
// private methods
//
+//______________________________________________________________________________
+TGeoHMatrix
+AliMUONGeometryEnvelopeStore::ConvertDETransform(const TGeoHMatrix& transform) const
+{
+/// Convert transformation into the reference frame
+
+ if ( fReferenceFrame.IsIdentity() )
+ return transform;
+ else {
+ return AliMUONGeometryBuilder::Multiply( fReferenceFrame.Inverse(),
+ transform );
+ }
+}
+
//______________________________________________________________________________
AliMUONGeometryEnvelope*
AliMUONGeometryEnvelopeStore::FindEnvelope(const TString& name) const
if (detElemId == 0) return false;
AliMUONGeometryDetElement* detElement
- = (AliMUONGeometryDetElement*) fDetElements->Get(detElemId);
+ = (AliMUONGeometryDetElement*) fDetElements->GetValue(detElemId);
if (!detElement) {
AliWarning("Transformation not found.");
return false;
};
- envelope->SetTransform(*(detElement->GetLocalTransformation()));
+ // Apply frame transform
+ TGeoHMatrix newTransform
+ = ConvertDETransform(*(detElement->GetLocalTransformation()));
+
+ envelope->SetTransform(newTransform);
+
return true;
}
const TString& envName, Int_t copyNo)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding constituent " << name
const TGeoTranslation& translation)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding constituent " << name
const TGeoRotation& rotation)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding constituent " << name
const TGeoCombiTrans& transform)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding constituent " << name
Int_t npar, Double_t* param)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding parameterised constituent " << name
Int_t npar, Double_t* param)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding parameterised constituent " << name
Int_t npar, Double_t* param)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding parameterised constituent " << name
Int_t npar, Double_t* param)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding parameterised constituent " << name