Changeset 6cdc544 in git for modules/PdgCodeFilter.cc
- Timestamp:
- Dec 21, 2014, 12:07:11 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 38bf1ae
- Parents:
- 1d1f6a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/PdgCodeFilter.cc
r1d1f6a4 r6cdc544 19 19 /** \class PdgCodeFilter 20 20 * 21 * Removes particles with specific pdg codes21 * Removes particles with specific PDG codes 22 22 * 23 23 * \author M. Selvaggi … … 40 40 #include "TRandom3.h" 41 41 #include "TObjArray.h" 42 //#include "TDatabasePDG.h"42 #include "TDatabasePDG.h" 43 43 #include "TLorentzVector.h" 44 44 … … 67 67 void PdgCodeFilter::Init() 68 68 { 69 69 70 70 ExRootConfParam param; 71 71 Size_t i, size; 72 72 73 73 // PT threshold 74 74 fPTMin = GetDouble("PTMin", 0.0); … … 77 77 fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles")); 78 78 fItInputArray = fInputArray->MakeIterator(); 79 79 80 80 param = GetParam("PdgCode"); 81 81 size = param.GetSize(); 82 82 83 83 // read PdgCodes to be filtered out from the data card 84 84 85 85 fPdgCodes.clear(); 86 86 for(i = 0; i < size; ++i) … … 88 88 fPdgCodes.push_back(param[i].GetInt()); 89 89 } 90 90 91 91 // create output array 92 92 fOutputArray = ExportArray(GetString("OutputArray", "filteredParticles")); … … 115 115 const TLorentzVector &candidateMomentum = candidate->Momentum; 116 116 pt = candidateMomentum.Pt(); 117 117 118 118 pass = kTRUE; 119 119 120 if( pt < fPTMin) pass = kFALSE;121 if( find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end()) pass = kFALSE;120 if(pt < fPTMin) pass = kFALSE; 121 if(find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end()) pass = kFALSE; 122 122 123 if 123 if(pass) fOutputArray->Add(candidate); 124 124 } 125 125 }
Note:
See TracChangeset
for help on using the changeset viewer.