/************************************************************************** * 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" /// \cond CLASSIMP ClassImp(AliMUONRawCluster) /// \endcond //____________________________________________________ AliMUONRawCluster::AliMUONRawCluster() : TObject(), 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; 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] = 0.144; fErrXY[1] = 0.01; } //____________________________________________________ AliMUONRawCluster::~AliMUONRawCluster() { /// Destructor } //____________________________________________________ Int_t AliMUONRawCluster::Compare(const TObject *obj) const { /// Compare /* AliMUONRawCluster *raw=(AliMUONRawCluster *)obj; Float_t r=GetRadius(); Float_t ro=raw->GetRadius(); if (r>ro) return 1; else if (rfY[0]; if (y>yo) return 1; else if (y(obj); if ( GetCharge(0) > raw->GetCharge(0) ) { return 1; } else if ( GetCharge(0) < raw->GetCharge(0) ) { 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