--- /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$
+*/
+
+#include "AliDigitNew.h"
+
+ClassImp(AliDigitNew)
+
+AliDigitNew::AliDigitNew()
+{
+}
+
+AliDigitNew::AliDigitNew(Int_t *tracks)
+{
+ fTracks[0] = tracks[0];
+ fTracks[1] = tracks[1];
+ fTracks[2] = tracks[2];
+}
+
+
--- /dev/null
+#ifndef ALIDIGITNEW_H
+#define ALIDIGITNEW_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+////////////////////////////////////////////////
+// Base class for Alice Digits //
+////////////////////////////////////////////////
+
+#include "TObject.h"
+
+class AliDigitNew : public TObject {
+ public:
+ Int_t fTracks[3]; //tracks number making this digit (up to 3)
+
+ public:
+ AliDigitNew() ;
+ AliDigitNew(Int_t *track);
+ ~AliDigitNew() {;}
+ inline virtual int *GetTracks() {return &fTracks[0];}
+ inline virtual Int_t GetAmp() = 0 ;
+
+ private:
+
+
+ public:
+ ClassDef(AliDigitNew,1) //Base class for all Alice digits
+
+} ;
+#endif // ALIDIGITNEW_H
--- /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$
+*/
+
+//-*-C++-*-
+//_________________________________________________________________________
+// AliGeometry base class is pABC
+//*-- Author : Yves Schutz SUBATECH
+//////////////////////////////////////////////////////////////////////////////
+
+// --- ROOT system ---
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+
+#include "AliGeometry.h"
+
+ClassImp(AliGeometry)
+
+//____________________________________________________________________________
+AliGeometry::AliGeometry()
+{
+ // ctor
+}
+
+//____________________________________________________________________________
+AliGeometry::~AliGeometry()
+{
+ // dtor
+}
+
--- /dev/null
+#ifndef ALIGEOMETRY_H
+#define ALIGEOMETRY_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+////////////////////////////////////////////////
+// AliGeometry Base Class pABC //
+// //
+// Author Yves Schutz SUBATECH //
+// //
+// //
+////////////////////////////////////////////////
+
+// --- ROOT system ---
+
+#include "TNamed.h"
+#include "TVector3.h"
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+
+#include "AliRecPoint.h"
+
+class AliRecPoint;
+
+class AliGeometry : public TNamed {
+
+public:
+
+ AliGeometry() ; // ctor
+ virtual ~AliGeometry() ; // dtor
+
+ virtual void GetGlobal(const AliRecPoint * p, TVector3 & pos, TMatrix & mat) = 0 ;
+ virtual void GetGlobal(const AliRecPoint * p, TVector3 & pos) = 0 ;
+
+protected:
+
+ AliGeometry(const Text_t* name, const Text_t* title) : TNamed (name,title) {}
+
+public:
+
+ ClassDef(AliGeometry,1) // description , version 1
+
+};
+
+#endif // ALIGEOMETRY_H
--- /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$
+*/
+
+//-*-C++-*-
+//_________________________________________________________________________
+// Base Class of Cluster (empty cxx needed by Root)
+//*-- Author : Yves Schutz SUBATECH
+//////////////////////////////////////////////////////////////////////////////
+
+// --- ROOT system ---
+
+#include "TObjArray.h"
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+
+#include "AliRecPoint.h"
+
+ClassImp(AliRecPoint)
+
+
+//____________________________________________________________________________
+AliRecPoint::AliRecPoint()
+{
+ // ctor
+ fAmp = 0.0 ;
+
+ fLocPos.SetXYZ(0., 0., 0.) ;
+ fLocPosM = new TMatrix(3,3) ;
+ fMaxDigit = 100 ;
+ fMulDigit = 0 ;
+ fDigitsList = new int[fMaxDigit]; ;
+ fMaxTrack = 5 ;
+ fMulTrack = 0 ;
+ fTracksList = new int[fMaxTrack]; ;
+}
+
+//____________________________________________________________________________
+AliRecPoint::~AliRecPoint()
+{
+ // dtor
+
+ delete fLocPosM ;
+ if ( fDigitsList ) delete fDigitsList ;
+ if ( fTracksList ) delete fTracksList ;
+
+}
+
+//____________________________________________________________________________
+void AliRecPoint::AddDigit(AliDigitNew & digit)
+{
+ // adds a digit to the digits list
+ // and accumulates the total amplitude and the multiplicity
+
+
+ if ( fMulDigit >= fMaxDigit ) { // increase the size of the list
+ int * tempo = new ( int[fMaxDigit*=2] ) ;
+
+ Int_t index ;
+
+ for ( index = 0 ; index < fMulDigit ; index++ )
+ tempo[index] = fDigitsList[index] ;
+
+ delete fDigitsList ;
+ fDigitsList = tempo ;
+ }
+
+ fDigitsList[fMulDigit++]= (int) &digit ;
+ fAmp += digit.GetAmp() ;
+}
+
+//____________________________________________________________________________
+// void AliRecPoint::AddTrack(AliTrack & track)
+// {
+// // adds a digit to the digits list
+// // and accumulates the total amplitude and the multiplicity
+
+
+// if ( fMulTrack >= fMaxTrack ) { // increase the size of the list
+// int * tempo = new int[fMaxTrack*=2] ;
+// Int_t index ;
+// for ( index = 0 ; index < fMulTrack ; index++ )
+// tempo[index] = fTracksList[index] ;
+// delete fTracksList ;
+// fTracksList = tempo ;
+// }
+
+// fTracksList[fMulTrack++]= (int) &Track ;
+// }
+
+//____________________________________________________________________________
+void AliRecPoint::GetCovarianceMatrix(TMatrix & mat)
+{
+ // returns the covariant matrix for the local position
+
+ mat = *fLocPosM ;
+
+}
+
+//____________________________________________________________________________
+void AliRecPoint::GetLocalPosition(TVector3 & pos)
+{
+ // returns the position of the cluster in the local reference system of the sub-detector
+
+ pos = fLocPos;
+
+
+}
+
+//____________________________________________________________________________
+void AliRecPoint::GetGlobalPosition(TVector3 & gpos, TMatrix & gmat)
+{
+ // returns the position of the cluster in the global reference system of ALICE
+ // and the uncertainty on this position
+
+
+ fGeom->GetGlobal(this, gpos, gmat) ;
+
+}
+
+//______________________________________________________________________________
+void AliRecPoint::Streamer(TBuffer &R__b)
+{
+ // Stream an object of class AliRecPoint.
+
+ if (R__b.IsReading()) {
+ Version_t R__v = R__b.ReadVersion(); if (R__v) { }
+ TObject::Streamer(R__b);
+ R__b >> fAmp;
+ R__b.ReadArray(fDigitsList);
+ R__b >> fGeom;
+ fLocPos.Streamer(R__b);
+ R__b >> fLocPosM;
+ R__b >> fMulDigit;
+ R__b >> fMulTrack;
+ R__b.ReadArray(fTracksList);
+ } else {
+ R__b.WriteVersion(AliRecPoint::IsA());
+ TObject::Streamer(R__b);
+ R__b << fAmp;
+ R__b.WriteArray(fDigitsList, fMaxDigit);
+ R__b << fGeom;
+ fLocPos.Streamer(R__b);
+ R__b << fLocPosM;
+ R__b << fMulDigit;
+ R__b << fMulTrack;
+ R__b.WriteArray(fTracksList, fMaxTrack);
+ }
+}
--- /dev/null
+#ifndef ALIRECPOINT_H
+#define ALIRECPOINT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+////////////////////////////////////////////////
+// Base class for Reconstructed Point //
+// Version 0.1 //
+// Author Yves Schutz SUBATECH //
+// //
+// //
+////////////////////////////////////////////////
+
+// --- ROOT system ---
+
+#include "TObject.h"
+#include "TVector3.h"
+#include "TMatrix.h"
+
+// --- Standard library ---
+
+#include "assert.h"
+#include "iostream.h"
+
+// --- AliRoot header files ---
+
+#include "AliDigitNew.h"
+#include "AliGeometry.h"
+//#include "AliTrack.h"
+
+
+class AliGeometry;
+
+class AliRecPoint : public TObject {
+
+public:
+
+ AliRecPoint() ; // ctor
+ virtual ~AliRecPoint() ; // dtor
+
+ virtual void AddDigit(AliDigitNew & digit) ; // add a digit to the digits list
+ // virtual void AddTrack(AliTrack & track) ; // add a track to the tracks list
+ virtual void GetCovarianceMatrix(TMatrix & mat) ;
+ virtual AliGeometry * GetGeom() const { return fGeom; }
+ virtual void GetGlobalPosition(TVector3 & gpos, TMatrix & gmat) ; // return the global position in ALICE
+ virtual int * GetDigitsList(void) const { return fDigitsList ; }
+ // virtual int * GetTracksList(void) const { return fTracksList ; }
+ virtual Float_t GetEnergy() {return fAmp; }
+ virtual void GetLocalPosition(TVector3 & pos) ;
+ virtual Int_t GetDigitsMultiplicity(void) const { return fMulDigit ; }
+ virtual Int_t GetMaximumDigitMultiplicity() const { return fMaxDigit; }
+ virtual Int_t GetMaximumTrackMultiplicity() const { return fMaxTrack; }
+ virtual Int_t GetTracksMultiplicity(void) const { return fMulTrack ; }
+ virtual void Print(Option_t * opt = "void") = 0 ;
+
+
+protected:
+
+ Float_t fAmp ; // summed amplitude of digits
+ int * fDigitsList ; // list of digits from which the point was reconstructed
+ AliGeometry * fGeom ; // pointer to the geometry class
+ TVector3 fLocPos ; // local position in the sub-detector coordinate
+ TMatrix * fLocPosM ; // covariance matrix ;
+ Int_t fMaxDigit ; //! max initial size of digits array (not saved)
+ Int_t fMulDigit ; // total multiplicity of digits
+ Int_t fMaxTrack ; //! max initial size of tracks array (not saved)
+ Int_t fMulTrack ; // total multiplicity of tracks
+ int * fTracksList ; // list of tracks to which the point was assigned
+
+public:
+
+
+ ClassDef(AliRecPoint,1)
+
+};
+
+#endif // ALIRECPOINT_H
# C++ sources
-SRCS = AliDetector.cxx AliHeader.cxx AliMagF.cxx \
- AliDigit.cxx AliHit.cxx AliPoints.cxx \
- AliDisplay.cxx AliMC.cxx AliRun.cxx AliGenerator.cxx \
- AliLego.cxx AliModule.cxx
-
+SRCS = AliDetector.cxx AliHeader.cxx AliMagF.cxx \
+ AliDigit.cxx AliHit.cxx AliPoints.cxx \
+ AliDisplay.cxx AliMC.cxx AliRun.cxx AliGenerator.cxx \
+ AliLego.cxx AliModule.cxx AliDigitNew.cxx \
+ AliGeometry.cxx AliRecPoint.cxx
# C++ Headers
#pragma link C++ class AliMagFCM;
#pragma link C++ class AliMC;
#pragma link C++ class AliLego;
+#pragma link C++ class AliDigitNew;
+#pragma link C++ class AliGeometry;
+#pragma link C++ class AliRecPoint-;
#endif