本文整理汇总了C++中edm::Event::luminosityBlock方法的典型用法代码示例。如果您正苦于以下问题:C++ Event::luminosityBlock方法的具体用法?C++ Event::luminosityBlock怎么用?C++ Event::luminosityBlock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edm::Event
的用法示例。
在下文中一共展示了Event::luminosityBlock方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetEvtId
void ChPartTree::GetEvtId(const edm::Event& iEvent)
{
using namespace std;
if ( EvtIdDebug )
{
cout << "XJ: EvdId: " << iEvent.id() << endl ;
cout << "XJ: Run : " << iEvent.id().run() << endl ;
cout << "XJ: Evt : " << iEvent.id().event() << endl ;
cout << "XJ: Lumbl: " << iEvent.luminosityBlock() << endl ;
// cout << "XJ: proID: " << iEvent.processHistoryID() << endl;
// cout << "XJ: GUID : " << iEvent.processGUID() << endl;
edm::Timestamp Time=iEvent.time();
cout << "XJ: time : " << Time.value() << endl;
cout << "XJ: isDa : " << iEvent.isRealData() << endl;
cout << "XJ: expTy: " << iEvent.experimentType() << endl ;
cout << "XJ: Bx : " << iEvent.bunchCrossing() << endl;
cout << "XJ: Orbit: " << iEvent.orbitNumber() << endl;
// cout << "XJ: Store: " << iEvent.storeNumber() << endl;
}
EvtId.Reset();
EvtId.Run = iEvent.id().run() ;
EvtId.Evt = iEvent.id().event() ;
EvtId.LumiSect = iEvent.luminosityBlock();
edm::Timestamp Time=iEvent.time();
EvtId.Time = Time.value();
EvtId.IsData = iEvent.isRealData();
EvtId.ExpType = iEvent.experimentType();
EvtId.Bunch = iEvent.bunchCrossing();
EvtId.Orbit = iEvent.orbitNumber();
}
示例2: analyze
int NeroAll::analyze(const edm::Event&iEvent)
{
if(isMc_ <0 )
{
isMc_ = ( iEvent.isRealData() ) ? 0 : 1;
isRealData = ( iEvent.isRealData() ) ? 1 : 0;
}
if( isSkim() == 0)
{
//TODO FILL all_
isRealData = ( iEvent.isRealData() ) ? 1 : 0;
runNum = iEvent.id().run();
lumiNum = iEvent.luminosityBlock();
eventNum = iEvent.id().event();
iEvent.getByLabel(edm::InputTag("generator"), info_handle); // USE TOKEN AND INPUT TAG ?
iEvent.getByLabel(edm::InputTag("addPileupInfo"), pu_handle);
mcWeight = info_handle->weight();
//PU
puTrueInt = 0;
for(const auto & pu : *pu_handle)
{
//Intime
if (pu.getBunchCrossing() == 0)
puTrueInt += pu.getTrueNumInteractions();
//Out-of-time
}
}
return 0;
}
示例3: if
EventInfo::EventInfo(const edm::Event& iEvent, const edm::Handle<reco::BeamSpot>& beamSpot, const edm::Handle<HcalNoiseSummary>& hcalNoiseSummary, const edm::Handle< std::vector<PileupSummaryInfo> >& puSummaryInfo, bool firstVertexIsGood_, float rho_):firstVertexIsGood(firstVertexIsGood_),rho(rho_)
{
evt = iEvent.id().event();
run = iEvent.id().run();
lumiBlock = iEvent.luminosityBlock();
BSx = beamSpot->x0();
BSy = beamSpot->y0();
BSz = beamSpot->z0();
if( hcalNoiseSummary.isValid() ){
hcalnoiseLoose = hcalNoiseSummary->passLooseNoiseFilter();
hcalnoiseTight = hcalNoiseSummary->passTightNoiseFilter();
}
if( puSummaryInfo.isValid() ){
for(std::vector<PileupSummaryInfo>::const_iterator PVI = puSummaryInfo->begin(); PVI != puSummaryInfo->end(); ++PVI) {
int BX = PVI->getBunchCrossing();
sumNVtx += float(PVI->getPU_NumInteractions());
sumTrueNVtx += float(PVI->getTrueNumInteractions());
if( BX==0 ){
numGenPV = PVI->getPU_NumInteractions();
numTruePV = PVI->getTrueNumInteractions();
}
if(BX == -1) {
nm1 = PVI->getPU_NumInteractions();
nm1_true = PVI->getTrueNumInteractions();
}
else if(BX == 0) {
n0 = PVI->getPU_NumInteractions();
n0_true = PVI->getTrueNumInteractions();
}
else if(BX == 1) {
np1 = PVI->getPU_NumInteractions();
np1_true = PVI->getTrueNumInteractions();
}
}
}
}