Index: trunk/Delphes.cpp
===================================================================
--- trunk/Delphes.cpp	(revision 289)
+++ trunk/Delphes.cpp	(revision 290)
@@ -318,5 +318,6 @@
   vector<fastjet::PseudoJet> input_particles;//for FastJet algorithm
   vector<fastjet::PseudoJet> sorted_jets;
-  vector<TLorentzVector> TrackCentral;  
+  //vector<TLorentzVector> TrackCentral;  
+  vector<TRootTracks> TrackCentral;  
   vector<PhysicsTower> towers;
   //vector<ParticleUtil> electron;
@@ -326,4 +327,6 @@
   //vector<ParticleUtil> gamma;
   vector<D_Particle> gamma;
+
+bool FLAG_lhco = true;
 
   TSimpleArray<TRootGenParticle> NFCentralQ;
@@ -489,7 +492,7 @@
 		   if( (rand()%100) < DET->TRACK_eff && sET!=0) {
    		     elementTrack = (TRootTracks*) branchTrack->NewEntry();
-		     elementTrack->Set(particle->Eta, particle->Phi, particle->EtaCalo, particle->PhiCalo, sET);
-		     TrackCentral.push_back(elementTrack->GetFourVector()); // tracks at vertex!
-		     // TODO!!! associates the tracks to the calo where it points to
+		     elementTrack->Set(particle->Eta, particle->Phi, particle->EtaCalo, particle->PhiCalo, sET, particle->Charge);
+		     //TrackCentral.push_back(elementTrack->GetFourVector()); // tracks at vertex!
+		     TrackCentral.push_back(*elementTrack); // tracks at vertex!
 		     // TODO!!! apply a smearing on the position of the origin of the track
 		     // TODO!!! elementTracks->SetPositionOut(Xout,Yout,Zout);
@@ -577,5 +580,5 @@
         elementElec->Charge = sign(electron[i].PID());
         elementElec->IsolFlag = DET->Isolation(electron[i].Phi(),electron[i].Eta(),TrackCentral,2.0);//isolation based on tracks
-      }
+      }											/////////////// HARDCODING
       DET->SortedVector(muon);
       for(unsigned int i=0; i < muon.size(); i++) {
@@ -585,5 +588,5 @@
         elementMu->EtaCalo = muon[i].EtaCalo(); 
         elementMu->PhiCalo = muon[i].PhiCalo();
-        elementMu->IsolFlag = DET->Isolation(muon[i].Phi(),muon[i].Eta(),TrackCentral,2.0);
+        elementMu->IsolFlag = DET->Isolation(muon[i].Phi(),muon[i].Eta(),TrackCentral,2.0); /////////////// HARDCODING
       }
       DET->SortedVector(gamma);
Index: trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h
===================================================================
--- trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h	(revision 289)
+++ trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h	(revision 290)
@@ -289,5 +289,5 @@
 //---------------------------------------------------------------------------
 
-class TRootTracks : public TRootParticle {
+class TRootTracks : public TSortableObject {
  public:
     TRootTracks(); // needed for storage in ExRootAnalysis
@@ -295,17 +295,18 @@
     TRootTracks(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt);
     TRootTracks& operator=(const TRootTracks& track);
-    void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt);
+    void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt, const float charge);
     const TLorentzVector GetFourVector() const;
-   // const float getEta() const {return Eta;}
-   // const float getPhi() const {return Phi;}
-   // const float getEtaOuter() const {return EtaOuter;}
-   // const float getPhiOuter() const {return PhiOuter;}
+    const float getEta() const {return Eta;}
+    const float getPhi() const {return Phi;}
+    const float getEtaOuter() const {return EtaOuter;}
+    const float getPhiOuter() const {return PhiOuter;}
 
     static TCompare *fgCompare; //!
-    //const TCompare *GetCompare() const { return fgCompare; }
-
-//    float Eta, Phi; // (eta,phi) at the beginning of the track
+    const TCompare *GetCompare() const { return fgCompare; }
+
+    float Eta, Phi; // (eta,phi) at the beginning of the track
     float EtaOuter, PhiOuter; // (eta,phi) at the end of the track
-//    float PT, E, Px, Py, Pz;  // transverse momentum
+    float PT, E, Px, Py, Pz;  // transverse momentum
+    float Charge; 
  ClassDef(TRootTracks, 1)
 };
@@ -352,4 +353,5 @@
 public:
   TRootTauJet() {};
+  float Charge; // normally, using the charge of the track ; here using gen-level tau charge
 
 //  float E;  // particle energy in GeV
Index: trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc
===================================================================
--- trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc	(revision 289)
+++ trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc	(revision 290)
@@ -126,40 +126,24 @@
 }
 
-    float Eta, Phi; // (eta,phi) at the beginning of the track
+/*    float Eta, Phi; // (eta,phi) at the beginning of the track
     float EtaOuter, PhiOuter; // (eta,phi) at the end of the track
-    float PT, E, Px, Py, Pz; 
+    float PT, E, Px, Py, Pz; */
 
 TRootTracks::TRootTracks() :
-        TRootParticle(),
-	EtaOuter(UNDEFINED), PhiOuter(UNDEFINED) {}
-/*        Eta = UNDEFINED;
-        Phi = UNDEFINED;
-        PT = UNDEFINED;
-        E = UNDEFINED;
-        Px = UNDEFINED;
-        Py = UNDEFINED;
-        Pz = UNDEFINED; 
-
-}*/
+	Eta(UNDEFINED), Phi(UNDEFINED), EtaOuter(UNDEFINED), PhiOuter(UNDEFINED), 
+        PT(UNDEFINED), E(UNDEFINED), Px(UNDEFINED), Py(UNDEFINED), Pz(UNDEFINED),
+	Charge(UNDEFINED) {}
 
 TRootTracks::TRootTracks(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) :
-	EtaOuter(outEta), PhiOuter(outPhi) {
-        Eta = inEta;
-        Phi = inPhi;
-        PT = pt;
+	Eta(inEta), Phi(inPhi), EtaOuter(outEta), PhiOuter(outPhi), 
+        PT(pt) {
 	TLorentzVector p; p.SetPtEtaPhiE(PT,Eta,Phi,PT*cosh(Eta));
         Px = p.Px(); Py = p.Py(); Pz = p.Pz();  E=p.E();
+	Charge = UNDEFINED;
 }
 TRootTracks::TRootTracks(const TRootTracks& track) :
-        EtaOuter(track.EtaOuter), PhiOuter(track.PhiOuter)
-        {
-          Eta = track.Eta;
-          Phi = track.Phi;
-          PT = track.PT;
-          E = track.E;
-          Px = track.Px;
-          Py = track.Py;
-          Pz = track.Pz;
-        }
+	Eta(track.Eta), Phi(track.Phi), 
+        EtaOuter(track.EtaOuter), PhiOuter(track.PhiOuter), 
+	PT(track.PT), E(track.E), Px(track.Px), Py(track.Py), Pz(track.Pz), Charge(track.Charge) {}
 
 TRootTracks& TRootTracks::operator=(const TRootTracks& track) {
@@ -168,11 +152,13 @@
         EtaOuter = track.EtaOuter;   PhiOuter = track.PhiOuter; 
         PT = track.PT; E = track.E;  Px = track.Px;  Py= track.Py; Pz =track.Pz; 
+	Charge = track.Charge;
   return *this;
 }
 
-void TRootTracks::Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) {
+void TRootTracks::Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt, const float charge) {
 	Eta= inEta; Phi=inPhi;  EtaOuter=outEta; PhiOuter=outPhi; PT=pt; 
 	TLorentzVector p; p.SetPtEtaPhiE(PT,Eta,Phi,PT*cosh(Eta));
 	Px = p.Px(); Py = p.Py(); Pz = p.Pz();  E=p.E();
+	Charge = charge;
 }
 
