// @(#)root/html:$Name:  $:$Id: THtml.cxx,v 1.124 2006/11/24 16:01:02 brun Exp $
// Author: Mathieu Benoit <mailto:mbenoit@umontreal.ca> 

/*************************************************************************
 * . Class CTDR_Tree					                 *
 *   Written by : Mathieu Benoit                                         *
 *   m.benoit@umontreal.ca						 *
 *************************************************************************/

#include "CTDR_Tree.h"
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <string>
using namespace std;

//////////////////////////////////////////////////////////////////////////		        
// This class represent the abstract class for Detecteur and Field	//		        
//////////////////////////////////////////////////////////////////////////

ClassImp(CTDR_Tree)


//______________________________________________________________________________
		CTDR_Tree::CTDR_Tree(){
//Default constructor
		}

//______________________________________________________________________________
		CTDR_Tree::CTDR_Tree( int NdivX, int NdivY, int NdivZ,double LX,double LY, double LZ)
		{
// Constructor for the CTDR_Tree

			char hash[100];// A character chain to store the hash function
			NDivx=NdivX;
			NDivy=NdivY;
			NDivz=NdivZ;
			Lx=LX;
			Ly=LY;
			Lz=LZ;
};

//______________________________________________________________________________    
Long64_t CTDR_Tree::Hash(double x,double y, double z)
{
//This function calculate the ID of a position x,y,z 
	Long64_t I;
	I=int(x*(NDivy)*(NDivz) + y*(NDivz) +(z));
	return I;
};

//______________________________________________________________________________
void CTDR_Tree::SetPoints(double x , double y ,double z)
{  
//This function calculate the index of the 8 surrounding points to (x,y,z)  
	lowx=floor((x+Lx/2)/(Lx/NDivx));
	highx=ceil((x+Lx/2)/(Lx/NDivx));
	lowy=floor((y+Ly/2)/(Ly/NDivy));
	highy=ceil((y+Ly/2)/(Ly/NDivy));
	lowz=floor((z)/(Lz/NDivz));
	highz=ceil((z)/(Lz/NDivz));
     //cout << lowx << " " << lowy << " " << lowz <<" " << highx << " " << highy << " " << highz <<endl;
};




ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.