/* $Id$ */
-
-///////////////////////////////////////////////
-// Manager and hits classes for set:MUON //
-////////////////////////////////////////////////
+// ------------------
+// Class AliMUON
+// ------------------
+// AliDetector class for MUON subsystem
+// providing simulation data management
#include "Riostream.h"
fDigitizerType(""),
fRawWriter(0x0)
{
-// Default Constructor
-//
- AliDebug(1,Form("default (empty) ctor this=%p",this));
+/// Default Constructor
+
+ AliDebug(1,Form("default (empty) ctor this=%p",this));
fIshunt = 0;
}
fDigitizerType(digitizerClassName),
fRawWriter(0x0)
{
- AliDebug(1,Form("ctor this=%p",this));
+/// Standard constructor
+
+ AliDebug(1,Form("ctor this=%p",this));
fIshunt = 0;
SetMarkerColor(kRed);//
AliMUON::AliMUON(const AliMUON& rMUON)
: AliDetector(rMUON)
{
-// Protected copy constructor
+/// Protected copy constructor
AliFatal("Not implemented.");
}
//____________________________________________________________________
AliMUON::~AliMUON()
{
-// Destructor
+/// Destructor
+
AliDebug(1,Form("dtor this=%p",this));
fIshunt = 0;
//________________________________________________________________________
AliMUON& AliMUON::operator = (const AliMUON& rhs)
{
-// Protected assignement operator
+/// Protected assignement operator
if (this == &rhs) return *this;
//_____________________________________________________________________________
void AliMUON::AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder)
{
-// Adds the geometry builder to the list
-// ---
+/// Add the geometry builder to the list
fGeometryBuilder->AddBuilder(geomBuilder);
}
//____________________________________________________________________
void AliMUON::BuildGeometry()
{
-// Geometry for event display
+/// Geometry for event display
// for (Int_t i = 0; i < AliMUONConstants::NCh(); i++)
//____________________________________________________________________
const AliMUONGeometry* AliMUON::GetGeometry() const
{
-// Return geometry parametrisation
+/// Return geometry parametrisation
if ( !fGeometryBuilder) {
AliWarningStream() << "GeometryBuilder not defined." << std::endl;
//____________________________________________________________________
const AliMUONGeometryTransformer* AliMUON::GetGeometryTransformer() const
{
-// Return geometry parametrisation
+/// Return geometry parametrisation
const AliMUONGeometry* kGeometry = GetGeometry();
//__________________________________________________________________
void AliMUON::SetTreeAddress()
{
+/// Set Hits tree address
+
GetMUONData()->SetLoader(fLoader);
// GetMUONData()->MakeBranch("D,S,RC");
// GetMUONData()->SetTreeAddress("H,D,S,RC");
//_________________________________________________________________
void AliMUON::SetChargeSlope(Int_t id, Float_t p1)
{
-// Set the inverse charge slope for chamber id
+/// Set the inverse charge slope for chamber id
+
Int_t i=2*(id-1); //PH ((AliMUONChamber*) (*fChambers)[i])->SetSigmaIntegration(p1);
//PH ((AliMUONChamber*) (*fChambers)[i+1])->SetSigmaIntegration(p1);
((AliMUONChamber*) fChambers->At(i))->SetChargeSlope(p1);
//__________________________________________________________________
void AliMUON::SetChargeSpread(Int_t id, Float_t p1, Float_t p2)
{
-// Set sigma of charge spread for chamber id
+/// Set sigma of charge spread for chamber id
+
Int_t i=2*(id-1);
((AliMUONChamber*) fChambers->At(i))->SetChargeSpread(p1,p2);
((AliMUONChamber*) fChambers->At(i+1))->SetChargeSpread(p1,p2);
//___________________________________________________________________
void AliMUON::SetSigmaIntegration(Int_t id, Float_t p1)
{
-// Set integration limits for charge spread
+/// Set integration limits for charge spread
Int_t i=2*(id-1);
((AliMUONChamber*) fChambers->At(i))->SetSigmaIntegration(p1);
((AliMUONChamber*) fChambers->At(i+1))->SetSigmaIntegration(p1);
//__________________________________________________________________
void AliMUON::SetMaxAdc(Int_t id, Int_t p1)
{
-// Set maximum number for ADCcounts (saturation)
+/// Set maximum number for ADCcounts (saturation)
+
Int_t i=2*(id-1);
((AliMUONChamber*) fChambers->At(i))->SetMaxAdc(p1);
((AliMUONChamber*) fChambers->At(i+1))->SetMaxAdc(p1);
//__________________________________________________________________
void AliMUON::SetMaxStepGas(Float_t p1)
{
-// Set stepsize in gas
+/// Set stepsize in gas
+
fMaxStepGas=p1;
}
//__________________________________________________________________
void AliMUON::SetMaxStepAlu(Float_t p1)
{
-// Set step size in Alu
+/// Set step size in Alu
+
fMaxStepAlu=p1;
}
//__________________________________________________________________
void AliMUON::SetMaxDestepGas(Float_t p1)
{
-// Set maximum step size in Gas
+/// Set maximum step size in Gas
+
fMaxDestepGas=p1;
}
//__________________________________________________________________
void AliMUON::SetMaxDestepAlu(Float_t p1)
{
-// Set maximum step size in Alu
+/// Set maximum step size in Alu
+
fMaxDestepAlu=p1;
}
//____________________________________________________________________
Float_t AliMUON::GetMaxStepGas() const
{
-// Return stepsize in gas
+/// Return stepsize in gas
return fMaxStepGas;
}
//____________________________________________________________________
Float_t AliMUON::GetMaxStepAlu() const
{
-// Return step size in Alu
+/// Return step size in Alu
return fMaxStepAlu;
}
//____________________________________________________________________
Float_t AliMUON::GetMaxDestepGas() const
{
-// Return maximum step size in Gas
+/// Return maximum step size in Gas
return fMaxDestepGas;
}
//____________________________________________________________________
Float_t AliMUON::GetMaxDestepAlu() const
{
-// Return maximum step size in Gas
+/// Return maximum step size in Gas
return fMaxDestepAlu;
}
//____________________________________________________________________
void AliMUON::SetAlign(Bool_t align)
{
- // Sets option for alignement to geometry builder
+/// Set option for alignement to geometry builder
fGeometryBuilder->SetAlign(align);
}
//____________________________________________________________________
void AliMUON::SetAlign(const TString& fileName, Bool_t align)
{
- // Sets option for alignement to geometry builder
+/// Set option for alignement to geometry builder
fGeometryBuilder->SetAlign(fileName, align);
}
//____________________________________________________________________
void AliMUON::SetResponseModel(Int_t id, AliMUONResponse *response)
{
-// Set the response for chamber id
+/// Set the response for chamber id
((AliMUONChamber*) fChambers->At(id))->SetResponseModel(response);
}
+
//____________________________________________________________________
AliDigitizer* AliMUON::CreateDigitizer(AliRunDigitizer* manager) const
{
- // FIXME: the selection of the class should be done through a factory
- // mechanism. (see also Hits2SDigits()).
+/// FIXME: the selection of the class should be done through a factory
+/// mechanism. (see also Hits2SDigits()).
AliInfo(Form("Digitizer used : %s",fDigitizerType.Data()));
TString
AliMUON::SDigitizerType() const
{
+/// Return digitizer type
+
return fSDigitizerType;
}
//_____________________________________________________________________
void AliMUON::SDigits2Digits()
{
-
-// write TreeD here
+/// Write TreeD here only
char hname[30];
// sprintf(hname,"TreeD%d",fLoader->GetHeader()->GetEvent());
//_____________________________________________________________________
void AliMUON::Hits2SDigits()
{
- // FIXME: the selection of the sdigitizer should be done through a
- // factory mechanism.
+/// FIXME: the selection of the sdigitizer should be done through a
+/// factory mechanism.
AliInfo(Form("SDigitizer used : %s",fSDigitizerType.Data()));
TString
AliMUON::DigitizerType() const
{
+/// Return digitizer type
+
return fDigitizerType;
}
//_____________________________________________________________________
void AliMUON::Digits2Raw()
{
- // convert digits of the current event to raw data
+/// Convert digits of the current event to raw data
+
if (!fRawWriter)
{
fRawWriter = new AliMUONRawWriter(fMUONData);
//_______________________________________________________________________
AliLoader* AliMUON::MakeLoader(const char* topfoldername)
{
-//builds standard getter (AliLoader type)
-//if detector wants to use castomized getter, it must overload this method
-
+/// Build standard getter (AliLoader type);
+/// if detector wants to use castomized getter, it must overload this method
AliDebug(1,Form("Creating standard getter for detector %s. Top folder is %s.",
GetName(),topfoldername));
AliMUONRawCluster *AliMUON::RawCluster(Int_t ichamber, Int_t icathod, Int_t icluster)
{
-//
-// Return rawcluster (icluster) for chamber ichamber and cathode icathod
-// Obsolete ??
+/// Return rawcluster (icluster) for chamber ichamber and cathode icathod
+/// Obsolete ??
+
TClonesArray *muonRawCluster = GetMUONData()->RawClusters(ichamber);
ResetRawClusters();
TTree *treeR = fLoader->TreeR();
void
AliMUON::ResetGeometryBuilder()
{
- // Only to be used by "experts" wanting to change the geometry builders
- // to be used.
- // As the ctor of AliMUON now defines a default geometrybuilder, this
- // ResetGeometryBuilder() must be called prior to call the
- // AddGeometryBuilder()
+/// Only to be used by "experts" wanting to change the geometry builders
+/// to be used.
+/// As the ctor of AliMUON now defines a default geometrybuilder, this
+/// ResetGeometryBuilder() must be called prior to call the
+/// AddGeometryBuilder()
+
delete fGeometryBuilder;
fGeometryBuilder = new AliMUONGeometryBuilder(this);
fGeometryBuilder