Index: /trunk/CHANGELOG
===================================================================
--- /trunk/CHANGELOG	(revision 563)
+++ /trunk/CHANGELOG	(revision 564)
@@ -1,3 +1,5 @@
-* Changes relative to V.1.8 
+* Changes relative to V.1.8  -- last changes: 02/03/2010
+   - a muon/electron is not reconstructed if its track is not existing
+   - new warning when LHE files are read as input in Delphes
    - new: b-(mis)tag algorithms
        * pt/eta dependence for b-(mis)tagging ; 
@@ -9,5 +11,5 @@
      NB 'SumPt' was before 'IsolPt' in muon collection only
    - datacard: change of several variable names!!!
-       before    ->  new name
+       old name       -> new name
        ISOL_PT        -> ISOL_trk_PT
        ISOL_Cone      -> ISOL_trk_Cone
@@ -15,5 +17,6 @@
        ISOL_Calo_ET   -> ISOL_calo_ET
        ISOL_Calo_Grid -> ISOL_calo_Grid 
-   - bug fix: EtRatio for muons
+   - new: Vx, Vy, Vz: real vertex location for tracks
+   - bug fix: EtRatio for muons, now similar to LHCO standards
    - new: ./configure for the installation
    - update: default jet algorithms have change in data cards
Index: /trunk/Delphes.cpp
===================================================================
--- /trunk/Delphes.cpp	(revision 563)
+++ /trunk/Delphes.cpp	(revision 564)
@@ -27,5 +27,5 @@
 **                     Louvain-la-Neuve, Belgium                      ** 
 **                                                                    **
-**                      Copyright (C) 2008-2009,                      **
+**                      Copyright (C) 2008-2010,                      **
 **                        All rights reserved.                        **
 **                                                                    **
@@ -219,4 +219,8 @@
     {
       cout <<"**                   LHEF file format detected                     **"<<endl;
+      cout <<"** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!**"<<endl;
+      cout <<"** !!!!!!        The file should already be hadronised       !!!!!!**"<<endl;
+      cout <<"** !!!!!!  Delphes is running neither PYTHIA neither Herwig  !!!!!!**"<<endl;
+      cout <<"** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!**"<<endl;
       cout <<"**                 This can take several minutes                   **"<< endl;
       LHEFConverter converter(inputFileList,outputfilename,DET->PDGtable,DET->NEvents);
@@ -444,5 +448,7 @@
 		    )
 		  ) 
-		{	
+		{
+                  bool trackRec=true;	
+                  if((grandom->Uniform()*100.) > DET->TRACK_eff)trackRec=false; 
 		  // 2.1a.2.3.1 Filling the particle properties + smearing
 		  // Hypothesis: the final eta/phi are the ones from the generator, thanks to the track reconstruction
@@ -452,5 +458,5 @@
 		  
 		  // 2.1a.2.3.2 Muons
-		  if (pid == pMU && fabs(particle->EtaCalo)< DET->CEN_max_mu) 
+		  if (pid == pMU && fabs(particle->EtaCalo)< DET->CEN_max_mu && trackRec==true) 
 		    {
 		      TLorentzVector p;
@@ -464,5 +470,5 @@
 		    }  
 		  // 2.1a.2.3.3 Electrons
-		  else if (pid == pE) 
+		  else if (pid == pE && trackRec==true) 
 		    {
 		      // Finds in which calorimeter the particle has gone, to know its resolution
@@ -501,5 +507,5 @@
 		  // 2.1a.2.3.5 Tracks
 		  //if( (rand()%100) < DET->TRACK_eff && sET!=0) 
-		  if( (grandom->Uniform()*100.) < DET->TRACK_eff && sET!=0) 
+		  if( trackRec==true && sET!=0) 
 		    {
 		      elementTrack = (TRootTracks*) branchTrack->NewEntry();
@@ -683,4 +689,12 @@
 	    }
         }
+      //on rajoute les muons dans ETMIS 
+      for(unsigned int i=0; i < muon.size(); i++)
+         {
+
+            Att.SetPxPyPzE(muon[i].Px(),muon[i].Py(),muon[i].Pz(),muon[i].E());
+            PTmis = PTmis + Att;
+         }
+      //on rempli les muons du dessus
       elementEtmis = (TRootETmis*) branchETmis->NewEntry();
       elementEtmis->ET = (PTmis).Pt();
@@ -688,11 +702,13 @@
       elementEtmis->Px = (-PTmis).Px();
       elementEtmis->Py = (-PTmis).Py();
+
       
       // 2.2.3 ************* jets, B-tag, tau jets
       vector<int> NTrackJet; //for number of tracks
       vector<float> EHADEEM; //for energyHad over energyEm
-      sorted_jets=JETRUN->RunJets(input_particles, TrackCentral,NTrackJet,EHADEEM,list_of_active_towers);
-      JETRUN->RunJetBtagging(treeWriter, branchJet,sorted_jets,NFCentralQ,NTrackJet,EHADEEM);
-      JETRUN->RunTauJets(treeWriter,branchTauJet,sorted_jets,towers, TrackCentral,NTrackJet,EHADEEM);
+      vector<int> NCALO; //nombre de tours calorimetriques utilisee
+      sorted_jets=JETRUN->RunJets(input_particles, TrackCentral,NTrackJet,EHADEEM,list_of_active_towers,NCALO);
+      JETRUN->RunJetBtagging(treeWriter, branchJet,sorted_jets,NFCentralQ,NTrackJet,EHADEEM,NCALO);
+      JETRUN->RunTauJets(treeWriter,branchTauJet,sorted_jets,towers, TrackCentral,NTrackJet,EHADEEM,NCALO);
       
       treeWriter->Fill();
