X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSRecPoint.cxx;h=fe5b04e8479bc7465e497abaa079bda30bec19d7;hb=e99ef86a861f8128d121cbb4333a64b571e9387e;hp=c65f63a9bc99ddb312cbfcafae4b0d8c2826aaf7;hpb=7101948c54b4453237ceaf30507bea915aa6c353;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSRecPoint.cxx b/ITS/AliITSRecPoint.cxx index c65f63a9bc9..fe5b04e8479 100644 --- a/ITS/AliITSRecPoint.cxx +++ b/ITS/AliITSRecPoint.cxx @@ -34,10 +34,12 @@ #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 @@ -77,8 +81,8 @@ fDriftTime(0.) Double_t lxyz[3] = {0, 0, 0}; GetTracking2LocalMatrix()->LocalToMaster(txyz,lxyz); fXloc = lxyz[0]; fZloc = lxyz[2]; - if(fLayer==5) hit[5]=-hit[5]; - if( (fLayer==4) || (fLayer=5) ) SetSigmaYZ(hit[5]); + if(fLayer==4) hit[5]=-hit[5]; + if( (fLayer==4) || (fLayer==5) ) SetSigmaYZ(hit[5]); } else { switch (fLayer) { @@ -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,10 +180,94 @@ void AliITSRecPoint::Print(ostream *os){ *os << fXloc << " " << fZloc << " " << fdEdX << " "; fmt = os->setf(ios::fixed); // every fixed *os << fIndex <<" " << fQ << " "<flags(fmt); // reset back to old formating. return; } + +//---------------------------------------------------------------------- +Int_t AliITSRecPoint::GetNpixels() const { +// +// returns the number of pixels used for the SPD clusters +// + + if(fLayer > 1) return -1; + else return fType; + +} + +//---------------------------------------------------------------------- +Int_t AliITSRecPoint::GetSPDclusterType() const { +// +// returns an Int_t with encoded information on cluster size +// type <= 16: cluster type identifier according to conventional numbering +// type > 16: Npixels+1000*Ny+1000000*Nz +// + + Int_t type = -1; + if(fLayer > 1) return type; + else { + + switch (fType) { + case 1 : type = 1 ;break; + case 2 : if(fNy == 2) type = 2; + else type = 3; + break; + case 3 : if(fNy == 3) type = 4; + else if(fNz == 3) type = 6; + else type = 5; + break; + case 4 : if(fNz == 1) type = 7; + else if(fNz == 2 && fNy == 2) type = 8; + else if(fNy == 2 && fNz == 3) type = 11; + else if(fNy == 3 && fNz == 2) type = 9; + else type = 15; + break; + case 5 : if(fNy == 3 && fNz == 2) type = 10; + if(fNy == 2 && fNz == 3 ) type = 12; + if(fNy == 5) type = 16; + else type = fType+1000*fNy+1000000*fNz; + break; + case 6 : if(fNy ==3 && fNz == 2) type = 13; + if(fNy ==2 && fNz == 3) type = 14; + else type = fType+1000*fNy+1000000*fNz; + break; + default: type = fType+1000*fNy+1000000*fNz; + break; + } + + return type; + } +} + +//---------------------------------------------------------------------- +Int_t AliITSRecPoint::GetSDDclusterType() const { +// returns an Int_t with encoded information on cluster size +// Byte1 = fNz Byte0=fNy, other two bytes empty for extra information +// 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 +// Byte1 = fNz Byte0=fNy, other two bytes empty for extra information +// max. allowed cluster size = 255 + Int_t typ=(fNz&0xFF)<<8; + typ+=fNy&0xFF; + return typ; +} + //---------------------------------------------------------------------- void AliITSRecPoint::Read(istream *is){ //////////////////////////////////////////////////////////////////////// @@ -195,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; } @@ -217,4 +308,4 @@ istream &operator>>(istream &is,AliITSRecPoint &r){ r.Read(&is); return is; } -//---------------------------------------------------------------------- \ No newline at end of file +//----------------------------------------------------------------------