]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSRecPoint.cxx
Adding include path to allow compilation of CleanGeom task
[u/mrichter/AliRoot.git] / ITS / AliITSRecPoint.cxx
index 2222de9d8dfc12ed69b452058301436f86a500ef..fe5b04e8479bc7465e497abaa079bda30bec19d7 100644 (file)
 #include "AliITSRecPoint.h"
 #include "AliAlignObj.h"
 
+using std::ios;
 ClassImp(AliITSRecPoint)
 
 //_____________________________________________________________
-AliITSRecPoint::AliITSRecPoint(): AliCluster(),
+AliITSRecPoint::AliITSRecPoint(): 
+AliCluster(),
 fXloc(0),
 fZloc(0),
 fdEdX(0),
@@ -49,7 +51,8 @@ fNy(0),
 fChargeRatio(0),
 fType(0),
 fDeltaProb(0),
-fDriftTime(0.)
+fDriftTime(0.),
+fDriftSide(0)
 {
     // default constructor
 }
@@ -68,7 +71,8 @@ fNy(info[0]),
 fChargeRatio(0),
 fType(0),
 fDeltaProb(0),
-fDriftTime(0.)
+fDriftTime(0.),
+fDriftSide(0)
 {
   //standard constructor used in AliITSClusterFinderV2
 
@@ -93,6 +97,7 @@ fDriftTime(0.)
     case 4:
       fdEdX=fQ*2.16;
       SetSigmaYZ(hit[5]);
+      break;
     case 5:
       fdEdX=fQ*2.16;
       hit[5]=-hit[5];
@@ -115,19 +120,21 @@ fDriftTime(0.)
 }
 
 //_______________________________________________________________________
-AliITSRecPoint::AliITSRecPoint(const AliITSRecPoint& pt):AliCluster(pt),
-fXloc(pt.fXloc),
-fZloc(pt.fZloc),
-fdEdX(pt.fdEdX),
-fIndex(pt.fIndex),
-fQ(pt.fQ),
-fLayer(pt.fLayer),
-fNz(pt.fNz),
-fNy(pt.fNy),
-fChargeRatio(pt.fChargeRatio),
-fType(pt.fType),
-fDeltaProb(pt.fDeltaProb),
-fDriftTime(pt.fDriftTime)
+AliITSRecPoint::AliITSRecPoint(const AliITSRecPoint& pt):
+  AliCluster(pt),
+  fXloc(pt.fXloc),
+  fZloc(pt.fZloc),
+  fdEdX(pt.fdEdX),
+  fIndex(pt.fIndex),
+  fQ(pt.fQ),
+  fLayer(pt.fLayer),
+  fNz(pt.fNz),
+  fNy(pt.fNy),
+  fChargeRatio(pt.fChargeRatio),
+  fType(pt.fType),
+  fDeltaProb(pt.fDeltaProb),
+  fDriftTime(pt.fDriftTime),
+  fDriftSide(pt.fDriftSide)
 {
   //Copy constructor
 
@@ -173,7 +180,7 @@ void AliITSRecPoint::Print(ostream *os){
     *os << fXloc << " " << fZloc << " " << fdEdX << " ";
     fmt = os->setf(ios::fixed); // every fixed
     *os << fIndex <<" " << fQ << " "<<fLayer <<" "<<fNz<<" "<<fNy<<" ";
-    *os << fChargeRatio<<" " << fType << " " << fDeltaProb << " " << fDriftTime;
+    *os << fChargeRatio<<" " << fType << " " << fDeltaProb << " " << fDriftTime<< " " << fDriftSide;
     os->flags(fmt); // reset back to old formating.
     return;
 }
@@ -240,9 +247,17 @@ Int_t AliITSRecPoint::GetSDDclusterType() const {
 // max. allowed cluster size = 255
   Int_t typ=(fNz&0xFF)<<8;
   typ+=fNy&0xFF;
+  if(fDriftSide==1) typ+=1<<16;
   return typ;
 }
-
+//----------------------------------------------------------------------
+void  AliITSRecPoint::DecodeSDDclusterType(Int_t cluType, Int_t &cluSizAn, Int_t& cluSizTb, Int_t &drSide){
+// Extract cluster sizes and drift side from cluster type 
+  cluSizTb=cluType&0xFF;
+  cluSizAn=(cluType>>8)&0xFF;
+  drSide=(cluType>>16);
+  return;
+}
 //----------------------------------------------------------------------
 Int_t AliITSRecPoint::GetSSDclusterType() const {
 // returns an Int_t with encoded information on cluster size
@@ -271,7 +286,7 @@ void AliITSRecPoint::Read(istream *is){
     SetVolumeId(lab[0]);// fIsMisalinged = mis;
     *is >> fXloc >> fZloc >> fdEdX;
     *is >> fIndex >> fQ >> fLayer >> fNz >> fNy >> fChargeRatio >> fType;
-    *is >> fDeltaProb >> fDriftTime;
+    *is >> fDeltaProb >> fDriftTime >> fDriftSide;
 
     return;
 }