77 if( histo->GetXaxis()->FindBin(x) == 0 ||
78 histo->GetXaxis()->FindBin(x) > histo->GetXaxis()->GetNbins() ) {
81 if( histo->GetYaxis()->FindBin(y) == 0 ||
82 histo->GetYaxis()->FindBin(y) > histo->GetYaxis()->GetNbins() ) {
90 edm::LogWarning(
"MuonIdentification") <<
"MuonCaloCompatibility is not configured! Nothing is calculated.";
133 throw cms::Exception(
"FatalError") <<
"Failed to fill muon id calo_compatibility information for a muon with undefined references to tracks";
145 if( p>=2000. ) p = 1999.9;
166 if( p>=2000. ) p = 1999.9;
184 if( p < 0. )
return 0.5;
185 if( fabs(eta) > 2.5 )
return 0.5;
203 else if(eta > -1.4 && eta <= -1.31) {
210 else if(eta > -1.31 && eta <= 1.31) {
219 else if(eta > 1.31 && eta <= 1.4) {
234 LogTrace(
"MuonIdentification")<<
"Some very weird thing happened in MuonCaloCompatibility::evaluate - go figure ;) ";
238 else if( 42 == 42 ) {
239 if( track->
eta() > 1.27 ) {
246 if( track->
eta() <= 1.27 && track->
eta() > 1.1 ) {
253 if( track->
eta() <= 1.1 && track->
eta() > -1.1 ) {
260 if( track->
eta() <= -1.1 && track->
eta() > -1.27 ) {
267 if( track->
eta() <= -1.27 ) {
279 if( track->
eta() > 1.479 ) {
286 if( track->
eta() <= 1.479 && track->
eta() > -1.479 ) {
292 if( track->
eta() <= -1.479 ) {
302 if( track->
eta() < 1.28 && track->
eta() > -1.28 ) {
321 LogTrace(
"MuonIdentification")<<
"Input variables: eta p em had ho "<<
"\n"
322 <<eta<<
" "<<p<<
" "<<em<<
" "<<had<<
" "<<ho<<
" "<<
"\n"
323 <<
"cal uncorr: em had ho "<<
"\n"
337 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ecal - defaulting signal and background ";
346 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for hcal - defaulting signal and background ";
355 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ho - defaulting signal and background ";
366 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ecal - defaulting signal and background ";
375 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for hcal - defaulting signal and background ";
384 LogTrace(
"MuonIdentification")<<
" // Message: trying to access overflow bin in MuonCompatibility template for ho - defaulting signal and background ";
396 if (
psx == 0. ||
pbx == 0.) {
400 if (
psy == 0. ||
pby == 0.) {
404 if (
psz == 0. ||
pbz == 0.) {
435 LogTrace(
"MuonIdentification")<<
"Divide by 0 - defaulting consistency to 0.5 (neutral)!!";
437 LogTrace(
"MuonIdentification")<<
"Input variables: eta p em had ho "<<
"\n"
438 <<eta<<
" "<<p<<
" "<<em<<
" "<<had<<
" "<<ho<<
" "<<
"\n"
439 <<
"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
bool isNull() const
Checks for null.
double eta() const
pseudorapidity of momentum vector
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_
T const * get() const
Returns C++ pointer to the item.
boost::shared_ptr< TFile > muon_templates
double muon_compatibility
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track