本文整理汇总了C++中HLTMod::GetNEvents方法的典型用法代码示例。如果您正苦于以下问题:C++ HLTMod::GetNEvents方法的具体用法?C++ HLTMod::GetNEvents怎么用?C++ HLTMod::GetNEvents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HLTMod
的用法示例。
在下文中一共展示了HLTMod::GetNEvents方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runWWAnalysisChain
void runWWAnalysisChain(TString inputfiles, TString outputfileName, TString PlotType, TString JetsName) {
//Trigger
HLTMod *hltmod = new HLTMod;
hltmod->SetPrintTable(kFALSE);
// hltmod->AddTrigger("HLT_IsoMu15");
// hltmod->AddTrigger("HLT_IsoEle15_L1I");
hltmod->AddTrigger("HLT_Mu5");
hltmod->AddTrigger("HLT_Ele10_SW_L1R");
hltmod->SetTrigObjsName("myhltobjs");
//PreSelection
HwwEvtPreSelMod *preSelectionMod = new HwwEvtPreSelMod;
//Object ID and Cleaning Sequence;
MuonIDMod *muonID = new MuonIDMod;
ElectronIDMod *electronID = new ElectronIDMod;
JetIDMod *JetID = new JetIDMod; //default names are IC5
JetID->SetJetName(JetsName); //for SC5 I have to set the names
JetID->SetGoodJetsName(TString("GoodJets"));
ElectronCleaningMod *electronCleaning = new ElectronCleaningMod;
JetCleaningMod *JetCleaning = new JetCleaningMod; //default names are ok for IC5
JetCleaning->SetGoodJetsName(TString("GoodJets"));
JetCleaning->SetCleanJetsName(TString("CleanJets"));
//Event Selection modules
WWEvtSelMod *eventSelectionMod = new WWEvtSelMod;
eventSelectionMod->SetLoadGenParticles(false);
eventSelectionMod->SetCleanJetsName(TString("CleanJets"));
eventSelectionMod->SetPlotType(PlotType);
eventSelectionMod->SetPrintDebug(false);
//chain modules together
hltmod->Add(preSelectionMod);
preSelectionMod->Add(muonID);
muonID->Add(electronID);
electronID->Add(JetID);
JetID->Add(electronCleaning);
electronCleaning->Add(JetCleaning);
JetCleaning->Add(eventSelectionMod);
// set up analysis
Analysis *ana = new Analysis;
//ana->SetUseHLT(false);
ana->SetKeepHierarchy(kFALSE);
ana->SetSuperModule(preSelectionMod);
ana->AddFile(inputfiles);
ana->SetOutputName(outputfileName.Data());
// run the analysis after successful initialisation
ana->Run(! gROOT->IsBatch());
cout << "HLTMod: Accepted " << hltmod->GetNAccepted()
<< " of " << hltmod->GetNEvents() << " events" << endl;
return;
}
示例2: runHLTExample
//--------------------------------------------------------------------------------------------------
void runHLTExample(const char *trigger="HLT_Mu15_v1",
//const char *files = "XX-MITDATASET-XX_000.root",
const char *files = "/castor/cern.ch/user/p/paus/filefi/020/p11-h160ww2l-gf-v1g1-pu/342631BD-F250-E011-9C32-00A0D1EE8B54.root",
Int_t nEvs = 0)
{
using namespace mithep;
gDebugMask = Debug::kAnalysis;
gDebugLevel = 1;
HLTMod *hltmod = new HLTMod;
hltmod->SetPrintTable(kTRUE);
hltmod->AddTrigger(trigger);
hltmod->SetTrigObjsName("myhltobjs");
HLTExampleMod *hltexmod = new HLTExampleMod;
hltexmod->SetTrigObjsName("myhltobjs");
hltmod->Add(hltexmod);
// set up analysis
Analysis *ana = new Analysis;
if (0) {
hltmod->SetBitsName("HLTBits");
ana->SetHLTTreeName("HLT");
ana->SetHLTObjsName("HLTObjects");
}
if (nEvs)
ana->SetProcessNEvents(nEvs);
ana->SetSuperModule(hltmod);
ana->AddFile(files);
if (gROOT->IsBatch())
ana->SetOutputName("mit-hlt-hist.root");
// run the analysis after successful initialisation
ana->Run(!gROOT->IsBatch());
cout << "HLTMod: Accepted " << hltmod->GetNAccepted()
<< " of " << hltmod->GetNEvents() << " events" << endl;
}
示例3: runHLTAnalysis
void runHLTAnalysis(TString inputfiles, TString outputfileName) {
//Trigger
HLTMod *hltmod = new HLTMod;
hltmod->SetPrintTable(kFALSE);
hltmod->AddTrigger("HLT_IsoEle15_L1I");
hltmod->AddTrigger("HLT_Ele15_SW_L1R");
hltmod->AddTrigger("HLT_IsoEle15_LW_L1I");
hltmod->AddTrigger("HLT_IsoEle18_L1R");
hltmod->AddTrigger("HLT_Ele15_LW_L1R");
hltmod->AddTrigger("HLT_LooseIsoEle15_LW_L1R");
hltmod->AddTrigger("HLT_IsoMu15");
hltmod->AddTrigger("HLT_Mu15");
hltmod->SetTrigObjsName("myhltobjs");
//PreSelection
HwwEvtPreSelMod *preSelectionMod = new HwwEvtPreSelMod;
//chain together
preSelectionMod->Add(hltmod);
// set up analysis
Analysis *ana = new Analysis;
ana->SetKeepHierarchy(kFALSE);
ana->SetSuperModule(preSelectionMod);
ana->AddFile(inputfiles);
ana->SetOutputName(outputfileName.Data());
// run the analysis after successful initialisation
ana->Run(! gROOT->IsBatch());
cout << "HLTMod: Accepted " << hltmod->GetNAccepted()
<< " of " << hltmod->GetNEvents() << " events" << endl;
return;
}