CMS 3D CMS Logo

Functions
AssociatorTools.h File Reference
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "SimDataFormats/CaloAnalysis/interface/CaloParticle.h"
#include <vector>

Go to the source code of this file.

Functions

void removeCPFromPU (const std::vector< CaloParticle > &caloParticles, std::vector< size_t > &cPIndices)
 

Function Documentation

◆ removeCPFromPU()

void removeCPFromPU ( const std::vector< CaloParticle > &  caloParticles,
std::vector< size_t > &  cPIndices 
)

Definition at line 7 of file AssociatorTools.h.

7  {
8  //Consider CaloParticles coming from the hard scatterer
9  //excluding the PU contribution and save the indices.
10  for (unsigned int cpId = 0; cpId < caloParticles.size(); ++cpId) {
11  if (caloParticles[cpId].g4Tracks()[0].eventId().event() != 0 or
12  caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing() != 0) {
13  LogDebug("HGCalValidator") << "Excluding CaloParticles from event: "
14  << caloParticles[cpId].g4Tracks()[0].eventId().event()
15  << " with BX: " << caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing()
16  << std::endl;
17  continue;
18  }
19  cPIndices.emplace_back(cpId);
20  }
21 }

References caloTruthCellsProducer_cfi::caloParticles, LogDebug, and or.

Referenced by HGCalValidator::dqmAnalyze(), and LayerClusterAssociatorByEnergyScoreImpl::makeConnections().

caloTruthCellsProducer_cfi.caloParticles
caloParticles
Definition: caloTruthCellsProducer_cfi.py:6
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12