X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=MUON%2FAliMUONChamberGeometry.h;h=cec55c57214045e46ce333ba9e849f926609fbbd;hp=018227edce6ac0b52b30fcba35873afff663d49a;hb=14b7b8965d1424e192bac69a24643313dfe432ea;hpb=6b82c1f0f43ff565411e813e660f73718f3895da;ds=sidebyside diff --git a/MUON/AliMUONChamberGeometry.h b/MUON/AliMUONChamberGeometry.h index 018227edce6..cec55c57214 100644 --- a/MUON/AliMUONChamberGeometry.h +++ b/MUON/AliMUONChamberGeometry.h @@ -1,4 +1,9 @@ -// $Id$ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ +// Revision of includes 07/05/2004 + // // Class AliMUONChamberGeometry // ----------------------------- @@ -10,6 +15,7 @@ #define ALI_MUON_CHAMBER_GEOMETRY_H #include +#include class TGeoTranslation; class TGeoRotation; @@ -19,120 +25,81 @@ class TArrayI; class AliMUONChamber; class AliMUONGeometryEnvelope; +class AliMUONGeometryEnvelopeStore; +class AliMUONGeometryTransformStore; +class AliMUONGeometrySVMap; class AliMUONChamberGeometry : public TObject { public: AliMUONChamberGeometry(Int_t chamberId); AliMUONChamberGeometry(); - AliMUONChamberGeometry(const AliMUONChamberGeometry& rhs); virtual ~AliMUONChamberGeometry(); - // operators - AliMUONChamberGeometry& operator = (const AliMUONChamberGeometry& rhs); - // methods - - // adding virtual envelopes - // (not placed in MC geometry, only logical assembly of volumes, - // cannot have more copies) - void AddEnvelope(const TString& name, Bool_t isVirtual, - const char* only="ONLY"); - void AddEnvelope(const TString& name, Bool_t isVirtual, - const TGeoTranslation& translation, - const char* only="ONLY"); - void AddEnvelope(const TString& name, Bool_t isVirtual, - const TGeoTranslation& translation, - const TGeoRotation& rotation, - const char* only="ONLY"); - - // adding non-virtual envelopes - // (placed in MC geometry with transformation composed - // of transformation of chamber and their transformation, - // can have more copies ) - void AddEnvelope(const TString& name, Int_t copyNo, - const char* only="ONLY"); - void AddEnvelope(const TString& name, Int_t copyNo, - const TGeoTranslation& translation, - const char* only="ONLY"); - void AddEnvelope(const TString& name, Int_t copyNo, - const TGeoTranslation& translation, - const TGeoRotation& rotation, - const char* only="ONLY"); - - // adding constituents to virtual envelopes - // (placed in MC geometry with transformation composed - // of transformation of chamber, envelope and their own - // transformation ) - void AddEnvelopeConstituent(const TString& name, const TString& envName, - Int_t copyNo); - void AddEnvelopeConstituent(const TString& name, const TString& envName, - Int_t copyNo, const TGeoTranslation& translation); - void AddEnvelopeConstituent(const TString& name, const TString& envName, - Int_t copyNo, const TGeoTranslation& translation, - const TGeoRotation& rotation); - - // adding constituents to virtual envelopes with specified shape - // parameters - // (placed in MC geometry with transformation composed - // of transformation of chamber, envelope and their own - // transformation ) - void AddEnvelopeConstituentParam(const TString& name, const TString& envName, - Int_t copyNo, Int_t npar, Double_t* param); - void AddEnvelopeConstituentParam(const TString& name, const TString& envName, - Int_t copyNo, const TGeoTranslation& translation, - Int_t npar, Double_t* param); - void AddEnvelopeConstituentParam(const TString& name, const TString& envName, - Int_t copyNo, const TGeoTranslation& translation, - const TGeoRotation& rotation, Int_t npar, Double_t* param); - void SetMotherVolume(const TString& motherVolumeName); void SetTranslation(const TGeoTranslation& translation); void SetRotation(const TGeoRotation& rotation); void SetSensitiveVolume(Int_t volId); void SetSensitiveVolume(const TString& name); - void SetDebug(Bool_t debug); - + void SetAlign(Bool_t align); + // get methods TString GetMotherVolume() const; - const TGeoCombiTrans* GetTransformation() const; - const TObjArray* GetEnvelopes() const; + const TGeoCombiTrans* GetTransformation() const; + AliMUONGeometryEnvelopeStore* GetEnvelopeStore() const; + AliMUONGeometryTransformStore* GetTransformStore() const; + AliMUONGeometrySVMap* GetSVMap() const; Bool_t IsSensitiveVolume(Int_t volId) const; + Bool_t IsSensitiveVolume(const TString& volName) const; +// +//Int_t GetDEVolId(Int_t svVolId) const; + + protected: + AliMUONChamberGeometry(const AliMUONChamberGeometry& rhs); + // operators + AliMUONChamberGeometry& operator = (const AliMUONChamberGeometry& rhs); private: // methods - AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const; + Int_t GetSVIndex(Int_t svVolId) const; // data members Int_t fChamberId; // the chamber Id TString fMotherVolume; // mother volume name + Int_t fNofSVs; // number of sensitive volumes + TArrayI* fSVVolumeIds; // densitive volumes IDs TGeoCombiTrans* fTransformation;// the chamber transformation wrt to mother // volume - TObjArray* fEnvelopes; // the envelopes names and transformations - // wrt to the chamber position in mother volume - Int_t fNofSensVolumeIds; // Number of sensitive volumes IDs - TArrayI* fSensVolumeIds; // Sensitive volumes IDs - Bool_t fDebug; // Switch for debugging + AliMUONGeometryTransformStore* fDETransforms; // det elements transformations + AliMUONGeometryEnvelopeStore* fEnvelopes; // envelopes + AliMUONGeometrySVMap* fSVMap; // sensitive volumes map - ClassDef(AliMUONChamberGeometry,1) // MUON chamber geometry base class + ClassDef(AliMUONChamberGeometry,2) // MUON chamber geometry base class }; // inline functions -inline void AliMUONChamberGeometry::SetMotherVolume(const TString& motherVolumeName) +inline void +AliMUONChamberGeometry::SetMotherVolume(const TString& motherVolumeName) { fMotherVolume = motherVolumeName; } -inline void AliMUONChamberGeometry::SetDebug(Bool_t debug) -{ fDebug = debug; } - inline TString AliMUONChamberGeometry::GetMotherVolume() const { return fMotherVolume; } inline const TGeoCombiTrans* AliMUONChamberGeometry::GetTransformation() const { return fTransformation; } -inline const TObjArray* AliMUONChamberGeometry::GetEnvelopes() const +inline AliMUONGeometryEnvelopeStore* +AliMUONChamberGeometry::GetEnvelopeStore() const { return fEnvelopes; } -#endif //ALI_MUON_V_CHAMBER_GEOMETRY_H +inline AliMUONGeometryTransformStore* +AliMUONChamberGeometry::GetTransformStore() const +{ return fDETransforms; } + +inline AliMUONGeometrySVMap* AliMUONChamberGeometry::GetSVMap() const +{ return fSVMap; } + +#endif //ALI_MUON_CHAMBER_GEOMETRY_H