Page MenuHomeHEPForge

testBuilder.C
No OneTemporary

testBuilder.C

{
// Load stuff ----------------------------------------------------------
// needed with recent ROOT version
gSystem->Load("libTree.so") ;
gSystem->Load("libPhysics.so");
// following triggers loading of needed libs.
// there's certainly better to be done !
TMarker t;
#include <vector>
// load spartyjet libraries :
// this way of loading stuff is obsolete in recent ROOT version
gSystem->Load("../libs/libJetCore.so");
gSystem->Load("../libs/libCDFJet.so");
gSystem->Load("../libs/libExtras.so");
gSystem->Load("../libs/libATLASJet.so"); // load libExtras.so before !
// loaded everything --------------------------------------------------------
// This is the main class
JetBuilder builder;
// configure an interface to the tree --------------
//atlas::CBNTInput input;
NtupleInputMaker input(NtupleInputMaker::EtaPhiPtE_vector_float);
// give variable names
input.set_prefix("cl_");
input.set_suffix("_caltopo");
input.set_variables("eta","phi","pt","e");
input.set_n_name("nc");
input.set_masslessMode(true); // consider clusters as massless
// Give a name to input :
input.set_name("InputJet");
// give input file and tree names
input.setFileTree("../data/AtlasClustersJ5.root", "CollectionTree");
// Finally assign input class to the builder
builder.configure_input((InputMaker*)&input);
// ------------------------------------------------
// Get energy scale from Input class
double GeV = input.getGeV();
// Schedule 2 algorithms --------------------------------
// instanciate a jet finder tool, configure it and add it to the builder
atlas::FastKtTool * fastkt = new atlas::FastKtTool("FastKt");
fastkt->simple_config("Standard",0.7) ;
builder.add_default_alg(fastkt );
atlas::ConeFinderTool * coneF = new atlas::ConeFinderTool("ConeFinder");
coneF->set_config(0.7,2*GeV,0.5);
builder.add_default_alg(coneF );
// ------------------------------------------------
// atlas::FastKtTool * fastkta = new atlas::FastKtTool("FastKtAA");
// fastkta->simple_config("Aachen",0.7);
// builder.add_default_alg(fastkta , true);
// Other settings ---------------------------------
// configure min Pt cuts for input and output jets
builder.set_default_cut(0,2*GeV);
// Schedule calculation of some jet moments
EtaPhiMomentTool * mom = new EtaPhiMomentTool("EtaPhiMom");
builder.add_moments(mom);
// Give final file and tree name
builder.configure_output("myTree","../data/output/testBuilder_output.root");
// ------------------------------------------------
// Run !! ------------------------------------------
//builder.silent_mode();
builder.process_events(10);
// ------------------------------------------------
}

File Metadata

Mime Type
text/x-c
Expires
Thu, Apr 24, 6:33 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4847542
Default Alt Text
testBuilder.C (2 KB)

Event Timeline