X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONRawCluster.cxx;h=fe2281def29d9fdd7fb4f2d453beacbc403218a4;hb=858212ddb389e53e2dda7b9e51e68b11dfca9eaf;hp=35a60df2f64a5629161c9580b9e35841ffbd4047;hpb=a9e2aefa97f1153d6f61e580a32d396156706b7b;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONRawCluster.cxx b/MUON/AliMUONRawCluster.cxx index 35a60df2f64..fe2281def29 100644 --- a/MUON/AliMUONRawCluster.cxx +++ b/MUON/AliMUONRawCluster.cxx @@ -13,27 +13,46 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.1.2.1 2000/06/09 22:04:50 morsch -Was before in DataStructures.cxx +/* $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 "AliMUONRawCluster.h" -#include #include +#include + +#include "AliMUONRawCluster.h" -ClassImp(AliMUONRawCluster); +using std::endl; +using std::cout; +using std::setw; +/// \cond CLASSIMP +ClassImp(AliMUONRawCluster) +/// \endcond -AliMUONRawCluster::AliMUONRawCluster() { -// Constructor +//____________________________________________________ +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; @@ -46,10 +65,36 @@ AliMUONRawCluster::AliMUONRawCluster() { } } fNcluster[0]=fNcluster[1]=-1; + fErrXY[0] = FLT_MAX; + fErrXY[1] = FLT_MAX; } -Int_t AliMUONRawCluster::Compare(TObject *obj) +//____________________________________________________ +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; ifY[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) +//____________________________________________________ +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. +/// 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) { @@ -81,13 +138,11 @@ BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto) } 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 - // +/// 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 @@ -142,10 +197,10 @@ void AliMUONRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Floa } - -Int_t AliMUONRawCluster::PhysicsContribution() +//____________________________________________________ +Int_t AliMUONRawCluster::PhysicsContribution() const { -// Evaluate physics contribution to cluster +/// Evaluate physics contribution to cluster Int_t iPhys=0; Int_t iBg=0; Int_t iMixed=0; @@ -162,3 +217,262 @@ Int_t AliMUONRawCluster::PhysicsContribution() return 0; } } + +//____________________________________________________ +void AliMUONRawCluster::Print(Option_t* opt) const +{ + /// + /// Printing Raw Cluster (Rec Point) information + /// "full" option for printing all the information about the raw cluster + /// + TString sopt(opt); + sopt.ToUpper(); + + cout << Form(": 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