153 main_titles[6 ] =
"Tracker p_{T} within veto cone";
183 axis_titles[13] =
"#Sigma p_{T} / N_{Tracks} (GeV)";
184 axis_titles[14] =
"(1.5) X #Sigma E_{T}^{EM} + #Sigma E_{T}^{Had}";
197 names[4 ] =
"nTracks";
199 names[6 ] =
"trackerVetoPt";
200 names[7 ] =
"emVetoEt";
201 names[8 ] =
"hadVetoEt";
202 names[9 ] =
"hoVetoEt";
203 names[10] =
"muonPt";
204 names[11] =
"muonEta";
205 names[12] =
"muonPhi";
207 names[14] =
"weightedEt";
208 names[15] =
"PFsumChargedHadronPt";
209 names[16] =
"PFsumChargedTotalPt";
210 names[17] =
"PFsumEMuPt";
211 names[18] =
"PFsumNeutralHadronEt";
212 names[19] =
"PFsumPhotonEt";
213 names[20] =
"PFsumPUPt";
305 edm::LogInfo(
"Tutorial") <<
"Number of Muons: " << muonsHandle->size();
315 if (
muon->combinedMuon().isNull())
continue;
329 theData[0] = muon->isolationR03().sumPt;
330 theData[1] = muon->isolationR03().emEt;
331 theData[2] = muon->isolationR03().hadEt;
332 theData[3] = muon->isolationR03().hoEt;
334 theData[4] = muon->isolationR03().nTracks;
335 theData[5] = muon->isolationR03().nJets;
336 theData[6] = muon->isolationR03().trackerVetoPt;
337 theData[7] = muon->isolationR03().emVetoEt;
338 theData[8] = muon->isolationR03().hadVetoEt;
339 theData[9] = muon->isolationR03().hoVetoEt;
358 if ( muon->isPFMuon() && muon->isPFIsolationValid() ) {
359 theData[15] = muon->pfIsolationR03().sumChargedHadronPt;
360 theData[16] = muon->pfIsolationR03().sumChargedParticlePt;
361 theData[17] = muon->pfIsolationR03().sumChargedParticlePt-muon->pfIsolationR03().sumChargedHadronPt;
362 theData[18] = muon->pfIsolationR03().sumNeutralHadronEt;
363 theData[19] = muon->pfIsolationR03().sumPhotonEt;
364 theData[20] = muon->pfIsolationR03().sumPUPt;
374 edm::LogInfo(
"Tutorial") <<
"\n#########################################\n\n"
375 <<
"Lets get started! "
376 <<
"\n\n#########################################\n";
396 edm::LogInfo(
"Tutorial") <<
"\n#########################################\n\n"
397 <<
"Total Number of Events: " <<
nEvents
398 <<
"\nTotal Number of Muons: " <<
nIncMuons
399 <<
"\n\n#########################################\n"
400 <<
"\nInitializing Histograms...\n";
402 edm::LogInfo(
"Tutorial") <<
"\nIntializing Finished. Filling...\n";
406 edm::LogInfo(
"Tutorial") <<
"\nSaved. Peace, homie, I'm out.\n";
419 for(
int var = 0; var <
NUM_VARS; var++){
428 h_1D[var]->setAxisTitle(
"Fraction of Muons",
YAXIS);
446 for(
int var1 = 0; var1 <
NUM_VARS; var1++){
447 for(
int var2 = 0; var2 <
NUM_VARS; var2++){
448 if(var1 == var2)
continue;
501 p_2D[4][9]->setAxisRange(0.5,15.5,
XAXIS);
511 const double first_bin_width = (r > 1.0) ?
512 (max -
min)*(1-r)/(1-
pow(r,nbins)) :
516 bin_edges[1] = min + first_bin_width;
518 bin_edges[
n] = bin_edges[
n-1] + (bin_edges[
n-1] - bin_edges[
n-2])*r;
524 for(
int var=0; var<
NUM_VARS; var++){
531 if (entries==0)
continue;
535 int n_max = int(
param[var][0])+1;
536 for(
int n=1;
n<=n_max; ++
n){
551 for(
int var=0; var<
NUM_VARS; var++){
556 overFlowBin = (int)
param[var][0] + 1;
563 for(
int var1=0; var1<
NUM_VARS; ++var1){
564 for(
int var2=0; var2<
NUM_VARS; ++var2){
565 if(var1 == var2)
continue;
void RecordData(MuonIterator muon)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > isContinuous
TH1 * GetTH1FromMonitorElement(MonitorElement *me)
std::vector< std::vector< MonitorElement * > > p_2D
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
std::vector< std::string > names
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void cd(void)
go to top directory (ie. root)
#define DEFINE_FWK_MODULE(type)
edm::View< reco::Muon >::const_iterator MuonIterator
std::vector< std::string > main_titles
TH2 * GetTH2FromMonitorElement(MonitorElement *me)
MuIsoValidation(const edm::ParameterSet &)
std::vector< MonitorElement * > h_1D
TProfile * GetTProfileFromMonitorElement(MonitorElement *me)
edm::EDGetTokenT< edm::View< reco::Muon > > Muon_Token
MonitorElement * h_nMuons
virtual void analyze(const edm::Event &, const edm::EventSetup &)
const T & max(const T &a, const T &b)
std::vector< MonitorElement * > cd_plots
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
static const int NUM_VARS
std::vector< std::vector< double > > param
TProfile * getTProfile(void) const
void MakeLogBinsForProfile(Double_t *bin_edges, const double min, const double max)
std::vector< std::string > axis_titles
TH2F * getTH2F(void) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Power< A, B >::type pow(const A &a, const B &b)
void setCurrentFolder(const std::string &fullpath)
std::vector< int > cdCompNeeded