#!/usr/local/bin/perl ######################################################################### #*-- AUTHOR : Hector Alvarez-Pol hapol@fpddux.usc.es #*-- Date: 11/2006 #*-- Last Update: 14/11/06 by Hector Alvarez # ---------------------------------------------------------------------- # # Program to convert the map fields to simplest vector of magnetic field # It is assumed a typical structure: X B_X Y B_Y Z B_Z # ######################################################################### $file1 = 'Aladin/measuredF-ala18.dat'; # open(INTRO1, $file1); # Open the file @lines = ; # Read it into an array close(INTRO1); # Close the file # for($i = 0;$i < scalar(@lines); ++$i) { chomp (@lines[$i]); #avoiding the end of line } # # separating the components in the lines # for($i = 0;$i $fileOut"); # Open for output # print OUT1 " // ALADIN MAP - from measuredF-ala18.dat file \n"; print OUT1 " G4double xfield[] = {"; for($i = 1;$i