CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

static void removeCPFromPU (const std::vector< CaloParticle > &caloParticles, std::vector< size_t > &cPIndices, bool hardScatterOnly=true)
 

Function Documentation

static void removeCPFromPU ( const std::vector< CaloParticle > &  caloParticles,
std::vector< size_t > &  cPIndices,
bool  hardScatterOnly = true 
)
static

Definition at line 7 of file AssociatorTools.h.

References edmPickEvents::event, LogDebug, and or.

Referenced by HGCalValidator::dqmAnalyze(), MultiClusterAssociatorByEnergyScoreImpl::makeConnections(), and LCToCPAssociatorByEnergyScoreImpl::makeConnections().

9  {
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 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
#define LogDebug(id)