当前位置: 首页>>代码示例>>C++>>正文


C++ HLTMod::GetNEvents方法代码示例

本文整理汇总了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;

}
开发者ID:IlariaVai,项目名称:UserCode-1,代码行数:57,代码来源:runWWSelection.C

示例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;
}
开发者ID:cpausmit,项目名称:MitAna,代码行数:39,代码来源:runHLTExample.C

示例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;

}
开发者ID:IlariaVai,项目名称:UserCode-1,代码行数:36,代码来源:runWWSelection.C


注:本文中的HLTMod::GetNEvents方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。