/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id$ */ //----------------------------------------------------------------------------- // Class AliMUONRawCluster // ------------------------- // Class for the MUON RecPoint // It contains the properties of the physics cluters found in the tracking chambers // RawCluster contains also the information from the both cathode of the chambers. //----------------------------------------------------------------------------- #include "Riostream.h" #include #include #include "AliMUONRawCluster.h" using std::endl; using std::cout; using std::setw; /// \cond CLASSIMP ClassImp(AliMUONRawCluster) /// \endcond //____________________________________________________ AliMUONRawCluster::AliMUONRawCluster() : AliMUONVCluster(), fClusterType(0), fGhost(0), fDetElemId(0) { /// Constructor fTracks[0]=fTracks[1]=fTracks[2]=-1; for (int j=0;j<2;j++) { fQ[j]=0; fX[j]=0; fY[j]=0; fZ[j]=0; fMultiplicity[j]=0; fPeakSignal[j]=-1; fChi2[j]=-1; for (int k=0;k<50;k++) { fIndexMap[k][j]=-1; fOffsetMap[k][j]=0; fContMap[k][j]=0; fPhysicsMap[k]=-1; } } fNcluster[0]=fNcluster[1]=-1; fErrXY[0] = FLT_MAX; fErrXY[1] = FLT_MAX; } //____________________________________________________ AliMUONRawCluster::~AliMUONRawCluster() { /// Destructor } //____________________________________________________ void AliMUONRawCluster::SetDigitsId(Int_t nDigits, const UInt_t *digitsId) { /// Set the array of digit Id /// if digitsId is not given the array is filled with id=0 fMultiplicity[0] = (nDigits < 50) ? nDigits : 50; if (fMultiplicity[0] == 0) return; if (digitsId == 0) for (Int_t i=0; iGetRadius(); if (r>ro) return 1; else if (rfY[0]; if (y>yo) return 1; else if (y(obj); if ( GetCharge() > raw->GetCharge() ) { return 1; } else if ( GetCharge() < raw->GetCharge() ) { return -1; } return 0; } //____________________________________________________ Int_t AliMUONRawCluster::BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto) { /// Find object using a binary search. Array must first have been sorted. /// Search can be limited by setting upto to desired index. Int_t low=from, high=upto-1, half; while(high-low>1) { half=(high+low)/2; if(y>coord[half]) low=half; else high=half; } return low; } //____________________________________________________ void AliMUONRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Float_t *yarray,Float_t *qarray, Int_t ntr) { /// Get the 3 closest points(cog) one can find on the second cathode /// starting from a given cog on first cathode // // Loop over deltax, only 3 times // Float_t xmin; Int_t jmin; Int_t id[3] = {-2,-2,-2}; Float_t jx[3] = {0.,0.,0.}; Float_t jy[3] = {0.,0.,0.}; Float_t jq[3] = {0.,0.,0.}; Int_t jid[3] = {-2,-2,-2}; Int_t i,j,imax; if (ntr<3) imax=ntr; else imax=3; for(i=0;i: DetEle=%4d (x,y,z)=(%7.4f,%7.4f,%7.4f) cm" " Chi2=%7.2f Q=%7.2f", GetDetElemId(),GetX(),GetY(),GetZ(),GetChi2(), GetCharge()); if ( sopt.Contains("FULL") ) { cout << ", Hit=" << setw(4) << GetTrack(0) << ", Track1=" << setw(4) << GetTrack(1) << ", Track2=" << setw(4) << GetTrack(2); } cout << endl; } //____________________________________________________ void AliMUONRawCluster::DumpIndex(void) { /// Dumping IdexMap of the cluster printf ("-----\n"); for (Int_t icat=0;icat<2;icat++) { printf ("Mult %d\n",fMultiplicity[icat]); for (Int_t idig=0;idig