44 std::cout <<
"Running options:" << std::endl;
45 std::cout <<
" --help : To get the help you're reading" << std::endl;
46 std::cout <<
" --jetColl= : Specify the jet collection" << std::endl;
47 std::cout <<
" --sample= : Specify input xAOD" << std::endl;
48 std::cout <<
" Example: Example --jetColl=AntiKt4EMTopo --sample=xAOD.root" << std::endl;
55int main(
int argc,
char* argv[]){
61 std::string jetColl =
"";
66 for (
int i=1;
i<
argc;
i++){
68 std::string
opt(argv[i]); std::vector< std::string >
v;
70 std::istringstream iss(opt);
75 while (std::getline(iss, item, delim)){
79 if (
opt.find(
"--help") != std::string::npos ) {
83 if (
opt.find(
"--sample=") != std::string::npos )
sample =
v[1];
85 if (
opt.find(
"--jetColl=") != std::string::npos ) jetColl =
v[1];
90 std::cout <<
"No input xAOD file specified, exiting" << std::endl;
94 std::cout <<
"No jet collection specified, exiting" << std::endl;
99 static const char*
APP_NAME =
"JetJvtTools_Example";
105 std::unique_ptr< TFile >
ifile( TFile::Open(
sample.c_str(),
"READ" ) );
117 const std::string name_JetJvtTool =
"JetJvt_Example";
118 const std::string name_JetfJvtTool =
"JetfJvt_Example";
124 jvtTool.setProperty(
"JVTFileName",
125 "JetMomentTools/JVTlikelihood_20140805.root"));
128 if(!(jvtTool.initialize().isSuccess())){
129 std::cout <<
"Initialization of JetJvtTools failed, exiting" << std::endl;
132 if(!(fjvtTool.initialize().isSuccess())){
133 std::cout <<
"Initialization of JetJvtTools failed, exiting" << std::endl;
141 const Long64_t
nevents =
event.getEntries();
142 for(Long64_t ievent = 0; ievent <
nevents; ++ievent){
145 if(
event.getEntry( ievent ) < 0 ) {
146 std::cerr <<
"Failed to load entry " << ievent << std::endl;
151 if(ievent % 100==0) std::cout <<
"Event " << ievent <<
" of " <<
nevents << std::endl;
162 jvtTool.updateJvt( *
jet );
166 delete jets_shallowCopy.first;
167 delete jets_shallowCopy.second;
#define RETURN_CHECK(CONTEXT, EXP)
Helper macro for checking return codes in a compact form in the code.
James Frost November 2014.
ReadStats & stats()
Access the object belonging to the current thread.
static IOStats & instance()
Singleton object accessor.
void printSmartSlimmingBranchList(bool autoIncludeLinks=false) const
Print the accessed variables, formatted for smart slimming.
Tool for accessing xAOD files outside of Athena.
@ kClassAccess
Access auxiliary data using the aux containers.
A relatively simple transient store for objects created in analysis.
Jet_v1 Jet
Definition of the current "jet version".
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, const EventContext &ctx)
Function making a shallow copy of a constant container.
JetContainer_v1 JetContainer
Definition of the current "jet container version".