CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/DQM/EcalPreshowerMonitorModule/src/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 "DataFormats/EcalDigi/interface/EcalDigiCollections.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_t fitf (Double_t *x, Double_t *par)

Function Documentation

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

Definition at line 30 of file ESTimingTask.cc.

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

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

                                          {

  Double_t wc = par[2];
  Double_t n  = par[3]; // n-1 (in fact)
  Double_t v1 = pow(wc/n*(x[0]-par[1]), n);
  Double_t v2 = TMath::Exp(n-wc*(x[0]-par[1]));
  Double_t v  = par[0]*v1*v2;

  if (x[0] < par[1]) v = 0;

  return v;
}