]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
AliPHOSRecPoint inheritance from AliCluster
authorpolicheh <policheh@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 May 2007 14:49:29 +0000 (14:49 +0000)
committerpolicheh <policheh@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 May 2007 14:49:29 +0000 (14:49 +0000)
PHOS/AliPHOSGeometry.cxx
PHOS/AliPHOSGeometry.h
PHOS/AliPHOSPIDv1.cxx
PHOS/AliPHOSRecPoint.cxx
PHOS/AliPHOSRecPoint.h
PHOS/AliPHOSTrackSegmentMakerv1.cxx
PHOS/AliPHOSTrackSegmentMakerv2.cxx

index 4a8e2efcdf8261096f6158a883c25e6a9cf70e3e..ad7fe75513c17b245697fb9b574b7922891d2c65 100644 (file)
@@ -262,13 +262,18 @@ Bool_t AliPHOSGeometry::AbsToRelNumbering(Int_t AbsId, Int_t * relid) const
   } 
   return rv ; 
 }
-
 //____________________________________________________________________________
 void AliPHOSGeometry::GetGlobal(const AliRecPoint* recPoint, TVector3 & gpos) const
+{
+  AliFatal(Form("Please use GetGlobalPHOS(recPoint,gpos) instead of GetGlobal!"));
+}
+
+//____________________________________________________________________________
+void AliPHOSGeometry::GetGlobalPHOS(const AliPHOSRecPoint* recPoint, TVector3 & gpos) const
 {
   // Calculates the coordinates of a RecPoint and the error matrix in the ALICE global coordinate system
  
-  AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) recPoint ;  
+  const AliPHOSRecPoint * tmpPHOS = recPoint ;  
   TVector3 localposition ;
 
   tmpPHOS->GetLocalPosition(gpos) ;
index d5e9951dd376367083e235162fbe8e6e2db9a500..b6b157939992a026ed01374f07b30d5721ce18f2 100644 (file)
@@ -25,6 +25,8 @@
 #include "AliPHOSCPVGeometry.h"
 #include "AliPHOSSupportGeometry.h"
 
+class AliPHOSRecPoint;
+class TVector3;
 
 class AliPHOSGeometry : public AliGeometry {
 
@@ -39,6 +41,9 @@ public:
   virtual void   GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrixF & /* gmat */) const 
                  {GetGlobal(RecPoint,gpos); }
   virtual void   GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) const ;
+  virtual void   GetGlobalPHOS(const AliPHOSRecPoint* RecPoint, TVector3 & gpos) const ;
+  virtual void   GetGlobalPHOS(const AliPHOSRecPoint* RecPoint, TVector3 & gpos, TMatrixF & /* gmat */) const 
+                 {GetGlobalPHOS(RecPoint,gpos); }
   virtual Bool_t Impact(const TParticle * particle) const ;
 
   AliPHOSGeometry & operator = (const AliPHOSGeometry  & /*rvalue*/) {
index 0ba806b578f1e84c73a649652f400aabc07b76c8..48eabe6dc52ea749a62ed2c31f2c251fb05a8d99 100644 (file)
@@ -18,6 +18,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.110  2007/04/24 10:08:03  kharlov
+ * Vertex extraction from GenHeader
+ *
  * Revision 1.109  2007/04/18 09:34:05  kharlov
  * Geometry bug fixes
  *
@@ -1504,7 +1507,7 @@ void  AliPHOSPIDv1::MakeRecParticles()
     AliPHOSTrackSegment * ts  = gime->TrackSegment(rp->GetPHOSTSIndex()) ; 
     AliPHOSEmcRecPoint  * erp = gime->EmcRecPoint(ts->GetEmcIndex()) ; 
     TVector3 pos ; 
-    geom->GetGlobal(erp, pos) ; 
+    geom->GetGlobalPHOS(erp, pos) ; 
     rp->SetPos(pos);
     index++ ; 
   }
index d259034baa412e19acacd5c4731373bdd8f7fc99..bb2b1de4bc0b51bc036dee512cd1b3ca1c9f7b9f 100644 (file)
@@ -40,24 +40,78 @@ ClassImp(AliPHOSRecPoint)
 
 //____________________________________________________________________________
 AliPHOSRecPoint::AliPHOSRecPoint()
-  : AliRecPoint(),
-    fPHOSMod(0)
+  : AliCluster(),fPHOSMod(0),
+    fMulTrack(0),fMaxDigit(100),fMulDigit(0),fMaxTrack(0),
+    fDigitsList(0),fTracksList(0),fAmp(0),
+    fIndexInList(-1), // to be set when the point is already stored
+    fLocPos(0,0,0),fLocPosM(0)
 {
   // ctor
 
-  fMaxTrack = 0 ;
 }
 
 //____________________________________________________________________________
-AliPHOSRecPoint::AliPHOSRecPoint(const char * opt) 
-  : AliRecPoint(opt),
-    fPHOSMod(0)
+AliPHOSRecPoint::AliPHOSRecPoint(const char * ) 
+  : AliCluster(),fPHOSMod(0),
+    fMulTrack(0),fMaxDigit(100),fMulDigit(0),fMaxTrack(200),
+    fDigitsList(new int[fMaxDigit]),fTracksList(new int[fMaxTrack]),fAmp(0),
+    fIndexInList(-1), // to be set when the point is already stored
+    fLocPos(0,0,0),fLocPosM(new TMatrixF(3,3))
+
 {
   // ctor
   
-  fMaxTrack = 200 ;
 }
+//_______________________________________________________________________
+AliPHOSRecPoint::~AliPHOSRecPoint()
+{
+  // dtor
+  
+  delete fLocPosM ; 
+  delete [] fDigitsList ; 
+  delete [] fTracksList ;  
+  
+}
+//____________________________________________________________________________
+AliPHOSRecPoint::AliPHOSRecPoint(const AliPHOSRecPoint &rp) : 
+  AliCluster(rp),
+  fPHOSMod(rp.fPHOSMod),fMulTrack(rp.fMulTrack),fMaxDigit(rp.fMaxDigit),
+  fMulDigit(rp.fMulDigit),fMaxTrack(rp.fMaxTrack),fDigitsList(new int[rp.fMaxDigit]),
+  fTracksList(new int[rp.fMaxTrack]),fAmp(rp.fAmp),fIndexInList(rp.fIndexInList), 
+  fLocPos(rp.fLocPos),fLocPosM(rp.fLocPosM)
+{
+  //copy ctor
 
+  for(Int_t i=0; i<fMaxDigit; i++)
+    fDigitsList[i] = rp.fDigitsList[i];
+
+  for(Int_t i=0; i<fMaxTrack; i++)
+    fTracksList[i] = rp.fTracksList[i];
+  
+}
+//____________________________________________________________________________
+AliPHOSRecPoint& AliPHOSRecPoint::operator= (const AliPHOSRecPoint &rp)
+{
+  if(&rp == this) return *this;
+
+  fPHOSMod = rp.fPHOSMod;
+  fMulTrack = rp.fMulTrack;
+  fMaxDigit = rp.fMaxDigit;
+  fMulDigit = rp.fMulDigit;
+  fMaxTrack = rp.fMaxTrack;
+  fAmp = rp.fAmp;
+  fIndexInList = rp.fIndexInList; 
+  fLocPos = rp.fLocPos;
+  fLocPosM = rp.fLocPosM;
+
+  for(Int_t i=0; i<fMaxDigit; i++)
+    fDigitsList[i] = rp.fDigitsList[i];
+
+  for(Int_t i=0; i<fMaxTrack; i++)
+    fTracksList[i] = rp.fTracksList[i];
+
+  return *this;
+}
 //____________________________________________________________________________
 Int_t AliPHOSRecPoint::DistancetoPrimitive(Int_t px, Int_t py)
 {
@@ -250,7 +304,14 @@ void AliPHOSRecPoint::GetGlobalPosition(TVector3 & gpos, TMatrixF & gmat) const
 {
   // returns the position of the cluster in the global reference system of ALICE
   // and the uncertainty on this position
-  (AliPHOSGetter::Instance())->PHOSGeometry()->GetGlobal(this, gpos, gmat);
+
+  (AliPHOSGetter::Instance())->PHOSGeometry()->GetGlobalPHOS(this, gpos, gmat);
+
+//   Float_t xyz[3];
+//   GetGlobalXYZ(xyz);
+//   gpos.SetXYZ(xyz[0],xyz[1],xyz[2]);
+
+  
 }
 
 
@@ -276,4 +337,10 @@ void AliPHOSRecPoint::Paint(Option_t *)
   gPad->PaintPolyMarker(1,&x,&y,"") ;
 }
 //______________________________________________________________________________
-
+void AliPHOSRecPoint::GetLocalPosition(TVector3 & pos) const
+{
+  // returns the position of the cluster in the local reference system 
+  // of the sub-detector
+  
+  pos = fLocPos;
+}
index b3951a53bf656de6753e89ddd61fff5ddf0bb1e0..c49f70bee040b68d99e69579b799c5bf4e0dbaca 100644 (file)
@@ -8,19 +8,17 @@
 //*-- Author: Gines Martinez (SUBATECH)
 
 // --- ROOT system ---
-
-//#include "TMarker.h"
-//#include "TGraph.h"
-//#include "TPaveText.h"
-  class TClonesArray ;
-// --- Standard library ---
+#include <TVector3.h>
 
 // --- AliRoot header files ---
+#include "AliCluster.h"
 
-#include "AliRecPoint.h"
-class AliPHOSDigit ; 
+class TClonesArray ;
+class AliPHOSDigit ;
+class AliDigitNew;
+class TMAtrixF; 
 
-class AliPHOSRecPoint : public AliRecPoint {
+class AliPHOSRecPoint : public AliCluster {
 
  public:
   
@@ -28,10 +26,13 @@ class AliPHOSRecPoint : public AliRecPoint {
 
   AliPHOSRecPoint() ;                   // ctor         
   AliPHOSRecPoint(const char * opt) ;   // ctor 
+
+  AliPHOSRecPoint(const AliPHOSRecPoint &rp);
+  AliPHOSRecPoint& operator= (const AliPHOSRecPoint &rp);
+
   
-  virtual ~AliPHOSRecPoint(){
-    // dtor
-  }
+  virtual ~AliPHOSRecPoint();
+
   virtual  void   AddDigit(AliDigitNew &){
    Fatal("AddDigit", "use AddDigit(AliPHOSDigit & digit, Float_t Energy)") ; 
   }
@@ -40,18 +41,24 @@ class AliPHOSRecPoint : public AliRecPoint {
   virtual Int_t   DistancetoPrimitive(Int_t px, Int_t py);
   virtual void    Draw(Option_t * option="") ;
   virtual void    ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
-  void    EvalAll(TClonesArray * digits) ;  
+  void            EvalAll(TClonesArray * digits) ;  
   virtual void    EvalPHOSMod(AliPHOSDigit * digit) ;  
-  virtual void    EvalPrimaries(TClonesArray * digits) ;  
+  virtual void    EvalPrimaries(TClonesArray * digits) ;
+  virtual int *   GetDigitsList(void) const { return fDigitsList ; }  
+  virtual Float_t GetEnergy() const {return fAmp; }
+  virtual void    GetLocalPosition(TVector3 & pos) const ;   
   virtual void    GetGlobalPosition(TVector3 & gpos, TMatrixF & gmat) const ; // return global position in ALICE
   virtual Int_t   GetPHOSMod(void) const {return fPHOSMod ; }
   virtual Int_t * GetPrimaries(Int_t & number) const {number = fMulTrack ; 
                                                       return fTracksList ; }
+  virtual Int_t   GetDigitsMultiplicity(void) const { return fMulDigit ; }
+  Int_t           GetIndexInList() const { return fIndexInList ; }
   virtual Bool_t  IsEmc(void)const { return kTRUE ;  } 
   virtual Bool_t  IsSortable() const { 
     // tells that this is a sortable object
     return kTRUE ; 
   }  
+  void            SetIndexInList(Int_t val) { fIndexInList = val ; }
   virtual void    Paint(Option_t * option="");
   virtual void    Print(Option_t *) const {
     // Print prototype
@@ -59,9 +66,20 @@ class AliPHOSRecPoint : public AliRecPoint {
 
 protected:
   
-  Int_t fPHOSMod ;      // PHOS Module number in which the RecPoint is found
-  
-  ClassDef(AliPHOSRecPoint,1) // RecPoint for PHOS (Base Class)
+  Int_t     fPHOSMod ;    // PHOS Module number in which the RecPoint is found
+  Int_t     fMulTrack ;   // total multiplicity of tracks to which the point was assigned
+  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*    fDigitsList ; //[fMulDigit] list of digit's indexes from which the point was reconstructed 
+  Int_t*    fTracksList ; //[fMulTrack] list of tracks to which the point was assigned 
+  Float_t   fAmp ;        // summed amplitude of digits 
+  Int_t     fIndexInList ;// the index of this RecPoint in the list stored in TreeR (to be set by analysis)  
+  TVector3  fLocPos ;     // local position in the sub-detector coordinate
+  TMatrixF* fLocPosM ;    // covariance matrix ;
+
+
+  ClassDef(AliPHOSRecPoint,2) // RecPoint for PHOS (Base Class)
  
 };
 
index 1f475525c631dade161651d21b5f4eb40bf7529e..12c90cd43213638293f71460b753052ca6e155a3 100644 (file)
@@ -17,6 +17,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.86  2007/04/02 15:00:16  cvetan
+ * No more calls to gAlice in the reconstruction
+ *
  * Revision 1.85  2007/03/28 19:18:15  kharlov
  * RecPoints recalculation in TSM removed
  *
@@ -246,7 +249,7 @@ void  AliPHOSTrackSegmentMakerv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * em
     
   Double_t xCPV,zCPV ; //EMC-projected coordinates of CPV cluster 
   TVector3 cpvGlobal; // Global position of the CPV recpoint
-  geom->GetGlobal((AliRecPoint*)cpvClu,cpvGlobal);
+  geom->GetGlobalPHOS((AliPHOSRecPoint*)cpvClu,cpvGlobal);
   Double_t vtxCPV[3]={cpvGlobal.X(),cpvGlobal.Y(),cpvGlobal.Z()} ;
 
   if (fESD == 0x0) {
index 3afbb7e8faa738ff1ba9456e862f316f7cfec0fc..70900bbfd33d55b616cdccd939a4031a71f2717b 100644 (file)
@@ -17,6 +17,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.3  2007/04/25 19:39:42  kharlov
+ * Track extracpolation improved
+ *
  * Revision 1.2  2007/04/01 19:16:52  kharlov
  * D.P.: Produce EMCTrackSegments using TPC/ITS tracks (no CPV)
  *
@@ -224,7 +227,7 @@ void  AliPHOSTrackSegmentMakerv2::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * em
 
   const AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
   TVector3 emcGlobal; // Global position of the EMC recpoint
-  geom->GetGlobal((AliRecPoint*)emcClu,emcGlobal);
+  geom->GetGlobalPHOS((AliPHOSRecPoint*)emcClu,emcGlobal);
 
   //Calculate actual distance to the PHOS surface
   Double_t modAngle=270.+geom->GetPHOSAngle(emcClu->GetPHOSMod()) ;