34 #ifndef ROOT_TMVA_PDEFoamCell
45 TMVA::PDEFoamCell::PDEFoamCell()
81 Error(
"PDEFoamCell",
"Dimension has to be >0" );
90 fSerial (cell.fSerial),
91 fStatus (cell.fStatus),
92 fParent (cell.fParent),
93 fDaught0 (cell.fDaught0),
94 fDaught1 (cell.fDaught1),
97 fVolume (cell.fVolume),
98 fIntegral(cell.fIntegral),
100 fElement (cell.fElement)
102 Error(
"PDEFoamCell",
"COPY CONSTRUCTOR NOT IMPLEMENTED" );
136 cellPosi = 0.0; cellSize=1.0;
140 if( pCell== 0)
break;
143 if(dCell == pCell->
GetDau0() ) {
144 cellSize[
kDiv] *=xDivi;
145 cellPosi[
kDiv] *=xDivi;
146 }
else if( dCell == pCell->
GetDau1() ) {
147 cellSize[
kDiv] *=(1.0-xDivi);
148 cellPosi[
kDiv] =cellPosi[
kDiv]*(1.0-xDivi)+xDivi;
150 Error(
"GetHcub ",
"Something wrong with linked tree \n");
169 if( pCell== 0)
break;
172 if(dCell == pCell->
GetDau0() ) {
173 cellSize[
kDiv]=cellSize[
kDiv]*xDivi;
174 }
else if(dCell == pCell->
GetDau1() ) {
175 cellSize[
kDiv]=cellSize[
kDiv]*(1.0-xDivi);
177 Error(
"GetHSize ",
"Something wrong with linked tree \n");
193 for(k=0; k<fDim; k++) volu *= cellSize[k];
210 while ((cell=cell->
GetPare()) != 0){
224 UInt_t depth0 = 0, depth1 = 0;
225 if (GetDau0() !=
NULL)
226 depth0 = GetDau0()->GetTreeDepth(depth+1);
227 if (GetDau1() !=
NULL)
228 depth1 = GetDau1()->GetTreeDepth(depth+1);
230 return (depth0 > depth1 ? depth0 : depth1);
238 if (!option)
Error(
"Print",
"No option set\n");
240 std::cout <<
" Status= "<< fStatus <<
",";
241 std::cout <<
" Volume= "<< fVolume <<
",";
242 std::cout <<
" TrueInteg= " << fIntegral <<
",";
243 std::cout <<
" DriveInteg= "<< fDrive <<
",";
244 std::cout << std::endl;;
245 std::cout <<
" Xdiv= "<<fXdiv<<
",";
246 std::cout <<
" Best= "<<fBest<<
",";
247 std::cout <<
" Parent= {"<< (GetPare() ? GetPare()->GetSerial() : -1) <<
"} ";
248 std::cout <<
" Daught0= {"<< (GetDau0() ? GetDau0()->GetSerial() : -1 )<<
"} ";
249 std::cout <<
" Daught1= {"<< (GetDau1() ? GetDau1()->GetSerial() : -1 )<<
"} ";
250 std::cout << std::endl;;
255 GetHcub(cellPosi,cellSize);
256 std::cout <<
" Posi= "; cellPosi.
Print(
"1"); std::cout<<
","<< std::endl;;
257 std::cout <<
" Size= "; cellSize.
Print(
"1"); std::cout<<
","<< std::endl;;
void Fill(Int_t, PDEFoamCell *, PDEFoamCell *, PDEFoamCell *)
Fills in certain data into newly allocated cell.
virtual ~PDEFoamCell()
Destructor.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void Error(const char *location, const char *msgfmt,...)
void Print(Option_t *option) const
Printout of the cell geometry parameters for the debug purpose.
void Print(Option_t *option) const
Printout of all vector components.
PDEFoamCell * GetPare() const
UInt_t GetTreeDepth(UInt_t depth=0)
Get depth of cell tree, starting at this cell.
void CalcVolume()
Calculates volume of the cell using size params which are calculated.
UInt_t GetDepth()
Get depth of cell in binary tree, where the root cell has depth 1.
void GetHSize(PDEFoamVect &) const
Provides size of the cell Size parameters are calculated by analyzing information in all parents cell...
ClassImp(TMVA::PDEFoamCell) TMVA
Default constructor for streamer.
Mother of all ROOT objects.
Abstract ClassifierFactory template that handles arbitrary types.
PDEFoamCell * GetDau1() const
void GetHcub(PDEFoamVect &, PDEFoamVect &) const
Provides size and position of the cell These parameter are calculated by analyzing information in all...
PDEFoamCell * GetDau0() const