//Macro designed to create the input file for the TpcLaserTask //Felix Boehmer, initial creation 19.7.07 { #include //TPC geometry double _rMin = 15.5; double _rMax = 41.5; double _zMin = -39.5; double _zMax = 109.5; int ngrids=15; double dz=10; double _iondens = 45; double _beamwidth = 0.02; double _firetime = 0; //... double z=-40; 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="LaserGridTest.dat"; std::ofstream outfile(_filename); outfile<<"#This file was created using macro createLaserFile.C"<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<