CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
ESTimingTask.cc File Reference
#include <memory>
#include <fstream>
#include <iostream>
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/EcalDetId/interface/ESDetId.h"
#include "DataFormats/EcalDigi/interface/ESDataFrame.h"
#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
#include "CondFormats/DataRecord/interface/ESGainRcd.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQM/EcalPreshowerMonitorModule/interface/ESTimingTask.h"
#include "TStyle.h"
#include "TH2F.h"
#include "TMath.h"
#include "TGraph.h"

Go to the source code of this file.

Functions

 DEFINE_FWK_MODULE (ESTimingTask)
 
double fitf (double *x, double *par)
 

Function Documentation

DEFINE_FWK_MODULE ( ESTimingTask  )
double fitf ( double *  x,
double *  par 
)

Definition at line 29 of file ESTimingTask.cc.

References n, funct::pow(), and findQualityFiles::v.

Referenced by ESRecHitFitAlgo::ESRecHitFitAlgo(), and ESTimingTask::ESTimingTask().

29  {
30 
31  double wc = par[2];
32  double n = par[3]; // n-1 (in fact)
33  double v1 = pow(wc/n*(x[0]-par[1]), n);
34  double v2 = TMath::Exp(n-wc*(x[0]-par[1]));
35  double v = par[0]*v1*v2;
36 
37  if (x[0] < par[1]) v = 0;
38 
39  return v;
40 }
Definition: DDAxes.h:10
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40