//---------------------------------- // A Top Find driver script //---------------------------------- { // Instantiate a StnAna object //---------------------------- TStnAna x("results/stnmaker_111307_1by8_data.root"); // Compile filter code //-------------------- gSystem->CompileMacro("TTrackFilterModule.cc","k"); gSystem->CompileMacro("TTopJetModule.cc","k"); // Create pointer to a track filter object //---------------------------------------- cout << ">>> First track filter <<<" << endl; TTrackFilterModule* m = new TTrackFilterModule; // Add this track filter module to the StnAna object //-------------------------------------------------- x.AddModule(m); // Set tracking cuts //------------------ m->SetNT(2); m->SetMinpt(1.5); m->SetMinz(50); // Get tracking cuts //------------------ cout << ">>> Current Cut on NT " << m->GetNT() << " <<<" << endl; cout << ">>> Current Cut on pt " << m->GetMinpt() << " <<<" << endl; cout << ">>> Current Cut on z " << m->GetMinz() << " <<<" << endl; // Create pointer to a top jet filter object //------------------------------------------ cout << ">>>>> Now the top jet filter <<<<<" << endl; TTopJetModule* j = new TTopJetModule; // Add this jet filter module to the StnAna object //------------------------------------------------ x.AddModule(j); // Set some jet cuts //------------------ j->SetNMIN(3); j->SetETMIN(2.0); j->SetETAMIN(-2.50); j->SetETAMAX(2.50); // Get some jet cuts //------------------ cout << ">>>> Current Cut on nj " << j->GetNMIN() << " <<<<" << endl; cout << ">>>> Current Cut on et " << j->GetETMIN() << " <<<<" << endl; cout << ">>>> Current Cut on eta min " << j->GetETAMIN() << " <<<<" << endl; cout << ">>>> Current Cut on eta max " << j->GetETAMAX() << " <<<<" << endl; // This output module saves the events passing the filter to // a NEW Stntuple root file. //---------------------------------------------------------- TStnOutputModule out("after_jet_filter.root"); x.SetOutputModule(&out); // Run the StnAna object over the root file specified at instantiation //-------------------------------------------------------------------- x.Run(); m->Display(); //make some track histos j->Display(); //make some jet histos }