CMS 3D CMS Logo

AssociatorTools.h
Go to the documentation of this file.
1 #if !defined(SimCalorimetry_HGCalAssociatorProducers_interface_AssociatorTools_h)
2 #define SimCalorimetry_HGCalAssociatorProducers_interface_AssociatorTools_h
5 #include <vector>
6 
7 static void removeCPFromPU(const std::vector<CaloParticle>& caloParticles,
8  std::vector<size_t>& cPIndices,
9  bool hardScatterOnly = true) {
10  //Consider CaloParticles coming from the hard scatterer
11  //excluding the PU contribution and save the indices.
12  for (unsigned int cpId = 0; cpId < caloParticles.size(); ++cpId) {
13  if (hardScatterOnly && (caloParticles[cpId].g4Tracks()[0].eventId().event() != 0 or
14  caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing() != 0)) {
15  LogDebug("HGCalValidator") << "Excluding CaloParticles from event: "
16  << caloParticles[cpId].g4Tracks()[0].eventId().event()
17  << " with BX: " << caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing()
18  << std::endl;
19  continue;
20  }
21  cPIndices.emplace_back(cpId);
22  }
23 }
24 
25 #endif
MessageLogger.h
caloTruthCellsProducer_cfi.caloParticles
caloParticles
Definition: caloTruthCellsProducer_cfi.py:6
removeCPFromPU
static void removeCPFromPU(const std::vector< CaloParticle > &caloParticles, std::vector< size_t > &cPIndices, bool hardScatterOnly=true)
Definition: AssociatorTools.h:7
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
CaloParticle.h
edmPickEvents.event
event
Definition: edmPickEvents.py:273
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