76 if( histo->GetXaxis()->FindBin(x) == 0 ||
77 histo->GetXaxis()->FindBin(x) > histo->GetXaxis()->GetNbins() ) {
80 if( histo->GetYaxis()->FindBin(y) == 0 ||
81 histo->GetYaxis()->FindBin(y) > histo->GetYaxis()->GetNbins() ) {
89 edm::LogWarning(
"MuonIdentification") <<
"MuonCaloCompatibility is not configured! Nothing is calculated.";
132 throw cms::Exception(
"FatalError") <<
"Failed to fill muon id calo_compatibility information for a muon with undefined references to tracks";
144 if( p>=2000. ) p = 1999.9;
165 if( p>=2000. ) p = 1999.9;
183 if( p < 0. )
return 0.5;
184 if( fabs(eta) > 2.5 )
return 0.5;
202 else if(eta > -1.4 && eta <= -1.31) {
209 else if(eta > -1.31 && eta <= 1.31) {
218 else if(eta > 1.31 && eta <= 1.4) {
233 LogTrace(
"MuonIdentification")<<
"Some very weird thing happened in MuonCaloCompatibility::evaluate - go figure ;) ";
237 else if( 42 == 42 ) {
238 if( track->
eta() > 1.27 ) {
245 if( track->
eta() <= 1.27 && track->
eta() > 1.1 ) {
252 if( track->
eta() <= 1.1 && track->
eta() > -1.1 ) {
259 if( track->
eta() <= -1.1 && track->
eta() > -1.27 ) {
266 if( track->
eta() <= -1.27 ) {
278 if( track->
eta() > 1.479 ) {
285 if( track->
eta() <= 1.479 && track->
eta() > -1.479 ) {
291 if( track->
eta() <= -1.479 ) {
301 if( track->
eta() < 1.28 && track->
eta() > -1.28 ) {
320 LogTrace(
"MuonIdentification")<<
"Input variables: eta p em had ho "<<
"\n"
321 <<eta<<
" "<<p<<
" "<<em<<
" "<<had<<
" "<<ho<<
" "<<
"\n"
322 <<
"cal uncorr: em had ho "<<
"\n"
336 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ecal - defaulting signal and background ";
345 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for hcal - defaulting signal and background ";
354 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ho - defaulting signal and background ";
365 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ecal - defaulting signal and background ";
374 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for hcal - defaulting signal and background ";
383 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ho - defaulting signal and background ";
395 if (
psx == 0. ||
pbx == 0.) {
399 if (
psy == 0. ||
pby == 0.) {
403 if (
psz == 0. ||
pbz == 0.) {
434 LogTrace(
"MuonIdentification")<<
"Divide by 0 - defaulting consistency to 0.5 (neutral)!!";
436 LogTrace(
"MuonIdentification")<<
"Input variables: eta p em had ho "<<
"\n"
437 <<eta<<
" "<<p<<
" "<<em<<
" "<<had<<
" "<<ho<<
" "<<
"\n"
438 <<
"cal uncorr: em had ho "<<
"\n"
double p() const
momentum vector magnitude
T getParameter(std::string const &) const
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 &)
boost::shared_ptr< TFile > pion_templates
float ho
energy deposited in crossed HO towers
T x() const
Cartesian x coordinate.
double eta() const
pseudorapidity of momentum vector
T const * get() const
Returns C++ pointer to the item.
bool isNull() const
Checks for null.
MuonEnergy calEnergy() const
get energy deposition information
std::string PionfileName_
void configure(const edm::ParameterSet &)
bool accessing_overflow(TH2D *histo, double x, double y)
std::string MuonfileName_
boost::shared_ptr< TFile > muon_templates
double muon_compatibility
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track