Index: /Interface_Web/trunk/pspaWT/History
===================================================================
--- /Interface_Web/trunk/pspaWT/History	(revision 416)
+++ /Interface_Web/trunk/pspaWT/History	(revision 417)
@@ -5,4 +5,10 @@
      PSPA - Plateforme de simulation en physique des accÃ©lÃ©rateurs
      =========================================================
+
+10 juin 2013  : Guy Le Meur
+- redefinition du faisceau (particleBeam) comme donné à z = cte
+- pour PARMELA, quand le faiceau n'est pas donné par rfgun, on recule 
+  le faisceau, pour qu'au début du calcul il soit tout entier avant le 
+  premier élément.
 
 18 avril 2013 : Laurent Garnier
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/particleBeam.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/particleBeam.h	(revision 416)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/particleBeam.h	(revision 417)
@@ -20,17 +20,23 @@
   double P0Transport_;
 
-  // la representation du faisceau de particules sera a preciser ulterieurement 
-  // Pour l'instant une particule courante est definie par : 
-  // x
-  // y
-  // deltaz = z - z0 (z0 est le z de la particule de reference)
-  // gamma.betax
+  // ce faisceau contient les coordonnees des particules quand elles 
+  // passe en un z, qui est celui de la particules de reference (
+  // (particule donne par l'attribut  referenceParticle_ ci-dessous ; 
+  // cette particule est abstraite, car elle est dupliquee dans le faisceau 
+  // proprement dit, et n'intervient plus, en tant que telle, dans la dynamique)
+
+  // Une particule courante est definie par : 
+  // x (cm)
+  // y (cm)
+  // cdeltat = dephasage, donc dÃ©calage en z, exprime en c.dt soit, en cm  
+  // cdeltat > 0 implique que la particule est en avance sur la particule de ref.
+  // gamma.betax (radians ? a verifier)
   // gamma.betay
   // gamma.betaz
-  vector<bareParticle> goodPartic_;
 
-  // par ailleurs, la particules de reference est definie par x,y,z,gamma.betax, gamma.betay, gamma.betaz
-  // elle est dupliquee dans le faisceau prorement dit (goodPartic_) avec z = z-z0 et ne doit, par consequent,
-  // pas etre prise en compte dans les calculs de trajectoire.
+  vector<bareParticle> relativePartic_;
+  // La particule de reference (abstraite) est definie par x,y,z,gamma.betax, gamma.betay, gamma.betaz
+  // elle est dupliquee dans le faisceau proprement dit (relativePartic_) avec z = 0;
+
   bareParticle referenceParticle_;
   
@@ -94,4 +100,5 @@
  }
 
+
  public:
 
@@ -112,12 +119,22 @@
   vector<bareParticle>& getParticleVector(); 
   double getXmaxRms();
-  void getVariance(double& varx, double& vary, double& varz) const;
+  //  void getVariance(double& varx, double& vary, double& varz) const;
   void set2Moments(beam2Moments& moments);
   void setWithParticles(vector<double>& centroid, bareParticle& referencePart, vector<bareParticle>& particles);
   void printAllXYZ() const;
-  void Zrange(double& zmin, double& zmax) const;
+  void ZrangeCdt(double& zmin, double& zmax) const; // extension en phase (cm)
   void donneesDessinEllipse(vector<double>& xcor, vector<double>& ycor, vector<string>& legende, string namex, string namey);
   void particlesPhaseSpaceData(vector<double>& xcor, vector<double>& ycor, vector<string>& legende, string namex, string namey);
-  virtual string FileOutputFlow() const;
+
+
+ // coordonnees d'une particule dans le faisceau deploye ( passage 
+ // d'une representation z=cte a une representation t=cte)
+ TRIDVECTOR coordonneesDeployees(unsigned particleIndex, double cdtShift = 0.0);
+
+ inline TRIDVECTOR betaGamma(unsigned particleIndex) {
+     return relativePartic_.at(particleIndex).getBetaGamma();
+   }
+
+  virtual string fileOutputFlow() const;
   virtual bool FileInput(ifstream& ifs);
 
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h	(revision 416)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h	(revision 417)
@@ -16,4 +16,5 @@
 
     vector<int> relativeParmelaElementIndices_;
+
 
   bool beamFromParmela(string workingDir,unsigned numeroElement, double referencefrequency, vector<double>& centroid, bareParticle& refPart,vector<bareParticle>& particles );
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/particleBeam.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/particleBeam.cc	(revision 416)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/particleBeam.cc	(revision 417)
@@ -19,5 +19,5 @@
 
 void particleBeam::clear() {
-  goodPartic_.clear();
+  relativePartic_.clear();
   rij_.raz();
   P0Transport_ = 0.0;
@@ -27,5 +27,5 @@
 
 int particleBeam::getNbParticles() const {
-  return goodPartic_.size();
+  return relativePartic_.size();
 }
 
@@ -99,7 +99,7 @@
   centroid_ = centroid;
   referenceParticle_ = referencePart;
-  goodPartic_.clear();
-  goodPartic_ = particles;
-  cout << " particleBeam::setWithParticles taille vect. part. ENREGISTRE " << goodPartic_.size() << endl;
+  relativePartic_.clear();
+  relativePartic_ = particles;
+  cout << " particleBeam::setWithParticles taille vect. part. ENREGISTRE " << relativePartic_.size() << endl;
   particleRepresentationOk_ = true;
 }
@@ -114,89 +114,89 @@
 void  particleBeam::addParticle( bareParticle p)
 {
-  goodPartic_.push_back(p);
+  relativePartic_.push_back(p);
 }
 
 const vector<bareParticle>& particleBeam::getParticleVector() const
 {
-  return goodPartic_;
+  return relativePartic_;
 }
 
 vector<bareParticle>& particleBeam::getParticleVector() 
 {
-  return goodPartic_;
-}
-
-void particleBeam::getVariance(double& varx, double& vary, double& varz) const {
-  unsigned int k;
-  double x,y,z;
-  double xav = 0.;
-  double yav = 0.;
-  double zav = 0.;
-  double xavsq = 0.;
-  double yavsq = 0.;
-  double zavsq = 0.;
-
-  TRIDVECTOR pos;
-
-
-  for ( k = 0 ; k < goodPartic_.size(); k++) {
-    pos = goodPartic_.at(k).getPosition();
-    pos.getComponents(x,y,z);
-    //      partic_[k].getXYZ(x,y,z);
-    xav += x;
-    xavsq += x*x;
-    yav += y;
-    yavsq += y*y;
-    zav += z;
-    zavsq += z*z;
-  }
-
-  double aginv = double (goodPartic_.size());
-  aginv = 1.0/aginv;
-
-  varx =  aginv * ( xavsq - xav*xav*aginv );
-  vary =  aginv * ( yavsq - yav*yav*aginv );
-  varz =  aginv * ( zavsq - zav*zav*aginv );
-}
+  return relativePartic_;
+}
+
+// void particleBeam::getVariance(double& varx, double& vary, double& varz) const {
+//   unsigned int k;
+//   double x,y,z;
+//   double xav = 0.;
+//   double yav = 0.;
+//   double zav = 0.;
+//   double xavsq = 0.;
+//   double yavsq = 0.;
+//   double zavsq = 0.;
+
+//   TRIDVECTOR pos;
+
+
+//   for ( k = 0 ; k < goodPartic_.size(); k++) {
+//     pos = goodPartic_.at(k).getPosition();
+//     pos.getComponents(x,y,z);
+//     //      partic_[k].getXYZ(x,y,z);
+//     xav += x;
+//     xavsq += x*x;
+//     yav += y;
+//     yavsq += y*y;
+//     zav += z;
+//     zavsq += z*z;
+//   }
+
+//   double aginv = double (goodPartic_.size());
+//   aginv = 1.0/aginv;
+
+//   varx =  aginv * ( xavsq - xav*xav*aginv );
+//   vary =  aginv * ( yavsq - yav*yav*aginv );
+//   varz =  aginv * ( zavsq - zav*zav*aginv );
+// }
 
 
 void particleBeam::printAllXYZ() const {
   cout << " dump du faisceau : " << endl;
-  cout <<  goodPartic_.size() << " particules " << endl;
+  cout <<  relativePartic_.size() << " particules " << endl;
   unsigned int k;
-  for ( k = 0 ; k < goodPartic_.size(); k++)
+  for ( k = 0 ; k < relativePartic_.size(); k++)
     {
       double xx,yy,zz;
-      goodPartic_.at(k).getPosition().getComponents(xx,yy,zz);
+      relativePartic_.at(k).getPosition().getComponents(xx,yy,zz);
       double betgamx, betgamy, betgamz;
-      goodPartic_.at(k).getBetaGamma().getComponents(betgamx, betgamy, betgamz);
-      cout << " part. numero " << k << "  x= " << xx << " y= " << yy  << " z= " << zz << "  betgamx= " << betgamx << " betgamy= " << betgamy  << " betgamz= " << betgamz << endl;
-    }
-}
-
-
-
-void particleBeam::Zrange(double& zmin, double& zmax) const {
+      relativePartic_.at(k).getBetaGamma().getComponents(betgamx, betgamy, betgamz);
+      cout << " part. numero " << k << "  x= " << xx << " y= " << yy  << " dphas (c.dt, cm) = " << zz << "  betgamx= " << betgamx << " betgamy= " << betgamy  << " betgamz= " << betgamz << endl;
+    }
+}
+
+
+// extension en phase (cm)
+void particleBeam::ZrangeCdt(double& cdtmin, double& cdtmax) const {
   double z;
-  zmin = GRAND;
-  zmax = -zmin;
+  cdtmin = GRAND;
+  cdtmax = -cdtmin;
 
   unsigned int k;
-  for ( k = 0 ; k < goodPartic_.size(); k++)
+  for ( k = 0 ; k < relativePartic_.size(); k++)
     {
-      z = goodPartic_.at(k).getZ();
-      if ( z < zmin ) zmin = z;
-      else if ( z > zmax) zmax = z;	    
-    }
-}
-
-
-
-string particleBeam::FileOutputFlow() const {
+      z = relativePartic_.at(k).getZ(); // ce z est un dephasage, c.dt, en cm
+      if ( z < cdtmin ) cdtmin = z;
+      else if ( z > cdtmax) cdtmax = z;	    
+    }
+}
+
+
+
+string particleBeam::fileOutputFlow() const {
   ostringstream sortie;
   unsigned int k;
-  for ( k = 0 ; k < goodPartic_.size(); k++)
+  for ( k = 0 ; k < relativePartic_.size(); k++)
     {
-      sortie << goodPartic_.at(k).FileOutputFlow() << endl;
+      sortie << relativePartic_.at(k).FileOutputFlow() << endl;
     }
   sortie << endl;
@@ -219,5 +219,6 @@
 
 void particleBeam::buildMomentRepresentation() {
-
+  // le faisceau cense etre represente en un z donne (reference) sera 
+  // ici deploye spatialement (faisceau en un temps donne)
   unsigned k,j,m;
   double auxj, auxm;
@@ -248,13 +249,19 @@
   double PMeVsc;
   double del;
+  //  double xp,yp,dz,cdt;
   vector<double> part(6, 0.0);
 
     vector< vector<double> >& matrice = rij_.getMatrix();
 
-
-  for (k=0; k < goodPartic_.size(); k++) {
-    gamma = goodPartic_.at(k).getGamma();
-    pos = goodPartic_.at(k).getPosition();
-    begam= goodPartic_.at(k).getBetaGamma();
+    TRIDVECTOR positionDeployee;
+
+  for (k=0; k < relativePartic_.size(); k++) {
+
+    positionDeployee = coordonneesDeployees(k);
+    gamma = relativePartic_.at(k).getGamma();
+
+    //    pos = relativePartic_.at(k).getPosition();
+    //    cdt = pos.getComponent(2);
+    begam= relativePartic_.at(k).getBetaGamma();
     begamz = begam.getComponent(2);
     g = gamma -1.0;
@@ -262,9 +269,13 @@
     del = 100.0 * ( PMeVsc -  P_reference_MeV_sur_c ) / P_reference_MeV_sur_c ; // en %
 
-    part[0] = pos.getComponent(0);
+    //    dz = begamz * cdt / gamma;
+    //    xp = begam.getComponent(0)/begamz;
+    //    yp = begam.getComponent(1)/begamz;
+
+    part[0] = positionDeployee.getComponent(0);
     part[1] = begam.getComponent(0)/begamz;
-    part[2] = pos.getComponent(1);
+    part[2] = positionDeployee.getComponent(1);
     part[3] = begam.getComponent(1)/begamz;
-    part[4] = pos.getComponent(2);
+    part[4] = positionDeployee.getComponent(2);
     part[5] = del;
 
@@ -286,5 +297,5 @@
 
   // moyenne
-  double facmoy = 1.0/double( goodPartic_.size() );
+  double facmoy = 1.0/double( relativePartic_.size() );
   for ( j = 0; j < 6; j++) {
         ( matrice.at(j) ).at(j) = sqrt(( matrice.at(j) ).at(j) * facmoy );
@@ -359,5 +370,5 @@
 
 // renvoie (dans le vecteur coord) la liste des coordonnÃ©es d'index 'index' : 
-// index = 0 , 1, 2 -> x,y,z
+// index = 0 , 1, 2 -> x,y,z (en coordonnees deployees)
 // index = 3,4 -> x' = betax/betaz , y' = betay/betaz
 // index = 5 -> Ec : energie cinetique
@@ -367,10 +378,13 @@
   
   coord.clear();
-  coord.resize(goodPartic_.size(), 0.0 );
+  coord.resize(relativePartic_.size(), 0.0 );
   cout << " particleBeam::particlesPhaseSpaceComponent index = " << index << endl;
 
   if ( index <= 2 ) {
-    for (unsigned i = 0; i < goodPartic_.size(); ++i) {
-      coord.at(i) =  10.*goodPartic_.at(i).getPosition().getComponent(index);  // en mm
+
+    for (unsigned i = 0; i < relativePartic_.size(); ++i) {
+
+      coord.at(i) =  10.*coordonneesDeployees(i).getComponent(index);
+      //      coord.at(i) =  10.*relativePartic_.at(i).getPosition().getComponent(index);  // en mm
     }
     return;
@@ -378,8 +392,8 @@
   
   if ( index >  2 && index < 5 ) {
-    for (unsigned i = 0; i < goodPartic_.size(); ++i) {
-      double begamz = goodPartic_.at(i).getBetaGamma().getComponent(2);
+    for (unsigned i = 0; i < relativePartic_.size(); ++i) {
+      double begamz = relativePartic_.at(i).getBetaGamma().getComponent(2);
       if ( begamz != 0.0) {
-	coord.at(i) =  1000.*goodPartic_.at(i).getBetaGamma().getComponent(index - 3)/begamz; // milliradians
+	coord.at(i) =  1000.*relativePartic_.at(i).getBetaGamma().getComponent(index - 3)/begamz; // milliradians
       } else {
 	coord.at(i) = 0.0;
@@ -392,6 +406,6 @@
     double gamma0 = referenceParticle_.getGamma();
     if ( gamma0 == 0.0 ) return;
-    for (unsigned i = 0; i < goodPartic_.size(); ++i) {
-      coord.at(i) =  100.*(goodPartic_.at(i).getGamma() - gamma0)/gamma0;  // en %
+    for (unsigned i = 0; i < relativePartic_.size(); ++i) {
+      coord.at(i) =  100.*(relativePartic_.at(i).getGamma() - gamma0)/gamma0;  // en %
     }
     return;
@@ -618,5 +632,5 @@
   double ecatyp= 0.0;
   
-  for (unsigned int k = 0; k < goodPartic_.size(); k++) {
+  for (unsigned int k = 0; k < relativePartic_.size(); k++) {
     if (vshf[k] < vmin) vmin = vshf[k];
     else if (vshf[k] > vmax) vmax = vshf[k];
@@ -625,5 +639,5 @@
   }
 
-  double sum= (float)goodPartic_.size();
+  double sum= (float)relativePartic_.size();
   out[0]= sum; 
   vmoy /= sum;
@@ -654,5 +668,5 @@
   }
 
-  for (unsigned int k = 0; k < goodPartic_.size(); k++) {
+  for (unsigned int k = 0; k < relativePartic_.size(); k++) {
     vshf[k] -= vmoy;
   }
@@ -706,2 +720,20 @@
 }
 
+ // coordonnees d'une particule dans le faisceau deploye ( passage 
+ // d'une representation z=cte a une representation t=cte)
+TRIDVECTOR particleBeam::coordonneesDeployees(unsigned particleIndex, double cdtShift) {
+    double gamma = relativePartic_.at(particleIndex).getGamma();
+    //    TRIDVECTOR pos = relativePartic_.at(particleIndex).getPosition();
+    double xx = relativePartic_.at(particleIndex).getReferenceToPosition().getComponent(0);
+    double yy = relativePartic_.at(particleIndex).getReferenceToPosition().getComponent(1);
+    double cdt = relativePartic_.at(particleIndex).getReferenceToPosition().getComponent(2);
+    cdt += cdtShift;
+    //    TRIDVECTOR begam= goodPartic_.at(particleIndex).getBetaGamma();
+    double begamz = relativePartic_.at(particleIndex).getReferenceToBetaGamma().getComponent(2);
+    double dz = begamz * cdt / gamma;
+    double xp = relativePartic_.at(particleIndex).getReferenceToBetaGamma().getComponent(0)/begamz;
+    double yp = relativePartic_.at(particleIndex).getReferenceToBetaGamma().getComponent(1)/begamz;
+    xx += xp * dz;
+    yy += yp * dz;    
+    return TRIDVECTOR(xx, yy, dz);
+ }
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc	(revision 416)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc	(revision 417)
@@ -182,6 +182,6 @@
   //  passiveParticles.resize(nbProbPart, bareParticle());
   double x,y;
-  double deltaz;
-  double deltat;
+  //  double deltaz;
+  double cdeltat;
   TRIDVECTOR  pos;
   TRIDVECTOR betagamma;
@@ -207,14 +207,18 @@
     double gamma = sqrt(1.0 + betagamma.norm2());
 
-    // decalage temporel par rapport a la reference  
-    deltat = faisceau.at(k).clock - timeRef; // nanoseondes
-    double ds = CLIGHT_m_per_ns * deltat /gamma;
-    x += betaGammax * ds;  // en metres
-    y += betaGammay * ds;
+    // decalage temporel par rapport a la reference  ?
+    // on prend le faisceau sous la forme "a un instant donne"
+
+    //   deltat = faisceau.at(k).clock - timeRef; // nanoseondes
+    cdeltat = CLIGHT_m_per_ns * (faisceau.at(k).clock - timeRef); // metres
+    //    double ds = CLIGHT_m_per_ns * deltat /gamma;
+    //    x += betaGammax * ds;  // en metres
+    //    y += betaGammay * ds;
 
     // ici on neglige la difference entre gamma de la part. et gamma de la ref.
-    deltaz = (pzPartRel/EREST_eV) * CLIGHT_m_per_ns * deltat; // en metres
-
-    pos.setComponents(100.*x,100.*y,100.*deltaz);  // en cm
+    //    deltaz = (pzPartRel/EREST_eV) * CLIGHT_m_per_ns * deltat; // en metres
+
+    //    pos.setComponents(100.*x,100.*y,100.*deltaz);  // en cm
+    pos.setComponents(100.*x,100.*y,100.*cdeltat);  // en cm
     if ( faisceau.at(k).flag == -1 ) {
       particles.push_back(bareParticle(pos,betagamma));
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/softwareParmela.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/softwareParmela.cc	(revision 416)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/softwareParmela.cc	(revision 417)
@@ -22,4 +22,5 @@
   cout << " setRelativeParmelaElementIndices() taille a priori : " << relativeParmelaElementIndices_.size() << endl;
   abstractElement* elPtr = dataManager_->getElementPointerFromNumero(numeroDeb_);
+
   bool there_is_rfgun = ( elPtr->getNomdElement().getElementType() == RFgun );
   unsigned offsetNumElem;
@@ -262,8 +263,9 @@
   particles.clear();
   particles.resize(faisceau.size(), bareParticle());
-  double x,xp,y,yp;
+  //  double x,xp,y,yp;
+  double xp, yp;
   double betagammaz;
-  double betaz;
-  double deltaz;
+  //  double betaz;
+  double cdt;
   double dephas;
   double g;
@@ -273,7 +275,7 @@
   // sont donnes en radians
   for (unsigned k = 0; k < faisceau.size(); k++) {
-    x= faisceau.at(k).xx;
+    //    x= faisceau.at(k).xx;
     xp=faisceau.at(k).xxp;
-    y= faisceau.at(k).yy;
+    //    y= faisceau.at(k).yy;
     yp=faisceau.at(k).yyp;
     // dephasage par rapport a la reference
@@ -281,9 +283,10 @@
     g = faisceau.at(k).wz/EREST_MeV;
     betagammaz = faisceau.at(k).begamz;
-    betaz = betagammaz/(g+1.0);
-    deltaz = FACTEUR * betaz * dephas / referencefrequency;
-    x += xp * deltaz;
-    y += yp * deltaz;
-    pos.setComponents(x,y,deltaz);
+    //    betaz = betagammaz/(g+1.0);
+    //    deltaz = FACTEUR * betaz * dephas / referencefrequency;
+    cdt = FACTEUR * dephas / referencefrequency;
+    //    x += xp * deltaz;
+    //    y += yp * deltaz;
+    pos.setComponents(faisceau.at(k).xx,faisceau.at(k).yy,cdt);
     betagamma.setComponents(xp*betagammaz, yp*betagammaz, betagammaz);
     particles.at(k) = bareParticle(pos,betagamma);
@@ -311,14 +314,26 @@
     }
     
-    const vector<bareParticle>& partic = beam->getParticleVector();
+    //    const vector<bareParticle>& partic = beam->getParticleVector();
     double weight = 1.0;
     double xx,yy,zz;
     double begamx, begamy, begamz;
-    for (unsigned k = 0; k < partic.size(); k++) {
-        partic.at(k).getPosition().getComponents(xx,yy,zz);
-        partic.at(k).getBetaGamma().getComponents(begamx,begamy,begamz);
+    //    TRIDVECTOR pos, begam;
+    double zmin = GRAND;
+    double zmax = -zmin; 
+    double cdtmin, cdtmax;
+    beam->ZrangeCdt(cdtmin, cdtmax);
+    cout << " softwareParmela::beamToParmela cdtmin = " << cdtmin << " cdtmax = " << cdtmax << endl;
+  
+    for (unsigned k = 0; k < beam->getNbParticles(); k++) {
+        // partic.at(k).getPosition().getComponents(xx,yy,zz);
+        // partic.at(k).getBetaGamma().getComponents(begamx,begamy,begamz);
+      beam->coordonneesDeployees(k, -cdtmax).getComponents(xx,yy,zz);
+      beam->betaGamma(k).getComponents(begamx,begamy,begamz);
+      if ( zz > zmax) zmax = zz;
+      if ( zz < zmin ) zmin = zz;
         outfile << xx << " " << begamx << " " <<  yy << " " << begamy << " " << zz << " " << begamz  << " " << weight << endl;
     }
     outfile.close();
+    cout << " softwareParmela::beamToParmela zmn = " << zmin << " zmax = " << zmax << endl;
     return true;
 }
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h	(revision 416)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h	(revision 417)
@@ -92,5 +92,5 @@
   //  void scatterPlot1D(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor);
 
-  void chartPlot2vec(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor, bool drawPoints, string title, string legendx, string legendy, int width, int height, bool makeIcon=false);
+  // void chartPlot2vec(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor, bool drawPoints, string title, string legendx, string legendy, int width, int height, bool makeIcon=false);
   void chartPlot2vec(WContainerWidget* toto,vector<double>& xcor,vector<double>& ycor,Wt::Chart::SeriesType seriesType,Wt::Chart::FillRangeType fillRange,Wt::Chart::AxisValue value,bool isGridLinesEnables,string title,string legendx,string legendy,int width,int height,bool makeIcon = false);
 
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_console.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_console.cc	(revision 416)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_console.cc	(revision 417)
@@ -24,5 +24,5 @@
     Wt::WLabel *label = new Wt::WLabel("Search ", searchContainer);
     searchLineEdit_ = new Wt::WLineEdit("", searchContainer);
-    searchLineEdit_->setToolTip("clic here to search a string into the output");
+    searchLineEdit_->setToolTip("clic here to search a string in the output");
     
     // le panel
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc	(revision 416)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc	(revision 417)
@@ -702,94 +702,94 @@
 
 
-// parametre drawPoints : true = on trace des points (phase space) ; false = on trace des lignes (enveloppes...) 
-void PspaApplication::chartPlot2vec(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor, bool drawPoints,string title,string legendx, string legendy,int width, int height, bool makeIcon)
-{
-    int nbpts = xcor.size();
-    cout << " PspaApplication::chartPlot2vec nbpts = " << nbpts << endl;
-    WStandardItemModel *model = new WStandardItemModel(nbpts, 2, toto);
-    for (int i = 0; i < nbpts; ++i) {
-        model->setData(i, 0, xcor.at(i));
-        model->setData(i, 1, ycor.at(i));
-        //    cout << " PspaApplication::chartPlot2vec el= " << i+1 << " x= " << xcor.at(i) << " y= " << ycor.at(i) << endl;
-    }
-    
-    WCartesianChart *chart = new WCartesianChart(toto);
-    if (!makeIcon) {
-        chart->setTitle(title);
-    }
-    chart->initLayout();
-    
-    chart->setModel(model);        // set the model
-    chart->setXSeriesColumn(0);    // set the column that holds the X data
-    if (!makeIcon) {
-        chart->setLegendEnabled(true); // enable the legend
-    } else {
-        chart->setLegendEnabled(false); // enable the legend
-    }
-    
-    chart->setType(ScatterPlot);   // set type to ScatterPlot
-    
-    // Typically, for mathematical functions, you want the axes to cross
-    // at the 0 mark:
-    chart->axis(XAxis).setLocation(ZeroValue);
-    chart->axis(YAxis).setLocation(ZeroValue);
-
-    // Provide space for the X and Y axis and title.
-    chart->setPlotAreaPadding(80, Left);  // ?
-    chart->setPlotAreaPadding(40, Bottom);
-    chart->setPlotAreaPadding(60, Top);
-    if ( drawPoints ) {
-      WDataSeries s(1, PointSeries, Y1Axis);
-      chart->addSeries(s);    
-    } else {
-      WDataSeries s(1, LineSeries, Y1Axis);
-      chart->addSeries(s);    
-    }
-    chart->resize(width, height); // WPaintedWidget must be given explicit size
-    
-    
-    WAxis& axis = chart->axis(XAxis);
-    axis.setLabelFormat("%.3f");
-    //       axis.setGridLinesEnabled(true);
-    axis.setTitle(legendx);
-    
-    WAxis& axey = chart->axis(YAxis);
-    axey.setTitle(legendy);
-    // axis = chart->axis(YAxis);
-    // axis.setLabelFormat("%.3f");
-    // axis.setGridLinesEnabled(true);
-    // axis.setTitle(legendy);
-    
-    if (makeIcon) {
-      chart->setPlotAreaPadding(0);
-      chart->setAxisPadding(0);
-      WFont xAxisFont = chart->axis(XAxis).labelFont();
-      xAxisFont.setSize(8);
-      WFont yAxisFont = chart->axis(YAxis).labelFont();
-      yAxisFont.setSize(8);
-      chart->axis(XAxis).setLabelFont(xAxisFont);
-      chart->axis(YAxis).setLabelFont(yAxisFont);
-    }
-
-#ifdef HAS_IMAGEMAGIC
-/*    Wt::WRasterImage pngImage("png", 600, 600);
-    Wt::WPainter p(&pngImage);
-    chart->paint(p);
-    std::string name;
-    name = workingDir_ + "/chart-"+sessionId ()+".png";
-    std::ofstream f(name.c_str(), std::ios::out |std::ios::trunc | std::ios::binary);
-    pngImage.write(f);    
-    new WText("<a href='workingArea/chart-"+sessionId ()+".png' target='_blank'>Afficher l'image</a>",toto);
-    
-  Wt::WPdfImage pdfImage("30cm", "30cm");
-    Wt::WPainter p1(&pdfImage);
-    pdfImage.init();
-    chart->paint(p1);
-    name = workingDir_ + "/chart-"+sessionId ()+".pdf";
-    std::ofstream f1(name.c_str(), std::ios::out |std::ios::trunc | std::ios::binary);
-    pdfImage.write(f1);
- */
-#endif
-}
+// // parametre drawPoints : true = on trace des points (phase space) ; false = on trace des lignes (enveloppes...) 
+// void PspaApplication::chartPlot2vec(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor, bool drawPoints,string title,string legendx, string legendy,int width, int height, bool makeIcon)
+// {
+//     int nbpts = xcor.size();
+//     cout << " PspaApplication::chartPlot2vec nbpts = " << nbpts << endl;
+//     WStandardItemModel *model = new WStandardItemModel(nbpts, 2, toto);
+//     for (int i = 0; i < nbpts; ++i) {
+//         model->setData(i, 0, xcor.at(i));
+//         model->setData(i, 1, ycor.at(i));
+//         //    cout << " PspaApplication::chartPlot2vec el= " << i+1 << " x= " << xcor.at(i) << " y= " << ycor.at(i) << endl;
+//     }
+    
+//     WCartesianChart *chart = new WCartesianChart(toto);
+//     if (!makeIcon) {
+//         chart->setTitle(title);
+//     }
+//     chart->initLayout();
+    
+//     chart->setModel(model);        // set the model
+//     chart->setXSeriesColumn(0);    // set the column that holds the X data
+//     if (!makeIcon) {
+//         chart->setLegendEnabled(true); // enable the legend
+//     } else {
+//         chart->setLegendEnabled(false); // enable the legend
+//     }
+    
+//     chart->setType(ScatterPlot);   // set type to ScatterPlot
+    
+//     // Typically, for mathematical functions, you want the axes to cross
+//     // at the 0 mark:
+//     chart->axis(XAxis).setLocation(ZeroValue);
+//     chart->axis(YAxis).setLocation(ZeroValue);
+
+//     // Provide space for the X and Y axis and title.
+//     chart->setPlotAreaPadding(80, Left);  // ?
+//     chart->setPlotAreaPadding(40, Bottom);
+//     chart->setPlotAreaPadding(60, Top);
+//     if ( drawPoints ) {
+//       WDataSeries s(1, PointSeries, Y1Axis);
+//       chart->addSeries(s);    
+//     } else {
+//       WDataSeries s(1, LineSeries, Y1Axis);
+//       chart->addSeries(s);    
+//     }
+//     chart->resize(width, height); // WPaintedWidget must be given explicit size
+    
+    
+//     WAxis& axis = chart->axis(XAxis);
+//     axis.setLabelFormat("%.3f");
+//     //       axis.setGridLinesEnabled(true);
+//     axis.setTitle(legendx);
+    
+//     WAxis& axey = chart->axis(YAxis);
+//     axey.setTitle(legendy);
+//     // axis = chart->axis(YAxis);
+//     // axis.setLabelFormat("%.3f");
+//     // axis.setGridLinesEnabled(true);
+//     // axis.setTitle(legendy);
+    
+//     if (makeIcon) {
+//       chart->setPlotAreaPadding(0);
+//       chart->setAxisPadding(0);
+//       WFont xAxisFont = chart->axis(XAxis).labelFont();
+//       xAxisFont.setSize(8);
+//       WFont yAxisFont = chart->axis(YAxis).labelFont();
+//       yAxisFont.setSize(8);
+//       chart->axis(XAxis).setLabelFont(xAxisFont);
+//       chart->axis(YAxis).setLabelFont(yAxisFont);
+//     }
+
+// #ifdef HAS_IMAGEMAGIC
+// /*    Wt::WRasterImage pngImage("png", 600, 600);
+//     Wt::WPainter p(&pngImage);
+//     chart->paint(p);
+//     std::string name;
+//     name = workingDir_ + "/chart-"+sessionId ()+".png";
+//     std::ofstream f(name.c_str(), std::ios::out |std::ios::trunc | std::ios::binary);
+//     pngImage.write(f);    
+//     new WText("<a href='workingArea/chart-"+sessionId ()+".png' target='_blank'>Afficher l'image</a>",toto);
+    
+//   Wt::WPdfImage pdfImage("30cm", "30cm");
+//     Wt::WPainter p1(&pdfImage);
+//     pdfImage.init();
+//     chart->paint(p1);
+//     name = workingDir_ + "/chart-"+sessionId ()+".pdf";
+//     std::ofstream f1(name.c_str(), std::ios::out |std::ios::trunc | std::ios::binary);
+//     pdfImage.write(f1);
+//  */
+// #endif
+// }
 
 
@@ -950,5 +950,6 @@
 */
   
-  Wt::WPdfImage pdfImage("1000", "600");
+//  Wt::WPdfImage pdfImage("1000", "600");
+  WPdfImage pdfImage("1000", "600");
   {
    Wt::WPainter p1(&pdfImage);
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_serverFileSelector.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_serverFileSelector.cc	(revision 416)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_serverFileSelector.cc	(revision 417)
@@ -11,4 +11,5 @@
 #include <Wt/WIconPair>
 #include <Wt/WApplication>
+
 
 #include <boost/algorithm/string.hpp>
