Index: modules/ModulesLinkDef.h
===================================================================
--- modules/ModulesLinkDef.h	(revision be6c1c802edfcf2f0bab07b4dfe691afa5010c27)
+++ modules/ModulesLinkDef.h	(revision fc4e460e3d447a51b3836e5d26a221b8c2ffcd4e)
@@ -38,4 +38,5 @@
 #include "modules/ConstituentFilter.h"
 #include "modules/StatusPidFilter.h"
+#include "modules/PdgCodeFilter.h"
 #include "modules/Cloner.h"
 #include "modules/Weighter.h"
@@ -75,4 +76,5 @@
 #pragma link C++ class ConstituentFilter+;
 #pragma link C++ class StatusPidFilter+;
+#pragma link C++ class PdgCodeFilter+;
 #pragma link C++ class Cloner+;
 #pragma link C++ class Weighter+;
Index: modules/PdgCodeFilter.cc
===================================================================
--- modules/PdgCodeFilter.cc	(revision fc4e460e3d447a51b3836e5d26a221b8c2ffcd4e)
+++ modules/PdgCodeFilter.cc	(revision fc4e460e3d447a51b3836e5d26a221b8c2ffcd4e)
@@ -0,0 +1,108 @@
+/** \class PdgCodeFilter
+ *
+ *  Removes particles with specific pdg codes 
+ *
+ *  \author M. Selvaggi
+ *
+ */
+
+#include "modules/PdgCodeFilter.h"
+
+#include "classes/DelphesClasses.h"
+#include "classes/DelphesFactory.h"
+#include "classes/DelphesFormula.h"
+
+#include "ExRootAnalysis/ExRootResult.h"
+#include "ExRootAnalysis/ExRootFilter.h"
+#include "ExRootAnalysis/ExRootClassifier.h"
+
+#include "TMath.h"
+#include "TString.h"
+#include "TFormula.h"
+#include "TRandom3.h"
+#include "TObjArray.h"
+//#include "TDatabasePDG.h"
+#include "TLorentzVector.h"
+
+#include <algorithm>
+#include <stdexcept>
+#include <iostream>
+#include <sstream>
+
+using namespace std;
+
+//------------------------------------------------------------------------------
+
+PdgCodeFilter::PdgCodeFilter() :
+  fItInputArray(0)
+{
+}
+
+//------------------------------------------------------------------------------
+
+PdgCodeFilter::~PdgCodeFilter()
+{
+}
+
+//------------------------------------------------------------------------------
+
+void PdgCodeFilter::Init()
+{
+  
+  ExRootConfParam param;
+  Size_t i, size;
+  
+  // PT threshold
+  fPTMin = GetDouble("PTMin", 0.0);
+
+  // import input array
+  fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles"));
+  fItInputArray = fInputArray->MakeIterator();
+ 
+  param = GetParam("PdgCode");
+  size = param.GetSize();
+
+  // read PdgCodes to be filtered out from the data card
+ 
+  fPdgCodes.clear();
+  for(i = 0; i < size; ++i)
+  {
+    fPdgCodes.push_back(param[i].GetInt());
+  }
+  
+  // create output array
+  fOutputArray = ExportArray(GetString("OutputArray", "filteredParticles"));
+}
+
+//------------------------------------------------------------------------------
+
+void PdgCodeFilter::Finish()
+{
+  if(fItInputArray) delete fItInputArray;
+}
+
+//------------------------------------------------------------------------------
+
+void PdgCodeFilter::Process()
+{
+  Candidate *candidate;
+  Int_t pdgCode;
+  Bool_t pass;
+  Double_t pt;
+
+  fItInputArray->Reset();
+  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
+  {
+    pdgCode = candidate->PID;
+    const TLorentzVector &candidateMomentum = candidate->Momentum;
+    pt = candidateMomentum.Pt();
+    
+    pass = kTRUE;
+
+    if( pt < fPTMin ) pass = kFALSE;
+    if( find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end() ) pass = kFALSE;
+
+    if (pass) fOutputArray->Add(candidate);
+  }
+}
+
Index: modules/PdgCodeFilter.h
===================================================================
--- modules/PdgCodeFilter.h	(revision fc4e460e3d447a51b3836e5d26a221b8c2ffcd4e)
+++ modules/PdgCodeFilter.h	(revision fc4e460e3d447a51b3836e5d26a221b8c2ffcd4e)
@@ -0,0 +1,46 @@
+//------------------------------------------------------------------------------
+
+#ifndef PidFilter_h
+#define PidFilter_h
+
+/** \class Efficiency
+ *
+ *  Removes particles with specific pdg codes 
+  *
+ *  \author M. Selvaggi
+ *
+ */
+
+#include "classes/DelphesModule.h"
+#include <vector>
+
+class TIterator;
+class TObjArray;
+
+class PdgCodeFilter: public DelphesModule
+{
+public:
+
+  PdgCodeFilter();
+  ~PdgCodeFilter();
+
+  void Init();
+  void Process();
+  void Finish();
+
+private:
+
+  Double_t fPTMin; //!
+  
+  std::vector<Int_t> fPdgCodes; 
+
+  TIterator *fItInputArray; //!
+
+  const TObjArray *fInputArray; //!
+
+  TObjArray *fOutputArray; //!
+
+  ClassDef(PdgCodeFilter, 1)
+};
+
+#endif
