24 TFile muon_templates(muonfileName.c_str(),
"READ");
25 TFile pion_templates(pionfileName.c_str(),
"READ");
33 pion_em_etaB.reset((TH2D*)pion_templates.Get(
"em_etaB"));
35 pion_ho_etaB.reset((TH2D*)pion_templates.Get(
"ho_etaB"));
49 muon_em_etaB.reset((TH2D*)muon_templates.Get(
"em_etaB"));
51 muon_ho_etaB.reset((TH2D*)muon_templates.Get(
"ho_etaB"));
93 const std::string prefixPion =
"MuonCaloCompatibility_pion_";
110 const std::string prefixMuon =
"MuonCaloCompatibility_muon_";
145 if (
histo.GetXaxis()->FindBin(
x) == 0 ||
histo.GetXaxis()->FindBin(
x) >
histo.GetXaxis()->GetNbins()) {
148 if (
histo.GetYaxis()->FindBin(
y) == 0 ||
histo.GetYaxis()->FindBin(
y) >
histo.GetYaxis()->GetNbins()) {
156 edm::LogWarning(
"MuonIdentification") <<
"MuonCaloCompatibility is not configured! Nothing is calculated.";
198 <<
"Failed to fill muon id calo_compatibility information for a muon with undefined references to tracks";
272 }
else if (
eta > -1.4 &&
eta <= -1.31) {
278 }
else if (
eta > -1.31 &&
eta <= 1.31) {
286 }
else if (
eta > 1.31 &&
eta <= 1.4) {
292 }
else if (
eta > 1.4) {
300 <<
"Some very weird thing happened in MuonCaloCompatibility::evaluate - go figure ;) ";
303 }
else if (42 == 42) {
304 if (
track->eta() > 1.27) {
313 if (
track->eta() <= 1.27 &&
track->eta() > 1.1) {
322 if (
track->eta() <= 1.1 &&
track->eta() > -1.1) {
331 if (
track->eta() <= -1.1 &&
track->eta() > -1.27) {
340 if (
track->eta() <= -1.27) {
354 if (
track->eta() > 1.479) {
361 if (
track->eta() <= 1.479 &&
track->eta() > -1.479) {
367 if (
track->eta() <= -1.479) {
377 if (
track->eta() < 1.28 &&
track->eta() > -1.28) {
395 LogTrace(
"MuonIdentification") <<
"Input variables: eta p em had ho " 397 <<
eta <<
" " <<
p <<
" " << em <<
" " << had <<
" " <<
ho <<
" " 399 <<
"cal uncorr: em had ho " 414 LogTrace(
"MuonIdentification") <<
" // Message: trying to access overflow bin in MuonCompatibility " 415 "template for ecal - defaulting signal and background ";
417 <<
" e: " << em <<
" p: " <<
p;
426 LogTrace(
"MuonIdentification") <<
" // Message: trying to access overflow bin in MuonCompatibility " 427 "template for hcal - defaulting signal and background ";
429 <<
" e: " << had <<
" p: " <<
p;
438 LogTrace(
"MuonIdentification") <<
" // Message: trying to access overflow bin in MuonCompatibility " 439 "template for ho - defaulting signal and background ";
441 <<
" e: " << em <<
" p: " <<
p;
451 LogTrace(
"MuonIdentification") <<
" // Message: trying to access overflow bin in MuonCompatibility " 452 "template for ecal - defaulting signal and background ";
454 <<
" e: " << em <<
" p: " <<
p;
463 LogTrace(
"MuonIdentification") <<
" // Message: trying to access overflow bin in MuonCompatibility " 464 "template for hcal - defaulting signal and background ";
466 <<
" e: " << had <<
" p: " <<
p;
475 LogTrace(
"MuonIdentification") <<
" // Message: trying to access overflow bin in MuonCompatibility " 476 "template for ho - defaulting signal and background ";
478 <<
" e: " <<
ho <<
" p: " <<
p;
492 if (
psx == 0. ||
pbx == 0.) {
496 if (
psy == 0. ||
pby == 0.) {
500 if (
psz == 0. ||
pbz == 0.) {
531 LogTrace(
"MuonIdentification") <<
"Divide by 0 - defaulting consistency to 0.5 (neutral)!!";
533 LogTrace(
"MuonIdentification") <<
"Input variables: eta p em had ho " 535 <<
eta <<
" " <<
p <<
" " << em <<
" " << had <<
" " <<
ho <<
" " 537 <<
"cal uncorr: em had ho " std::shared_ptr< TH2D > muon_em_etaTmi
std::shared_ptr< TH2D > muon_template_em
T getParameter(std::string const &) const
std::shared_ptr< TH2D > muon_em_etaEmi
std::shared_ptr< TH2D > pion_ho_etaB
std::shared_ptr< TH2D > muon_ho_etaB
std::shared_ptr< TH2D > pion_had_etaEpl
Sin< T >::type sin(const T &t)
double evaluate(const reco::Muon &)
std::shared_ptr< TH2D > pion_had_etaB
std::shared_ptr< TH2D > pion_em_etaEpl
TrackRef track() const override
reference to a Track
std::shared_ptr< TH2D > muon_had_etaEpl
std::shared_ptr< TH2D > muon_template_ho
std::shared_ptr< TH2D > pion_template_em
std::shared_ptr< TH2D > pion_had_etaTmi
float ho
energy deposited in crossed HO towers
std::shared_ptr< TH2D > muon_template_had
std::shared_ptr< TH2D > pion_em_etaB
std::shared_ptr< TH2D > pion_em_etaTmi
std::shared_ptr< TH2D > muon_had_etaTpl
MuonEnergy calEnergy() const
get energy deposition information
TrackRef standAloneMuon() const override
reference to a stand-alone muon Track
bool isNull() const
Checks for null.
bool accessing_overflow(const TH2D &histo, double x, double y)
void configure(const edm::ParameterSet &)
std::shared_ptr< TH2D > pion_template_had
std::shared_ptr< TH2D > pion_template_ho
std::shared_ptr< TH2D > muon_em_etaB
T const * get() const
Returns C++ pointer to the item.
std::shared_ptr< TH2D > pion_em_etaTpl
std::shared_ptr< TH2D > pion_had_etaEmi
Log< level::Warning, false > LogWarning
std::shared_ptr< TH2D > muon_had_etaTmi
std::shared_ptr< TH2D > pion_em_etaEmi
std::shared_ptr< TH2D > muon_em_etaTpl
double muon_compatibility
std::shared_ptr< TH2D > pion_had_etaTpl
std::shared_ptr< TH2D > muon_had_etaEmi
std::shared_ptr< TH2D > muon_had_etaB
std::shared_ptr< TH2D > muon_em_etaEpl