// --- MUON includes ---
#include "AliMUON.h"
#include "AliMUONChamber.h"
-#include "AliMUONGeometryModule.h"
+#include "AliMUONSegmentation.h"
#include "AliMUONHit.h"
#include "AliLog.h"
AliMUONChamber::AliMUONChamber()
: TObject(),
fId(0),
- fdGas(0.),
- fdAlu(0.),
- fZ(0.),
- frMin(0.),
- frMax(0.),
fCurrentCorrel(1), // to avoid mistakes if ChargeCorrelInit is not called
- fSegmentation2(0),
fResponse(0),
- fGeometry(0),
fMUON(0)
{
// Default constructor
+
+ AliDebug(1, Form("default (empty) ctor this = %p", this));
}
//_______________________________________________________
AliMUONChamber::AliMUONChamber(Int_t id)
: TObject(),
fId(id),
- fdGas(0.),
- fdAlu(0.),
- fZ(0.),
- frMin(0.),
- frMax(0.),
fCurrentCorrel(1), // to avoid mistakes if ChargeCorrelInit is not called
- fSegmentation2(0),
fResponse(0),
- fGeometry(0),
fMUON(0)
{
return;
}
- // new segmentation
- fSegmentation2 = new TObjArray(2);
- fSegmentation2->AddAt(0,0);
- fSegmentation2->AddAt(0,1);
-
- fGeometry = new AliMUONGeometryModule(fId);
-
+ AliDebug(1, Form("ctor this = %p", this) );
}
//_______________________________________________________
{
// Destructor
- if (fSegmentation2) {
- fSegmentation2->Delete();
- delete fSegmentation2;
- }
-
- delete fGeometry;
+ AliDebug(1, Form("dtor this = %p", this));
}
//_______________________________________________________
return *this;
}
-//_______________________________________________________
-Bool_t AliMUONChamber::IsSensId(Int_t volId) const
-{
- // Returns true if the volume specified by volId is in the list
- // of sesitive volumes for this chamber
-
- return fGeometry->IsSensitiveVolume(volId);
-}
-
-
//_____________________________________________________
void AliMUONChamber::ChargeCorrelationInit() {
// Initialisation of charge correlation for current hit
fCurrentCorrel = TMath::Exp(gRandom->Gaus(0,fResponse->ChargeCorrel()/2));
}
-//_______________________________________________________
-void AliMUONChamber::InitGeo(Float_t /*zpos*/)
-{
- // sensitive gas gap
- fdGas= 0.5;
- // 3% radiation length of aluminum (X0=8.9 cm)
- fdAlu= 3.0/100*8.9;
-}
-//_______________________________________________________
-//
-// NEW SEGMENTATION
-//_______________________________________________________
-void AliMUONChamber::Init(Int_t flag)
-{
- // Initalisation ..
- //
- // ... for chamber segmentation
-
- if (!flag) AliFatal("wrong segmentation type.");
-
- if (fSegmentation2->At(0))
- ((AliMUONGeometrySegmentation*) fSegmentation2->At(0))->Init(fId);
- if (fSegmentation2->At(1))
- ((AliMUONGeometrySegmentation*) fSegmentation2->At(1))->Init(fId);
-
-}
-// //_________________________________________________________________
-// void AliMUONChamber::SigGenInit(AliMUONHit *hit)
-// {
-// //
-// // Initialisation of segmentation for hit
-// //
-// Float_t x = hit->X();
-// Float_t y = hit->Y();
-// Float_t z = hit->Z();
-// Int_t id = hit->DetElemId();
-
-// ((AliMUONGeometrySegmentation*) fSegmentation2->At(0))->SigGenInit(id, x, y, z) ;
-// ((AliMUONGeometrySegmentation*) fSegmentation2->At(1))->SigGenInit(id, x, y, z) ;
-
-// }
-
//_______________________________________________________
void AliMUONChamber::DisIntegration(AliMUONHit *hit,
Int_t& nnew,Float_t newclust[6][500])
// Cathode plane loop
for (Int_t i = 1; i <= 2; i++) {
Float_t qcath = qtot * (i==1? fCurrentCorrel : 1/fCurrentCorrel);
-
+
AliMUONGeometrySegmentation* segmentation=
- (AliMUONGeometrySegmentation*) fSegmentation2->At(i-1);
+ fMUON->GetSegmentation()->GetModuleSegmentation(fId, i-1);
for (segmentation->FirstPad(id, xhit, yhit, zhit, dx, dy);
segmentation->MorePads(id);
#include "AliMUONGeometrySegmentation.h"
class AliMUONClusterFinderVS;
-class AliMUONGeometryModule;
class AliMUON;
class AliMUONHit;
virtual Int_t GetId() const {return fId;}
//
-// Get chamber Id
- virtual Bool_t IsSensId(Int_t volId) const;
-
-// Initialisation
- virtual void Init(Int_t flag);
-// Set z-position of chamber
- virtual void SetZ(Float_t Z) {fZ = Z;}
-// Get z-position of chamber
- virtual Float_t Z() const {return fZ;}
-// Set inner radius of sensitive volume
- virtual void SetRInner(Float_t rmin) {frMin=rmin;}
-// Set outer radius of sensitive volum
- virtual void SetROuter(Float_t rmax) {frMax=rmax;}
-
-// Return inner radius of sensitive volume
- virtual Float_t RInner() const {return frMin;}
-// Return outer radius of sensitive volum
- virtual Float_t ROuter() const {return frMax;}
//
// Set response model
virtual void SetResponseModel(AliMUONResponse* thisResponse) {fResponse=thisResponse;}
//
-// Set segmentation model
- virtual void SetSegmentationModel(Int_t isec, AliMUONGeometrySegmentation* thissegmentation) {
- fSegmentation2->AddAt(thissegmentation,isec-1);
- }
-//
// Get pointer to response model
virtual AliMUONResponse* &ResponseModel(){return fResponse;}
-//
-// Get reference to segmentation model
- virtual AliMUONGeometrySegmentation* SegmentationModel2(Int_t isec) {
- return (AliMUONGeometrySegmentation*) (*fSegmentation2)[isec-1];
- }
//
// Member function forwarding to the segmentation and response models
//
// Calculate pulse height from energy loss
virtual Float_t IntPH(Float_t eloss) {return fResponse->IntPH(eloss);}
-//
-// Ask segmentation if signal should be generated
-// virtual Int_t SigGenCond(AliMUONHit* hit);
-//
-// Initialisation of segmentation for hit
-// virtual void SigGenInit(AliMUONHit* hit);
+
// Initialisation of charge fluctuation for given hit
virtual void ChargeCorrelationInit();
// Cluster formation method (charge disintegration)
virtual void DisIntegration(AliMUONHit* hit,
Int_t& x, Float_t newclust[6][500]);
-// Initialize geometry related parameters
- virtual void InitGeo(Float_t z);
//
- virtual Float_t DGas() const {return fdGas;}
- virtual Float_t DAlu() const {return fdAlu;}
- virtual void SetDGas(Float_t DGas) {fdGas = DGas;}
- virtual void SetDAlu(Float_t DAlu) {fdAlu = DAlu;}
virtual void SetChargeCorrel(Float_t correl) {fResponse->SetChargeCorrel(correl);}
-// geometry
- void SetGeometry(AliMUONGeometryModule* geometry) {fGeometry = geometry;}
- AliMUONGeometryModule* GetGeometry() const {return fGeometry; }
-
-
protected:
AliMUONChamber(const AliMUONChamber & rChamber);
// assignment operator
AliMUONChamber& operator =(const AliMUONChamber& rhs);
Int_t fId; // chamber number
- Float_t fdGas; // half gaz gap
- Float_t fdAlu; // half Alu width
- Float_t fZ; // Z position (cm)
- Float_t frMin; // innermost sensitive radius
- Float_t frMax; // outermost sensitive radius
Float_t fCurrentCorrel; //! charge correlation for current hit.
- TObjArray *fSegmentation2; // pointer to geometry segmentation bending & NBending
-
AliMUONResponse *fResponse; // pointer to response
- AliMUONGeometryModule *fGeometry; // pointer to geometry
AliMUON *fMUON; // pointer to MUON
ClassDef(AliMUONChamber,3) // Muon tracking chamber class
};