152 main_titles[6 ] =
"Tracker p_{T} within veto cone";
182 axis_titles[13] =
"#Sigma p_{T} / N_{Tracks} (GeV)";
183 axis_titles[14] =
"(1.5) X #Sigma E_{T}^{EM} + #Sigma E_{T}^{Had}";
196 names[4 ] =
"nTracks";
198 names[6 ] =
"trackerVetoPt";
199 names[7 ] =
"emVetoEt";
200 names[8 ] =
"hadVetoEt";
201 names[9 ] =
"hoVetoEt";
202 names[10] =
"muonPt";
203 names[11] =
"muonEta";
204 names[12] =
"muonPhi";
206 names[14] =
"weightedEt";
207 names[15] =
"PFsumChargedHadronPt";
208 names[16] =
"PFsumChargedTotalPt";
209 names[17] =
"PFsumEMuPt";
210 names[18] =
"PFsumNeutralHadronEt";
211 names[19] =
"PFsumPhotonEt";
212 names[20] =
"PFsumPUPt";
304 edm::LogInfo(
"Tutorial") <<
"Number of Muons: " << muonsHandle->size();
314 if (
muon->combinedMuon().isNull())
continue;
328 theData[0] = muon->isolationR03().sumPt;
329 theData[1] = muon->isolationR03().emEt;
330 theData[2] = muon->isolationR03().hadEt;
331 theData[3] = muon->isolationR03().hoEt;
333 theData[4] = muon->isolationR03().nTracks;
334 theData[5] = muon->isolationR03().nJets;
335 theData[6] = muon->isolationR03().trackerVetoPt;
336 theData[7] = muon->isolationR03().emVetoEt;
337 theData[8] = muon->isolationR03().hadVetoEt;
338 theData[9] = muon->isolationR03().hoVetoEt;
357 if ( muon->isPFMuon() && muon->isPFIsolationValid() ) {
358 theData[15] = muon->pfIsolationR03().sumChargedHadronPt;
359 theData[16] = muon->pfIsolationR03().sumChargedParticlePt;
360 theData[17] = muon->pfIsolationR03().sumChargedParticlePt-muon->pfIsolationR03().sumChargedHadronPt;
361 theData[18] = muon->pfIsolationR03().sumNeutralHadronEt;
362 theData[19] = muon->pfIsolationR03().sumPhotonEt;
363 theData[20] = muon->pfIsolationR03().sumPUPt;
373 edm::LogInfo(
"Tutorial") <<
"\n#########################################\n\n"
374 <<
"Lets get started! "
375 <<
"\n\n#########################################\n";
395 edm::LogInfo(
"Tutorial") <<
"\n#########################################\n\n"
396 <<
"Total Number of Events: " <<
nEvents
397 <<
"\nTotal Number of Muons: " <<
nIncMuons
398 <<
"\n\n#########################################\n"
399 <<
"\nInitializing Histograms...\n";
401 edm::LogInfo(
"Tutorial") <<
"\nIntializing Finished. Filling...\n";
405 edm::LogInfo(
"Tutorial") <<
"\nSaved. Peace, homie, I'm out.\n";
418 for(
int var = 0; var <
NUM_VARS; var++){
427 h_1D[var]->setAxisTitle(
"Fraction of Muons",
YAXIS);
445 for(
int var1 = 0; var1 <
NUM_VARS; var1++){
446 for(
int var2 = 0; var2 <
NUM_VARS; var2++){
447 if(var1 == var2)
continue;
500 p_2D[4][9]->setAxisRange(0.5,15.5,
XAXIS);
510 const double first_bin_width = (r > 1.0) ?
511 (max -
min)*(1-r)/(1-
pow(r,nbins)) :
515 bin_edges[1] = min + first_bin_width;
517 bin_edges[
n] = bin_edges[
n-1] + (bin_edges[
n-1] - bin_edges[
n-2])*r;
523 for(
int var=0; var<
NUM_VARS; var++){
530 if (entries==0)
continue;
534 int n_max = int(
param[var][0])+1;
535 for(
int n=1;
n<=n_max; ++
n){
550 for(
int var=0; var<
NUM_VARS; var++){
555 overFlowBin = (int)
param[var][0] + 1;
562 for(
int var1=0; var1<
NUM_VARS; ++var1){
563 for(
int var2=0; var2<
NUM_VARS; ++var2){
564 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
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)
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")
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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