本文整理汇总了C++中EventInfo::lumi方法的典型用法代码示例。如果您正苦于以下问题:C++ EventInfo::lumi方法的具体用法?C++ EventInfo::lumi怎么用?C++ EventInfo::lumi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventInfo
的用法示例。
在下文中一共展示了EventInfo::lumi方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process
bool TauAnalysisSelector::process(Long64_t entry) {
double weight = 1.0;
if(!fPuWeightName.empty()) {
weight *= fPuWeight->value();
}
fEventCounter.setWeight(weight);
cAll.increment();
if(fIsEmbedded) {
weight *= fGeneratorWeight->value();
fEventCounter.setWeight(weight);
}
cGeneratorWeight.increment();
/*
std::cout << "FOO Event " << fEventInfo.event() << ":" << fEventInfo.lumi() << ":" << fEventInfo.run()
<< " electronVeto passed? " << fElectronVetoPassed->value()
<< std::endl;
if( (fEventInfo.event() == 10069461 && fEventInfo.lumi() == 33572) ||
(fEventInfo.event() == 10086951 && fEventInfo.lumi() == 33630) ||
(fEventInfo.event() == 101065527 && fEventInfo.lumi() == 336953) ||
(fEventInfo.event() == 101450418 && fEventInfo.lumi() == 338236) ||
(fEventInfo.event() == 101460111 && fEventInfo.lumi() == 338268) ) {
std::cout << "BAR Event " << fEventInfo.event() << ":" << fEventInfo.lumi() << ":" << fEventInfo.run()
<< " electronVeto passed? " << fElectronVetoPassed->value()
<< " Nelectrons " << fElectrons.size()
<< std::endl;
for(size_t i=0; i<fElectrons.size(); ++i) {
ElectronCollection::Electron electron = fElectrons.get(i);
std::cout << " Electron " << i
<< " pt " << electron.p4().Pt()
<< " eta " << electron.p4().Eta()
<< " hasGsfTrack " << electron.hasGsfTrack()
<< " hasSuperCluster " << electron.hasSuperCluster()
<< " supercluster eta " << electron.superClusterEta()
<< " passIdVeto " << electron.cutBasedIdVeto()
<< std::endl;
}
}
if(!fElectronVetoPassed->value()) return false;
cElectronVeto.increment();
*/
// Tau BR
if(fIsEmbedded && fEmbeddingNormalizationMode == kIDTriggerEfficiencyTauBR) {
weight *= (1-0.357); // from my thesis, which took the numbers from PDG
fEventCounter.setWeight(weight);
}
cTauBRWeight.increment();
// MC status
std::vector<GenParticleCollection::GenParticle> genTaus;
GenParticleCollection::GenParticle theGenTau;
if(isMC()) {
bool canContinue = true;
if(fIsEmbedded) {
canContinue = findGenTaus(fGenTausEmbedded, 2212, &genTaus);
canContinue = canContinue && genTaus.size() != 0;
}
else
canContinue = findGenTaus(fGenTaus, 6, &genTaus);
if(!canContinue)
return false;
}
cGenTauFound.increment();
if(isMC() && fMCTauMultiplicity != kMCTauNone) {
size_t ntaus = genTaus.size();
if(fIsEmbedded) {
std::vector<GenParticleCollection::GenParticle> genTausOrig;
findGenTaus(fGenTaus, 6, &genTausOrig);
ntaus = genTausOrig.size();
}
if(fIsEmbedded) {
// For embedded the embedded tau is counted as one
if(fMCTauMultiplicity == kMCTauZeroTaus) return true;
if(fMCTauMultiplicity == kMCTauOneTau && ntaus != 0) return true;
if(fMCTauMultiplicity == kMCTauTwoTaus && ntaus != 1) return true;
if(fMCTauMultiplicity == kMCTauMoreThanTwoTaus && ntaus < 2) return true;
}
else {
if(fMCTauMultiplicity == kMCTauZeroTaus && ntaus != 0) return true;
if(fMCTauMultiplicity == kMCTauOneTau && ntaus != 1) return true;
if(fMCTauMultiplicity == kMCTauTwoTaus && ntaus != 2) return true;
if(fMCTauMultiplicity == kMCTauMoreThanTwoTaus && ntaus < 3) return true;
}
if(genTaus.size() > 0)
theGenTau = genTaus[0];
}
cTauMCSelection.increment();
bool originalMuonIsWMu = false;
EmbeddingMuonCollection::Muon embeddingMuon;
if(fIsEmbedded) {
if(fMuons.size() != 1)
throw std::runtime_error("Embedding muon collection size is not 1");
//.........这里部分代码省略.........