45 std::vector<std::string> hltPathsOfInterest =
parameters_.
getParameter<std::vector<std::string> > (
"HLTPathsOfInterest");
46 if (hltPathsOfInterest.empty())
return;
49 std::vector<std::string> selectedPaths;
50 for (std::vector<std::string>::const_iterator it = pathList.begin();
51 it != pathList.end(); ++it) {
53 for (std::vector<std::string>::const_iterator kt = hltPathsOfInterest.begin();
54 kt != hltPathsOfInterest.end(); ++kt) {
55 nmatch += TPRegexp(*kt).Match(*it);
57 if (!nmatch)
continue;
58 else selectedPaths.push_back(*it);
69 for (std::vector<std::string> ::iterator it = selectedPaths.begin();
70 it != selectedPaths.end(); it++) {
72 std::map<std::string, PixelMEs>::iterator iPos =
histoMap_.find(tag);
79 htitle=
"# of Pixel Clusters (";
88 htitle=
"# of Pixel Vertices (";
91 VtxHistoPar.getParameter<int32_t>(
"Xbins"),
92 VtxHistoPar.getParameter<
double>(
"Xmin"),
93 VtxHistoPar.getParameter<
double>(
"Xmax"));
95 histoMap_.insert(std::make_pair(tag, local_MEs));
109 edm::LogInfo(
"PixelVTXMonitor") <<
"HLT config with process name " 114 edm::LogError(
"PixelVTXMonotor") <<
"Error! HLT config extraction with process name " 128 if(!siPixelClusters.
isValid()) {
132 unsigned nClusters = siPixelClusters->
size();
138 if (!pixelVertices.
isValid()) {
144 for (reco::VertexCollection::const_iterator ivtx = pixelVertices->begin();
145 ivtx != pixelVertices->end(); ++ivtx) {
148 if ((ivtx->isValid() ==
true) &&
149 (ivtx->isFake() ==
false) &&
151 (ivtx->tracksSize() != 0)) nVtx++;
157 if (!triggerResults.
isValid())
return;
159 for (std::map<std::string,PixelMEs>::iterator it =
histoMap_.begin();
165 if ( index < triggerResults->
size() && triggerResults->
accept(index)) {
166 if (me_vtx) me_vtx->
Fill(nVtx);
167 if (me_clus) me_clus->
Fill(nClusters);
edm::EDGetTokenT< reco::VertexCollection > pixelVertexInputTagToken_
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::TriggerResults > hltInputTagToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::ParameterSet parameters_
bool accept() const
Has at least one path accepted the event?
const std::vector< std::string > & triggerNames() const
names of trigger paths
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
MonitorElement * book1D(char_string const &name, char_string const &title, int const nchX, double const lowX, double const highX)
Book 1D histogram.
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
HLTConfigProvider hltConfig_
edm::InputTag pixelClusterInputTag_
#define DEFINE_FWK_MODULE(type)
std::map< std::string, PixelMEs > histoMap_
void endRun(edm::Run const &iRun, edm::EventSetup const &iSetup) override
static std::string const triggerResults
edm::InputTag pixelVertexInputTag_
~PixelVTXMonitor() override
edm::InputTag hltInputTag_
void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< SiPixelClusterCollectionNew > pixelClusterInputTagToken_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
void beginRun(edm::Run const &iRun, edm::EventSetup const &iSetup) override
PixelVTXMonitor(const edm::ParameterSet &)