CMS 3D CMS Logo

Classes | Functions

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/DQMOffline/Ecal/src/EcalZmassClient.cc File Reference

#include <memory>
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "DQM/Physics/src/EwkDQM.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "TMath.h"
#include <string>
#include <cmath>
#include "TH1.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include <iostream>

Go to the source code of this file.

Classes

class  EcalZmassClient

Functions

 DEFINE_FWK_MODULE (EcalZmassClient)
Double_t mybw (Double_t *x, Double_t *par)
Double_t mygauss (Double_t *x, Double_t *par)

Function Documentation

DEFINE_FWK_MODULE ( EcalZmassClient  )
Double_t mybw ( Double_t *  x,
Double_t *  par 
)

Definition at line 215 of file EcalZmassClient.cc.

{
  Double_t arg1 = 14.0 / 22.0;  // 2 over pi
  Double_t arg2 = par[1] * par[1] * par[2] * par[2];    //Gamma=par[2]  M=par[1]
  Double_t arg3 =
    ((x[0] * x[0]) - (par[1] * par[1])) * ((x[0] * x[0]) - (par[1] * par[1]));
  Double_t arg4 =
    x[0] * x[0] * x[0] * x[0] * ((par[2] * par[2]) / (par[1] * par[1]));
  return par[0] * arg1 * arg2 / (arg3 + arg4);
}
Double_t mygauss ( Double_t *  x,
Double_t *  par 
)

Definition at line 228 of file EcalZmassClient.cc.

References cmsCodeRulesChecker::arg, and Pi.

Referenced by EcalZmassClient::endRun().

{
  Double_t arg = 0;
  if (par[2] < 0)
    par[2] = -par[2];           // par[2]: sigma
  if (par[2] != 0)
    arg = (x[0] - par[1]) / par[2];     // par[1]: mean
  return par[0] * TMath::Exp (-0.5 * arg * arg) / (TMath::Sqrt (2 * TMath::Pi ()) * par[2]);    // par[0] is constant

}