+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-// IETF/DTD HTML 2.0// EN">
-<html>
-<!-- -->
-<!-- Author: ROOT team (rootdev@hpsalo.cern.ch) -->
-<!-- -->
-<!-- Date: Mon Mar 26 12:10:04 2001 -->
-<!-- -->
-<head>
-<title>AliPHOSPpsdRecPoint - source file</title>
-<link rev=made href="mailto:rootdev@root.cern.ch">
-<meta name="rating" content="General">
-<meta name="objecttype" content="Manual">
-<meta name="keywords" content="software development, oo, object oriented, unix, x11, windows, c++, html, rene brun, fons rademakers">
-<meta name="description" content="ROOT - An Object Oriented Framework For Large Scale Data Analysis.">
-</head>
-<body BGCOLOR="#ffffff" LINK="#0000ff" VLINK="#551a8b" ALINK="#ff0000" TEXT="#000000">
-<a name="TopOfPage"></a>
-<pre>
-/**************************************************************************
- * 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$ */
-<b>//_________________________________________________________________________</b>
-<b>// A RecPoint (cluster) in the PPSD </b>
-<b>// A PPSD RecPoint ends up to be a single digit</b>
-<b>// Why should I put meaningless comments</b>
-<b>// just to satisfy</b>
-<b>// the code checker </b>
-<b>// </b>
-<b>//*-- Yves Schutz (SUBATECH)</b>
-
-<b>// --- ROOT system ---</b>
-
-#include "TPad.h"
-
-<b>// --- Standard library ---</b>
-
-#include <iostream.h>
-
-<b>// --- AliRoot header files ---</b>
-
-#include "AliPHOSGeometry.h"
-#include "AliPHOSPpsdRecPoint.h"
-#include "AliPHOSCpvRecPoint.h"
-#include "AliRun.h"
-
-ClassImp(AliPHOSPpsdRecPoint)
-
-<b>//____________________________________________________________________________</b>
-<a name="AliPHOSPpsdRecPoint:AliPHOSPpsdRecPoint"> </a><a href=".././AliPHOSPpsdRecPoint.html#AliPHOSPpsdRecPoint:AliPHOSPpsdRecPoint">AliPHOSPpsdRecPoint::AliPHOSPpsdRecPoint</a>(<a href="../ListOfTypes.html#void">void</a>)
-{
-<b> // ctor</b>
-
- fMulDigit = 0 ;
- fGeom = <a href=".././AliPHOSGeometry.html#AliPHOSGeometry:GetInstance">AliPHOSGeometry::GetInstance</a>() ;
- fLocPos.SetX(1000000.) ; //Local position should be evaluated
-}
-
-<b>//____________________________________________________________________________</b>
-<a name="AliPHOSPpsdRecPoint:AddDigit"> </a><a href="../ListOfTypes.html#void">void</a> <a href=".././AliPHOSPpsdRecPoint.html#AliPHOSPpsdRecPoint:AddDigit">AliPHOSPpsdRecPoint::AddDigit</a>(<a href=".././AliPHOSDigit.html">AliPHOSDigit</a> & digit, <a href="../ListOfTypes.html#Float_t">Float_t</a> Energy)
-{
-<b> // adds a digit to the digits list</b>
-<b> // and accumulates the total amplitude and the multiplicity </b>
-
-
- if ( fMulDigit >= fMaxDigit ) { // increase the size of the lists
- fMaxDigit*=2 ;
- <a href="../ListOfTypes.html#int">int</a> * tempo = new ( <a href="../ListOfTypes.html#int">int</a>[fMaxDigit] ) ;
- <a href="../ListOfTypes.html#Int_t">Int_t</a> index ;
-
- for ( index = 0 ; index < fMulDigit ; index++ )
- tempo[index] = fDigitsList[index] ;
-
- delete [] fDigitsList ;
- fDigitsList = new ( <a href="../ListOfTypes.html#int">int</a>[fMaxDigit] ) ;
-
- for ( index = 0 ; index < fMulDigit ; index++ )
- fDigitsList[index] = tempo[index] ;
-
- delete [] tempo ;
- }
-
- fDigitsList[fMulDigit++] = digit.GetIndexInList() ;
- fAmp += Energy ;
- EvalPHOSMod(&digit) ;
-}
-
-<b>//____________________________________________________________________________</b>
-<a name="AliPHOSPpsdRecPoint:Compare"> </a><a href="../ListOfTypes.html#Int_t">Int_t</a> <a href=".././AliPHOSPpsdRecPoint.html#AliPHOSPpsdRecPoint:Compare">AliPHOSPpsdRecPoint::Compare</a>(const TObject * obj) const
-{
-<b> // Compares according to the position</b>
- <a href="../ListOfTypes.html#Float_t">Float_t</a> delta = 1 ; //width of the "Sorting row"
-
- <a href="../ListOfTypes.html#Int_t">Int_t</a> rv ;
-
- if( (strcmp(obj->ClassName() , "<a href=".././AliPHOSPpsdRecPoint.html">AliPHOSPpsdRecPoint</a>" )) == 0) // PPSD Rec Point
- {
- <a href=".././AliPHOSPpsdRecPoint.html">AliPHOSPpsdRecPoint</a> * clu = (<a href=".././AliPHOSPpsdRecPoint.html">AliPHOSPpsdRecPoint</a> *)obj ;
-
- <a href="../ListOfTypes.html#Float_t">Float_t</a> x1 , z1 ; //This rec <a href="../ListOfTypes.html#point">point</a>
- <a href="../ListOfTypes.html#Float_t">Float_t</a> x2 , z2 ; //
-
- <a href="../ListOfTypes.html#Int_t">Int_t</a> phosmod1 ;
- <a href="../ListOfTypes.html#Int_t">Int_t</a> phosmod2 ;
-
- <a href="../ListOfTypes.html#Int_t">Int_t</a> up1 ;
- <a href="../ListOfTypes.html#Int_t">Int_t</a> up2 ;
-
- if(<a href="#AliPHOSPpsdRecPoint:GetUp">GetUp</a>()) // upper layer
- up1 = 0 ;
- else // lower layer
- up1 = 1 ;
-
- if(clu-><a href="#AliPHOSPpsdRecPoint:GetUp">GetUp</a>()) // upper layer
- up2 = 0 ;
- else // lower layer
- up2 = 1 ;
-
- TVector3 posloc ;
- GetLocalPosition(posloc) ;
- x1 = posloc.X() ;
- z1 = posloc.Z() ;
- phosmod1 = GetPHOSMod();
- clu->GetLocalPosition(posloc) ;
- x2 = posloc.X() ;
- z2 = posloc.Z() ;
- phosmod2 = clu->GetPHOSMod();
-
- if(phosmod1 == phosmod2 ) {
-
- if(up1 == up2 ){
- <a href="../ListOfTypes.html#Int_t">Int_t</a> rowdif = (<a href="../ListOfTypes.html#Int_t">Int_t</a>)TMath::Ceil(x1/delta) - (<a href="../ListOfTypes.html#Int_t">Int_t</a>) TMath::Ceil(x2/delta) ;
-
- if (rowdif> 0)
- rv = 1 ;
- else if(rowdif < 0)
- rv = -1 ;
- else if(z1>z2)
- rv = -1 ;
- else
- rv = 1 ;
- }
-
- else {
-
- if(up1 < up2 ) // Upper level first (up = True or False, True > False)
- rv = -1 ;
- else
- rv = 1 ;
- }
-
- } // if phosmod1 == phosmod2
-
- else {
-
- if(phosmod1 < phosmod2 )
- rv = -1 ;
- else
- rv = 1 ;
-
- }
-
- return rv ;
- }
- else
- {
- <a href=".././AliPHOSCpvRecPoint.html">AliPHOSCpvRecPoint</a> * clu = (<a href=".././AliPHOSCpvRecPoint.html">AliPHOSCpvRecPoint</a> *) obj ;
- if(GetPHOSMod() < clu->GetPHOSMod() )
- rv = -1 ;
- else
- rv = 1 ;
- return rv ;
- }
-
-
-}
-
-<b>//____________________________________________________________________________</b>
-<a name="AliPHOSPpsdRecPoint:EvalAll"> </a><a href="../ListOfTypes.html#void">void</a> <a href=".././AliPHOSPpsdRecPoint.html#AliPHOSPpsdRecPoint:EvalAll">AliPHOSPpsdRecPoint::EvalAll</a>(<a href="../ListOfTypes.html#Float_t">Float_t</a> logWeight,TClonesArray * digits ){
- <a href=".././AliPHOSRecPoint.html#AliPHOSRecPoint:EvalAll">AliPHOSRecPoint::EvalAll</a>(logWeight,digits) ;
- <a href="#AliPHOSPpsdRecPoint:EvalLocalPosition">EvalLocalPosition</a>(logWeight,digits) ;
- <a href="#AliPHOSPpsdRecPoint:EvalUp">EvalUp</a>(digits) ;
-}
-
-<b>//____________________________________________________________________________</b>
-<a name="AliPHOSPpsdRecPoint:EvalLocalPosition"> </a><a href="../ListOfTypes.html#void">void</a> <a href=".././AliPHOSPpsdRecPoint.html#AliPHOSPpsdRecPoint:EvalLocalPosition">AliPHOSPpsdRecPoint::EvalLocalPosition</a>(<a href="../ListOfTypes.html#Float_t">Float_t</a> logWeight,TClonesArray * digits )
-{
-<b> // Calculates the local position in the PHOS-PPSD-module corrdinates</b>
-
- <a href="../ListOfTypes.html#Int_t">Int_t</a> relid[4] ;
-
- <a href="../ListOfTypes.html#Float_t">Float_t</a> x = 0. ;
- <a href="../ListOfTypes.html#Float_t">Float_t</a> z = 0. ;
-
- <a href=".././AliPHOSGeometry.html">AliPHOSGeometry</a> * phosgeom = (<a href=".././AliPHOSGeometry.html">AliPHOSGeometry</a> *) fGeom ;
-
- <a href=".././AliPHOSDigit.html">AliPHOSDigit</a> * digit ;
- <a href="../ListOfTypes.html#Int_t">Int_t</a> iDigit;
-
- for(iDigit = 0; iDigit < fMulDigit; iDigit++) {
- digit = (<a href=".././AliPHOSDigit.html">AliPHOSDigit</a> *) digits->At(fDigitsList[iDigit]) ;
-
- <a href="../ListOfTypes.html#Float_t">Float_t</a> xi ;
- <a href="../ListOfTypes.html#Float_t">Float_t</a> zi ;
- phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
- phosgeom->RelPosInModule(relid, xi, zi);
- x += xi ;
- z += zi ;
- }
-
- x /= fMulDigit ;
- z /= fMulDigit ;
-
- fLocPos.SetX(x) ;
- fLocPos.SetY(0.) ;
- fLocPos.SetZ(z) ;
-
-}
-
-<b>//____________________________________________________________________________</b>
-<a name="AliPHOSPpsdRecPoint:EvalUp"> </a><a href="../ListOfTypes.html#void">void</a> <a href=".././AliPHOSPpsdRecPoint.html#AliPHOSPpsdRecPoint:EvalUp">AliPHOSPpsdRecPoint::EvalUp</a>(TClonesArray * digits)
-{
-<b> // Are we in the uper PPSD module ?</b>
-
- <a href="../ListOfTypes.html#Int_t">Int_t</a> relid[4] ;
-
- <a href=".././AliPHOSGeometry.html">AliPHOSGeometry</a> * phosgeom = (<a href=".././AliPHOSGeometry.html">AliPHOSGeometry</a> *) fGeom ;
-
-
- <a href=".././AliPHOSDigit.html">AliPHOSDigit</a> *digit = (<a href=".././AliPHOSDigit.html">AliPHOSDigit</a> *) digits->At(fDigitsList[0]) ;
-
- phosgeom->AbsToRelNumbering(digit->GetId(),relid);
-
- if((<a href="../ListOfTypes.html#Int_t">Int_t</a>)TMath::Ceil((<a href="../ListOfTypes.html#Float_t">Float_t</a>)relid[1]/
- (phosgeom->GetNumberOfModulesPhi()*phosgeom->GetNumberOfModulesZ())-0.0001 ) > 1)
- <a href=".././AliPHOSPpsdRecPoint.html#AliPHOSPpsdRecPoint:fUp">fUp</a> = kFALSE ;
- else
- <a href=".././AliPHOSPpsdRecPoint.html#AliPHOSPpsdRecPoint:fUp">fUp</a> = kTRUE ;
-
-}
-<b>//______________________________________________________________________________</b>
-<a name="AliPHOSPpsdRecPoint:Paint"> </a><a href="../ListOfTypes.html#void">void</a> <a href=".././AliPHOSPpsdRecPoint.html#AliPHOSPpsdRecPoint:Paint">AliPHOSPpsdRecPoint::Paint</a>(<a href="../ListOfTypes.html#Option_t">Option_t</a> *)
-{
-<b> //*-*-*-*-*-*-*-*-*-*-*Paint this ALiRecPoint as a TMarker with its current attributes*-*-*-*-*-*-*</b>
-<b> //*-* =============================================</b>
-
- TVector3 pos(0.,0.,0.) ;
- GetLocalPosition(pos) ;
- <a href="../ListOfTypes.html#Coord_t">Coord_t</a> x = pos.X() ;
- <a href="../ListOfTypes.html#Coord_t">Coord_t</a> y = pos.Z() ;
- <a href="../ListOfTypes.html#Color_t">Color_t</a> markercolor = 1 ;
- <a href="../ListOfTypes.html#Size_t">Size_t</a> markersize = 1. ;
- <a href="../ListOfTypes.html#Style_t">Style_t</a> markerstyle = 2 ;
- if (<a href="#AliPHOSPpsdRecPoint:GetUp">GetUp</a>())
- markerstyle = 3 ;
-
- if (!gPad->IsBatch()) {
- gVirtualX->SetMarkerColor(markercolor);
- gVirtualX->SetMarkerSize (markersize);
- gVirtualX->SetMarkerStyle(markerstyle);
- }
- gPad->SetAttMarkerPS(markercolor,markerstyle,markersize);
- gPad->PaintPolyMarker(1,&x,&y,"");
-
-
-}
-
-<b>//____________________________________________________________________________</b>
-<a name="AliPHOSPpsdRecPoint:Print"> </a><a href="../ListOfTypes.html#void">void</a> <a href=".././AliPHOSPpsdRecPoint.html#AliPHOSPpsdRecPoint:Print">AliPHOSPpsdRecPoint::Print</a>(<a href="../ListOfTypes.html#Option_t">Option_t</a> * option)
-{
-<b> // Print the digits information </b>
-
- cout << "<a href=".././AliPHOSPpsdRecPoint.html">AliPHOSPpsdRecPoint</a>: " << endl ;
-
- <a href="../ListOfTypes.html#Int_t">Int_t</a> iDigit;
- cout << " Digit{s} # " ;
- for(iDigit=0; iDigit<fMulDigit; iDigit++)
- cout << fDigitsList[iDigit] << " " ;
- cout << endl ;
-
- cout << " Multiplicity = " << fMulDigit << endl ;
- cout << " Stored at position " << fIndexInList << endl ;
-}
-
-
-</pre>
-
-<!--SIGNATURE-->
-<br>
-<address>
-<hr>
-<center>
-<a href="http://root.cern.ch/root/Welcome.html">ROOT page</a> - <a href="../ClassIndex.html">Class index</a> - <a href="#TopOfPage">Top of the page</a><br>
-</center>
-<hr>This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to <a href="mailto:rootdev@root.cern.ch">ROOT support</a>, or contact <a href="mailto:rootdev@root.cern.ch">the developers</a> with any questions or problems regarding ROOT.
-</address>
-</body>
-</html>