]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added IsInPreShower method
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Jan 2002 23:33:01 +0000 (23:33 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Jan 2002 23:33:01 +0000 (23:33 +0000)
EMCAL/AliEMCALHit.cxx
EMCAL/AliEMCALHit.h

index 97b7821ed198f41e62e6219a56d4afcd89b0d7cb..ece99a2088ff1fbc99d56c9b2503d2ac7ad0a1e2 100644 (file)
@@ -36,7 +36,8 @@
 #include "AliEMCALHit.h"
 #include "AliRun.h"
 #include "AliConst.h"
-
+#include "AliEMCALGeometry.h"
+#include "AliEMCALGetter.h"
 
 ClassImp(AliEMCALHit)
 
@@ -98,6 +99,18 @@ AliEMCALHit::AliEMCALHit(Int_t shunt, Int_t primary, Int_t track,Int_t iparent,
     fIparent    = iparent;
     fIenergy    = ienergy;
 }
+
+//______________________________________________________________________
+const Bool_t AliEMCALHit::IsInPreShower() const 
+{
+  Bool_t rv = kFALSE ;
+  
+  const AliEMCALGeometry * geom = AliEMCALGetter::GetInstance()->EMCALGeometry() ;
+  if((GetId()/geom->GetNPhi()) < (2*geom->GetNZ())) 
+    rv = kTRUE; 
+  return rv; 
+} 
+
 //______________________________________________________________________
 Bool_t AliEMCALHit::operator==(AliEMCALHit const &rValue) const{ 
     // Two hits are identical if they have the same Id and originat
index ffa2aa98f2e69dfe732f40d04e1b58ccda8b6b8b..f855643b253d623f8d6611d012d9494d8d5ef93b 100644 (file)
@@ -46,6 +46,7 @@ public:
   Float_t GetPy(void) const{return fPy;}
   Float_t GetPz(void) const{return fPz;}
   Float_t GetPe(void) const{return fPe;}
+  const Bool_t  IsInPreShower() const ; 
   Bool_t operator == (AliEMCALHit const &rValue) const;
   AliEMCALHit operator + (const AliEMCALHit& rValue);