/*
$Log$
+Revision 1.3 2000/06/30 12:07:49 kowal2
+Updated from the TPC-PreRelease branch
+
Revision 1.2.4.2 2000/06/14 16:45:13 kowal2
Improved algorithms. Compiler warnings removed.
#include "TError.h"
#include "TClass.h"
#include <TROOT.h>
-#include "AliCluster.h"
+#include "AliComplexCluster.h"
#include "AliClusters.h"
-#include "TClonesArray.h"
#include "TMarker.h"
}
if(!fClusters) fClusters=new TClonesArray(fClass->GetName(),1000);
TClonesArray &lclusters = *fClusters;
- return new(lclusters[fNclusters++]) AliCluster(*((AliCluster*)c));
+ return new(lclusters[fNclusters++]) AliComplexCluster(*((AliComplexCluster*)c));
}
//_____________________________________________________________________________
//
// return index of cluster nearest to given y position
//
- AliCluster* cl;
- cl=(AliCluster*)fClusters->UncheckedAt(0);
+ AliComplexCluster* cl;
+ cl=(AliComplexCluster*)fClusters->UncheckedAt(0);
if (y <= cl->fY) return 0;
- cl=(AliCluster*)fClusters->UncheckedAt(fNclusters-1);
+ cl=(AliComplexCluster*)fClusters->UncheckedAt(fNclusters-1);
if (y > cl->fY) return fNclusters;
Int_t b=0, e=fNclusters-1, m=(b+e)/2;
for (; b<e; m=(b+e)/2) {
- cl = (AliCluster*)fClusters->UncheckedAt(m);
+ cl = (AliComplexCluster*)fClusters->UncheckedAt(m);
if (y > cl->fY) b=m+1;
else e=m;
}
//draw marker for each of cluster
Int_t ncl=fClusters->GetEntriesFast();
for (Int_t i=0;i<ncl;i++){
- AliCluster *cl = (AliCluster*)fClusters->UncheckedAt(i);
+ AliComplexCluster *cl = (AliComplexCluster*)fClusters->UncheckedAt(i);
TMarker * marker = new TMarker;
marker->SetX(cl->fX+shiftx);
marker->SetY(cl->fY+shifty);
#include "AliSegmentID.h"
-class TClonesArray;
+#include <TClonesArray.h>
+
class TObjArray;
TClonesArray * fClusters;
Int_t fNclusters;
TClass * fClass; //!type of cluster class
- ClassDef(AliClusters,1)
+ ClassDef(AliClusters,1) // Cluster manager
};
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/*
+$Log$
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Time Projection Chamber clusters objects //
+//
+// Origin: Marian Ivanov , GSI Darmstadt
+// //
+//Begin_Html
+/*
+<img src="gif/AliTPCCluster.gif">
+*/
+//End_Html
+// //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliComplexCluster.h"
+
+ClassImp(AliComplexCluster)
+//_____________________________________________________________________________
+Int_t AliComplexCluster::Compare(TObject * o)
+{
+ //
+ // compare two clusters according y coordinata
+ AliComplexCluster *cl= (AliComplexCluster *)o;
+ if (fY<cl->fY) return -1;
+ if (fY==cl->fY) return 0;
+ return 1;
+}
+
+Bool_t AliComplexCluster::IsSortable() const
+{
+ //
+ //make AliComplexCluster sortabale
+ return kTRUE;
+}
+
+ClassImp(AliDigitCluster)
+ClassImp(AliDifCluster)
--- /dev/null
+#ifndef ALICOMPLEXCLUSTER_H
+#define ALICOMPLEXCLUSTER_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#include "TObject.h"
+
+class AliComplexCluster : public TObject {
+public:
+ Int_t fTracks[3];//labels of overlapped tracks
+ Float_t fX ; //Y of cluster
+ Float_t fY ; //Z of cluster
+ Float_t fQ ; //Q of cluster (in ADC counts)
+ Float_t fSigmaX2; //Sigma Y square of cluster
+ Float_t fSigmaY2; //Sigma Z square of cluster
+ Float_t fSigmaXY; // XY moment
+ Float_t fArea; //area of cluster
+ Float_t fMax; //amplitude at maximum
+public:
+ AliComplexCluster() {
+ fTracks[0]=fTracks[1]=fTracks[2]=0;
+ fX=fY=fQ=fSigmaX2=fSigmaY2=0.;
+ }
+ virtual ~AliComplexCluster() {;}
+ Bool_t IsSortable() const;
+ Int_t Compare(TObject *o) ;
+ ClassDef(AliComplexCluster,1) // Cluster manager
+};
+
+class AliDigitCluster : public AliComplexCluster {
+public:
+ Int_t fNx; //number of accepted x bins
+ Int_t fNy; //number of accepted y bins
+ Float_t fMaxX; //maximum x bin
+ Float_t fMaxY; //maximum y bin
+public:
+ ClassDef(AliDigitCluster,1) // Tclusters
+};
+
+class AliDifCluster : public AliDigitCluster {
+public:
+ Float_t fDx; //delta x
+ Float_t fDy; //delta y
+ Float_t fAngleX;//x angle
+ Float_t fAngleY;//y angle
+ Float_t fOrigQ; //original charge
+ Int_t fGenerTrack; //track number of nearest track
+ ClassDef(AliDifCluster,1) // // Cluster manager
+};
+
+#endif //ALICOMPLEXCLUSTER_H