]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added a data member so that the RecPoint makes himself known as a tower or a preshower
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Dec 2002 18:14:41 +0000 (18:14 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Dec 2002 18:14:41 +0000 (18:14 +0000)
EMCAL/AliEMCALRecPoint.cxx
EMCAL/AliEMCALRecPoint.h

index 7a19c5d2bf3714f1506322fce9d38b841ac683a2..9f235a653883f0202bf26c3712f6a34634b86f78 100644 (file)
@@ -46,7 +46,7 @@ AliEMCALRecPoint::AliEMCALRecPoint()
   fMaxTrack = 0 ;
   fTheta = fPhi = 0. ; 
   fEMCALArm = 0;
-
+  fTower = kFALSE ; 
 }
 
 //____________________________________________________________________________
@@ -241,17 +241,19 @@ void  AliEMCALRecPoint::EvalPrimaries(TClonesArray * digits)
   delete tempo ;
 
 }
+
 //____________________________________________________________________________
 void AliEMCALRecPoint::GetGlobalPosition(TVector3 & gpos) const
 {
   // returns the position of the cluster in the global reference system of ALICE
-  // and the uncertainty on this position
   
   AliEMCALGeometry * emcalgeom = AliEMCALGetter::GetInstance()->EMCALGeometry();  
   gpos.SetX(fPhi) ;
-  gpos.SetY(emcalgeom->GetIPDistance() + emcalgeom->GetAirGap()) ;
+  if (IsTower() ) 
+    gpos.SetY(emcalgeom->GetIP2Tower()) ;
+  else 
+    gpos.SetY(emcalgeom->GetIP2PreShower()) ;
   gpos.SetZ(fTheta) ; 
 }
 
 
index 772c011709482fa10a987f33a3a4ae7e227436f8..8921babd02b182d7921b347a52ed525b9fd9e232 100644 (file)
@@ -57,7 +57,8 @@ class AliEMCALRecPoint : public AliRecPoint {
   //  virtual Int_t   GetEMCALMod(void) const {return fEMCALMod ; }
   virtual Int_t * GetPrimaries(Int_t & number) const {number = fMulTrack ; 
                                                       return fTracksList ; }
-  virtual Bool_t  IsEmc(void)const { return kTRUE ;  } 
+  virtual Bool_t  IsEmc(void)const { return kTRUE ;  }
+  const Bool_t IsTower(void) const { return fTower ; } 
   virtual Bool_t  IsSortable() const { 
     // tells that this is a sortable object
     return kTRUE ; 
@@ -66,7 +67,8 @@ class AliEMCALRecPoint : public AliRecPoint {
   virtual void    Print(Option_t * opt = "void") const {
     // Print prototype
   } 
-
+  
+  void SetTower() { fTower = kTRUE ; } 
   AliEMCALRecPoint & operator = (const AliEMCALRecPoint & )  {
     // assignement operator requested by coding convention but not needed
     assert(0==1) ;
@@ -78,9 +80,9 @@ protected:
   Int_t fEMCALArm ; // EMCAM Arm number
   Float_t fTheta ; // theta angle in Alice
   Float_t fPhi ;   // phi angle in Alice
+  Bool_t  fTower ; // tells if the recpoint is a tower or not 
 
-
-  ClassDef(AliEMCALRecPoint,1) // RecPoint for EMCAL (Base Class)
+  ClassDef(AliEMCALRecPoint,2) // RecPoint for EMCAL (Base Class)
  
 };