// JetCleanser Package // Questions/Comments? dkrohn@physics.harvard.edu mattlow@uchicago.edu schwartz@physics.harvard.edu liantaow@uchicago.edu // // Copyright (c) 2013 // David Krohn, Matthew Low, Matthew Schwartz, and Lian-Tao Wang // // Compile it with "make example" and run it with // // ./example < ../data/Pythia-Zp2jets-lhc-pileup-1ev.dat // // $Id$ // //---------------------------------------------------------------------- // This file is part of FastJet contrib. // // It is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at // your option) any later version. // // It is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public // License for more details. // // You should have received a copy of the GNU General Public License // along with this code. If not, see . //---------------------------------------------------------------------- #include #include #include #include "fastjet/PseudoJet.hh" #include "fastjet/ClusterSequence.hh" #include "fastjet/FunctionOfPseudoJet.hh" #include "JetCleanser.hh" // In external code, this should be fastjet/contrib/JetCleanser.hh using namespace std; using namespace fastjet; using namespace fastjet::contrib; // forward declaration to make things clearer void read_event(vector &hard_event_charged, vector &hard_event_neutral, vector &pileup_charged, vector &pileup_neutral); //---------------------------------------------------------------------- int main(){ //---------------------------------------------------------- // read in input particles vector hard_event_charged, hard_event_neutral, pileup_charged, pileup_neutral; read_event(hard_event_charged, hard_event_neutral, pileup_charged, pileup_neutral); //---------------------------------------------------------- // construct measureable quantities vector hard_event, full_event; // via "calo cells" vector full_event_neutral; // via "particle flow" for (unsigned i=0; i > sets; sets.push_back( full_event ); // calorimeter cells sets.push_back( hard_event_charged ); // tracks from primary interaction sets.push_back( pileup_charged ); // tracks from pileup sets.push_back( full_event_neutral ); // neutral particles sets.push_back( hard_event ); // for truth comparison // collect jets vector< vector > jet_sets = ClusterSets(jet_def, full_event, sets, 25.0); vector jets_plain = jet_sets[0]; vector jets_tracks_LV = jet_sets[1]; vector jets_tracks_PU = jet_sets[2]; vector jets_neutrals = jet_sets[3]; vector jets_truth = jet_sets[4]; PseudoJet plain_dijet, truth_dijet, jvf_cleansed_dijet, lin_cleansed_dijet, gau_cleansed_dijet; unsigned n_jets; //---------------------------------------------------------- // ATLAS-like: cleansers cout << "ATLAS-like cleansing:" << endl << endl; JetDefinition subjet_def_A(kt_algorithm, 0.3); JetCleanser jvf_cleanser_A(subjet_def_A, JetCleanser::jvf_cleansing, JetCleanser::input_nc_together); jvf_cleanser_A.SetTrimming(0.01); JetCleanser linear_cleanser_A(0.25, JetCleanser::linear_cleansing, JetCleanser::input_nc_together); linear_cleanser_A.SetLinearParameters(0.65); JetCleanser gaussian_cleanser_A(0.3, JetCleanser::gaussian_cleansing, JetCleanser::input_nc_together); gaussian_cleanser_A.SetGaussianParameters(0.67,0.62,0.20,0.25); // print info about cleansers cout << jvf_cleanser_A.description() << endl; cout << linear_cleanser_A.description() << endl; cout << gaussian_cleanser_A.description() << endl; // ATLAS-like: cleanse jets n_jets = min((int) jets_plain.size(),3); for (unsigned i=0; i> px >> py >> pz >> E >> pid >> charge; PseudoJet particle(px,py,pz,E); if ( nsub <= 1 ) { if ( charge != 0 ) hard_event_charged.push_back(particle); else hard_event_neutral.push_back(particle); } else { if ( charge != 0 ) pileup_charged.push_back(particle); else pileup_neutral.push_back(particle); } } // if there was nothing in the event if (nsub == 0) { cerr << "Error: read empty event\n"; exit(-1); } cout << "# " << nsub-1 << " pileup events on top of the hard event" << endl; }