From d19b6003496911d8cd38801049a60dc29d1c4dba Mon Sep 17 00:00:00 2001 From: hristov Date: Tue, 11 Apr 2006 14:58:50 +0000 Subject: [PATCH] - Class description on 5 lines (Coding conventions) - Adding third slash to all member function comments (for Doxygen) (Ivana) --- MUON/AliMUON.cxx | 115 ++++++++++++---------- MUON/AliMUONChamber.cxx | 28 ++++-- MUON/AliMUONClusterDrawAZ.cxx | 36 +++---- MUON/AliMUONClusterFinderAZ.cxx | 114 +++++++++++----------- MUON/AliMUONClusterFinderVS.cxx | 75 +++++++------- MUON/AliMUONClusterReconstructor.cxx | 50 +++++----- MUON/AliMUONDetElement.cxx | 34 ++++--- MUON/AliMUONDigitMapA1.cxx | 43 ++++---- MUON/AliMUONDigitizer.cxx | 124 ++++++++++++------------ MUON/AliMUONDigitizerv2.cxx | 44 +++++---- MUON/AliMUONHitForRec.cxx | 55 ++++++----- MUON/AliMUONHitMapA1.cxx | 50 +++++----- MUON/AliMUONLoader.cxx | 22 +++-- MUON/AliMUONMathieson.cxx | 41 ++++---- MUON/AliMUONPixel.cxx | 16 +-- MUON/AliMUONRawCluster.cxx | 75 +++++++------- MUON/AliMUONRawReader.cxx | 6 +- MUON/AliMUONRawWriter.cxx | 3 + MUON/AliMUONRecoCheck.cxx | 34 ++++--- MUON/AliMUONReconstructor.cxx | 23 ++++- MUON/AliMUONResponse.cxx | 12 ++- MUON/AliMUONResponseFactory.cxx | 29 +++--- MUON/AliMUONResponseV0.cxx | 7 ++ MUON/AliMUONSt345SlatSegmentation.cxx | 12 ++- MUON/AliMUONSt345SlatSegmentationV2.cxx | 7 -- MUON/AliMUONTrackHit.cxx | 24 +++-- MUON/AliMUONTrackK.cxx | 115 +++++++++++----------- MUON/AliMUONTransientDigit.cxx | 18 ++-- MUON/AliMUONTriggerSegmentation.cxx | 9 ++ MUON/AliMUONv1.cxx | 57 ++++++----- 30 files changed, 705 insertions(+), 573 deletions(-) diff --git a/MUON/AliMUON.cxx b/MUON/AliMUON.cxx index aa2c34dd20a..25b0920f7a3 100644 --- a/MUON/AliMUON.cxx +++ b/MUON/AliMUON.cxx @@ -15,10 +15,11 @@ /* $Id$ */ - -/////////////////////////////////////////////// -// Manager and hits classes for set:MUON // -//////////////////////////////////////////////// +// ------------------ +// Class AliMUON +// ------------------ +// AliDetector class for MUON subsystem +// providing simulation data management #include "Riostream.h" @@ -118,9 +119,9 @@ AliMUON::AliMUON() 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; } @@ -151,7 +152,9 @@ AliMUON::AliMUON(const char *name, const char *title, fDigitizerType(digitizerClassName), fRawWriter(0x0) { - AliDebug(1,Form("ctor this=%p",this)); +/// Standard constructor + + AliDebug(1,Form("ctor this=%p",this)); fIshunt = 0; SetMarkerColor(kRed);// @@ -204,7 +207,7 @@ AliMUON::AliMUON(const char *name, const char *title, AliMUON::AliMUON(const AliMUON& rMUON) : AliDetector(rMUON) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } @@ -212,7 +215,8 @@ AliMUON::AliMUON(const AliMUON& rMUON) //____________________________________________________________________ AliMUON::~AliMUON() { -// Destructor +/// Destructor + AliDebug(1,Form("dtor this=%p",this)); fIshunt = 0; @@ -233,7 +237,7 @@ AliMUON::~AliMUON() //________________________________________________________________________ AliMUON& AliMUON::operator = (const AliMUON& rhs) { -// Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; @@ -245,8 +249,7 @@ AliMUON& AliMUON::operator = (const AliMUON& rhs) //_____________________________________________________________________________ void AliMUON::AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder) { -// Adds the geometry builder to the list -// --- +/// Add the geometry builder to the list fGeometryBuilder->AddBuilder(geomBuilder); } @@ -254,7 +257,7 @@ void AliMUON::AddGeometryBuilder(AliMUONVGeometryBuilder* geomBuilder) //____________________________________________________________________ void AliMUON::BuildGeometry() { -// Geometry for event display +/// Geometry for event display // for (Int_t i = 0; i < AliMUONConstants::NCh(); i++) @@ -266,7 +269,7 @@ void AliMUON::BuildGeometry() //____________________________________________________________________ const AliMUONGeometry* AliMUON::GetGeometry() const { -// Return geometry parametrisation +/// Return geometry parametrisation if ( !fGeometryBuilder) { AliWarningStream() << "GeometryBuilder not defined." << std::endl; @@ -279,7 +282,7 @@ const AliMUONGeometry* AliMUON::GetGeometry() const //____________________________________________________________________ const AliMUONGeometryTransformer* AliMUON::GetGeometryTransformer() const { -// Return geometry parametrisation +/// Return geometry parametrisation const AliMUONGeometry* kGeometry = GetGeometry(); @@ -291,6 +294,8 @@ const AliMUONGeometryTransformer* AliMUON::GetGeometryTransformer() const //__________________________________________________________________ void AliMUON::SetTreeAddress() { +/// Set Hits tree address + GetMUONData()->SetLoader(fLoader); // GetMUONData()->MakeBranch("D,S,RC"); // GetMUONData()->SetTreeAddress("H,D,S,RC"); @@ -308,7 +313,8 @@ void AliMUON::SetTreeAddress() //_________________________________________________________________ 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); @@ -317,7 +323,8 @@ void AliMUON::SetChargeSlope(Int_t id, Float_t 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); @@ -325,7 +332,7 @@ void AliMUON::SetChargeSpread(Int_t id, Float_t p1, Float_t 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); @@ -334,7 +341,8 @@ void AliMUON::SetSigmaIntegration(Int_t id, Float_t 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); @@ -343,32 +351,36 @@ void AliMUON::SetMaxAdc(Int_t id, Int_t 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; } @@ -376,7 +388,7 @@ Float_t AliMUON::GetMaxStepGas() const //____________________________________________________________________ Float_t AliMUON::GetMaxStepAlu() const { -// Return step size in Alu +/// Return step size in Alu return fMaxStepAlu; } @@ -384,7 +396,7 @@ Float_t AliMUON::GetMaxStepAlu() const //____________________________________________________________________ Float_t AliMUON::GetMaxDestepGas() const { -// Return maximum step size in Gas +/// Return maximum step size in Gas return fMaxDestepGas; } @@ -392,7 +404,7 @@ Float_t AliMUON::GetMaxDestepGas() const //____________________________________________________________________ Float_t AliMUON::GetMaxDestepAlu() const { -// Return maximum step size in Gas +/// Return maximum step size in Gas return fMaxDestepAlu; } @@ -400,7 +412,7 @@ Float_t AliMUON::GetMaxDestepAlu() const //____________________________________________________________________ void AliMUON::SetAlign(Bool_t align) { - // Sets option for alignement to geometry builder +/// Set option for alignement to geometry builder fGeometryBuilder->SetAlign(align); } @@ -408,7 +420,7 @@ Float_t AliMUON::GetMaxDestepAlu() const //____________________________________________________________________ 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); } @@ -416,14 +428,15 @@ Float_t AliMUON::GetMaxDestepAlu() const //____________________________________________________________________ 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())); @@ -458,14 +471,15 @@ AliDigitizer* AliMUON::CreateDigitizer(AliRunDigitizer* manager) const 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()); @@ -476,8 +490,8 @@ void AliMUON::SDigits2Digits() //_____________________________________________________________________ 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())); @@ -510,13 +524,16 @@ void AliMUON::Hits2SDigits() 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); @@ -535,9 +552,8 @@ void AliMUON::Digits2Raw() //_______________________________________________________________________ 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)); @@ -550,9 +566,9 @@ AliLoader* AliMUON::MakeLoader(const char* 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(); @@ -571,11 +587,12 @@ AliMUONRawCluster *AliMUON::RawCluster(Int_t ichamber, Int_t icathod, Int_t iclu 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 diff --git a/MUON/AliMUONChamber.cxx b/MUON/AliMUONChamber.cxx index 03a0e844f21..aadb147f02b 100644 --- a/MUON/AliMUONChamber.cxx +++ b/MUON/AliMUONChamber.cxx @@ -15,6 +15,12 @@ /* $Id$ */ +// ----------------------- +// Class AliMUONChamber +// ----------------------- +// MUON tracking chamber class +// now only providing DisIntegration function + // --- ROOT includes --- #include #include @@ -37,7 +43,7 @@ AliMUONChamber::AliMUONChamber() fResponse(0), fMUON(0) { -// Default constructor +/// Default constructor AliDebug(1, Form("default (empty) ctor this = %p", this)); } @@ -50,6 +56,7 @@ AliMUONChamber::AliMUONChamber(Int_t id) fResponse(0), fMUON(0) { +/// Standard constructor // muon fMUON = (AliMUON*)gAlice->GetModule("MUON"); @@ -65,7 +72,7 @@ AliMUONChamber::AliMUONChamber(Int_t id) AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber) : TObject(rChamber) { - // Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); // Dummy copy constructor @@ -74,7 +81,7 @@ AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber) //_______________________________________________________ AliMUONChamber::~AliMUONChamber() { - // Destructor +/// Destructor AliDebug(1, Form("dtor this = %p", this)); } @@ -82,7 +89,7 @@ AliMUONChamber::~AliMUONChamber() //_______________________________________________________ AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& rhs) { - // Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; @@ -92,9 +99,10 @@ AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& rhs) } //_____________________________________________________ -void AliMUONChamber::ChargeCorrelationInit() { - // Initialisation of charge correlation for current hit - // the value is stored, and then used by Disintegration +void AliMUONChamber::ChargeCorrelationInit() +{ +/// Initialisation of charge correlation for current hit +/// the value is stored, and then used by Disintegration // exponential is here to avoid eventual problems in 0 // factor 2 because chargecorrel is q1/q2 and not q1/qtrue @@ -105,9 +113,9 @@ void AliMUONChamber::ChargeCorrelationInit() { void AliMUONChamber::DisIntegration(AliMUONHit *hit, Int_t& nnew,Float_t newclust[6][500]) { - // - // Generates pad hits (simulated cluster) - // using the segmentation and the response model +/// Generates pad hits (simulated cluster) +/// using the segmentation and the response model + Float_t dx, dy; Float_t xhit = hit->X(); diff --git a/MUON/AliMUONClusterDrawAZ.cxx b/MUON/AliMUONClusterDrawAZ.cxx index d7ecd414bcc..19210ed0f45 100644 --- a/MUON/AliMUONClusterDrawAZ.cxx +++ b/MUON/AliMUONClusterDrawAZ.cxx @@ -15,10 +15,10 @@ /* $Id$ */ +// ------------------------------------- // Class AliMUONClusterDrawAZ // ------------------------------------- // Cluster drawing for AZ cluster finder -// // Author: Alexander Zinchenko, JINR Dubna #include @@ -53,7 +53,7 @@ ClassImp(AliMUONClusterDrawAZ) AliMUONClusterDrawAZ::AliMUONClusterDrawAZ() : TObject() { -// Default constructor +/// Default constructor fFind = NULL; fData = NULL; for (Int_t i=0; i<4; i++) fHist[i] = NULL; } @@ -62,7 +62,7 @@ AliMUONClusterDrawAZ::AliMUONClusterDrawAZ() AliMUONClusterDrawAZ::AliMUONClusterDrawAZ(AliMUONClusterFinderAZ *clusFinder) : TObject() { -// Constructor +/// Constructor fFind = clusFinder; for (Int_t i=0; i<4; i++) fHist[i] = NULL; fDebug = 1; @@ -74,14 +74,14 @@ AliMUONClusterDrawAZ::AliMUONClusterDrawAZ(AliMUONClusterFinderAZ *clusFinder) //_____________________________________________________________________________ AliMUONClusterDrawAZ::~AliMUONClusterDrawAZ() { - // Destructor +/// Destructor } //_____________________________________________________________________________ AliMUONClusterDrawAZ::AliMUONClusterDrawAZ(const AliMUONClusterDrawAZ& rhs) : TObject(rhs) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } @@ -91,7 +91,7 @@ AliMUONClusterDrawAZ::AliMUONClusterDrawAZ(const AliMUONClusterDrawAZ& rhs) AliMUONClusterDrawAZ& AliMUONClusterDrawAZ::operator=(const AliMUONClusterDrawAZ& rhs) { -// Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; @@ -102,7 +102,7 @@ AliMUONClusterDrawAZ::operator=(const AliMUONClusterDrawAZ& rhs) //_____________________________________________________________________________ void AliMUONClusterDrawAZ::Init() { - // Initialization +/// Initialization TCanvas *c1 = new TCanvas("c1","Clusters",0,0,600,700); //c1->SetFillColor(10); @@ -124,7 +124,7 @@ void AliMUONClusterDrawAZ::Init() //_____________________________________________________________________________ Bool_t AliMUONClusterDrawAZ::FindEvCh(Int_t nev, Int_t ch) { - // Find requested event and chamber (skip the ones before the selected) +/// Find requested event and chamber (skip the ones before the selected) if (nev < fEvent) return kFALSE; else if (nev == fEvent) { @@ -140,7 +140,7 @@ Bool_t AliMUONClusterDrawAZ::FindEvCh(Int_t nev, Int_t ch) //_____________________________________________________________________________ void AliMUONClusterDrawAZ::DrawCluster() { - // Draw preclusters +/// Draw preclusters TCanvas *c1 = (TCanvas*) gROOT->GetListOfCanvases()->FindObject("c1"); @@ -334,7 +334,7 @@ void AliMUONClusterDrawAZ::DrawCluster() //_____________________________________________________________________________ void AliMUONClusterDrawAZ::DrawHits() { - // Draw simulated and reconstructed hits +/// Draw simulated and reconstructed hits TView *view[2] = { 0x0, 0x0 }; Double_t p1[3]={0}, p2[3], xNDC[6], xl, yl, zl; @@ -471,7 +471,8 @@ void AliMUONClusterDrawAZ::DrawHits() //_____________________________________________________________________________ Int_t AliMUONClusterDrawAZ::Next() { - // What to do next? +/// What to do next? + // File FILE *lun = 0; //lun = fopen("pull.dat","w"); @@ -506,7 +507,8 @@ Int_t AliMUONClusterDrawAZ::Next() //_____________________________________________________________________________ void AliMUONClusterDrawAZ::ModifyHistos(void) { - // Modify histograms to bring them to (approximately) the same size +/// Modify histograms to bring them to (approximately) the same size + Int_t nhist = 0; Float_t hlim[4][4], hbin[4][4]; // first index - xmin, xmax, ymin, ymax @@ -612,7 +614,7 @@ void AliMUONClusterDrawAZ::ModifyHistos(void) //_____________________________________________________________________________ void AliMUONClusterDrawAZ::AdjustHist(Double_t *xylim, const AliMUONPixel *pixPtr) { - // Adjust histogram limits for pixel drawing +/// Adjust histogram limits for pixel drawing Float_t xypads[4]; if (fHist[0]) { @@ -632,7 +634,7 @@ void AliMUONClusterDrawAZ::AdjustHist(Double_t *xylim, const AliMUONPixel *pixPt //_____________________________________________________________________________ void AliMUONClusterDrawAZ::DrawHist(const char* canvas, TH2D *hist) { - // Draw histogram in given canvas +/// Draw histogram in given canvas Int_t ix = 0; //((TCanvas*)gROOT->FindObject("c2"))->cd(); @@ -648,7 +650,7 @@ void AliMUONClusterDrawAZ::DrawHist(const char* canvas, TH2D *hist) //_____________________________________________________________________________ void AliMUONClusterDrawAZ::FillMuon(Int_t nfit, const Double_t *parOk, const Double_t *errOk) { - // Fill muon information +/// Fill muon information Int_t indx, imax; Double_t cmax, rad; @@ -674,7 +676,7 @@ void AliMUONClusterDrawAZ::FillMuon(Int_t nfit, const Double_t *parOk, const Dou //_____________________________________________________________________________ void AliMUONClusterDrawAZ::UpdateCluster(Int_t npad) { - // Update cluster after removing non-overlapped pads +/// Update cluster after removing non-overlapped pads Int_t cath = 0, ix = 0, iy = 0; cout << " Update cluster " << endl; @@ -706,7 +708,7 @@ void AliMUONClusterDrawAZ::UpdateCluster(Int_t npad) //_____________________________________________________________________________ TH2D* AliMUONClusterDrawAZ::GetBackground(Int_t iHist) { - // Build histogram with pads from the cluster contaminated by the background +/// Build histogram with pads from the cluster contaminated by the background //return 0x0; Int_t cath = iHist / 2; diff --git a/MUON/AliMUONClusterFinderAZ.cxx b/MUON/AliMUONClusterFinderAZ.cxx index d4dd7bbee26..51b7b17add7 100644 --- a/MUON/AliMUONClusterFinderAZ.cxx +++ b/MUON/AliMUONClusterFinderAZ.cxx @@ -15,8 +15,11 @@ /* $Id$ */ -// Clusterizer class developed by A. Zinchenko (Dubna), based on the -// Expectation-Maximization algorithm +// ------------------------------- +// Class AliMUONClusterFinderAZ +// ------------------------------- +// Clusterizer class based on the Expectation-Maximization algorithm +// Author: Alexander Zinchenko, JINR Dubna #include #include @@ -50,7 +53,7 @@ ClassImp(AliMUONClusterFinderAZ) AliMUONClusterFinderAZ::AliMUONClusterFinderAZ(Bool_t draw) : AliMUONClusterFinderVS() { -// Constructor +/// Constructor fnPads[0]=fnPads[1]=0; for (Int_t i=0; i<7; i++) @@ -90,7 +93,7 @@ AliMUONClusterFinderAZ::AliMUONClusterFinderAZ(Bool_t draw) AliMUONClusterFinderAZ::AliMUONClusterFinderAZ(const AliMUONClusterFinderAZ& rhs) : AliMUONClusterFinderVS(rhs) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } @@ -98,7 +101,7 @@ AliMUONClusterFinderAZ::AliMUONClusterFinderAZ(const AliMUONClusterFinderAZ& rhs //_____________________________________________________________________________ AliMUONClusterFinderAZ::~AliMUONClusterFinderAZ() { - // Destructor +/// Destructor delete fgMinuit; fgMinuit = 0; delete fPixArray; fPixArray = 0; delete fDraw; } @@ -106,7 +109,7 @@ AliMUONClusterFinderAZ::~AliMUONClusterFinderAZ() //_____________________________________________________________________________ void AliMUONClusterFinderAZ::FindRawClusters() { -// To provide the same interface as in AliMUONClusterFinderVS +/// To provide the same interface as in AliMUONClusterFinderVS ResetRawClusters(); EventLoop (gAlice->GetEvNumber(), fInput->Chamber()); @@ -115,7 +118,7 @@ void AliMUONClusterFinderAZ::FindRawClusters() //_____________________________________________________________________________ void AliMUONClusterFinderAZ::EventLoop(Int_t nev, Int_t ch) { -// Loop over digits +/// Loop over digits if (fDraw && !fDraw->FindEvCh(nev, ch)) return; @@ -252,7 +255,8 @@ next: //_____________________________________________________________________________ void AliMUONClusterFinderAZ::AddPad(Int_t cath, Int_t digit) { - // Add pad to the cluster +/// Add pad to the cluster + AliMUONDigit *mdig = fInput->Digit(cath,digit); Int_t charge = mdig->Signal(); @@ -305,8 +309,8 @@ void AliMUONClusterFinderAZ::AddPad(Int_t cath, Int_t digit) //_____________________________________________________________________________ Bool_t AliMUONClusterFinderAZ::Overlap(Int_t cath, AliMUONDigit *mdig) { - // Check if the pad from one cathode overlaps with a pad - // in the precluster on the other cathode +/// Check if the pad from one cathode overlaps with a pad +/// in the precluster on the other cathode Float_t xpad, ypad, zpad; fSegmentation[cath]->GetPadC(mdig->PadX(), mdig->PadY(), xpad, ypad, zpad); @@ -330,7 +334,7 @@ Bool_t AliMUONClusterFinderAZ::Overlap(Int_t cath, AliMUONDigit *mdig) //_____________________________________________________________________________ Bool_t AliMUONClusterFinderAZ::Overlap(Float_t *xy1, Int_t iPad, Float_t *xy12, Int_t iSkip) { - // Check if the pads xy1 and iPad overlap and return overlap area +/// Check if the pads xy1 and iPad overlap and return overlap area Float_t xy2[4]; xy2[0] = fXyq[0][iPad] - fXyq[3][iPad]; @@ -350,8 +354,8 @@ Bool_t AliMUONClusterFinderAZ::Overlap(Float_t *xy1, Int_t iPad, Float_t *xy12, //_____________________________________________________________________________ Bool_t AliMUONClusterFinderAZ::CheckPrecluster(Int_t *nShown) { - // Check precluster in order to attempt to simplify it (mostly for - // two-cathode preclusters) +/// Check precluster in order to attempt to simplify it (mostly for +/// two-cathode preclusters) Int_t i1, i2, cath=0, digit=0; Float_t xy1[4], xy12[4]; @@ -616,7 +620,7 @@ Bool_t AliMUONClusterFinderAZ::CheckPrecluster(Int_t *nShown) //_____________________________________________________________________________ void AliMUONClusterFinderAZ::BuildPixArray() { - // Build pixel array for MLEM method +/// Build pixel array for MLEM method Int_t nPix=0, i1, i2; Float_t xy1[4], xy12[4]; @@ -723,7 +727,7 @@ void AliMUONClusterFinderAZ::BuildPixArray() //_____________________________________________________________________________ void AliMUONClusterFinderAZ::AdjustPixel(Float_t width, Int_t ixy) { - // Check if some pixels have small size (adjust if necessary) +/// Check if some pixels have small size (adjust if necessary) AliMUONPixel *pixPtr, *pixPtr1 = 0; Int_t ixy1 = TMath::Even(ixy); @@ -777,7 +781,7 @@ void AliMUONClusterFinderAZ::AdjustPixel(Float_t width, Int_t ixy) //_____________________________________________________________________________ void AliMUONClusterFinderAZ::AdjustPixel(Float_t wxmin, Float_t wymin) { - // Check if some pixels have large size (adjust if necessary) +/// Check if some pixels have large size (adjust if necessary) Int_t n1[2], n2[2], iOK = 1, nPix = fPixArray->GetEntriesFast(); AliMUONPixel *pixPtr, pix; @@ -843,7 +847,7 @@ void AliMUONClusterFinderAZ::AdjustPixel(Float_t wxmin, Float_t wymin) //_____________________________________________________________________________ Bool_t AliMUONClusterFinderAZ::MainLoop(Int_t iSimple) { - // Repeat MLEM algorithm until pixel size becomes sufficiently small +/// Repeat MLEM algorithm until pixel size becomes sufficiently small TH2D *mlem; @@ -1133,7 +1137,7 @@ Bool_t AliMUONClusterFinderAZ::MainLoop(Int_t iSimple) //_____________________________________________________________________________ void AliMUONClusterFinderAZ::Mlem(Double_t *coef, Double_t *probi, Int_t nIter) { - // Use MLEM to find pixel charges +/// Use MLEM to find pixel charges Int_t nPix = fPixArray->GetEntriesFast(); Int_t npad = fnPads[0] + fnPads[1]; @@ -1176,7 +1180,7 @@ void AliMUONClusterFinderAZ::Mlem(Double_t *coef, Double_t *probi, Int_t nIter) //_____________________________________________________________________________ void AliMUONClusterFinderAZ::FindCOG(TH2D *mlem, Double_t *xyc) { - // Calculate position of the center-of-gravity around the maximum pixel +/// Calculate position of the center-of-gravity around the maximum pixel Int_t ixmax, iymax, ix, nsumx=0, nsumy=0, nsum=0; Int_t i1 = -9, j1 = -9; @@ -1259,8 +1263,8 @@ void AliMUONClusterFinderAZ::FindCOG(TH2D *mlem, Double_t *xyc) //_____________________________________________________________________________ Int_t AliMUONClusterFinderAZ::FindNearest(AliMUONPixel *pixPtr0) { - // Find the pixel nearest to the given one - // (algorithm may be not very efficient) +/// Find the pixel nearest to the given one +/// (algorithm may be not very efficient) Int_t nPix = fPixArray->GetEntriesFast(), imin = 0; Double_t rmin = 99999, dx = 0, dy = 0, r = 0; @@ -1281,9 +1285,9 @@ Int_t AliMUONClusterFinderAZ::FindNearest(AliMUONPixel *pixPtr0) //_____________________________________________________________________________ void AliMUONClusterFinderAZ::Split(TH2D *mlem, Double_t *coef) { - // The main steering function to work with clusters of pixels in anode - // plane (find clusters, decouple them from each other, merge them (if - // necessary), pick up coupled pads, call the fitting function) +/// The main steering function to work with clusters of pixels in anode +/// plane (find clusters, decouple them from each other, merge them (if +/// necessary), pick up coupled pads, call the fitting function) Int_t nx = mlem->GetNbinsX(); Int_t ny = mlem->GetNbinsY(); @@ -1518,7 +1522,7 @@ void AliMUONClusterFinderAZ::Split(TH2D *mlem, Double_t *coef) //_____________________________________________________________________________ void AliMUONClusterFinderAZ::AddBin(TH2D *mlem, Int_t ic, Int_t jc, Int_t mode, Bool_t *used, TObjArray *pix) { - // Add a bin to the cluster +/// Add a bin to the cluster Int_t nx = mlem->GetNbinsX(); Int_t ny = mlem->GetNbinsY(); @@ -1547,7 +1551,7 @@ void AliMUONClusterFinderAZ::AddBin(TH2D *mlem, Int_t ic, Int_t jc, Int_t mode, //_____________________________________________________________________________ TObject* AliMUONClusterFinderAZ::BinToPix(TH2D *mlem, Int_t jc, Int_t ic) { - // Translate histogram bin to pixel +/// Translate histogram bin to pixel Double_t yc = mlem->GetYaxis()->GetBinCenter(ic); Double_t xc = mlem->GetXaxis()->GetBinCenter(jc); @@ -1568,7 +1572,7 @@ TObject* AliMUONClusterFinderAZ::BinToPix(TH2D *mlem, Int_t jc, Int_t ic) //_____________________________________________________________________________ void AliMUONClusterFinderAZ::AddCluster(Int_t ic, Int_t nclust, TMatrixD *aijcluclu, Bool_t *used, Int_t *clustNumb, Int_t &nCoupled) { - // Add a cluster to the group of coupled clusters +/// Add a cluster to the group of coupled clusters for (Int_t i=0; iFindObject("mlem"); Double_t xmin = mlem->GetXaxis()->GetXmin() - mlem->GetXaxis()->GetBinWidth(1); @@ -2189,8 +2193,9 @@ Int_t AliMUONClusterFinderAZ::Fit(Int_t iSimple, Int_t nfit, Int_t *clustFit, TO //_____________________________________________________________________________ void AliMUONClusterFinderAZ::Fcn1(Int_t & /*npar*/, Double_t * /*gin*/, Double_t &f, Double_t *par, Int_t /*iflag*/) { - // Fit for one track - //AZ for Muinuit AliMUONClusterFinderAZ& c = *(AliMUONClusterFinderAZ::fgClusterFinder); +/// Fit for one track +/// AZ for Muinuit AliMUONClusterFinderAZ& c = *(AliMUONClusterFinderAZ::fgClusterFinder); + AliMUONClusterFinderAZ& c = *this; //AZ Int_t cath, ix, iy, indx, npads=0; @@ -2229,7 +2234,7 @@ void AliMUONClusterFinderAZ::Fcn1(Int_t & /*npar*/, Double_t * /*gin*/, Double_t //_____________________________________________________________________________ void AliMUONClusterFinderAZ::UpdatePads(Int_t /*nfit*/, Double_t *par) { - // Subtract the fitted charges from pads with strong coupling +/// Subtract the fitted charges from pads with strong coupling Int_t cath, ix, iy, indx; Double_t charge, coef=0; @@ -2259,8 +2264,10 @@ void AliMUONClusterFinderAZ::UpdatePads(Int_t /*nfit*/, Double_t *par) } //_____________________________________________________________________________ -Bool_t AliMUONClusterFinderAZ::TestTrack(Int_t /*t*/) const { -// Test if track was user selected +Bool_t AliMUONClusterFinderAZ::TestTrack(Int_t /*t*/) const +{ +/// Test if track was user selected + return kTRUE; /* if (fTrack[0]==-1 || fTrack[1]==-1) { @@ -2276,9 +2283,8 @@ Bool_t AliMUONClusterFinderAZ::TestTrack(Int_t /*t*/) const { //_____________________________________________________________________________ void AliMUONClusterFinderAZ::AddRawCluster(Double_t x, Double_t y, Double_t qTot, Double_t fmin, Int_t nfit, Int_t *tracks, Double_t /*sigx*/, Double_t /*sigy*/, Double_t /*dist*/) { - // - // Add a raw cluster copy to the list - // +/// Add a raw cluster copy to the list + if (qTot <= 0.501) return; AliMUONRawCluster cnew; @@ -2326,9 +2332,9 @@ void AliMUONClusterFinderAZ::AddRawCluster(Double_t x, Double_t y, Double_t qTot //_____________________________________________________________________________ Int_t AliMUONClusterFinderAZ::FindLocalMaxima(TObjArray *pixArray, Int_t *localMax, Double_t *maxVal) { - // Find local maxima in pixel space for large preclusters in order to - // try to split them into smaller pieces (to speed up the MLEM procedure) - // or to find additional fitting seeds if clusters were not completely resolved +/// Find local maxima in pixel space for large preclusters in order to +/// try to split them into smaller pieces (to speed up the MLEM procedure) +/// or to find additional fitting seeds if clusters were not completely resolved TH2D *hist = NULL; //if (pixArray == fPixArray) hist = (TH2D*) gROOT->FindObject("anode"); @@ -2387,7 +2393,7 @@ Int_t AliMUONClusterFinderAZ::FindLocalMaxima(TObjArray *pixArray, Int_t *localM //_____________________________________________________________________________ void AliMUONClusterFinderAZ::FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int_t *isLocalMax) { - // Flag pixels (whether or not local maxima) +/// Flag pixels (whether or not local maxima) Int_t nx = hist->GetNbinsX(); Int_t ny = hist->GetNbinsY(); @@ -2420,8 +2426,8 @@ void AliMUONClusterFinderAZ::FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int_t *i //_____________________________________________________________________________ void AliMUONClusterFinderAZ::FindCluster(Int_t *localMax, Int_t iMax) { - // Find pixel cluster around local maximum #iMax and pick up pads - // overlapping with it +/// Find pixel cluster around local maximum #iMax and pick up pads +/// overlapping with it TH2D *hist = (TH2D*) gROOT->FindObject("anode"); Int_t nx = hist->GetNbinsX(); @@ -2469,7 +2475,7 @@ void AliMUONClusterFinderAZ::FindCluster(Int_t *localMax, Int_t iMax) AliMUONClusterFinderAZ& AliMUONClusterFinderAZ::operator=(const AliMUONClusterFinderAZ& rhs) { -// Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; @@ -2481,8 +2487,8 @@ AliMUONClusterFinderAZ::operator=(const AliMUONClusterFinderAZ& rhs) //_____________________________________________________________________________ void AliMUONClusterFinderAZ::AddVirtualPad() { - // Add virtual pad (with small charge) to improve fit for some - // clusters (when pad with max charge is at the extreme of the cluster) +/// Add virtual pad (with small charge) to improve fit for some +/// clusters (when pad with max charge is at the extreme of the cluster) // Get number of pads in X and Y-directions Int_t nInX = -1, nInY; @@ -2697,8 +2703,8 @@ void AliMUONClusterFinderAZ::AddVirtualPad() //_____________________________________________________________________________ void AliMUONClusterFinderAZ::PadsInXandY(Int_t &nInX, Int_t &nInY) { - // Find number of pads in X and Y-directions (excluding virtual ones and - // overflows) +/// Find number of pads in X and Y-directions (excluding virtual ones and +/// overflows) static Int_t nXsaved = 0, nYsaved = 0; nXsaved = nYsaved = 0; @@ -2762,7 +2768,7 @@ void AliMUONClusterFinderAZ::PadsInXandY(Int_t &nInX, Int_t &nInY) //_____________________________________________________________________________ void AliMUONClusterFinderAZ::Simple() { - // Process simple cluster (small number of pads) without EM-procedure +/// Process simple cluster (small number of pads) without EM-procedure Int_t nForFit = 1, clustFit[1] = {0}, nfit; Double_t parOk[3] = {0.}; @@ -2778,7 +2784,7 @@ void AliMUONClusterFinderAZ::Simple() //_____________________________________________________________________________ void AliMUONClusterFinderAZ::Errors(AliMUONRawCluster *clus) { - // Correct reconstructed coordinates for some clusters and evaluate errors +/// Correct reconstructed coordinates for some clusters and evaluate errors Double_t qTot = clus->GetCharge(0), fmin = clus->GetChi2(0); Double_t xreco = clus->GetX(0), yreco = clus->GetY(0), zreco = clus->GetZ(0); @@ -2895,7 +2901,7 @@ void AliMUONClusterFinderAZ::Errors(Int_t ny, Int_t nx, Int_t iby, Int_t ibx, Do Double_t dyc, Double_t /*dxc*/, Double_t qtot, Double_t &yrec, Double_t &xrec, Double_t &erry, Double_t &errx) { - // Correct reconstructed coordinates for some clusters and evaluate errors +/// Correct reconstructed coordinates for some clusters and evaluate errors erry = 0.01; errx = 0.144; diff --git a/MUON/AliMUONClusterFinderVS.cxx b/MUON/AliMUONClusterFinderVS.cxx index 27de1dddff9..b1e17486589 100644 --- a/MUON/AliMUONClusterFinderVS.cxx +++ b/MUON/AliMUONClusterFinderVS.cxx @@ -15,6 +15,12 @@ /* $Id$ */ +// ------------------------------- +// Class AliMUONClusterFinderVS +// ------------------------------- +// Class for clustering and reconstruction of space points +// (Not used by default) + #include "AliMUONClusterFinderVS.h" #include "AliMUONDigit.h" #include "AliMUONRawCluster.h" @@ -43,7 +49,7 @@ ClassImp(AliMUONClusterFinderVS) AliMUONClusterFinderVS::AliMUONClusterFinderVS() : TObject() { -// Default constructor +/// Default constructor fInput=AliMUONClusterInput::Instance(); fDigitMap[0] = 0; fDigitMap[1] = 0; @@ -63,6 +69,8 @@ AliMUONClusterFinderVS::AliMUONClusterFinderVS() //____________________________________________________________________________ AliMUONClusterFinderVS::~AliMUONClusterFinderVS() { +/// Destructor + // Reset tracks information fNRawClusters = 0; if (fRawClusters) { @@ -73,27 +81,27 @@ AliMUONClusterFinderVS::~AliMUONClusterFinderVS() AliMUONClusterFinderVS::AliMUONClusterFinderVS(const AliMUONClusterFinderVS & clusterFinder):TObject(clusterFinder) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } //____________________________________________________________________________ void AliMUONClusterFinderVS::ResetRawClusters() { - // Reset tracks information +/// Reset tracks information fNRawClusters = 0; if (fRawClusters) fRawClusters->Clear(); } //____________________________________________________________________________ void AliMUONClusterFinderVS::Decluster(AliMUONRawCluster *cluster) { -// Decluster by local maxima +/// Decluster by local maxima SplitByLocalMaxima(cluster); } //____________________________________________________________________________ void AliMUONClusterFinderVS::SplitByLocalMaxima(AliMUONRawCluster *c) { - // Split complex cluster by local maxima +/// Split complex cluster by local maxima Int_t cath, i; fInput->SetCluster(c); @@ -948,7 +956,7 @@ void AliMUONClusterFinderVS::SplitByLocalMaxima(AliMUONRawCluster *c) void AliMUONClusterFinderVS::FindLocalMaxima(AliMUONRawCluster* /*c*/) { -// Find all local maxima of a cluster +/// Find all local maxima of a cluster AliDebug(1,"\n Find Local maxima !"); AliMUONDigit* digt; @@ -1152,9 +1160,8 @@ void AliMUONClusterFinderVS::FindLocalMaxima(AliMUONRawCluster* /*c*/) void AliMUONClusterFinderVS::FillCluster(AliMUONRawCluster* c, Int_t flag, Int_t cath) { - // - // Completes cluster information starting from list of digits - // +/// Completes cluster information starting from list of digits + AliMUONDigit* dig; Float_t x, y, z; Int_t ix, iy; @@ -1240,9 +1247,8 @@ void AliMUONClusterFinderVS::FillCluster(AliMUONRawCluster* c, Int_t flag, Int_ void AliMUONClusterFinderVS::FillCluster(AliMUONRawCluster* c, Int_t cath) { - // - // Completes cluster information starting from list of digits - // +/// Completes cluster information starting from list of digits + static Float_t dr0; AliMUONDigit* dig; @@ -1289,15 +1295,10 @@ void AliMUONClusterFinderVS::FillCluster(AliMUONRawCluster* c, Int_t cath) c->SetX(cath,fSeg2[cath]->GetAnod(fInput->DetElemId(), c->GetX(cath))); } -void AliMUONClusterFinderVS::FindCluster(Int_t i, Int_t j, Int_t cath, AliMUONRawCluster &c){ - - -// -// Find a super cluster on both cathodes -// -// -// Add i,j as element of the cluster -// +void AliMUONClusterFinderVS::FindCluster(Int_t i, Int_t j, Int_t cath, AliMUONRawCluster &c) +{ +/// Find a super cluster on both cathodes +/// Add i,j as element of the cluster Int_t idx = fDigitMap[cath]->GetHitIndex(i,j); AliMUONDigit* dig = (AliMUONDigit*) fDigitMap[cath]->GetHit(i,j); @@ -1428,10 +1429,8 @@ void AliMUONClusterFinderVS::FindCluster(Int_t i, Int_t j, Int_t cath, AliMUONR void AliMUONClusterFinderVS::FindRawClusters() { - // - // MUON cluster finder from digits -- finds neighbours on both cathodes and - // fills the tree with raw clusters - // +/// MUON cluster finder from digits -- finds neighbours on both cathodes and +/// fills the tree with raw clusters ResetRawClusters(); // Return if no input datad available @@ -1544,8 +1543,8 @@ void AliMUONClusterFinderVS::FindRawClusters() Float_t AliMUONClusterFinderVS::SingleMathiesonFit(AliMUONRawCluster *c, Int_t cath) { -// Performs a single Mathieson fit on one cathode -// +/// Performs a single Mathieson fit on one cathode + Double_t arglist[20]; Int_t ierflag=0; AliMUONClusterInput& clusterInput = *(AliMUONClusterInput::Instance()); @@ -1607,8 +1606,8 @@ Float_t AliMUONClusterFinderVS::SingleMathiesonFit(AliMUONRawCluster *c, Int_t c Float_t AliMUONClusterFinderVS::CombiSingleMathiesonFit(AliMUONRawCluster * /*c*/) { -// Perform combined Mathieson fit on both cathode planes -// +/// Perform combined Mathieson fit on both cathode planes + Double_t arglist[20]; Int_t ierflag=0; AliMUONClusterInput& clusterInput = *(AliMUONClusterInput::Instance()); @@ -1701,8 +1700,7 @@ Float_t AliMUONClusterFinderVS::CombiSingleMathiesonFit(AliMUONRawCluster * /*c* Bool_t AliMUONClusterFinderVS::DoubleMathiesonFit(AliMUONRawCluster * /*c*/, Int_t cath) { -// Performs a double Mathieson fit on one cathode -// +/// Performs a double Mathieson fit on one cathode // // Initialise global variables for fit @@ -1782,9 +1780,8 @@ Bool_t AliMUONClusterFinderVS::DoubleMathiesonFit(AliMUONRawCluster * /*c*/, Int Float_t AliMUONClusterFinderVS::CombiDoubleMathiesonFit(AliMUONRawCluster * /*c*/) { -// -// Perform combined double Mathieson fit on both cathode planes -// +/// Perform combined double Mathieson fit on both cathode planes + Double_t arglist[20]; Int_t ierflag=0; AliMUONClusterInput& clusterInput = *(AliMUONClusterInput::Instance()); @@ -1939,9 +1936,8 @@ Float_t AliMUONClusterFinderVS::CombiDoubleMathiesonFit(AliMUONRawCluster * /*c* void AliMUONClusterFinderVS::Split(AliMUONRawCluster* c) { -// -// One cluster for each maximum -// +/// One cluster for each maximum + Int_t i, j, cath; AliMUONClusterInput& clusterInput = *(AliMUONClusterInput::Instance()); for (j=0; j<2; j++) { @@ -1988,9 +1984,8 @@ void AliMUONClusterFinderVS::Split(AliMUONRawCluster* c) } void AliMUONClusterFinderVS::AddRawCluster(AliMUONRawCluster& c) { - // - // Add a raw cluster copy to the list - // +/// Add a raw cluster copy to the list + // AliMUON *pMUON=(AliMUON*)gAlice->GetModule("MUON"); // pMUON->GetMUONData()->AddRawCluster(fInput->Chamber(),c); // fNRawClusters++; diff --git a/MUON/AliMUONClusterReconstructor.cxx b/MUON/AliMUONClusterReconstructor.cxx index e2a56977a51..e4222e631af 100644 --- a/MUON/AliMUONClusterReconstructor.cxx +++ b/MUON/AliMUONClusterReconstructor.cxx @@ -15,12 +15,11 @@ /* $Id$ */ -//////////////////////////////////// -// +// ----------------------------------- +// Class AliMUONClusterReconstructor +// ---------------------------------- // MUON cluster reconstructor for MUON -// -// Should implement a virtual class ClusterFinder to chose between VS and AZ method -//////////////////////////////////// +// Should implement a virtual class ClusterFinder to choose between VS and AZ method #include "AliMUONClusterReconstructor.h" #include "AliRun.h" // for gAlice @@ -46,7 +45,7 @@ AliMUONClusterReconstructor::AliMUONClusterReconstructor(AliMUONData* data) fDigitsCath0(new TClonesArray("AliMUONDigit",1000)), fDigitsCath1(new TClonesArray("AliMUONDigit",1000)) { - // Standard Constructor +/// Standard Constructor fDigitsCath0->SetOwner(kTRUE); fDigitsCath1->SetOwner(kTRUE); @@ -56,7 +55,7 @@ AliMUONClusterReconstructor::AliMUONClusterReconstructor(AliMUONData* data) AliMUONClusterReconstructor::AliMUONClusterReconstructor (const AliMUONClusterReconstructor& rhs) : TObject(rhs) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } @@ -65,7 +64,7 @@ AliMUONClusterReconstructor::AliMUONClusterReconstructor (const AliMUONClusterRe AliMUONClusterReconstructor & AliMUONClusterReconstructor::operator=(const AliMUONClusterReconstructor& rhs) { -// Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; @@ -77,6 +76,8 @@ AliMUONClusterReconstructor::operator=(const AliMUONClusterReconstructor& rhs) //__________________________________________________________________________ AliMUONClusterReconstructor::~AliMUONClusterReconstructor(void) { +/// Destructor + delete fRecModel; delete fDigitsCath0; delete fDigitsCath1; @@ -86,10 +87,9 @@ AliMUONClusterReconstructor::~AliMUONClusterReconstructor(void) void AliMUONClusterReconstructor::CheckSize(TClonesArray& a) { - // - // Check if one can adds a new element, or if a is already full. - // If full, it is resized. - // +/// Check if one can adds a new element, or if a is already full. +/// If full, it is resized. + if ( a.GetLast()+1 >= a.GetSize() ) { AliInfo(Form("Increasing array size from %d to %d", @@ -102,10 +102,8 @@ AliMUONClusterReconstructor::CheckSize(TClonesArray& a) void AliMUONClusterReconstructor::ClusterizeOneDE(Int_t detElemId) { - // - // Clusterize one detection element, and let fMUONData know about - // the results. - // +/// Clusterize one detection element, and let fMUONData know about +/// the results. if ( fDigitsCath0->GetEntriesFast() || fDigitsCath1->GetEntriesFast() ) { @@ -136,15 +134,13 @@ AliMUONClusterReconstructor::ClusterizeOneDE(Int_t detElemId) //____________________________________________________________________ void AliMUONClusterReconstructor::Digits2Clusters(Int_t chBeg) { - // - // Clusterize all the tracking chamber digits. - // - // For each chamber, we loop *once* on that chamber digits, and store them - // in 2 temporary arrays (one pair of arrays per detection element, - // one array per cathode). Once a pair of arrays is full (i.e. all the digits - // of that detection element have been stored), we clusterize this DE, and - // move to the next one. - // +/// Clusterize all the tracking chamber digits. +/// +/// For each chamber, we loop *once* on that chamber digits, and store them +/// in 2 temporary arrays (one pair of arrays per detection element, +/// one array per cathode). Once a pair of arrays is full (i.e. all the digits +/// of that detection element have been stored), we clusterize this DE, and +/// move to the next one. if (!fRecModel) { @@ -208,6 +204,8 @@ void AliMUONClusterReconstructor::Digits2Clusters(Int_t chBeg) void AliMUONClusterReconstructor::SetRecoModel(AliMUONClusterFinderVS* rec) { +/// Set reconstruction model + delete fRecModel; fRecModel = rec; } @@ -215,7 +213,7 @@ AliMUONClusterReconstructor::SetRecoModel(AliMUONClusterFinderVS* rec) //_______________________________________________________________________ void AliMUONClusterReconstructor::Trigger2Trigger() { -// copy trigger from TreeD to TreeR +/// Copy trigger from TreeD to TreeR fMUONData->SetTreeAddress("GLT"); fMUONData->GetTriggerD(); diff --git a/MUON/AliMUONDetElement.cxx b/MUON/AliMUONDetElement.cxx index 8487a2ba3ac..b101cce4be7 100644 --- a/MUON/AliMUONDetElement.cxx +++ b/MUON/AliMUONDetElement.cxx @@ -15,6 +15,14 @@ /* $Id$ */ +// -------------------------- +// Class AliMUONDetElement +// -------------------------- +// Detection element object containing information for combined +// cluster / track finder in MUON arm +// Author: Alexander Zinchenko, JINR Dubna + + #include #include #include "AliMUONDetElement.h" @@ -37,7 +45,7 @@ ClassImp(AliMUONDetElement) // Class implementation in ROOT context AliMUONDetElement::AliMUONDetElement() : TObject() { -// Default constructor +/// Default constructor for (Int_t i = 0; i < 2; i++) { fHitMap[i] = NULL; fDigits[i] = NULL; @@ -51,7 +59,7 @@ AliMUONDetElement::AliMUONDetElement() AliMUONDetElement::AliMUONDetElement(Int_t idDE, AliMUONDigit *dig, AliMUONClusterFinderAZ *recModel) : TObject() { - // Constructor +/// Constructor fidDE = idDE; fChamber = fidDE / 100 - 1; fDigits[0] = new TObjArray(10); @@ -73,7 +81,7 @@ AliMUONDetElement::AliMUONDetElement(Int_t idDE, AliMUONDigit *dig, AliMUONClust //_________________________________________________________________________ AliMUONDetElement::~AliMUONDetElement() { - // Destructor +/// Destructor for (Int_t i = 0; i < 2; i++) { delete fHitMap[i]; fHitMap[i] = NULL; delete fDigits[i]; fDigits[i] = NULL; @@ -87,7 +95,7 @@ AliMUONDetElement::~AliMUONDetElement() AliMUONDetElement::AliMUONDetElement (const AliMUONDetElement& rhs) : TObject(rhs) { -// Copy constructor +/// Copy constructor AliFatal("Not implemented."); } @@ -95,7 +103,7 @@ AliMUONDetElement::AliMUONDetElement (const AliMUONDetElement& rhs) //________________________________________________________________________ AliMUONDetElement & AliMUONDetElement::operator = (const AliMUONDetElement& rhs) { -// Assignement operator +/// Assignement operator if (this == &rhs) return *this; AliFatal( "Not implemented."); @@ -105,9 +113,9 @@ AliMUONDetElement & AliMUONDetElement::operator = (const AliMUONDetElement& rhs) //_________________________________________________________________________ Int_t AliMUONDetElement::Compare(const TObject* detElem) const { - // "Compare" function to sort in Z (towards interaction point) - // Returns -1 (0, +1) if charge of current pixel - // is greater than (equal to, less than) charge of pixel +/// "Compare" function to sort in Z (towards interaction point) +/// Returns -1 (0, +1) if charge of current pixel +/// is greater than (equal to, less than) charge of pixel if (fZ > ((AliMUONDetElement*)detElem)->Z()) return(+1); else if (fZ == ((AliMUONDetElement*)detElem)->Z()) return( 0); else return(-1); @@ -116,7 +124,7 @@ Int_t AliMUONDetElement::Compare(const TObject* detElem) const //_________________________________________________________________________ void AliMUONDetElement::Fill(AliMUONData */*data*/) { - // Fill hit maps +/// Fill hit maps fLeft[0] = fDigits[0]->GetEntriesFast(); fLeft[1] = fDigits[1]->GetEntriesFast(); @@ -151,7 +159,7 @@ void AliMUONDetElement::Fill(AliMUONData */*data*/) //_________________________________________________________________________ void AliMUONDetElement::AddDigit(AliMUONDigit *dig) { - // Add digit +/// Add digit fDigits[dig->Cathode()]->Add(dig); } @@ -159,7 +167,7 @@ void AliMUONDetElement::AddDigit(AliMUONDigit *dig) //_________________________________________________________________________ Bool_t AliMUONDetElement::Inside(Double_t x, Double_t y, Double_t z) const { - // Check if point is inside detection element +/// Check if point is inside detection element Int_t ix, iy; for (Int_t i = 0; i < 2; i++) { @@ -188,7 +196,7 @@ Bool_t AliMUONDetElement::Inside(Double_t x, Double_t y, Double_t z) const //_________________________________________________________________________ void AliMUONDetElement::ClusterReco(Double_t xTrack, Double_t yTrack) { - // Run cluster reconstruction around point (x,y) +/// Run cluster reconstruction around point (x,y) if (fLeft[0] == 0 && fLeft[1] == 0) return; // all digits have been used Float_t dx, dy; @@ -260,7 +268,7 @@ void AliMUONDetElement::ClusterReco(Double_t xTrack, Double_t yTrack) //_________________________________________________________________________ void AliMUONDetElement::AddHitForRec(AliMUONRawCluster *clus) { - // Make HitForRec from raw cluster (rec. point) +/// Make HitForRec from raw cluster (rec. point) fRawClus->Add(new AliMUONRawCluster(*clus)); AliMUONHitForRec *hitForRec = diff --git a/MUON/AliMUONDigitMapA1.cxx b/MUON/AliMUONDigitMapA1.cxx index dbacc9529c4..33d926d4dde 100644 --- a/MUON/AliMUONDigitMapA1.cxx +++ b/MUON/AliMUONDigitMapA1.cxx @@ -15,6 +15,12 @@ /* $Id$ */ +// --------------------------- +// Class AliMUONDigitMapA1 +// --------------------------- +// Implements cluster Map as a 1-dim array +// Author: Christian Finck + #include "AliMUONDigitMapA1.h" #include "AliMUONDigit.h" @@ -33,13 +39,13 @@ AliMUONDigitMapA1::AliMUONDigitMapA1() fMaxIndex(0), fHitMap(0) { - // Default constructor +/// Default constructor } //________________________________________________________________________________ AliMUONDigitMapA1::AliMUONDigitMapA1(Int_t idDE, Int_t npx, Int_t npy ) { -// Constructor with new segmentation +/// Standard constructor fIdDE = idDE; fNpx = npx; @@ -54,27 +60,27 @@ AliMUONDigitMapA1::AliMUONDigitMapA1(Int_t idDE, Int_t npx, Int_t npy ) AliMUONDigitMapA1::AliMUONDigitMapA1(const AliMUONDigitMapA1& hitMap) : TObject(hitMap) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } //_________________________________ AliMUONDigitMapA1::~AliMUONDigitMapA1() { -// Destructor +/// Destructor if (fHitMap) delete[] fHitMap; } //______________________________________ void AliMUONDigitMapA1::Clear(const char *) { -// Clear hitmap +/// Clear hitmap memset(fHitMap,0,sizeof(int)*fMaxIndex); } //_________________________________________________________ Int_t AliMUONDigitMapA1::CheckedIndex(Int_t ix, Int_t iy) const { -// Return checked indices ix, iy +/// Return checked indices ix, iy Int_t index = iy * fNpx + ix; if ( index < 0 || index >= fMaxIndex ) { AliWarning(Form("index outside array idDE %d ix %d iy %d MaxIndex %d index %d Npx %d Npy %d", @@ -87,7 +93,7 @@ Int_t AliMUONDigitMapA1::CheckedIndex(Int_t ix, Int_t iy) const //_____________________________ void AliMUONDigitMapA1::FillHits(TObjArray* digits) { -// Fill hits from digits list +/// Fill hits from digits list fDigits = digits; Int_t ndigits = fDigits->GetEntriesFast(); if (!ndigits) return; @@ -100,43 +106,43 @@ void AliMUONDigitMapA1::FillHits(TObjArray* digits) //___________________________________________________________ void AliMUONDigitMapA1::SetHit(Int_t ix, Int_t iy, Int_t idigit) { -// Assign digit to hit cell ix,iy +/// Assign digit to hit cell ix,iy fHitMap[CheckedIndex(ix, iy)] = idigit + 1; } //_______________________________________________ void AliMUONDigitMapA1::DeleteHit(Int_t ix, Int_t iy) { -// Delete hit at cell ix,iy +/// Delete hit at cell ix,iy fHitMap[CheckedIndex(ix, iy)]=0; } //_____________________________________________ void AliMUONDigitMapA1::FlagHit(Int_t ix, Int_t iy) { -// Flag hit as used +/// Flag hit as used fHitMap[CheckedIndex(ix, iy)]= -TMath::Abs(fHitMap[CheckedIndex(ix, iy)]); } //________________________________________________________ Int_t AliMUONDigitMapA1::GetHitIndex(Int_t ix, Int_t iy) const { -// Get absolute value of contents of hit cell ix,iy +/// Get absolute value of contents of hit cell ix,iy return TMath::Abs(fHitMap[CheckedIndex(ix, iy)])-1; } //_______________________________________________________ TObject* AliMUONDigitMapA1::GetHit(Int_t ix, Int_t iy) const { - // Get pointer to object at hit cell ix, iy - // Force crash if index does not exist ! (Manu) +/// Get pointer to object at hit cell ix, iy +/// Force crash if index does not exist ! (Manu) Int_t index = GetHitIndex(ix,iy); return (index <0) ? 0 : fDigits->UncheckedAt(GetHitIndex(ix,iy)); } //_________________________________________________ FlagType AliMUONDigitMapA1::TestHit(Int_t ix, Int_t iy) { -// Check if hit cell is empty, used or unused -// +/// Check if hit cell is empty, used or unused + Int_t index = CheckedIndex(ix, iy); if (index<0 || index >= fMaxIndex) return kEmpty; @@ -152,7 +158,7 @@ FlagType AliMUONDigitMapA1::TestHit(Int_t ix, Int_t iy) //________________________________________________________________________ AliMUONDigitMapA1 & AliMUONDigitMapA1::operator = (const AliMUONDigitMapA1 & rhs) { -// Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; @@ -160,8 +166,3 @@ AliMUONDigitMapA1 & AliMUONDigitMapA1::operator = (const AliMUONDigitMapA1 & rhs return *this; } - - - - - diff --git a/MUON/AliMUONDigitizer.cxx b/MUON/AliMUONDigitizer.cxx index 39a156728f4..d8d22793953 100644 --- a/MUON/AliMUONDigitizer.cxx +++ b/MUON/AliMUONDigitizer.cxx @@ -55,8 +55,8 @@ AliMUONDigitizer::AliMUONDigitizer() : fMask(0), fSignal(0) { -// Default constructor. -// Initializes all pointers to NULL. +/// Default constructor. +/// Initializes all pointers to NULL. fRunLoader = NULL; fGime = NULL; @@ -74,8 +74,8 @@ AliMUONDigitizer::AliMUONDigitizer(AliRunDigitizer* manager) : fMask(0), fSignal(0) { -// Constructor which should be used rather than the default constructor. -// Initializes all pointers to NULL. +/// Constructor which should be used rather than the default constructor. +/// Initializes all pointers to NULL. fRunLoader = NULL; fGime = NULL; @@ -88,7 +88,7 @@ AliMUONDigitizer::AliMUONDigitizer(AliRunDigitizer* manager) : AliMUONDigitizer::AliMUONDigitizer(const AliMUONDigitizer& rhs) : AliDigitizer(rhs) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } @@ -96,7 +96,8 @@ AliMUONDigitizer::AliMUONDigitizer(const AliMUONDigitizer& rhs) //___________________________________________ AliMUONDigitizer::~AliMUONDigitizer() { -// Destructor +/// Destructor + if (fMUONData) delete fMUONData; @@ -108,7 +109,7 @@ AliMUONDigitizer::~AliMUONDigitizer() AliMUONDigitizer& AliMUONDigitizer::operator=(const AliMUONDigitizer& rhs) { -// Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; @@ -120,19 +121,20 @@ AliMUONDigitizer::operator=(const AliMUONDigitizer& rhs) //------------------------------------------------------------------------ Bool_t AliMUONDigitizer::Init() { -// Does nothing. - return kTRUE; +/// Initialize - Does nothing. + + return kTRUE; } //------------------------------------------------------------------------ void AliMUONDigitizer::Exec(Option_t* /*option*/) { -// The main work loop starts here. -// The digitization process is broken up into two steps: -// 1) Loop over input streams and create transient digits from the input. -// Done in GenerateTransientDigits() -// 2) Loop over the generated transient digits and write them to the output -// stream. Done in CreateDigits() +/// The main work loop starts here. +/// The digitization process is broken up into two steps: +/// 1) Loop over input streams and create transient digits from the input. +/// Done in GenerateTransientDigits() +/// 2) Loop over the generated transient digits and write them to the output +/// stream. Done in CreateDigits() AliDebug(1, "Running digitiser."); @@ -184,8 +186,8 @@ void AliMUONDigitizer::Exec(Option_t* /*option*/) //-------------------------------------------------------------------------- void AliMUONDigitizer::AddOrUpdateTransientDigit(AliMUONTransientDigit* mTD) { -// Checks to see if the transient digit exists in the corresponding fHitMap. -// If it does then the digit is updated otherwise it is added. +/// Checks to see if the transient digit exists in the corresponding fHitMap. +/// If it does then the digit is updated otherwise it is added. if (ExistTransientDigit(mTD)) { @@ -199,8 +201,8 @@ void AliMUONDigitizer::AddOrUpdateTransientDigit(AliMUONTransientDigit* mTD) //------------------------------------------------------------------------ void AliMUONDigitizer::UpdateTransientDigit(AliMUONTransientDigit* mTD) { -// Update the transient digit that is already in the fTDList by adding the new -// transient digits charges and track lists to the existing one. +/// Update the transient digit that is already in the fTDList by adding the new +/// transient digits charges and track lists to the existing one. AliDebug(4,Form( "Updating transient digit 0x%X", (void*)mTD)); // Choosing the maping of the cathode plane of the chamber: @@ -235,8 +237,8 @@ void AliMUONDigitizer::UpdateTransientDigit(AliMUONTransientDigit* mTD) //------------------------------------------------------------------------ void AliMUONDigitizer::AddTransientDigit(AliMUONTransientDigit* mTD) { -// Adds the transient digit to the fTDList and sets the appropriate entry -// in the fHitMap arrays. +/// Adds the transient digit to the fTDList and sets the appropriate entry +/// in the fHitMap arrays. AliDebug(4,Form( "Adding transient digit 0x%X", (void*)mTD)); // Choosing the maping of the cathode plane of the chamber: @@ -254,9 +256,9 @@ void AliMUONDigitizer::AddTransientDigit(AliMUONTransientDigit* mTD) //------------------------------------------------------------------------ Bool_t AliMUONDigitizer::ExistTransientDigit(AliMUONTransientDigit* mTD) { -// Checks if the transient digit already exists on the corresponding fHitMap. -// i.e. is there a transient digit on the same chamber, cathode and pad position -// as mTD. If yes then kTRUE is returned else kFASLE is returned. +/// Checks if the transient digit already exists on the corresponding fHitMap. +/// i.e. is there a transient digit on the same chamber, cathode and pad position +/// as mTD. If yes then kTRUE is returned else kFASLE is returned. // Choosing the maping of the cathode plane of the chamber: Int_t detElemId = mTD->DetElemId(); @@ -272,8 +274,8 @@ Bool_t AliMUONDigitizer::ExistTransientDigit(AliMUONTransientDigit* mTD) //----------------------------------------------------------------------- void AliMUONDigitizer::CreateDigits() { -// Loops over the fTDList for each cathode, gets the correct signal for the -// digit and adds the new digit to the output stream. +/// Loops over the fTDList for each cathode, gets the correct signal for the +/// digit and adds the new digit to the output stream. fTDList->Sort(); // sort by idDE AliDebug(2, "Creating digits..."); @@ -315,14 +317,14 @@ void AliMUONDigitizer::AddDigit( Int_t digitindex ) { -// Prepares the digits, track and charge arrays in preparation for a call to -// AddDigit(Int_t, Int_t[kMAXTRACKS], Int_t[kMAXTRACKS], Int_t[6]) -// This method is called by CreateDigits() whenever a new digit needs to be added -// to the output stream trees. -// The responseCharge value is used as the Signal of the new digit. -// The OnWriteTransientDigit method is also called just before the adding the -// digit to allow inheriting digitizers to be able to do some specific processing -// at this point. +/// Prepares the digits, track and charge arrays in preparation for a call to +/// AddDigit(Int_t, Int_t[kMAXTRACKS], Int_t[kMAXTRACKS], Int_t[6]) +/// This method is called by CreateDigits() whenever a new digit needs to be added +/// to the output stream trees. +/// The responseCharge value is used as the Signal of the new digit. +/// The OnWriteTransientDigit method is also called just before the adding the +/// digit to allow inheriting digitizers to be able to do some specific processing +/// at this point. Int_t tracks[kMAXTRACKS]; Int_t charges[kMAXTRACKS]; @@ -373,27 +375,27 @@ void AliMUONDigitizer::AddDigit( //------------------------------------------------------------------------ void AliMUONDigitizer::OnCreateTransientDigit(AliMUONTransientDigit* /*digit*/, TObject* /*source_object*/) { - // Does nothing. - // - // This is derived by Digitisers that want to trace which digits were made from - // which hits. +/// Does nothing. +/// +/// This is derived by Digitisers that want to trace which digits were made from +/// which hits. } //------------------------------------------------------------------------ void AliMUONDigitizer::OnWriteTransientDigit(AliMUONTransientDigit* /*digit*/) { - // Does nothing. - // - // This is derived by Digitisers that want to trace which digits were made from - // which hits. +/// Does nothing. +/// +/// This is derived by Digitisers that want to trace which digits were made from +/// which hits. } //------------------------------------------------------------------------ Bool_t AliMUONDigitizer::FetchLoaders(const char* foldername, AliRunLoader*& runloader, AliMUONLoader*& muonloader) { -// Fetches the run loader from the current folder, specified by 'foldername'. -// The muon loader is then loaded from the fetched run loader. -// kTRUE is returned if no error occurred otherwise kFALSE is returned. +/// Fetches the run loader from the current folder, specified by 'foldername'. +/// The muon loader is then loaded from the fetched run loader. +/// kTRUE is returned if no error occurred otherwise kFALSE is returned. AliDebug(3, Form("Fetching run loader and muon loader from folder: %s", foldername)); @@ -416,11 +418,11 @@ Bool_t AliMUONDigitizer::FetchLoaders(const char* foldername, AliRunLoader*& run //------------------------------------------------------------------------ Bool_t AliMUONDigitizer::FetchGlobalPointers(AliRunLoader* runloader) { -// Fetches the AliRun object into the global gAlice pointer from the specified -// run loader. The AliRun object is loaded into memory using the run loader if -// not yet loaded. The MUON module object is then loaded from gAlice and -// AliMUONData fetched from the MUON module. -// kTRUE is returned if no error occurred otherwise kFALSE is returned. +/// Fetches the AliRun object into the global gAlice pointer from the specified +/// run loader. The AliRun object is loaded into memory using the run loader if +/// not yet loaded. The MUON module object is then loaded from gAlice and +/// AliMUONData fetched from the MUON module. +/// kTRUE is returned if no error occurred otherwise kFALSE is returned. AliDebug(3, Form("Fetching gAlice, MUON module and AliMUONData from runloader 0x%X.", (void*)runloader @@ -460,6 +462,8 @@ Bool_t AliMUONDigitizer::FetchGlobalPointers(AliRunLoader* runloader) //----------------------------------------------------------------------- Bool_t AliMUONDigitizer::FetchTriggerPointer(AliMUONLoader* loader) { +/// \todo add description + if (fMUONData == NULL) { AliError("MUONData not found"); return kFALSE; @@ -474,12 +478,12 @@ Bool_t AliMUONDigitizer::FetchTriggerPointer(AliMUONLoader* loader) //------------------------------------------------------------------------ void AliMUONDigitizer::InitArrays() { -// Creates a new fTDList object. -// Also creates an array of 2 * chamber_number AliMUONHitMapA1 objects -// in the fHitMaps array. Each one is set to a chamber and cathode -// specific segmentation model. -// -// Note: the fTDList and fHitMap arrays must be NULL before calling this method. +/// Creates a new fTDList object. +/// Also creates an array of 2 * chamber_number AliMUONHitMapA1 objects +/// in the fHitMaps array. Each one is set to a chamber and cathode +/// specific segmentation model. +/// +/// Note: the fTDList and fHitMap arrays must be NULL before calling this method. AliDebug(2, "Initialising internal arrays."); AliDebug(4, "Creating transient digits list."); @@ -531,7 +535,7 @@ void AliMUONDigitizer::InitArrays() //------------------------------------------------------------------------ void AliMUONDigitizer::CleanupArrays() { -// The arrays fTDList and fHitMap are deleted and the pointers set to NULL. +/// The arrays fTDList and fHitMap are deleted and the pointers set to NULL. AliDebug(2, "Deleting internal arrays."); for(Int_t i = 0; i < 2*AliMUONConstants::NDetElem(); i++) { @@ -550,10 +554,8 @@ void AliMUONDigitizer::CleanupArrays() //------------------------------------------------------------------------ void AliMUONDigitizer::SortTracks(Int_t *tracks, Int_t *charges, Int_t ntr) const { -// -// Sort the list of tracks contributing to a given digit -// Only the 3 most significant tracks are actually sorted -// +/// Sort the list of tracks contributing to a given digit +/// Only the 3 most significant tracks are actually sorted if (ntr <= 1) return; diff --git a/MUON/AliMUONDigitizerv2.cxx b/MUON/AliMUONDigitizerv2.cxx index 2662d0b8e57..0daf860981d 100644 --- a/MUON/AliMUONDigitizerv2.cxx +++ b/MUON/AliMUONDigitizerv2.cxx @@ -44,26 +44,26 @@ ClassImp(AliMUONDigitizerv2) //___________________________________________ AliMUONDigitizerv2::AliMUONDigitizerv2() : AliMUONDigitizer() { - // Default ctor - don't use it +/// Default ctor - don't use it } //___________________________________________ AliMUONDigitizerv2::AliMUONDigitizerv2(AliRunDigitizer* manager) : AliMUONDigitizer(manager) { - // ctor which should be used +/// ctor which should be used } //___________________________________________ AliMUONDigitizerv2::~AliMUONDigitizerv2() { - // Destructor +/// Destructor } //----------------------------------------------------------------------- void AliMUONDigitizerv2::GenerateTransientDigits() { -// Loop over all chambers and s-digits in the input stream and create -// AliMUONTransientDigit objects from them. These are then added to fTDList. +/// Loop over all chambers and s-digits in the input stream and create +/// AliMUONTransientDigit objects from them. These are then added to fTDList. AliDebug(2,"Generating transient digits using treeH = 0x%X"); // @@ -97,8 +97,8 @@ void AliMUONDigitizerv2::GenerateTransientDigits() //------------------------------------------------------------------------ void AliMUONDigitizerv2::MakeTransientDigitFromSDigit(Int_t iChamber, AliMUONDigit* sDigit) { -// Makes a transient digit from the specified s-digit from the specified chamber. -// Once the digit is created it is added to the fTDList. +/// Makes a transient digit from the specified s-digit from the specified chamber. +/// Once the digit is created it is added to the fTDList. AliDebug(4,Form("Making transient digit from s-digit for chamber %d.", iChamber)); Int_t digits[7]; @@ -136,15 +136,15 @@ void AliMUONDigitizerv2::MakeTransientDigitFromSDigit(Int_t iChamber, AliMUONDig //------------------------------------------------------------------------ void AliMUONDigitizerv2::AddDigit(Int_t chamber, Int_t tracks[kMAXTRACKS], Int_t charges[kMAXTRACKS], Int_t digits[7]) { -// Override to add new digits to the digits tree TreeD. +/// Override to add new digits to the digits tree TreeD. fMUONData->AddDigit(chamber, tracks, charges, digits); } //------------------------------------------------------------------------ Int_t AliMUONDigitizerv2::GetSignalFrom(AliMUONTransientDigit* td) { -// Derived to apply the chamber response model to the digit. -// Using AliMUONChamber::ResponseModel() for this. +/// Derived to apply the chamber response model to the digit. +/// Using AliMUONChamber::ResponseModel() for this. AliDebug(4, "Applying response of chamber to TransientDigit signal."); // @@ -163,9 +163,9 @@ Int_t AliMUONDigitizerv2::GetSignalFrom(AliMUONTransientDigit* td) //------------------------------------------------------------------------ Bool_t AliMUONDigitizerv2::InitInputData(AliMUONLoader* muonloader) { -// Overridden to initialize fMUONData to read from the s-digits tree TreeS. -// If the s-digits are not loaded then the muon loader is used to load the -// s-digits into memory. +/// Overridden to initialize fMUONData to read from the s-digits tree TreeS. +/// If the s-digits are not loaded then the muon loader is used to load the +/// s-digits into memory. AliDebug(3,"Loading s-digits in READ mode and setting the tree address."); fMUONData->SetLoader(muonloader); @@ -187,7 +187,7 @@ Bool_t AliMUONDigitizerv2::InitInputData(AliMUONLoader* muonloader) //------------------------------------------------------------------------ void AliMUONDigitizerv2::CleanupInputData(AliMUONLoader* muonloader) { -// Overridden to release and unload s-digits from memory. +/// Overridden to release and unload s-digits from memory. AliDebug(3,"Releasing loaded s-digits."); fMUONData->ResetSDigits(); @@ -197,8 +197,8 @@ void AliMUONDigitizerv2::CleanupInputData(AliMUONLoader* muonloader) //------------------------------------------------------------------------ Bool_t AliMUONDigitizerv2::InitOutputData(AliMUONLoader* muonloader) { -// Derived to initialize the output digits tree TreeD, create it if necessary -// and sets the fMUONData tree address to treeD. +/// Derived to initialize the output digits tree TreeD, create it if necessary +/// and sets the fMUONData tree address to treeD. AliDebug(3, "Creating digits branch and setting the tree address."); @@ -224,7 +224,7 @@ Bool_t AliMUONDigitizerv2::InitOutputData(AliMUONLoader* muonloader) //------------------------------------------------------------------------ void AliMUONDigitizerv2::FillOutputData() { -// Derived to fill TreeD and resets the digit array in fMUONData. +/// Derived to fill TreeD and resets the digit array in fMUONData. AliDebug(3, "Filling trees with digits."); fMUONData->Fill("D"); @@ -234,7 +234,7 @@ void AliMUONDigitizerv2::FillOutputData() //------------------------------------------------------------------------ void AliMUONDigitizerv2::CleanupOutputData(AliMUONLoader* muonloader) { -// Derived to write the digits tree and then unload the digits tree once written. +/// Derived to write the digits tree and then unload the digits tree once written. AliDebug(3, "Writing digits and releasing pointers."); muonloader->WriteDigits("OVERWRITE"); @@ -245,6 +245,8 @@ void AliMUONDigitizerv2::CleanupOutputData(AliMUONLoader* muonloader) void AliMUONDigitizerv2::CleanupTriggerArrays() { +/// Cleanup trigger arrays + fTrigDec->ClearDigits(); } @@ -255,14 +257,14 @@ void AliMUONDigitizerv2::AddDigitTrigger( Int_t digitindex ) { -// Derived to add digits to TreeD for trigger. +/// Derived to add digits to TreeD for trigger. fTrigDec->AddDigit(chamber, tracks, charges, digits, digitindex); } //------------------------------------------------------------------------ void AliMUONDigitizerv2::FillTriggerOutput() { -// Derived to fill TreeD and resets the trigger array in fMUONData. +/// Derived to fill TreeD and resets the trigger array in fMUONData. AliDebug(3,"Filling trees with trigger."); fMUONData->Fill("GLT"); @@ -272,6 +274,8 @@ void AliMUONDigitizerv2::FillTriggerOutput() //------------------------------------------------------------------------ void AliMUONDigitizerv2::CreateTrigger() { +/// Create trigger data + fMUONData->MakeBranch("GLT"); fMUONData->SetTreeAddress("GLT"); fTrigDec->Digits2Trigger(); diff --git a/MUON/AliMUONHitForRec.cxx b/MUON/AliMUONHitForRec.cxx index b94a8cfd4ff..e40d6431e4e 100644 --- a/MUON/AliMUONHitForRec.cxx +++ b/MUON/AliMUONHitForRec.cxx @@ -15,10 +15,11 @@ /* $Id$ */ -//__________________________________________________________________________ -// +// ------------------------ +// Class AliMUONHitForRec +// ------------------------ // Hit for reconstruction in ALICE dimuon spectrometer -//__________________________________________________________________________ +// Author: J. Gosset #include "AliTrackReference.h" #include "AliMUONHitForRec.h" @@ -33,7 +34,7 @@ ClassImp(AliMUONHitForRec) // Class implementation in ROOT context AliMUONHitForRec::AliMUONHitForRec() : TObject() { - // Default Constructor +/// Default Constructor fFirstTrackHitPtr = 0; fLastTrackHitPtr = 0; @@ -43,11 +44,12 @@ AliMUONHitForRec::AliMUONHitForRec() AliMUONHitForRec::AliMUONHitForRec(AliTrackReference* theGhit) : TObject() { - // Constructor for AliMUONHitForRec from a track ref. hit. - // Fills the bending, non bending, and Z coordinates, - // which are taken from the coordinates of the track ref. hit, - // the track number (track ref. and not TH), - // and the chamber number (0...). +/// Constructor for AliMUONHitForRec from a track ref. hit. +/// Fills the bending, non bending, and Z coordinates, +/// which are taken from the coordinates of the track ref. hit, +/// the track number (track ref. and not TH), +/// and the chamber number (0...). + fBendingCoor = theGhit->Y(); fNonBendingCoor = theGhit->X(); fZ = theGhit->Z(); @@ -84,8 +86,9 @@ AliMUONHitForRec::AliMUONHitForRec(AliTrackReference* theGhit) AliMUONHitForRec::AliMUONHitForRec(AliMUONRawCluster* theRawCluster) : TObject() { - // Constructor for AliMUONHitForRec from a raw cluster. - // Fills the bending and non bending coordinates. +/// Constructor for AliMUONHitForRec from a raw cluster. +/// Fills the bending and non bending coordinates. + fNonBendingCoor = theRawCluster->GetX(0); fBendingCoor = theRawCluster->GetY(0); fDetElemId = theRawCluster->GetDetElemId(); @@ -105,6 +108,8 @@ AliMUONHitForRec::AliMUONHitForRec(AliMUONRawCluster* theRawCluster) AliMUONHitForRec::AliMUONHitForRec (const AliMUONHitForRec& theMUONHitForRec) : TObject(theMUONHitForRec) { +/// Copy constructor + fBendingCoor = theMUONHitForRec.fBendingCoor; fNonBendingCoor = theMUONHitForRec.fNonBendingCoor; fZ = theMUONHitForRec.fZ; @@ -125,6 +130,8 @@ AliMUONHitForRec::AliMUONHitForRec (const AliMUONHitForRec& theMUONHitForRec) //__________________________________________________________________________ AliMUONHitForRec & AliMUONHitForRec::operator=(const AliMUONHitForRec& theMUONHitForRec) { +/// Assignment operator + fBendingCoor = theMUONHitForRec.fBendingCoor; fNonBendingCoor = theMUONHitForRec.fNonBendingCoor; fZ = theMUONHitForRec.fZ; @@ -157,9 +164,10 @@ Int_t AliMUONHitForRec::Compare(const TObject* Hit) const //__________________________________________________________________________ Int_t AliMUONHitForRec::Compare(const TObject* Hit) const { - // "Compare" function to sort with decreasing Z-coordinate (spectro. MUON z<0). - // Returns 1 (0, -1) if Z-coordinate of current HitForRec - // is smaller than (equal to, larger than) Z-coordinate of Hit +/// "Compare" function to sort with decreasing Z-coordinate (spectro. MUON z<0). +/// Returns 1 (0, -1) if Z-coordinate of current HitForRec +/// is smaller than (equal to, larger than) Z-coordinate of Hit + if (fZ < ((AliMUONHitForRec*)Hit)->fZ) return(1); else if (fZ == ((AliMUONHitForRec*)Hit)->fZ) return( 0); else return(-1); @@ -168,15 +176,16 @@ Int_t AliMUONHitForRec::Compare(const TObject* Hit) const //__________________________________________________________________________ Double_t AliMUONHitForRec::NormalizedChi2WithHitForRec(AliMUONHitForRec* hitForRec, Double_t Sigma2Cut) const { - // Calculate the normalized Chi2 between the current hitForRec (this) - // and the hitForRec pointed to by "hitForRec", - // i.e. the square deviations between the coordinates, - // in both the bending and the non bending plane, - // divided by the variance of the same quantities and by "Sigma2Cut". - // Returns 3 if none of the 2 quantities is OK, - // something smaller than or equal to 2 otherwise. - // Would it be more correct to use a real chi square - // including the non diagonal term ???? +/// Calculate the normalized Chi2 between the current hitForRec (this) +/// and the hitForRec pointed to by "hitForRec", +/// i.e. the square deviations between the coordinates, +/// in both the bending and the non bending plane, +/// divided by the variance of the same quantities and by "Sigma2Cut". +/// Returns 3 if none of the 2 quantities is OK, +/// something smaller than or equal to 2 otherwise. +/// Would it be more correct to use a real chi square +/// including the non diagonal term ???? + Double_t chi2, chi2Max, diff, normDiff; chi2 = 0.0; chi2Max = 3.0; diff --git a/MUON/AliMUONHitMapA1.cxx b/MUON/AliMUONHitMapA1.cxx index d15a6630e94..cae147542e6 100644 --- a/MUON/AliMUONHitMapA1.cxx +++ b/MUON/AliMUONHitMapA1.cxx @@ -15,6 +15,12 @@ /* $Id$ */ +// ----------------------- +// Class AliMUONHitMapA1 +// ----------------------- +// Implements AliHitMap as a 1-dim array +// ... + #include "AliMUONHitMapA1.h" #include "AliMUONDigit.h" @@ -28,7 +34,7 @@ ClassImp(AliMUONHitMapA1) AliMUONHitMapA1::AliMUONHitMapA1() : AliHitMap() { - // Default constructor +/// Default constructor fNpx = 0; fNpy = 0; fMaxIndex = 0; @@ -41,11 +47,8 @@ AliMUONHitMapA1::AliMUONHitMapA1() AliMUONHitMapA1::AliMUONHitMapA1(Int_t npx, Int_t npy, TObjArray* dig) : AliHitMap() { -// Constructor with new segmentation -/* - fNpx = seg->Npx(idDE)+1; - fNpy = seg->Npy(idDE)+1; -*/ +/// Standard constructor + fNpx = npx; fNpy = npy; fMaxIndex=2*(fNpx+1)*2*(fNpy+1)+2*fNpy; @@ -58,28 +61,27 @@ AliMUONHitMapA1::AliMUONHitMapA1(Int_t npx, Int_t npy, TObjArray* dig) AliMUONHitMapA1::AliMUONHitMapA1(const AliMUONHitMapA1 & hitMap) : AliHitMap(hitMap) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } //_________________________________ AliMUONHitMapA1::~AliMUONHitMapA1() { -// Destructor +/// Destructor if (fHitMap) delete[] fHitMap; } //______________________________________ void AliMUONHitMapA1::Clear(const char *) { -// Clear hitmap +/// Clear hitmap memset(fHitMap,0,sizeof(int)*fMaxIndex); } //___________________________________________________ Bool_t AliMUONHitMapA1::ValidateHit(Int_t ix, Int_t iy) { - // - // Check if pad coordinates are within boundaries - // +/// Check if pad coordinates are within boundaries + // printf("\n Validate %d %d %d %d", ix, iy, fNpx, fNpy); return (TMath::Abs(ix) <= fNpx && TMath::Abs(iy) <= fNpy); @@ -87,7 +89,7 @@ Bool_t AliMUONHitMapA1::ValidateHit(Int_t ix, Int_t iy) //_________________________________________________________ Int_t AliMUONHitMapA1::CheckedIndex(Int_t ix, Int_t iy) const { -// Return checked indices ix, iy +/// Return checked indices ix, iy Int_t index=2*fNpy*(ix+fNpx)+(iy+fNpy); if ( index < 0 || index >= fMaxIndex ) { AliWarning(Form("index outside array ix %d iy %d MaxIndex %d index %d Npx %d Npy %d", @@ -100,7 +102,7 @@ Int_t AliMUONHitMapA1::CheckedIndex(Int_t ix, Int_t iy) const //_____________________________ void AliMUONHitMapA1::FillHits() { -// Fill hits from digits list +/// Fill hits from digits list Int_t ndigits = fDigits->GetEntriesFast(); //printf("\n Filling hits into HitMap\n"); //printf("FindRawClusters -- ndigits %d \n",ndigits); @@ -114,43 +116,45 @@ void AliMUONHitMapA1::FillHits() //___________________________________________________________ void AliMUONHitMapA1::SetHit(Int_t ix, Int_t iy, Int_t idigit) { -// Assign digit to hit cell ix,iy +/// Assign digit to hit cell ix,iy + // fHitMap[kMaxNpady*(ix+fNpx)+(iy+fNpy)]=idigit+1; fHitMap[CheckedIndex(ix, iy)]=idigit+1; } //_______________________________________________ void AliMUONHitMapA1::DeleteHit(Int_t ix, Int_t iy) { -// Delete hit at cell ix,iy +/// Delete hit at cell ix,iy + // fHitMap[kMaxNpady*(ix+fNpx)+(iy+fNpy)]=0; fHitMap[CheckedIndex(ix, iy)]=0; } //_____________________________________________ void AliMUONHitMapA1::FlagHit(Int_t ix, Int_t iy) { -// Flag hit as used +/// Flag hit as used fHitMap[CheckedIndex(ix, iy)]= -TMath::Abs(fHitMap[CheckedIndex(ix, iy)]); } //________________________________________________________ Int_t AliMUONHitMapA1::GetHitIndex(Int_t ix, Int_t iy) const { -// Get absolute value of contents of hit cell ix,iy +/// Get absolute value of contents of hit cell ix,iy return TMath::Abs(fHitMap[CheckedIndex(ix, iy)])-1; } //_______________________________________________________ TObject* AliMUONHitMapA1::GetHit(Int_t ix, Int_t iy) const { - // Get pointer to object at hit cell ix, iy - // Force crash if index does not exist ! (Manu) +/// Get pointer to object at hit cell ix, iy +/// Force crash if index does not exist ! (Manu) Int_t index=GetHitIndex(ix,iy); return (index <0) ? 0 : fDigits->UncheckedAt(GetHitIndex(ix,iy)); } //_________________________________________________ FlagType AliMUONHitMapA1::TestHit(Int_t ix, Int_t iy) { -// Check if hit cell is empty, used or unused -// +/// Check if hit cell is empty, used or unused + Int_t index = CheckedIndex(ix, iy); if (index<0 || index >= fMaxIndex) return kEmpty; @@ -166,7 +170,7 @@ FlagType AliMUONHitMapA1::TestHit(Int_t ix, Int_t iy) //________________________________________________________________________ AliMUONHitMapA1 & AliMUONHitMapA1::operator = (const AliMUONHitMapA1 & rhs) { -// Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; diff --git a/MUON/AliMUONLoader.cxx b/MUON/AliMUONLoader.cxx index 853c74af71d..166ea069b54 100644 --- a/MUON/AliMUONLoader.cxx +++ b/MUON/AliMUONLoader.cxx @@ -15,10 +15,12 @@ /* $Id$ */ +// ------------------------- +// Class AliMUONDataLoader +// ------------------------- +// Implements AliLoader for MUON subsystem +// Author: Gines Martinez -//Root includes - -//AliRoot includes #include "AliMUONLoader.h" #include "AliMUONConstants.h" #include "AliLog.h" @@ -29,7 +31,7 @@ AliMUONLoader::AliMUONLoader() : AliLoader(), fMUONData(0) { -//default constructor +/// Default constructor } //_______________________________________________________________________________ AliMUONLoader::AliMUONLoader(const Char_t* detname,const Char_t* eventfoldername) @@ -42,13 +44,13 @@ AliMUONLoader::AliMUONLoader(const Char_t * detname,TFolder* eventfolder) : AliLoader(detname,eventfolder), fMUONData(0) { -//constructor +/// Constructor } //___________________________________________ AliMUONLoader::AliMUONLoader(const AliMUONLoader& rhs) : AliLoader(rhs) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } @@ -56,13 +58,13 @@ AliMUONLoader::AliMUONLoader(const AliMUONLoader& rhs) //_______________________________________________________________________________ AliMUONLoader::~AliMUONLoader() { -//detructor +/// Destructor } //------------------------------------------------------------------- AliMUONLoader& AliMUONLoader::operator=(const AliMUONLoader& rhs) { -// Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; @@ -74,11 +76,15 @@ AliMUONLoader::operator=(const AliMUONLoader& rhs) //_______________________________________________________________________________ void AliMUONLoader::SetMUONData(AliMUONData * MUONData) { +/// Set MUON data + fMUONData = MUONData; } //_______________________________________________________________________________ AliMUONData * AliMUONLoader::GetMUONData() { +/// Get MUON data + return fMUONData; } diff --git a/MUON/AliMUONMathieson.cxx b/MUON/AliMUONMathieson.cxx index 862b1f9894a..98936e5c75d 100644 --- a/MUON/AliMUONMathieson.cxx +++ b/MUON/AliMUONMathieson.cxx @@ -15,6 +15,13 @@ /* $Id$ */ +// ----------------------- +// Class AliMUONMathieson +// ----------------------- +// Implementation of Mathieson response +// Separated from other classes by CH. Finck with removing circular +// dependencies + #include "AliMUONMathieson.h" #include "AliLog.h" @@ -37,17 +44,17 @@ ClassImp(AliMUONMathieson) fPitch(0.), fInversePitch(0.) { -// Default constructor +/// Default constructor } //__________________________________________________________________________ void AliMUONMathieson::SetSqrtKx3AndDeriveKx2Kx4(Float_t SqrtKx3) { - // Set to "SqrtKx3" the Mathieson parameter K3 ("fSqrtKx3") - // in the X direction, perpendicular to the wires, - // and derive the Mathieson parameters K2 ("fKx2") and K4 ("fKx4") - // in the same direction +/// Set to "SqrtKx3" the Mathieson parameter K3 ("fSqrtKx3") +/// in the X direction, perpendicular to the wires, +/// and derive the Mathieson parameters K2 ("fKx2") and K4 ("fKx4") +/// in the same direction fSqrtKx3 = SqrtKx3; fKx2 = TMath::Pi() / 2. * (1. - 0.5 * fSqrtKx3); Float_t cx1 = fKx2 * fSqrtKx3 / 4. / TMath::ATan(Double_t(fSqrtKx3)); @@ -57,10 +64,10 @@ void AliMUONMathieson::SetSqrtKx3AndDeriveKx2Kx4(Float_t SqrtKx3) //__________________________________________________________________________ void AliMUONMathieson::SetSqrtKy3AndDeriveKy2Ky4(Float_t SqrtKy3) { - // Set to "SqrtKy3" the Mathieson parameter K3 ("fSqrtKy3") - // in the Y direction, along the wires, - // and derive the Mathieson parameters K2 ("fKy2") and K4 ("fKy4") - // in the same direction +/// Set to "SqrtKy3" the Mathieson parameter K3 ("fSqrtKy3") +/// in the Y direction, along the wires, +/// and derive the Mathieson parameters K2 ("fKy2") and K4 ("fKy4") +/// in the same direction fSqrtKy3 = SqrtKy3; fKy2 = TMath::Pi() / 2. * (1. - 0.5 * fSqrtKy3); Float_t cy1 = fKy2 * fSqrtKy3 / 4. / TMath::ATan(Double_t(fSqrtKy3)); @@ -71,9 +78,8 @@ void AliMUONMathieson::SetSqrtKy3AndDeriveKy2Ky4(Float_t SqrtKy3) Float_t AliMUONMathieson::IntXY(Float_t xi1, Float_t yi1, Float_t xi2, Float_t yi2) const { - // - // Integrate the Mathieson over x and y - // +/// Integrate the Mathieson over x and y + xi1 *= fInversePitch; xi2 *= fInversePitch; yi1 *= fInversePitch; @@ -94,9 +100,9 @@ AliMUONMathieson::IntXY(Float_t xi1, Float_t yi1, Float_t xi2, Float_t yi2) cons // ------------------------------------------- Float_t AliMUONMathieson::IntXY(Int_t idDE, AliMUONGeometrySegmentation* segmentation) { -// Calculate charge on current pad according to Mathieson distribution -// using Detection elt -// +/// Calculate charge on current pad according to Mathieson distribution +/// using Detection elt + // Integration limits defined by segmentation model // Float_t xi1, xi2, yi1, yi2; @@ -108,9 +114,8 @@ Float_t AliMUONMathieson::IntXY(Int_t idDE, AliMUONGeometrySegmentation* segment void AliMUONMathieson::SetPitch(Float_t p1) { - // - // Defines the pitch, and store its inverse, which is what is used in fact. - // +/// Defines the pitch, and store its inverse, which is what is used in fact. + fPitch = p1; if ( fPitch ) { diff --git a/MUON/AliMUONPixel.cxx b/MUON/AliMUONPixel.cxx index 86a6731d39e..b89c3ad50fd 100644 --- a/MUON/AliMUONPixel.cxx +++ b/MUON/AliMUONPixel.cxx @@ -15,11 +15,11 @@ /* $Id$ */ +// ------------------------------------- // Class AliMUONPixel // ------------------------------------- // Basic object of the cluster / rec. point finder based // on Expectation-Minimization approach (AZ cluster finder) -// // Author: Alexander Zinchenko, JINR Dubna #include "AliMUONPixel.h" @@ -30,7 +30,7 @@ ClassImp(AliMUONPixel) // Class implementation in ROOT context AliMUONPixel::AliMUONPixel() : TObject() { - // Default constructor +/// Default constructor fXY[0] = fXY[1] = fSize[0] = fSize[1] = fCharge = 0; fFlag = 0; } @@ -39,7 +39,7 @@ AliMUONPixel::AliMUONPixel() AliMUONPixel::AliMUONPixel(Double_t xc, Double_t yc, Double_t wx, Double_t wy, Double_t charge) : TObject() { - // Constructor +/// Constructor fXY[0] = xc; fXY[1] = yc; fSize[0] = wx; fSize[1] = wy; fCharge = charge; fFlag = 0; } @@ -47,15 +47,15 @@ AliMUONPixel::AliMUONPixel(Double_t xc, Double_t yc, Double_t wx, Double_t wy, D //_____________________________________________________________________________ AliMUONPixel::~AliMUONPixel() { - // Destructor +/// Destructor } //__________________________________________________________________________ Int_t AliMUONPixel::Compare(const TObject* pixel) const { - // "Compare" function to sort with decreasing pixel charge. - // Returns -1 (0, +1) if charge of current pixel - // is greater than (equal to, less than) charge of pixel +/// "Compare" function to sort with decreasing pixel charge. +/// Returns -1 (0, +1) if charge of current pixel +/// is greater than (equal to, less than) charge of pixel if (fCharge > ((AliMUONPixel*)pixel)->Charge()) return(-1); else if (fCharge == ((AliMUONPixel*)pixel)->Charge()) return( 0); else return(+1); @@ -64,6 +64,6 @@ Int_t AliMUONPixel::Compare(const TObject* pixel) const //__________________________________________________________________________ void AliMUONPixel::Print(const char* /*opt*/) const { - // Print function +/// Print function printf("%9.4f %9.4f %9.4f %9.4f %9.4f %1d\n", fXY[0], fXY[1], fSize[0], fSize[1], fCharge, fFlag); } diff --git a/MUON/AliMUONRawCluster.cxx b/MUON/AliMUONRawCluster.cxx index 6aa99865c34..967264ca7ee 100644 --- a/MUON/AliMUONRawCluster.cxx +++ b/MUON/AliMUONRawCluster.cxx @@ -15,11 +15,12 @@ /* $Id$ */ +// ------------------------- +// Class AliMUONRawCluster +// ------------------------- // Class for the MUON RecPoint // It contains the properties of the physics cluters found in the tracking chambers // RawCluster contains also the information from the both cathode of the chambers. -// -// #include @@ -31,7 +32,7 @@ ClassImp(AliMUONRawCluster) AliMUONRawCluster::AliMUONRawCluster() : TObject() { -// Constructor +/// Constructor fTracks[0]=fTracks[1]=fTracks[2]=-1; for (int j=0;j<2;j++) { fQ[j]=0; @@ -57,6 +58,8 @@ AliMUONRawCluster::AliMUONRawCluster() //____________________________________________________ Int_t AliMUONRawCluster::Compare(const TObject *obj) const { +/// Compare + /* AliMUONRawCluster *raw=(AliMUONRawCluster *)obj; Float_t r=GetRadius(); @@ -76,8 +79,8 @@ Int_t AliMUONRawCluster::Compare(const TObject *obj) const //____________________________________________________ Int_t AliMUONRawCluster::BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto) { - // Find object using a binary search. Array must first have been sorted. - // Search can be limited by setting upto to desired index. +/// Find object using a binary search. Array must first have been sorted. +/// Search can be limited by setting upto to desired index. Int_t low=from, high=upto-1, half; while(high-low>1) { @@ -90,10 +93,8 @@ Int_t AliMUONRawCluster::BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_ //____________________________________________________ void AliMUONRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Float_t *yarray,Float_t *qarray, Int_t ntr) { - // - // Get the 3 closest points(cog) one can find on the second cathode - // starting from a given cog on first cathode - // +/// Get the 3 closest points(cog) one can find on the second cathode +/// starting from a given cog on first cathode // // Loop over deltax, only 3 times @@ -151,7 +152,7 @@ void AliMUONRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Floa //____________________________________________________ Int_t AliMUONRawCluster::PhysicsContribution() const { -// Evaluate physics contribution to cluster +/// Evaluate physics contribution to cluster Int_t iPhys=0; Int_t iBg=0; Int_t iMixed=0; @@ -171,7 +172,7 @@ Int_t AliMUONRawCluster::PhysicsContribution() const //____________________________________________________ void AliMUONRawCluster::DumpIndex(void) { - // Dumping IdexMap of the cluster +/// Dumping IdexMap of the cluster printf ("-----\n"); for (Int_t icat=0;icat<2;icat++) { printf ("Mult %d\n",fMultiplicity[icat]); @@ -184,7 +185,7 @@ void AliMUONRawCluster::DumpIndex(void) //____________________________________________________ Int_t AliMUONRawCluster::AddCharge(Int_t i, Int_t Q) { - // Adding Q to the fQ value +/// Adding Q to the fQ value if (i==0 || i==1) { fQ[i]+=Q; return 1; @@ -194,7 +195,7 @@ Int_t AliMUONRawCluster::AddCharge(Int_t i, Int_t Q) //____________________________________________________ Int_t AliMUONRawCluster::AddX(Int_t i, Float_t X) { - // Adding X to the fX value +/// Adding X to the fX value if (i==0 || i==1) { fX[i]+=X; return 1; @@ -204,7 +205,7 @@ Int_t AliMUONRawCluster::AddX(Int_t i, Float_t X) //____________________________________________________ Int_t AliMUONRawCluster::AddY(Int_t i, Float_t Y) { - // Adding Y to the fY value +/// Adding Y to the fY value if (i==0 || i==1) { fY[i]+=Y; return 1; @@ -214,7 +215,7 @@ Int_t AliMUONRawCluster::AddY(Int_t i, Float_t Y) //____________________________________________________ Int_t AliMUONRawCluster::AddZ(Int_t i, Float_t Z) { - // Adding Z to the fZ value +/// Adding Z to the fZ value if (i==0 || i==1) { fZ[i]+=Z; return 1; @@ -224,82 +225,82 @@ Int_t AliMUONRawCluster::AddZ(Int_t i, Float_t Z) //____________________________________________________ Int_t AliMUONRawCluster::GetCharge(Int_t i) const { - // Getting the charge of the cluster +/// Getting the charge of the cluster if (i==0 || i==1) return fQ[i]; else return 99999; } //____________________________________________________ Float_t AliMUONRawCluster::GetX(Int_t i) const { - // Getting X value of the cluster +/// Getting X value of the cluster if (i==0 || i==1) return fX[i]; else return 99999.; } //____________________________________________________ Float_t AliMUONRawCluster::GetY(Int_t i) const { - // Getting Y value of the cluster +/// Getting Y value of the cluster if (i==0 || i==1) return fY[i]; else return 99999.; } //____________________________________________________ Float_t AliMUONRawCluster::GetZ(Int_t i) const { - // Getting Z value of the cluster +/// Getting Z value of the cluster if (i==0 || i==1) return fZ[i]; else return 99999.; } //____________________________________________________ Int_t AliMUONRawCluster::GetTrack(Int_t i) const { - // Getting track i contributing to the cluster +/// Getting track i contributing to the cluster if (i==0 || i==1 || i==2) return fTracks[i]; else return 99999; } //____________________________________________________ Int_t AliMUONRawCluster::GetPeakSignal(Int_t i) const { - // Getting cluster peaksignal +/// Getting cluster peaksignal if (i==0 || i==1 ) return fPeakSignal[i]; else return 99999; } //____________________________________________________ Int_t AliMUONRawCluster::GetMultiplicity(Int_t i) const { - // Getting cluster multiplicity +/// Getting cluster multiplicity if (i==0 || i==1 ) return fMultiplicity[i]; else return 99999; } //____________________________________________________ Int_t AliMUONRawCluster::GetClusterType() const { - // Getting Cluster Type +/// Getting Cluster Type return fClusterType; } //____________________________________________________ Int_t AliMUONRawCluster::GetGhost() const { - // Getting Ghost +/// Getting Ghost return fGhost; } //____________________________________________________ Int_t AliMUONRawCluster::GetNcluster(Int_t i) const { - // Getting number of clusters +/// Getting number of clusters if (i==0 || i==1 ) return fNcluster[i]; else return 99999; } //____________________________________________________ Float_t AliMUONRawCluster::GetChi2(Int_t i) const { - // Getting chi2 value of the cluster +/// Getting chi2 value of the cluster if (i==0 || i==1) return fChi2[i]; else return 99999.; } //____________________________________________________ Int_t AliMUONRawCluster::SetCharge(Int_t i, Int_t Q) { - // Setting Charge of the cluster +/// Setting Charge of the cluster if (i==0 || i==1) { fQ[i]=Q; return 1; @@ -309,7 +310,7 @@ Int_t AliMUONRawCluster::SetCharge(Int_t i, Int_t Q) //____________________________________________________ Int_t AliMUONRawCluster::SetX(Int_t i, Float_t X) { - // Setting X value of the cluster +/// Setting X value of the cluster if (i==0 || i==1) { fX[i]=X; return 1; @@ -319,7 +320,7 @@ Int_t AliMUONRawCluster::SetX(Int_t i, Float_t X) //____________________________________________________ Int_t AliMUONRawCluster::SetY(Int_t i, Float_t Y) { - // Setting Y value of the cluster +/// Setting Y value of the cluster if (i==0 || i==1) { fY[i]=Y; return 1; @@ -329,7 +330,7 @@ Int_t AliMUONRawCluster::SetY(Int_t i, Float_t Y) //____________________________________________________ Int_t AliMUONRawCluster::SetZ(Int_t i, Float_t Z) { - // Setting Z value of the cluste +/// Setting Z value of the cluste if (i==0 || i==1) { fZ[i]=Z; return 1; @@ -339,7 +340,7 @@ Int_t AliMUONRawCluster::SetZ(Int_t i, Float_t Z) //____________________________________________________ Int_t AliMUONRawCluster::SetTrack(Int_t i, Int_t track) { - // Setting tracks contributing to the cluster +/// Setting tracks contributing to the cluster if (i==0 || i==1 || i==2) { fTracks[i]=track; return 1; @@ -349,7 +350,7 @@ Int_t AliMUONRawCluster::SetTrack(Int_t i, Int_t track) //____________________________________________________ Int_t AliMUONRawCluster::SetPeakSignal(Int_t i, Int_t peaksignal) { - // Setting PeakSignal of the cluster +/// Setting PeakSignal of the cluster if (i==0 || i==1 ) { fPeakSignal[i]=peaksignal; return 1; @@ -359,7 +360,7 @@ Int_t AliMUONRawCluster::SetPeakSignal(Int_t i, Int_t peaksignal) //____________________________________________________ Int_t AliMUONRawCluster::SetMultiplicity(Int_t i, Int_t mul) { - // Setting multiplicity of the cluster +/// Setting multiplicity of the cluster if (i==0 || i==1 ) { fMultiplicity[i]=mul; return 1; @@ -369,21 +370,21 @@ Int_t AliMUONRawCluster::SetMultiplicity(Int_t i, Int_t mul) //____________________________________________________ Int_t AliMUONRawCluster::SetClusterType(Int_t type) { - // Setting the cluster type +/// Setting the cluster type fClusterType=type; return 1; } //____________________________________________________ Int_t AliMUONRawCluster::SetGhost(Int_t ghost) { - // Setting the ghost +/// Setting the ghost fGhost=ghost; return 1; } //____________________________________________________ Int_t AliMUONRawCluster::SetNcluster(Int_t i, Int_t ncluster) { - // Setting number the cluster +/// Setting number the cluster if (i==0 || i==1 ) { fNcluster[i]=ncluster; return 1; @@ -393,7 +394,7 @@ Int_t AliMUONRawCluster::SetNcluster(Int_t i, Int_t ncluster) //____________________________________________________ Int_t AliMUONRawCluster::SetChi2(Int_t i, Float_t chi2) { - // Setting chi2 of the cluster +/// Setting chi2 of the cluster if (i==0 || i==1) { fChi2[i]=chi2; return 1; diff --git a/MUON/AliMUONRawReader.cxx b/MUON/AliMUONRawReader.cxx index 3389bf3d18f..1d3e6a61fda 100644 --- a/MUON/AliMUONRawReader.cxx +++ b/MUON/AliMUONRawReader.cxx @@ -76,10 +76,10 @@ AliMUONRawReader::AliMUONRawReader(AliMUONData* data) : TObject(), fScalerEvent(kFALSE) { +// Standard Constructor + AliDebug(1,""); - // Standard Constructor - // initialize segmentation factory fSegFactory = new AliMpSegFactory(); @@ -140,6 +140,8 @@ AliMUONRawReader::operator=(const AliMUONRawReader& rhs) //__________________________________________________________________________ AliMUONRawReader::~AliMUONRawReader() { +// Destructor + delete fSegFactory; delete fDDLTracker; diff --git a/MUON/AliMUONRawWriter.cxx b/MUON/AliMUONRawWriter.cxx index eee209aa8b5..d18ae98e1bc 100644 --- a/MUON/AliMUONRawWriter.cxx +++ b/MUON/AliMUONRawWriter.cxx @@ -146,6 +146,8 @@ AliMUONRawWriter::operator=(const AliMUONRawWriter& rhs) //__________________________________________________________________________ AliMUONRawWriter::~AliMUONRawWriter(void) { +// Destructor + AliDebug(1,"dtor"); delete fSubEventArray; @@ -573,6 +575,7 @@ Int_t AliMUONRawWriter::GetBusPatch(const AliMUONDigit& digit) //____________________________________________________________________ Int_t AliMUONRawWriter::WriteTriggerDDL() { +// Write trigger DDL fTriggerTimer.Start(kFALSE); diff --git a/MUON/AliMUONRecoCheck.cxx b/MUON/AliMUONRecoCheck.cxx index 9b4d2a2a2f7..207a9c9fffd 100644 --- a/MUON/AliMUONRecoCheck.cxx +++ b/MUON/AliMUONRecoCheck.cxx @@ -13,14 +13,14 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -////////////////////////////////////////////////////////////////////////////////////// -// +/* $Id$ */ + +// ----------------------- +// Class AliMUONRecoCheck +// ----------------------- // Utility class to check the muon reconstruction. Reconstructed tracks are compared // to reference tracks. The reference tracks are built from AliTrackReference for the // hit in chamber (0..9) and from kinematics for the vertex parameters. -// -////////////////////////////////////////////////////////////////////////////////////// - #include @@ -43,7 +43,7 @@ ClassImp(AliMUONRecoCheck) //_____________________________________________________________________________ AliMUONRecoCheck::AliMUONRecoCheck(Char_t *chLoader) { -// Constructor +/// Constructor fMuonTrackRef = new TClonesArray("AliMUONTrack", 10); // open the run loader @@ -73,7 +73,7 @@ AliMUONRecoCheck::AliMUONRecoCheck(Char_t *chLoader) AliMUONRecoCheck::AliMUONRecoCheck(const AliMUONRecoCheck& rhs) : TObject(rhs) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } @@ -81,6 +81,8 @@ AliMUONRecoCheck::AliMUONRecoCheck(const AliMUONRecoCheck& rhs) //_____________________________________________________________________________ AliMUONRecoCheck::~AliMUONRecoCheck() { +/// Destructor + fRunLoader->UnloadKinematics(); fRunLoader->UnloadTrackRefs(); fRunLoader->UnloadTracks(); @@ -92,7 +94,7 @@ AliMUONRecoCheck::~AliMUONRecoCheck() //________________________________________________________________________ AliMUONRecoCheck& AliMUONRecoCheck::operator = (const AliMUONRecoCheck& rhs) { -// Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; @@ -104,7 +106,7 @@ AliMUONRecoCheck& AliMUONRecoCheck::operator = (const AliMUONRecoCheck& rhs) //_____________________________________________________________________________ void AliMUONRecoCheck::MakeTrackRef() { - // Make reconstructible tracks +/// Make reconstructible tracks AliTrackReference *trackReference; AliMUONTrack *muonTrack; @@ -244,7 +246,7 @@ void AliMUONRecoCheck::MakeTrackRef() //____________________________________________________________________________ TClonesArray* AliMUONRecoCheck::GetTrackReco() { - // Return TClonesArray of reconstructed tracks +/// Return TClonesArray of reconstructed tracks GetMUONData()->ResetRecTracks(); GetMUONData()->SetTreeAddress("RT"); @@ -256,7 +258,7 @@ TClonesArray* AliMUONRecoCheck::GetTrackReco() //_____________________________________________________________________________ void AliMUONRecoCheck::PrintEvent() const { - // debug facility +/// Debug facility AliMUONTrack *track; AliMUONHitForRec *hitForRec; @@ -286,14 +288,16 @@ void AliMUONRecoCheck::PrintEvent() const //_____________________________________________________________________________ void AliMUONRecoCheck::ResetTracks() const { +/// Reset tracks + if (fMuonTrackRef) fMuonTrackRef->Clear(); } //_____________________________________________________________________________ void AliMUONRecoCheck::CleanMuonTrackRef() { - // Re-calculate hits parameters because two AliTrackReferences are recorded for - // each chamber (one when particle is entering + one when particle is leaving - // the sensitive volume) +/// Re-calculate hits parameters because two AliTrackReferences are recorded for +/// each chamber (one when particle is entering + one when particle is leaving +/// the sensitive volume) Float_t maxGasGap = 1.; // cm AliMUONTrack *track, *trackNew; @@ -423,7 +427,7 @@ void AliMUONRecoCheck::CleanMuonTrackRef() //_____________________________________________________________________________ void AliMUONRecoCheck::ReconstructibleTracks() { - // calculate the number of reconstructible tracks +/// Calculate the number of reconstructible tracks AliMUONTrack* track; TClonesArray* hitForRecAtHit = NULL; diff --git a/MUON/AliMUONReconstructor.cxx b/MUON/AliMUONReconstructor.cxx index 2951114f96b..cba32116153 100644 --- a/MUON/AliMUONReconstructor.cxx +++ b/MUON/AliMUONReconstructor.cxx @@ -54,6 +54,8 @@ ClassImp(AliMUONReconstructor) AliMUONReconstructor::AliMUONReconstructor() : AliReconstructor(), fCalibrationData(0x0) { +/// Default constructor + AliDebug(1,""); } @@ -69,6 +71,8 @@ AliMUONReconstructor::AliMUONReconstructor(const AliMUONReconstructor& right) //_____________________________________________________________________________ AliMUONReconstructor::~AliMUONReconstructor() { +/// Destructor + AliDebug(1,""); delete fCalibrationData; } @@ -91,9 +95,7 @@ AliMUONReconstructor::operator=(const AliMUONReconstructor& right) TTask* AliMUONReconstructor::GetCalibrationTask(AliMUONData* data) const { - // - // Create the calibration task(s). - // +/// Create the calibration task(s). const AliRun* run = fRunLoader->GetAliRun(); @@ -129,13 +131,17 @@ AliMUONReconstructor::GetCalibrationTask(AliMUONData* data) const void AliMUONReconstructor::Init(AliRunLoader* runLoader) { +/// Initialize + fRunLoader = runLoader; } //_____________________________________________________________________________ void AliMUONReconstructor::Reconstruct(AliRunLoader* runLoader) const { -// AliLoader +/// Reconstruct +/// \todo add more + AliLoader* loader = runLoader->GetLoader("MUONLoader"); Int_t nEvents = runLoader->GetNumberOfEvents(); @@ -265,6 +271,9 @@ void AliMUONReconstructor::Reconstruct(AliRunLoader* runLoader) const //_____________________________________________________________________________ void AliMUONReconstructor::Reconstruct(AliRunLoader* runLoader, AliRawReader* rawReader) const { +/// Recontruct +/// \todo add more + // AliLoader AliLoader* loader = runLoader->GetLoader("MUONLoader"); AliMUONData data(loader,"MUON","MUON"); @@ -413,6 +422,9 @@ void AliMUONReconstructor::Reconstruct(AliRunLoader* runLoader, AliRawReader* ra //_____________________________________________________________________________ void AliMUONReconstructor::FillESD(AliRunLoader* runLoader, AliESD* esd) const { +/// Fill ESD +/// \todo add more + TClonesArray* recTracksArray = 0; TClonesArray* recTrigTracksArray = 0; @@ -546,6 +558,9 @@ void AliMUONReconstructor::FillESD(AliRunLoader* runLoader, AliESD* esd) const }//_____________________________________________________________________________ void AliMUONReconstructor::FillESD(AliRunLoader* runLoader, AliRawReader* /*rawReader*/, AliESD* esd) const { +/// Fill ESD +/// \todo add more + // don't need rawReader ??? FillESD(runLoader, esd); } diff --git a/MUON/AliMUONResponse.cxx b/MUON/AliMUONResponse.cxx index f99c4724532..6745beb0241 100644 --- a/MUON/AliMUONResponse.cxx +++ b/MUON/AliMUONResponse.cxx @@ -15,6 +15,12 @@ /* $Id$ */ +// ------------------------- +// Class AliMUONResponse +// ------------------------- +// Chamber response base class +// ... + #include "AliMUONResponse.h" #include "AliLog.h" @@ -25,19 +31,21 @@ ClassImp(AliMUONResponse) AliMUONResponse::AliMUONResponse() : TObject() { -// Default constructor +/// Default constructor } AliMUONResponse::~AliMUONResponse() { -// Destructor +/// Destructor } //_____________________________________________________________________________ void AliMUONResponse::DisIntegrate(const AliMUONHit&, TList& digits) { +/// Not implemented disintegration + digits.Clear(); AliError("Not implemented in this base class"); } diff --git a/MUON/AliMUONResponseFactory.cxx b/MUON/AliMUONResponseFactory.cxx index e2c22de468d..37bdedfecc5 100644 --- a/MUON/AliMUONResponseFactory.cxx +++ b/MUON/AliMUONResponseFactory.cxx @@ -13,9 +13,11 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -//////////////////////////////////////////////////////////// -// Factory for muon response // -//////////////////////////////////////////////////////////// +// ----------------------------- +// Class AliMUONResponseFactory +// ----------------------------- +// Factory for muon response +// Class separated from AliMUONFactoryV4 /* $Id$ */ @@ -39,7 +41,9 @@ ClassImp(AliMUONResponseFactory) : TNamed(name, ""), fMUON(0), fResponse0(0) -{ +{ +/// Standard constructor + AliDebug(1,Form("ctor this=%p",this)); } @@ -49,15 +53,16 @@ ClassImp(AliMUONResponseFactory) fMUON(0), fResponse0(0) { +/// Default constructor + AliDebug(1,Form("default (empty) ctor this=%p",this)); -// Default constructor } //__________________________________________________________________________ AliMUONResponseFactory::AliMUONResponseFactory(const AliMUONResponseFactory& rhs) : TNamed(rhs) { - // Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } @@ -66,14 +71,14 @@ AliMUONResponseFactory::AliMUONResponseFactory(const AliMUONResponseFactory& rhs AliMUONResponseFactory::~AliMUONResponseFactory() { -// Destructor +/// Destructor AliDebug(1,Form("dtor this=%p",this)); } //__________________________________________________________________________ AliMUONResponseFactory& AliMUONResponseFactory::operator=(const AliMUONResponseFactory& rhs) { - // Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; @@ -85,9 +90,7 @@ AliMUONResponseFactory& AliMUONResponseFactory::operator=(const AliMUONResponse //__________________________________________________________________________ void AliMUONResponseFactory::BuildCommon() { - // - // Construct the default response. - // +/// Construct the default response. // Default response: 5 mm of gas fResponse0 = new AliMUONResponseV0; @@ -189,7 +192,7 @@ void AliMUONResponseFactory::BuildStation6() //__________________________________________________________________________ void AliMUONResponseFactory::Build(AliMUON* where) { -// Construct MUON responses +/// Construct MUON responses fMUON = where; @@ -211,7 +214,7 @@ void AliMUONResponseFactory::Build(AliMUON* where) //__________________________________________________________________________ void AliMUONResponseFactory::BuildStation(AliMUON* where, Int_t stationNumber) { -// Construct MUON responses +/// Construct MUON responses for given station fMUON = where; if (!fResponse0) BuildCommon(); diff --git a/MUON/AliMUONResponseV0.cxx b/MUON/AliMUONResponseV0.cxx index c0ad5c0f855..1828361019d 100644 --- a/MUON/AliMUONResponseV0.cxx +++ b/MUON/AliMUONResponseV0.cxx @@ -15,6 +15,11 @@ /* $Id$ */ +// -------------------------- +// Class AliMUONResponseV0 +// -------------------------- +// Implementation of Mathieson response +// ... #include "AliMUONResponseV0.h" @@ -111,6 +116,8 @@ AliMUONResponseV0& AliMUONResponseV0::operator = (const AliMUONResponseV0& rhs) void AliMUONResponseV0::Print(Option_t*) const { +// Printing + cout << " ChargeSlope=" << fChargeSlope << " ChargeSpreadX,Y=" << fChargeSpreadX << fChargeSpreadY diff --git a/MUON/AliMUONSt345SlatSegmentation.cxx b/MUON/AliMUONSt345SlatSegmentation.cxx index ae16aefb12a..ff892e860e0 100644 --- a/MUON/AliMUONSt345SlatSegmentation.cxx +++ b/MUON/AliMUONSt345SlatSegmentation.cxx @@ -123,6 +123,7 @@ AliMUONSt345SlatSegmentation::AliMUONSt345SlatSegmentation(const AliMUONSt345Sla fIymin(0), fIymax(0) { +// Copy constructor AliFatal("Not implemented"); } //---------------------------------------------------------------------- @@ -179,6 +180,8 @@ Float_t AliMUONSt345SlatSegmentation::GetAnod(Float_t xhit) const //_____________________________________________________________________________ Bool_t AliMUONSt345SlatSegmentation::HasPad(Int_t ix, Int_t iy) { +// Return true if pas with given indices exists + if ( ix < 1 || ix > Npx() || iy < 1 || iy > Npy() ) { return kFALSE; @@ -198,13 +201,14 @@ Bool_t AliMUONSt345SlatSegmentation::HasPad(Int_t ix, Int_t iy) //-------------------------------------------------------------------------------- void AliMUONSt345SlatSegmentation::GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y) { + // Returns real coordinates (x,y) for given pad coordinates (ix,iy) + if (ix < 1 || ix > Npx() || iy < 1 || iy > Npy() ){ AliWarning(Form("ix %d or iy %d out of boundaries: Npx=%d and Npy=%d",ix, iy, Npx(), Npy())); x = y= 0.; } else { - // Returns real coordinates (x,y) for given pad coordinates (ix,iy) // Find sector isec Int_t isec = Sector(ix,iy); if (isec == -1) AliWarning(Form("isector = %d with ix %d, iy %d", isec, ix, iy)); @@ -253,6 +257,8 @@ void AliMUONSt345SlatSegmentation::GetPadI(Float_t x, Float_t y, Int_t &ix, Int_ //------------------------------------------------------------------------- void AliMUONSt345SlatSegmentation::GetPadI(Float_t x, Float_t y , Float_t /*z*/, Int_t &ix, Int_t &iy) { +// Returns pad coordinates (ix,iy) for given real coordinates (x,y) + GetPadI(x, y, ix, iy); } @@ -316,6 +322,8 @@ void AliMUONSt345SlatSegmentation::SetHit(Float_t x, Float_t y) //---------------------------------------------------------------------------- void AliMUONSt345SlatSegmentation::SetHit(Float_t xhit, Float_t yhit, Float_t /*zhit*/) { + // Set current hit + SetHit(xhit, yhit); } @@ -387,6 +395,8 @@ void AliMUONSt345SlatSegmentation::FirstPad(Float_t xhit, Float_t yhit, Float_t //---------------------------------------------------------------------- void AliMUONSt345SlatSegmentation::FirstPad(Float_t xhit, Float_t yhit, Float_t /*zhit*/, Float_t dx, Float_t dy) { +// Initialises iteration over pads for charge distribution algorithm + FirstPad(xhit, yhit, dx, dy); } //---------------------------------------------------------------------- diff --git a/MUON/AliMUONSt345SlatSegmentationV2.cxx b/MUON/AliMUONSt345SlatSegmentationV2.cxx index fd89e9d0beb..a5372731c5d 100644 --- a/MUON/AliMUONSt345SlatSegmentationV2.cxx +++ b/MUON/AliMUONSt345SlatSegmentationV2.cxx @@ -15,13 +15,6 @@ /* $Id$ */ -// ------------------------------------- -// Class AliMUONSt345SlatSegmentation -// ------------------------------------- -// Segmentation for MUON slat stations using -// the mapping package - - #include "AliMUONSt345SlatSegmentationV2.h" #include "AliMUONConstants.h" diff --git a/MUON/AliMUONTrackHit.cxx b/MUON/AliMUONTrackHit.cxx index 5d03a89d420..88c62550d72 100644 --- a/MUON/AliMUONTrackHit.cxx +++ b/MUON/AliMUONTrackHit.cxx @@ -35,7 +35,8 @@ ClassImp(AliMUONTrackHit) // Class implementation in ROOT context AliMUONTrackHit::AliMUONTrackHit() : TObject() { - // Default constructor +/// Default constructor + fHitForRecPtr = 0; fNextTrackHitWithSameHitForRec = 0; fPrevTrackHitWithSameHitForRec = 0; @@ -44,6 +45,8 @@ AliMUONTrackHit::AliMUONTrackHit() AliMUONTrackHit::AliMUONTrackHit (const AliMUONTrackHit& theMUONTrackHit) : TObject(theMUONTrackHit) { +/// Copy constructor + fTrackParam = theMUONTrackHit.fTrackParam; fHitForRecPtr = theMUONTrackHit.fHitForRecPtr; fNextTrackHitWithSameHitForRec = theMUONTrackHit.fNextTrackHitWithSameHitForRec; @@ -52,6 +55,8 @@ AliMUONTrackHit::AliMUONTrackHit (const AliMUONTrackHit& theMUONTrackHit) //__________________________________________________________________________ AliMUONTrackHit & AliMUONTrackHit::operator=(const AliMUONTrackHit& theMUONTrackHit) { +/// Assignment operator + // check assignement to self if (this == &theMUONTrackHit) return *this; @@ -70,7 +75,8 @@ AliMUONTrackHit & AliMUONTrackHit::operator=(const AliMUONTrackHit& theMUONTrack //__________________________________________________________________________ AliMUONTrackHit::AliMUONTrackHit(AliMUONHitForRec* Hit) { - // Constructor from the HitForRec pointed to by "Hit" +/// Constructor from the HitForRec pointed to by "Hit" + fHitForRecPtr = Hit; // pointer to HitForRec // links from/to HitForRec if (Hit->GetNTrackHits() == 0) { @@ -88,9 +94,10 @@ AliMUONTrackHit::AliMUONTrackHit(AliMUONHitForRec* Hit) //__________________________________________________________________________ AliMUONTrackHit::~AliMUONTrackHit() { - // Destructor - // Update links between HitForRec's and TrackHit's - // connected to the current TrackHit being removed. +/// Destructor +/// Update links between HitForRec's and TrackHit's +/// connected to the current TrackHit being removed. + AliMUONHitForRec *hit = fHitForRecPtr; // pointer to HitForRec // remove current TrackHit in HitForRec links if (this == hit->GetFirstTrackHitPtr()) @@ -114,9 +121,10 @@ AliMUONTrackHit::~AliMUONTrackHit() //__________________________________________________________________________ Int_t AliMUONTrackHit::Compare(const TObject* TrackHit) const { - // "Compare" function to sort with decreasing Z (spectro. muon Z <0). - // Returns 1 (0, -1) if Z of current TrackHit - // is smaller than (equal to, larger than) Z of TrackHit +/// "Compare" function to sort with decreasing Z (spectro. muon Z <0). +/// Returns 1 (0, -1) if Z of current TrackHit +/// is smaller than (equal to, larger than) Z of TrackHit + if (fHitForRecPtr->GetZ() < ((AliMUONTrackHit*)TrackHit)->fHitForRecPtr->GetZ()) return(1); else if (fHitForRecPtr->GetZ() == diff --git a/MUON/AliMUONTrackK.cxx b/MUON/AliMUONTrackK.cxx index c9e3f2646c3..a1812c123fd 100644 --- a/MUON/AliMUONTrackK.cxx +++ b/MUON/AliMUONTrackK.cxx @@ -15,11 +15,11 @@ /* $Id$ */ +// --------------------- // Class AliMUONTrackK -// ------------------------------------- +// --------------------- // Reconstructed track in the muons system based on the extended // Kalman filter approach -// // Author: Alexander Zinchenko, JINR Dubna #include @@ -62,7 +62,7 @@ AliMUONTrackK::AliMUONTrackK() //AZ: TObject() : AliMUONTrack() { - // Default constructor +/// Default constructor fgTrackReconstructor = NULL; // pointer to event reconstructor fgHitForRec = NULL; // pointer to points @@ -88,7 +88,7 @@ AliMUONTrackK::AliMUONTrackK() AliMUONTrackK::AliMUONTrackK(AliMUONTrackReconstructor *TrackReconstructor, TClonesArray *hitForRec) : AliMUONTrack() { - // Constructor +/// Constructor if (!TrackReconstructor) return; fgTrackReconstructor = TrackReconstructor; // pointer to event reconstructor @@ -117,7 +117,7 @@ AliMUONTrackK::AliMUONTrackK(AliMUONSegment *segment) //: AliMUONTrack(segment, segment, fgTrackReconstructor) : AliMUONTrack(NULL, segment, fgTrackReconstructor) { - // Constructor from a segment +/// Constructor from a segment Double_t dX, dY, dZ; AliMUONHitForRec *hit1, *hit2; AliMUONRawCluster *clus; @@ -212,7 +212,7 @@ AliMUONTrackK::AliMUONTrackK(AliMUONSegment *segment) //__________________________________________________________________________ AliMUONTrackK::~AliMUONTrackK() { - // Destructor +/// Destructor if (fTrackHits) { //cout << fNmbTrackHits << endl; @@ -296,14 +296,15 @@ AliMUONTrackK::~AliMUONTrackK() AliMUONTrackK::AliMUONTrackK (const AliMUONTrackK& source) : AliMUONTrack(source) { -// Protected copy constructor +/// Protected copy constructor AliFatal("Not implemented."); } //__________________________________________________________________________ AliMUONTrackK & AliMUONTrackK::operator=(const AliMUONTrackK& source) { - // Assignment operator +/// Assignment operator + // Members if(&source == this) return *this; @@ -361,7 +362,7 @@ AliMUONTrackK & AliMUONTrackK::operator=(const AliMUONTrackK& source) //__________________________________________________________________________ void AliMUONTrackK::EvalCovariance(Double_t dZ) { - // Evaluate covariance (and weight) matrix for track candidate +/// Evaluate covariance (and weight) matrix for track candidate Double_t sigmaB, sigmaNonB, tanA, tanB, dAdY, rad, dBdX, dBdY; dZ = -dZ; @@ -403,7 +404,7 @@ void AliMUONTrackK::EvalCovariance(Double_t dZ) //__________________________________________________________________________ Bool_t AliMUONTrackK::KalmanFilter(Int_t ichamBeg, Int_t ichamEnd, Bool_t Back, Double_t zDipole1, Double_t zDipole2) { - // Follows track through detector stations +/// Follows track through detector stations Bool_t miss, success; Int_t ichamb, iFB, iMin, iMax, dChamb, ichambOK; Int_t ihit, firstIndx = -1, lastIndx = -1, currIndx = -1, iz0 = -1, iz = -1; @@ -663,7 +664,7 @@ Bool_t AliMUONTrackK::KalmanFilter(Int_t ichamBeg, Int_t ichamEnd, Bool_t Back, //__________________________________________________________________________ void AliMUONTrackK::ParPropagation(Double_t zEnd) { - // Propagation of track parameters to zEnd +/// Propagation of track parameters to zEnd Int_t iFB, nTries; Double_t dZ, step, distance, charge; Double_t vGeant3[7], vGeant3New[7]; @@ -724,8 +725,8 @@ void AliMUONTrackK::ParPropagation(Double_t zEnd) //__________________________________________________________________________ void AliMUONTrackK::WeightPropagation(Double_t zEnd, Bool_t smooth) { - // Propagation of the weight matrix - // W = DtWD, where D is Jacobian +/// Propagation of the weight matrix +/// W = DtWD, where D is Jacobian Int_t i, j; Double_t dPar; @@ -810,8 +811,8 @@ void AliMUONTrackK::WeightPropagation(Double_t zEnd, Bool_t smooth) //__________________________________________________________________________ Bool_t AliMUONTrackK::FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int_t iFB, AliMUONHitForRec *&hitAdd, Int_t iz) { - // Picks up point within a window for the chamber No ichamb - // Split the track if there are more than 1 hit +/// Picks up point within a window for the chamber No ichamb +/// Split the track if there are more than 1 hit Int_t ihit, nRecTracks; Double_t windowB, windowNonB, dChi2Tmp=0, dChi2, y, x, savePosition=0; TClonesArray *trackPtr; @@ -1061,8 +1062,8 @@ Bool_t AliMUONTrackK::FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int //__________________________________________________________________________ void AliMUONTrackK::TryPoint(TMatrixD &point, const TMatrixD &pointWeight, TMatrixD &trackParTmp, Double_t &dChi2) { - // Adds a measurement point (modifies track parameters and computes - // change of Chi2) +/// Adds a measurement point (modifies track parameters and computes +/// change of Chi2) // Solving linear system (W+U)p' = U(m-p) + (W+U)p TMatrixD wu = *fWeight; @@ -1099,7 +1100,7 @@ void AliMUONTrackK::TryPoint(TMatrixD &point, const TMatrixD &pointWeight, TMatr //__________________________________________________________________________ void AliMUONTrackK::MSThin(Int_t sign) { - // Adds multiple scattering in a thin layer (only angles are affected) +/// Adds multiple scattering in a thin layer (only angles are affected) Double_t cosAlph, cosBeta, momentum, velo, path, theta0; // check whether the Invert method returns flag if matrix cannot be inverted, @@ -1129,7 +1130,7 @@ void AliMUONTrackK::MSThin(Int_t sign) //__________________________________________________________________________ void AliMUONTrackK::StartBack(void) { - // Starts backpropagator +/// Starts backpropagator fBPFlag = kTRUE; fChi2 = 0; @@ -1147,8 +1148,8 @@ void AliMUONTrackK::StartBack(void) //__________________________________________________________________________ void AliMUONTrackK::SortHits(Int_t iflag, TObjArray *array) { - // Sort hits in Z if the seed segment in the last but one station - // (if iflag==0 in descending order in abs(z), if !=0 - unsort) +/// Sort hits in Z if the seed segment in the last but one station +/// (if iflag==0 in descending order in abs(z), if !=0 - unsort) if (iflag && ((AliMUONHitForRec*)(array->UncheckedAt(0)))->GetChamberNumber() == 6) return; Double_t z = 0, zmax = TMath::Abs(((AliMUONHitForRec*)(array->UncheckedAt(0)))->GetZ()); @@ -1179,8 +1180,8 @@ void AliMUONTrackK::SortHits(Int_t iflag, TObjArray *array) //__________________________________________________________________________ void AliMUONTrackK::SetGeantParam(Double_t *VGeant3, Int_t iFB) { - // Set vector of Geant3 parameters pointed to by "VGeant3" - // from track parameters +/// Set vector of Geant3 parameters pointed to by "VGeant3" +/// from track parameters VGeant3[0] = (*fTrackParNew)(1,0); // X VGeant3[1] = (*fTrackParNew)(0,0); // Y @@ -1194,8 +1195,8 @@ void AliMUONTrackK::SetGeantParam(Double_t *VGeant3, Int_t iFB) //__________________________________________________________________________ void AliMUONTrackK::GetFromGeantParam(Double_t *VGeant3, Int_t iFB) { - // Get track parameters from vector of Geant3 parameters pointed - // to by "VGeant3" +/// Get track parameters from vector of Geant3 parameters pointed +/// to by "VGeant3" fPositionNew = VGeant3[2]; // Z (*fTrackParNew)(0,0) = VGeant3[1]; // Y @@ -1208,7 +1209,7 @@ void AliMUONTrackK::GetFromGeantParam(Double_t *VGeant3, Int_t iFB) //__________________________________________________________________________ void AliMUONTrackK::SetTrackQuality(Int_t iChi2) { - // Computes "track quality" from Chi2 (if iChi2==0) or vice versa +/// Computes "track quality" from Chi2 (if iChi2==0) or vice versa if (fChi2 > 500) { AliWarning(Form(" *** Too high Chi2: %f ", fChi2)); @@ -1221,9 +1222,9 @@ void AliMUONTrackK::SetTrackQuality(Int_t iChi2) //__________________________________________________________________________ Int_t AliMUONTrackK::Compare(const TObject* trackK) const { - // "Compare" function to sort with decreasing "track quality". - // Returns +1 (0, -1) if quality of current track - // is smaller than (equal to, larger than) quality of trackK +/// "Compare" function to sort with decreasing "track quality". +/// Returns +1 (0, -1) if quality of current track +/// is smaller than (equal to, larger than) quality of trackK if (fChi2 < ((AliMUONTrackK*)trackK)->fChi2) return(+1); else if (fChi2 == ((AliMUONTrackK*)trackK)->fChi2) return(0); @@ -1233,8 +1234,8 @@ Int_t AliMUONTrackK::Compare(const TObject* trackK) const //__________________________________________________________________________ Bool_t AliMUONTrackK::KeepTrack(AliMUONTrackK* track0) const { - // Check whether or not to keep current track - // (keep, if it has less than half of common hits with track0) +/// Check whether or not to keep current track +/// (keep, if it has less than half of common hits with track0) Int_t hitsInCommon, nHits0, i, j, nTrackHits2; AliMUONHitForRec *hit0, *hit1; @@ -1262,14 +1263,14 @@ Bool_t AliMUONTrackK::KeepTrack(AliMUONTrackK* track0) const //__________________________________________________________________________ void AliMUONTrackK::Kill(void) { - // Kill track candidate +/// Kill track candidate fgTrackReconstructor->GetRecTracksPtr()->Remove(this); } //__________________________________________________________________________ void AliMUONTrackK::FillMUONTrack(void) { - // Compute track parameters at hit positions (as for AliMUONTrack) +/// Compute track parameters at hit positions (as for AliMUONTrack) // Set number of hits per track SetNTrackHits(fNmbTrackHits); @@ -1299,7 +1300,7 @@ void AliMUONTrackK::FillMUONTrack(void) //__________________________________________________________________________ void AliMUONTrackK::SetTrackParam(AliMUONTrackParam *trackParam, TMatrixD *par, Double_t z) { - // Fill AliMUONTrackParam object +/// Fill AliMUONTrackParam object trackParam->SetBendingCoor((*par)(0,0)); trackParam->SetNonBendingCoor((*par)(1,0)); @@ -1312,8 +1313,8 @@ void AliMUONTrackK::SetTrackParam(AliMUONTrackParam *trackParam, TMatrixD *par, //__________________________________________________________________________ void AliMUONTrackK::Branson(void) { - // Propagates track to the vertex thru absorber using Branson correction - // (makes use of the AliMUONTrackParam class) +/// Propagates track to the vertex thru absorber using Branson correction +/// (makes use of the AliMUONTrackParam class) //AliMUONTrackParam *trackParam = new AliMUONTrackParam(); AliMUONTrackParam trackParam = AliMUONTrackParam(); @@ -1352,7 +1353,7 @@ void AliMUONTrackK::Branson(void) //__________________________________________________________________________ void AliMUONTrackK::GoToZ(Double_t zEnd) { - // Propagates track to given Z +/// Propagates track to given Z ParPropagation(zEnd); MSThin(1); // multiple scattering in the chamber @@ -1364,9 +1365,9 @@ void AliMUONTrackK::GoToZ(Double_t zEnd) //__________________________________________________________________________ void AliMUONTrackK::GoToVertex(Int_t iflag) { - // Version 3.08 - // Propagates track to the vertex - // All material constants are taken from AliRoot +/// Version 3.08 +/// Propagates track to the vertex +/// All material constants are taken from AliRoot static Double_t x01[5] = { 24.282, // C 24.282, // C @@ -1594,7 +1595,7 @@ vertex: //__________________________________________________________________________ void AliMUONTrackK::MSLine(Double_t dZ, Double_t x0) { - // Adds multiple scattering in a thick layer for linear propagation +/// Adds multiple scattering in a thick layer for linear propagation Double_t cosAlph = TMath::Cos((*fTrackPar)(2,0)); Double_t tanAlph = TMath::Tan((*fTrackPar)(2,0)); @@ -1667,7 +1668,7 @@ void AliMUONTrackK::MSLine(Double_t dZ, Double_t x0) //__________________________________________________________________________ Bool_t AliMUONTrackK::Recover(void) { - // Adds new failed track(s) which can be tried to be recovered +/// Adds new failed track(s) which can be tried to be recovered Int_t nRecTracks; TClonesArray *trackPtr; AliMUONTrackK *trackK; @@ -1791,8 +1792,8 @@ Bool_t AliMUONTrackK::Recover(void) //__________________________________________________________________________ void AliMUONTrackK::AddMatrices(AliMUONTrackK *trackK, Double_t dChi2, AliMUONHitForRec *hitAdd) { - // Adds matrices for the smoother and keep Chi2 for the point - // Track parameters +/// Adds matrices for the smoother and keep Chi2 for the point +/// Track parameters //trackK->fParFilter->Last()->Print(); Int_t iD = trackK->fParFilter->Last()->GetUniqueID(); if (iD > 1) { @@ -1836,7 +1837,7 @@ void AliMUONTrackK::AddMatrices(AliMUONTrackK *trackK, Double_t dChi2, AliMUONHi //__________________________________________________________________________ void AliMUONTrackK::CreateMatrix(TObjArray *objArray) const { - // Create new matrix and add it to TObjArray +/// Create new matrix and add it to TObjArray TMatrixD *matrix = (TMatrixD*) objArray->First(); TMatrixD *tmp = new TMatrixD(*matrix); @@ -1847,7 +1848,7 @@ void AliMUONTrackK::CreateMatrix(TObjArray *objArray) const //__________________________________________________________________________ void AliMUONTrackK::RemoveMatrices(Double_t zEnd) { - // Remove matrices (and saved steps) in the smoother part with abs(z) < abs(zEnd) +/// Remove matrices (and saved steps) in the smoother part with abs(z) < abs(zEnd) for (Int_t i=fNSteps-1; i>=0; i--) { if (fgDebug > 1) printf("%10.4f %10.4f \n", (*fSteps)[i], zEnd); @@ -1859,7 +1860,7 @@ void AliMUONTrackK::RemoveMatrices(Double_t zEnd) //__________________________________________________________________________ void AliMUONTrackK::RemoveMatrices(AliMUONTrackK* trackK) { - // Remove last saved matrices and steps in the smoother part +/// Remove last saved matrices and steps in the smoother part trackK->fNSteps--; Int_t i = trackK->fNSteps; @@ -1901,7 +1902,7 @@ void AliMUONTrackK::RemoveMatrices(AliMUONTrackK* trackK) //__________________________________________________________________________ Bool_t AliMUONTrackK::Smooth(void) { - // Apply smoother +/// Apply smoother Int_t ihit = fNmbTrackHits - 1; AliMUONHitForRec *hit = (AliMUONHitForRec*) (*fTrackHits)[ihit]; fChi2Smooth = new TArrayD(fNmbTrackHits); @@ -2035,7 +2036,7 @@ L33: //__________________________________________________________________________ void AliMUONTrackK::Outlier() { - // Adds new track with removed hit having the highest chi2 +/// Adds new track with removed hit having the highest chi2 if (fgDebug > 0) { cout << " ******** Enter Outlier " << endl; @@ -2141,7 +2142,7 @@ void AliMUONTrackK::Outlier() //__________________________________________________________________________ Double_t AliMUONTrackK::GetChi2PerPoint(Int_t iPoint) const { - // Return Chi2 at point +/// Return Chi2 at point return fChi2Smooth ? (*fChi2Smooth)[iPoint] : (*fChi2Array)[iPoint]; //return 0.; } @@ -2149,7 +2150,7 @@ Double_t AliMUONTrackK::GetChi2PerPoint(Int_t iPoint) const //__________________________________________________________________________ void AliMUONTrackK::Print(FILE *lun) const { - // Print out track information +/// Print out track information Int_t flag = 1; AliMUONHitForRec *hit = 0; @@ -2212,7 +2213,7 @@ void AliMUONTrackK::Print(FILE *lun) const //__________________________________________________________________________ void AliMUONTrackK::DropBranches(Int_t imax, TObjArray *hits) { - // Drop branches downstream of the skipped hit +/// Drop branches downstream of the skipped hit Int_t nRecTracks; TClonesArray *trackPtr; AliMUONTrackK *trackK; @@ -2258,7 +2259,7 @@ void AliMUONTrackK::DropBranches(Int_t imax, TObjArray *hits) //__________________________________________________________________________ void AliMUONTrackK::DropBranches(AliMUONSegment *segment) { - // Drop all candidates with the same seed segment +/// Drop all candidates with the same seed segment Int_t nRecTracks; TClonesArray *trackPtr; AliMUONTrackK *trackK; @@ -2279,7 +2280,7 @@ void AliMUONTrackK::DropBranches(AliMUONSegment *segment) //__________________________________________________________________________ AliMUONHitForRec* AliMUONTrackK::GetHitLastOk(void) { - // Return the hit where track stopped +/// Return the hit where track stopped if (!fNSteps) return (AliMUONHitForRec*)((*fTrackHits)[1]); return fSkipHit; @@ -2288,14 +2289,14 @@ AliMUONHitForRec* AliMUONTrackK::GetHitLastOk(void) //__________________________________________________________________________ Int_t AliMUONTrackK::GetStation0(void) { - // Return seed station number +/// Return seed station number return fStartSegment->GetHitForRec1()->GetChamberNumber() / 2; } //__________________________________________________________________________ Bool_t AliMUONTrackK::ExistDouble(AliMUONHitForRec *hit) { - // Check if the track will make a double after outlier removal +/// Check if the track will make a double after outlier removal TClonesArray *trackPtr = fgTrackReconstructor->GetRecTracksPtr(); Int_t nRecTracks = fgTrackReconstructor->GetNRecTracks(); @@ -2348,7 +2349,7 @@ Bool_t AliMUONTrackK::ExistDouble(AliMUONHitForRec *hit) //__________________________________________________________________________ Bool_t AliMUONTrackK::ExistDouble(void) { - // Check if the track will make a double after recovery +/// Check if the track will make a double after recovery TClonesArray *trackPtr = fgTrackReconstructor->GetRecTracksPtr(); Int_t nRecTracks = fgTrackReconstructor->GetNRecTracks(); diff --git a/MUON/AliMUONTransientDigit.cxx b/MUON/AliMUONTransientDigit.cxx index cfeced6d05c..a6f78c6f30e 100644 --- a/MUON/AliMUONTransientDigit.cxx +++ b/MUON/AliMUONTransientDigit.cxx @@ -15,6 +15,12 @@ /* $Id$ */ +// ------------------------------ +// Class AliMUONTransientDigit +// ------------------------------ +// MUON transient digit +// Extends AliMUONDigit with a list of contributing tracks + #include #include @@ -29,14 +35,14 @@ AliMUONTransientDigit::AliMUONTransientDigit() : fChamber(0), fTrackList(0) { - // Default constructor +/// Default constructor } //____________________________________________________________________________ AliMUONTransientDigit::AliMUONTransientDigit(const AliMUONTransientDigit& digit) : AliMUONDigit(digit) { -// Protected copy constructor +/// Protected copy constructor AliFatal( "Not implemented."); } @@ -48,14 +54,14 @@ AliMUONTransientDigit::AliMUONTransientDigit(Int_t ich, Int_t *digits) : fTrackList(new TObjArray(5)) // 5 is arbitrary number, just to decrease default 16 { - // - // Creates a MUON digit list object - // +/// Creates a MUON digit list object } //////////////////////////////////////////////////////////////////////// AliMUONTransientDigit::~AliMUONTransientDigit() { +/// Destructor + fTrackList->Delete(); delete fTrackList; } @@ -64,7 +70,7 @@ AliMUONTransientDigit::~AliMUONTransientDigit() AliMUONTransientDigit& AliMUONTransientDigit::operator =(const AliMUONTransientDigit& rhs) { -// Protected assignement operator +/// Protected assignement operator if (this == &rhs) return *this; diff --git a/MUON/AliMUONTriggerSegmentation.cxx b/MUON/AliMUONTriggerSegmentation.cxx index 695710185a4..3f455e29d86 100644 --- a/MUON/AliMUONTriggerSegmentation.cxx +++ b/MUON/AliMUONTriggerSegmentation.cxx @@ -47,6 +47,8 @@ AliMUONTriggerSegmentation::AliMUONTriggerSegmentation() fRpcHalfXsize(0), fRpcHalfYsize(0) { +// Default constructor + // add to St345SlatSegmentation for (Int_t i=0; i<7; i++) { fNstrip[i]=0; @@ -97,6 +99,8 @@ AliMUONTriggerSegmentation::AliMUONTriggerSegmentation(Bool_t bending) //---------------------------------------------------------------------- AliMUONTriggerSegmentation::AliMUONTriggerSegmentation(const AliMUONTriggerSegmentation& rhs) : AliMUONVGeometryDESegmentation(rhs) { +// Copy constructor + AliFatal("Not implemented."); } //---------------------------------------------------------------------- @@ -273,11 +277,13 @@ void AliMUONTriggerSegmentation::GetPadI(Float_t x, Float_t y, Int_t &ix, Int_t //------------------------------------------------------------------------- void AliMUONTriggerSegmentation::GetPadI(Float_t x, Float_t y , Float_t /*z*/, Int_t &ix, Int_t &iy) { +// Returns global pad coordinates (ix,iy) for local real coordinates (x,y) GetPadI(x, y, ix, iy); } //------------------------------------------------------------------------- void AliMUONTriggerSegmentation::SetLineNumber(Int_t iLineNumber){ +// Set line number fLineNumber = iLineNumber; } //------------------------------------------------------------------------- @@ -300,6 +306,7 @@ void AliMUONTriggerSegmentation::SetHit(Float_t x, Float_t y) //---------------------------------------------------------------------------- void AliMUONTriggerSegmentation::SetHit(Float_t xhit, Float_t yhit, Float_t /*zhit*/) { + // Set current hit SetHit(xhit, yhit); } @@ -554,6 +561,8 @@ void AliMUONTriggerSegmentation::Init(Int_t detectionElementId, void AliMUONTriggerSegmentation::Print(Option_t*) const { +// Printing + cout << "fId=" << fId << " fBending=" << fBending << " fNsec=" << fNsec << " Nx,Ny=" << fNpx << "," << fNpy << " LineNumber=" << fLineNumber diff --git a/MUON/AliMUONv1.cxx b/MUON/AliMUONv1.cxx index db2723f8056..1b06b1811b4 100644 --- a/MUON/AliMUONv1.cxx +++ b/MUON/AliMUONv1.cxx @@ -15,9 +15,11 @@ /* $Id$ */ -///////////////////////////////////////////////////////// -// Manager and hits classes for set:MUON version 1 // -///////////////////////////////////////////////////////// +// -------------------- +// Class AliMUONv1 +// -------------------- +// AliDetector class for MUON subsystem which implements +// functions for simulation #include "AliMUONv1.h" #include "AliMUONConstants.h" @@ -65,8 +67,9 @@ AliMUONv1::AliMUONv1() fAngleEffect10(0x0), fAngleEffectNorma(0x0) { -// Default constructor - AliDebug(1,Form("default (empty) ctor this=%p",this)); +/// Default constructor + + AliDebug(1,Form("default (empty) ctor this=%p",this)); } //___________________________________________ @@ -86,9 +89,9 @@ AliMUONv1::AliMUONv1(const char *name, const char *title, fAngleEffect10(0x0), fAngleEffectNorma(0x0) { -// Standard onstructor +/// Standard onstructor - AliDebug(1,Form("ctor this=%p",this)); + AliDebug(1,Form("ctor this=%p",this)); // By default include all stations @@ -124,7 +127,7 @@ AliMUONv1::AliMUONv1(const char *name, const char *title, AliMUONv1::AliMUONv1(const AliMUONv1& right) : AliMUON(right) { - // copy constructor (not implemented) +/// Copy constructor (not implemented) AliFatal("Copy constructor not provided."); } @@ -132,8 +135,9 @@ AliMUONv1::AliMUONv1(const AliMUONv1& right) //___________________________________________ AliMUONv1::~AliMUONv1() { -// Destructor - AliDebug(1,Form("dtor this=%p",this)); +/// Destructor + + AliDebug(1,Form("dtor this=%p",this)); delete [] fStepSum; delete [] fDestepSum; delete fElossRatio; @@ -144,7 +148,7 @@ AliMUONv1::~AliMUONv1() //_____________________________________________________________________________ AliMUONv1& AliMUONv1::operator=(const AliMUONv1& right) { - // assignement operator (not implemented) +/// Assignement operator (not implemented) // check assignement to self if (this == &right) return *this; @@ -157,9 +161,7 @@ AliMUONv1& AliMUONv1::operator=(const AliMUONv1& right) //__________________________________________________ void AliMUONv1::CreateGeometry() { -// -// Construct geometry using geometry builder -// +/// Construct geometry using geometry builder fGeometryBuilder->CreateGeometry(); } @@ -167,9 +169,7 @@ void AliMUONv1::CreateGeometry() //________________________________________________________________ void AliMUONv1::CreateMaterials() { -// -// Construct materials using geometry builder -// +/// Construct materials using geometry builder fGeometryBuilder->CreateMaterials(); } @@ -177,11 +177,10 @@ void AliMUONv1::CreateMaterials() //___________________________________________ void AliMUONv1::Init() { +/// Initialize geometry + AliDebug(1,"Start Init for version 1 - CPC chamber type"); - // - // Initialize geometry - // fGeometryBuilder->InitGeometry(); AliDebug(1,"Finished Init for version 1 - CPC chamber type"); @@ -221,10 +220,9 @@ void AliMUONv1::Init() //__________________________________________________________________ Int_t AliMUONv1::GetChamberId(Int_t volId) const { -// Check if the volume with specified volId is a sensitive volume (gas) -// of some chamber and returns the chamber number; -// if not sensitive volume - return 0. -// --- +/// Check if the volume with specified volId is a sensitive volume (gas) +/// of some chamber and returns the chamber number; +/// if not sensitive volume - return 0. for (Int_t i = 0; i < AliMUONConstants::NCh(); i++) { if ( GetGeometry()->GetModule(i)->IsSensitiveVolume(volId) ) @@ -237,9 +235,8 @@ Int_t AliMUONv1::GetChamberId(Int_t volId) const //_______________________________________________________________________________ TString AliMUONv1::CurrentVolumePath() const { -// Returns current volume path -// (Could be removed when this function is available via gMC) -// --- +/// Return current volume path +/// (Could be removed when this function is available via gMC) TString path = ""; TString name; @@ -262,8 +259,8 @@ TString AliMUONv1::CurrentVolumePath() const //_______________________________________________________________________________ void AliMUONv1::StepManager() { - // Stepmanager for the chambers - // TBR +/// Step manager for the chambers +/// TBR if (fStepManagerVersionDE) { StepManager2(); @@ -432,7 +429,7 @@ void AliMUONv1::StepManager() //_______________________________________________________________________________ void AliMUONv1::StepManager2() { - // Stepmanager for the chambers +/// Step manager for the chambers // Only charged tracks if( !(gMC->TrackCharge()) ) return; -- 2.43.5