]>
Commit | Line | Data |
---|---|---|
12f6dd57 | 1 | // -- |
2 | // -- | |
3 | // Implementation for TTree output in PHOS DA | |
4 | // for calibrating energy by pi0 and MIP. | |
5 | // -- | |
6 | // -- Author: Hisayuki Torii (Hiroshima Univ.) | |
7 | // -- | |
8 | #include <iostream> | |
9 | #include <math.h> | |
10 | #include <Rtypes.h> | |
11 | #include "AliPHOSDATreeDigit.h" | |
12 | ||
13 | ClassImp(AliPHOSDATreeDigit) | |
14 | //------------------------------------------------------------------------ | |
15 | bool AliPHOSDATreeDigit::IsNeighbor(const AliPHOSDATreeDigit& digit) const{ | |
16 | // Check wether the given digit is neighboring to this digit. | |
17 | // Return true if yes. | |
18 | if( fabs(this->GetRow() - digit.GetRow()) < 2 && fabs(this->GetCol() - digit.GetCol()) < 2 ){ | |
19 | return true; | |
20 | } | |
21 | return false; | |
22 | } | |
23 | //------------------------------------------------------------------------ | |
24 | void AliPHOSDATreeDigit::Print(char* opt){ | |
25 | // Print out | |
26 | std::cout<<" AliPHOSDATreeDigit:: "<<opt<<" E="<<fEnergy<<" (row,col)=(" | |
27 | <<GetRow()<<","<<GetCol()<<") absid="<<fAbsId<<std::endl; | |
28 | } | |
29 | //------------------------------------------------------------------------ | |
30 | std::ostream& operator<<(std::ostream& out, const AliPHOSDATreeDigit& digit){ | |
31 | // Print out | |
32 | //std::cout<<" AliPHOSDATreeDigit:: E="<<digit.GetEnergy()<<" (row,col)=(" | |
33 | //<<digit.GetRow()<<","<<digit.GetCol()<<") absid="<<digit.GetAbsId()<<std::endl; | |
34 | out<<" AliPHOSDATreeDigit:: E="<<digit.fEnergy<<" (row,col)=(" | |
35 | <<(int)(digit.fAbsId/56)<<","<<digit.fAbsId%56<<") absid="<<digit.fAbsId; | |
36 | return out; | |
37 | } | |
38 | //------------------------------------------------------------------------ |