ClassImp(AliMUONClusterFinderVS)
- AliMUONClusterFinderVS::AliMUONClusterFinderVS()
+AliMUONClusterFinderVS::AliMUONClusterFinderVS()
{
// Default constructor
fInput=AliMUONClusterInput::Instance();
for (Int_t j=0; j<2; j++) {
fDig[i][j] = 0;
}
- }
+ }
+ fRawClusters = new TClonesArray("AliMUONRawCluster",1000);
+ fNRawClusters = 0;
+
+
+}
+ //____________________________________________________________________________
+AliMUONClusterFinderVS::~AliMUONClusterFinderVS()
+{
+ // Reset tracks information
+ fNRawClusters = 0;
+ if (fRawClusters) fRawClusters->Delete();
}
AliMUONClusterFinderVS::AliMUONClusterFinderVS(const AliMUONClusterFinderVS & clusterFinder):TObject(clusterFinder)
// Dummy copy Constructor
;
}
-
+//____________________________________________________________________________
+void AliMUONClusterFinderVS::ResetRawClusters()
+{
+ // Reset tracks information
+ fNRawClusters = 0;
+ if (fRawClusters) fRawClusters->Clear();
+}
+//____________________________________________________________________________
void AliMUONClusterFinderVS::Decluster(AliMUONRawCluster *cluster)
{
// Decluster by local maxima
SplitByLocalMaxima(cluster);
}
-
+//____________________________________________________________________________
void AliMUONClusterFinderVS::SplitByLocalMaxima(AliMUONRawCluster *c)
{
// Split complex cluster by local maxima
// fills the tree with raw clusters
//
+ ResetRawClusters();
// Return if no input datad available
if (!fInput->NDigits(0) && !fInput->NDigits(1)) return;
clusterInput.Fitter()->mnexcm("SET NOGR", arglist, 0, ierflag);
clusterInput.Fitter()->mnexcm("MIGRAD", arglist, 0, ierflag);
- clusterInput.Fitter()->mnexcm("EXIT" , arglist, 0, ierflag);
+ // clusterInput.Fitter()->mnexcm("EXIT" , arglist, 0, ierflag);
Double_t fmin, fedm, errdef;
Int_t npari, nparx, istat;
clusterInput.Fitter()->mnexcm("SET NOGR", arglist, 0, ierflag);
clusterInput.Fitter()->mnexcm("MIGRAD", arglist, 0, ierflag);
- clusterInput.Fitter()->mnexcm("EXIT" , arglist, 0, ierflag);
+ // clusterInput.Fitter()->mnexcm("EXIT" , arglist, 0, ierflag);
Double_t fmin, fedm, errdef;
Int_t npari, nparx, istat;
clusterInput.Fitter()->mnexcm("SET NOGR", arglist, 0, ierflag);
clusterInput.Fitter()->mnexcm("MIGRAD", arglist, 0, ierflag);
- clusterInput.Fitter()->mnexcm("EXIT" , arglist, 0, ierflag);
+ // clusterInput.Fitter()->mnexcm("EXIT" , arglist, 0, ierflag);
// Get fitted parameters
Double_t xrec[2], yrec[2], qfrac;
TString chname;
clusterInput.Fitter()->mnexcm("SET NOGR", arglist, 0, ierflag);
clusterInput.Fitter()->mnexcm("MIGRAD", arglist, 0, ierflag);
- clusterInput.Fitter()->mnexcm("EXIT" , arglist, 0, ierflag);
+ // clusterInput.Fitter()->mnexcm("EXIT" , arglist, 0, ierflag);
// Get fitted parameters
TString chname;
Double_t epxz, b1, b2;
f=chisq;
}
-void AliMUONClusterFinderVS::AddRawCluster(const AliMUONRawCluster c)
+void AliMUONClusterFinderVS::AddRawCluster(const AliMUONRawCluster& c)
{
//
// Add a raw cluster copy to the list
//
- AliMUON *pMUON=(AliMUON*)gAlice->GetModule("MUON");
- pMUON->GetMUONData()->AddRawCluster(fInput->Chamber(),c);
- fNRawClusters++;
+
+// AliMUON *pMUON=(AliMUON*)gAlice->GetModule("MUON");
+// pMUON->GetMUONData()->AddRawCluster(fInput->Chamber(),c);
+// fNRawClusters++;
+
+
+ TClonesArray &lrawcl = *fRawClusters;
+ new(lrawcl[fNRawClusters++]) AliMUONRawCluster(c);
if (fDebugLevel)
fprintf(stderr,"\nfNRawClusters %d\n",fNRawClusters);
}
public:
AliMUONClusterFinderVS();
AliMUONClusterFinderVS(const AliMUONClusterFinderVS& clusterFinder);
- virtual ~AliMUONClusterFinderVS(){;}
+ virtual ~AliMUONClusterFinderVS();
// Decluster ?
virtual void SetDeclusterFlag(Int_t flag=1) {fDeclusterFlag =flag;}
// Set max. cluster size ; bigger clusters will deconvoluted
virtual void FillCluster(AliMUONRawCluster *cluster, Int_t cath);
virtual void FillCluster(AliMUONRawCluster *cluster) {FillCluster(cluster,1,0);}
// Add a new raw cluster
- virtual void AddRawCluster(const AliMUONRawCluster cluster);
+ virtual void AddRawCluster(const AliMUONRawCluster& cluster);
// Set tracks for debugging
virtual void SetTracks(Int_t t1, Int_t t2) {fTrack[0]=t1; fTrack[1]=t2;}
virtual Bool_t TestTrack(Int_t t);
// debug level
void SetDebugLevel(Int_t level) {fDebugLevel = level;}
void SetGhostChi2Cut(Float_t cut) {fGhostChi2Cut = cut;}
+// get raw cluster pointer
+ TClonesArray* GetRawClusters() {return fRawClusters;}
+// reset raw clusters
+ void ResetRawClusters();
protected:
AliMUONClusterInput* fInput; // ! AliMUONClusterInput instance
Int_t fMul[2]; // current multiplicity
Int_t fNPeaks; // number of local maxima
Int_t fNRawClusters; // Number of Raw Clusters
+ TClonesArray* fRawClusters; // array of cluster per ch.
+
// Local data store
AliMUONDigit* fDig[100][2]; // current list of digits
Int_t fIx[100][2]; // current list of x-pad-coord.
Int_t fDebugLevel; // prinout control
// Return pointer to raw clusters
- ClassDef(AliMUONClusterFinderVS,1) //Class for clustering and reconstruction of space points
+ ClassDef(AliMUONClusterFinderVS,2) //Class for clustering and reconstruction of space points
};
#endif