Changeset d870fc5 in git for modules/PdgCodeFilter.cc
- Timestamp:
- Dec 21, 2014, 4:03:35 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- d77b51d
- Parents:
- 7f12612 (diff), e5767b57 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/PdgCodeFilter.cc
r7f12612 rd870fc5 2 2 * Delphes: a framework for fast simulation of a generic collider experiment 3 3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium 4 * 4 * 5 5 * This program is free software: you can redistribute it and/or modify 6 6 * it under the terms of the GNU General Public License as published by 7 7 * the Free Software Foundation, either version 3 of the License, or 8 8 * (at your option) any later version. 9 * 9 * 10 10 * This program is distributed in the hope that it will be useful, 11 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 13 * GNU General Public License for more details. 14 * 14 * 15 15 * You should have received a copy of the GNU General Public License 16 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. … … 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.