/* $Id$ */
-#include <TMinuit.h>
-#include <TF1.h>
-#include <TMinuit.h>
-#include <Riostream.h>
+// -------------------------------
+// Class AliMUONClusterFinderVS
+// -------------------------------
+// Class for clustering and reconstruction of space points
+// (Not used by default)
#include "AliMUONClusterFinderVS.h"
-#include "AliMpPlaneType.h"
-#include "AliMpVSegmentation.h"
#include "AliMUONDigit.h"
#include "AliMUONRawCluster.h"
#include "AliMUONGeometrySegmentation.h"
#include "AliMUONMathieson.h"
#include "AliMUONClusterInput.h"
#include "AliMUONDigitMapA1.h"
+
#include "AliLog.h"
+#include <TMinuit.h>
+#include <TF1.h>
+#include <TMinuit.h>
+#include <Riostream.h>
+
+
//_____________________________________________________________________
// This function is minimized in the double-Mathieson fit
void fcnS2(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
void fcnCombiS1(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
void fcnCombiS2(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
+/// \cond CLASSIMP
ClassImp(AliMUONClusterFinderVS)
+/// \endcond
AliMUONClusterFinderVS::AliMUONClusterFinderVS()
- : TObject()
+ : TObject(),
+ fInput(AliMUONClusterInput::Instance()),
+ fDeclusterFlag(0),
+ fClusterSize(0),
+ fNperMax(0),
+ fGhostChi2Cut(1e6),
+ fNPeaks(0),
+ fNRawClusters(0),
+ fRawClusters(0x0),
+ fZPlane(0.),
+ fSector(0),
+ fFitStat(0)
{
-// Default constructor
- fInput=AliMUONClusterInput::Instance();
+/// Default constructor
fDigitMap[0] = 0;
fDigitMap[1] = 0;
fTrack[0]=fTrack[1]=-1;
- fGhostChi2Cut = 1e6; // nothing done by default
fSeg2[0] = 0;
fSeg2[1] = 0;
}
}
fRawClusters = new TClonesArray("AliMUONRawCluster",1000);
- fNRawClusters = 0;
}
//____________________________________________________________________________
AliMUONClusterFinderVS::~AliMUONClusterFinderVS()
{
+/// Destructor
+
// Reset tracks information
fNRawClusters = 0;
if (fRawClusters) {
}
}
-AliMUONClusterFinderVS::AliMUONClusterFinderVS(const AliMUONClusterFinderVS & clusterFinder):TObject(clusterFinder)
-{
-// 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);
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;
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;
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;
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);
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
if (!fInput->NDigits(0) && !fInput->NDigits(1)) return;
- AliMpPlaneType plane1, plane2;
-
fSeg2[0] = fInput->Segmentation2(0);
fSeg2[1] = fInput->Segmentation2(1);
- if ( fSeg2[0]->GetDirection(fInput->DetElemId()) == kDirY ||
- fSeg2[0]->GetDirection(fInput->DetElemId()) == kDirUndefined ) {
- plane1 = kBendingPlane;
- plane2 = kNonBendingPlane;
- } else {
- plane2 = kBendingPlane;
- plane1 = kNonBendingPlane;
- }
+ Int_t detElemId = fInput->DetElemId();
- fDigitMap[0] = new AliMUONDigitMapA1(fInput->DetElemId(), plane1);
- fDigitMap[1] = new AliMUONDigitMapA1(fInput->DetElemId(), plane2);
+ Int_t npx0 = fSeg2[0]->Npx(detElemId)+1;
+ Int_t npy0 = fSeg2[0]->Npy(detElemId)+1;
+ fDigitMap[0] = new AliMUONDigitMapA1(detElemId, npx0, npy0);
+
+ Int_t npx1 = fSeg2[0]->Npx(detElemId)+1;
+ Int_t npy1 = fSeg2[0]->Npy(detElemId)+1;
+ fDigitMap[1] = new AliMUONDigitMapA1(detElemId, npx1, npy1);
AliMUONDigit *dig;
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());
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());
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
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());
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++) {
}
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++;