| Re: Constant magnetic field instead Solenoid Field maps [message #14911 is a reply to message #14905] | 
			Tue, 02 July 2013 11:43    | 
		 
		
			
				
				
				
					
						  
						Anastasia Karavdina
						 Messages: 76 Registered: May 2010  Location: Mainz, Germany
						
					 | 
					continuous participant  | 
					  From: *kph.uni-mainz.de
  | 
		 
		 
	 | 
 
	
		Well, I was wrong about GetBxyz method implementation in case field maps classes, actually it is implemented there. 
 
For  PndConstField I propose following implementation of this method (which is basicly merge of GetBx(), GetBy(),GetBz()): 
void PndConstField::GetBxyz(const Double_t point[3], Double_t* bField){
  if ( point [0] < fXmin  ||  point [0] > fXmax  ||
       point [1] < fYmin  ||  point [1] > fYmax  ||
       point [2] < fZmin  ||  point [2] > fZmax ) {
    bField[0]=0;     bField[1]=0;    bField[2]=0;
  }
  else{
    bField[0]=fBx;     bField[1]=fBy;    bField[2]=fBz;
  }
} 
 
Can it be insert in svn version of code, please? Stefano, I can send changed source and header files if they needed. 
 
Cheers, 
Anastasia
		
		
		
 |  
	| 
		
	 | 
 
 
 |