25 TFile muon_templates(muonfileName.c_str(),
"READ");
26 TFile pion_templates(pionfileName.c_str(),
"READ");
34 pion_em_etaB.reset((TH2D*) pion_templates.Get(
"em_etaB"));
36 pion_ho_etaB.reset((TH2D*) pion_templates.Get(
"ho_etaB"));
50 muon_em_etaB.reset((TH2D*) muon_templates.Get(
"em_etaB"));
52 muon_ho_etaB.reset((TH2D*) muon_templates.Get(
"ho_etaB"));
94 const std::string prefixPion =
"MuonCaloCompatibility_pion_";
111 const std::string prefixMuon =
"MuonCaloCompatibility_muon_";
146 if( histo.GetXaxis()->FindBin(x) == 0 ||
147 histo.GetXaxis()->FindBin(x) > histo.GetXaxis()->GetNbins() ) {
150 if( histo.GetYaxis()->FindBin(y) == 0 ||
151 histo.GetYaxis()->FindBin(y) > histo.GetYaxis()->GetNbins() ) {
159 edm::LogWarning(
"MuonIdentification") <<
"MuonCaloCompatibility is not configured! Nothing is calculated.";
202 throw cms::Exception(
"FatalError") <<
"Failed to fill muon id calo_compatibility information for a muon with undefined references to tracks";
214 if( p>=2000. ) p = 1999.9;
235 if( p>=2000. ) p = 1999.9;
253 if( p < 0. )
return 0.5;
254 if( fabs(eta) > 2.5 )
return 0.5;
272 else if(eta > -1.4 && eta <= -1.31) {
279 else if(eta > -1.31 && eta <= 1.31) {
288 else if(eta > 1.31 && eta <= 1.4) {
303 LogTrace(
"MuonIdentification")<<
"Some very weird thing happened in MuonCaloCompatibility::evaluate - go figure ;) ";
307 else if( 42 == 42 ) {
308 if( track->
eta() > 1.27 ) {
315 if( track->
eta() <= 1.27 && track->
eta() > 1.1 ) {
322 if( track->
eta() <= 1.1 && track->
eta() > -1.1 ) {
329 if( track->
eta() <= -1.1 && track->
eta() > -1.27 ) {
336 if( track->
eta() <= -1.27 ) {
348 if( track->
eta() > 1.479 ) {
355 if( track->
eta() <= 1.479 && track->
eta() > -1.479 ) {
361 if( track->
eta() <= -1.479 ) {
371 if( track->
eta() < 1.28 && track->
eta() > -1.28 ) {
390 LogTrace(
"MuonIdentification")<<
"Input variables: eta p em had ho "<<
"\n" 391 <<eta<<
" "<<p<<
" "<<em<<
" "<<had<<
" "<<ho<<
" "<<
"\n" 392 <<
"cal uncorr: em had ho "<<
"\n" 406 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ecal - defaulting signal and background ";
415 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for hcal - defaulting signal and background ";
424 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ho - defaulting signal and background ";
435 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ecal - defaulting signal and background ";
444 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for hcal - defaulting signal and background ";
453 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ho - defaulting signal and background ";
465 if (
psx == 0. ||
pbx == 0.) {
469 if (
psy == 0. ||
pby == 0.) {
473 if (
psz == 0. ||
pbz == 0.) {
504 LogTrace(
"MuonIdentification")<<
"Divide by 0 - defaulting consistency to 0.5 (neutral)!!";
506 LogTrace(
"MuonIdentification")<<
"Input variables: eta p em had ho "<<
"\n" 507 <<eta<<
" "<<p<<
" "<<em<<
" "<<had<<
" "<<ho<<
" "<<
"\n" 508 <<
"cal uncorr: em had ho "<<
"\n" std::shared_ptr< TH2D > muon_em_etaTmi
double p() const
momentum vector magnitude
T getParameter(std::string const &) const
std::shared_ptr< TH2D > muon_template_em
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
double theta() const
polar angle
Sin< T >::type sin(const T &t)
virtual TrackRef track() const
reference to a Track
double evaluate(const reco::Muon &)
std::shared_ptr< TH2D > pion_had_etaB
std::shared_ptr< TH2D > pion_em_etaEpl
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
double eta() const
pseudorapidity of momentum vector
std::shared_ptr< TH2D > pion_em_etaB
std::shared_ptr< TH2D > pion_em_etaTmi
std::shared_ptr< TH2D > muon_had_etaTpl
T const * get() const
Returns C++ pointer to the item.
bool isNull() const
Checks for null.
MuonEnergy calEnergy() const
get energy deposition information
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
std::shared_ptr< TH2D > pion_em_etaTpl
std::shared_ptr< TH2D > pion_had_etaEmi
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
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track