1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
19 // Implementation for TTree output in PHOS DA
20 // for calibrating energy by pi0 and MIP.
22 // -- Author: Hisayuki Torii (Hiroshima Univ.)
27 #include "AliPHOSDATreeDigit.h"
29 ClassImp(AliPHOSDATreeDigit)
30 //------------------------------------------------------------------------
31 bool AliPHOSDATreeDigit::IsNeighbor(const AliPHOSDATreeDigit& digit) const{
32 // Check wether the given digit is neighboring to this digit.
33 // Return true if yes.
34 if( fabs(this->GetRow() - digit.GetRow()) < 2 && fabs(this->GetCol() - digit.GetCol()) < 2 ){
39 //------------------------------------------------------------------------
40 void AliPHOSDATreeDigit::Print(Option_t *opt) const
43 std::cout<<" AliPHOSDATreeDigit:: "<<opt<<" E="<<fEnergy<<" (row,col)=("
44 <<GetRow()<<","<<GetCol()<<") absid="<<fAbsId<<std::endl;
46 //------------------------------------------------------------------------
47 std::ostream& operator<<(std::ostream& out, const AliPHOSDATreeDigit& digit){
49 //std::cout<<" AliPHOSDATreeDigit:: E="<<digit.GetEnergy()<<" (row,col)=("
50 //<<digit.GetRow()<<","<<digit.GetCol()<<") absid="<<digit.GetAbsId()<<std::endl;
51 out<<" AliPHOSDATreeDigit:: E="<<digit.fEnergy<<" (row,col)=("
52 <<(int)(digit.fAbsId/56)<<","<<digit.fAbsId%56<<") absid="<<digit.fAbsId;
55 //------------------------------------------------------------------------