//Macro designed to create the input file for the TpcLaserTask //Felix Boehmer, initial creation 19.7.07 { #include bool direction = true; // if false, second vector is interpreted as endVector of the beam //TPC geometry double _rMin = 15.75; double _rMax = 41.2; double _zMin = -39.5; double _zMax = 109.5; double zOffset = 2; int ngrids=30; double dz=(_zMax-_zMin-2*zOffset)/((double)ngrids); double _iondens = 45; double _beamwidth = 0.03; double _firetime = 0; //... double z=_zMin+zOffset; double deltaZ = 2; //total shift of x-y-plane for windschief beams double spread = 24; //spreading angle between two beams TVector3 zaxis(0,0,z); char* _filename="tpc/parfiles/LaserGridJun2012.dat"; std::ofstream outfile(_filename); outfile<<"#This file was created using macro createLaserFile2.C\n"<0)sign=1; beam.RotateZ(sign*alpha); beam.SetZ(tilt[imi]); beam*= (1./beam.Mag()); start.Print(); beam.Print(); TPolyLine3D* ray=new TPolyLine3D(2); ray->SetPoint(0,start.X(),start.Y(),start.Z()); TVector3 l=start+100*beam; ray->SetPoint(1,l.X(),l.Y(),l.Z()); ray->Draw(); //if(iz>(0.6*ngrids) && check==0) { //try to compensate bad edges // _iondens*=5; // check++; //} outfile<