45 std::vector<std::string> hltPathsOfInterest =
parameters_.
getParameter<std::vector<std::string> > (
"HLTPathsOfInterest");
46 if (hltPathsOfInterest.size() == 0)
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++) {
71 std::string
tag = (*it) ;
72 std::map<std::string, PixelMEs>::iterator iPos =
histoMap_.find(tag);
75 std::string hname, htitle;
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();
161 std::string
path = it->first;
165 if ( index < triggerResults->
size() && triggerResults->accept(index)) {
166 if (me_vtx) me_vtx->
Fill(nVtx);
167 if (me_clus) me_clus->
Fill(nClusters);
T getParameter(std::string const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
#define DEFINE_FWK_MODULE(type)
edm::ParameterSet parameters_
const std::vector< std::string > & triggerNames() const
names of trigger paths
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_
std::map< std::string, PixelMEs > histoMap_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag pixelVertexInputTag_
edm::InputTag hltInputTag_
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)
PixelVTXMonitor(const edm::ParameterSet &)
void endRun(edm::Run const &iRun, edm::EventSetup const &iSetup)
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup)
tuple size
Write out results.
void setCurrentFolder(const std::string &fullpath)