CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
MTVHistoProducerAlgo Class Referenceabstract

#include <MTVHistoProducerAlgo.h>

Inheritance diagram for MTVHistoProducerAlgo:
MTVHistoProducerAlgoForTracker

Public Member Functions

virtual void bookRecoHistos ()=0
 
virtual void bookRecoHistosForStandaloneRunning ()=0
 
virtual void bookSimHistos ()=0
 
virtual void fill_dedx_recoTrack_histos (int count, edm::RefToBase< reco::Track > &trackref, const std::vector< edm::ValueMap< reco::DeDxData > > &v_dEdx)=0
 
virtual void fill_generic_recoTrack_histos (int count, const reco::Track &track, const math::XYZPoint &bsPosition, bool isMatched, bool isSigMatched, bool isChargeMatched, int numAssocRecoTracks, int numVertices, int tpbunchcrossing, int nSimHits, double sharedFraction)=0
 
virtual void fill_generic_simTrack_histos (int counter, const TrackingParticle::Vector &, const TrackingParticle::Point &vertex, int bx)=0
 
virtual void fill_recoAssociated_simTrack_histos (int count, const TrackingParticle &tp, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, double dxy, double dz, int nSimHits, const reco::Track *track, int numVertices, double vertz)=0
 
virtual void fill_recoAssociated_simTrack_histos (int count, const reco::GenParticle &tp, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, double dxy, double dz, int nSimHits, const reco::Track *track, int numVertices, double vertz)=0
 
virtual void fill_ResoAndPull_recoTrack_histos (int count, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, int chargeTP, const reco::Track &track, const math::XYZPoint &bsPosition)=0
 
virtual void fill_simAssociated_recoTrack_histos (int count, const reco::Track &track)=0
 
virtual void fill_trackBased_histos (int count, int assTracks, int numRecoTracks, int numSimTracks)=0
 
virtual void fillHistosFromVectors (int counter)=0
 
virtual void fillProfileHistosFromVectors (int counter)=0
 
virtual void finalHistoFits (int counter)=0
 
virtual void initialize ()=0
 
 MTVHistoProducerAlgo (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
 MTVHistoProducerAlgo (const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
 
void setDQMStore (DQMStore *dbe)
 
virtual ~MTVHistoProducerAlgo ()
 

Protected Member Functions

void BinLogX (TH1 *h)
 
void doProfileX (TH2 *th2, MonitorElement *me)
 
void doProfileX (MonitorElement *th2m, MonitorElement *me)
 
void fillPlotFromVector (MonitorElement *h, std::vector< int > &vec)
 
void fillPlotFromVectors (MonitorElement *h, std::vector< int > &numerator, std::vector< int > &denominator, std::string type)
 
virtual double getEta (double eta)=0
 
virtual double getPt (double pt)=0
 

Protected Attributes

DQMStoredbe_
 

Private Attributes

const edm::ParameterSetpset_
 

Detailed Description

Definition at line 27 of file MTVHistoProducerAlgo.h.

Constructor & Destructor Documentation

MTVHistoProducerAlgo::MTVHistoProducerAlgo ( const edm::ParameterSet pset,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 30 of file MTVHistoProducerAlgo.h.

30 : MTVHistoProducerAlgo(pset, iC){};
MTVHistoProducerAlgo(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
MTVHistoProducerAlgo::MTVHistoProducerAlgo ( const edm::ParameterSet pset,
edm::ConsumesCollector iC 
)
inline

Definition at line 31 of file MTVHistoProducerAlgo.h.

31 : pset_(pset){};
const edm::ParameterSet & pset_
virtual MTVHistoProducerAlgo::~MTVHistoProducerAlgo ( )
inlinevirtual

Definition at line 32 of file MTVHistoProducerAlgo.h.

32 {}

Member Function Documentation

void MTVHistoProducerAlgo::BinLogX ( TH1 *  h)
protected

Definition at line 50 of file MTVHistoProducerAlgo.cc.

References i, and create_public_lumi_plots::width.

Referenced by MTVHistoProducerAlgoForTracker::bookRecoHistos(), and MTVHistoProducerAlgoForTracker::bookRecoHistosForStandaloneRunning().

50  {
51  TAxis *axis = h->GetXaxis();
52  int bins = axis->GetNbins();
53 
54  float from = axis->GetXmin();
55  float to = axis->GetXmax();
56  float width = (to - from) / bins;
57  float *new_bins = new float[bins + 1];
58 
59  for (int i = 0; i <= bins; i++) {
60  new_bins[i] = TMath::Power(10, from + i * width);
61 
62  }
63  axis->Set(bins, new_bins);
64  delete[] new_bins;
65 }
int i
Definition: DBlmapReader.cc:9
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
virtual void MTVHistoProducerAlgo::bookRecoHistos ( )
pure virtual
virtual void MTVHistoProducerAlgo::bookRecoHistosForStandaloneRunning ( )
pure virtual
virtual void MTVHistoProducerAlgo::bookSimHistos ( )
pure virtual
void MTVHistoProducerAlgo::doProfileX ( TH2 *  th2,
MonitorElement me 
)
protected

Definition at line 3 of file MTVHistoProducerAlgo.cc.

References edm::hlt::Exception, MonitorElement::getNbinsX(), MonitorElement::getTProfile(), and p1.

Referenced by doProfileX(), and MTVHistoProducerAlgoForTracker::fillProfileHistosFromVectors().

3  {
4  if (th2->GetNbinsX()==me->getNbinsX()){
5  TProfile * p1 = (TProfile*) th2->ProfileX();
6  p1->Copy(*me->getTProfile());
7  delete p1;
8  } else {
9  throw cms::Exception("MultiTrackValidator") << "Different number of bins!";
10  }
11 }
double p1[4]
Definition: TauolaWrapper.h:89
TProfile * getTProfile(void) const
int getNbinsX(void) const
get # of bins in X-axis
void MTVHistoProducerAlgo::doProfileX ( MonitorElement th2m,
MonitorElement me 
)
inlineprotected

Definition at line 104 of file MTVHistoProducerAlgo.h.

References doProfileX(), and MonitorElement::getTH2F().

104  {
105  doProfileX(th2m->getTH2F(), me);
106  }
void doProfileX(TH2 *th2, MonitorElement *me)
TH2F * getTH2F(void) const
virtual void MTVHistoProducerAlgo::fill_dedx_recoTrack_histos ( int  count,
edm::RefToBase< reco::Track > &  trackref,
const std::vector< edm::ValueMap< reco::DeDxData > > &  v_dEdx 
)
pure virtual
virtual void MTVHistoProducerAlgo::fill_generic_recoTrack_histos ( int  count,
const reco::Track track,
const math::XYZPoint bsPosition,
bool  isMatched,
bool  isSigMatched,
bool  isChargeMatched,
int  numAssocRecoTracks,
int  numVertices,
int  tpbunchcrossing,
int  nSimHits,
double  sharedFraction 
)
pure virtual
virtual void MTVHistoProducerAlgo::fill_generic_simTrack_histos ( int  counter,
const TrackingParticle::Vector ,
const TrackingParticle::Point vertex,
int  bx 
)
pure virtual
virtual void MTVHistoProducerAlgo::fill_recoAssociated_simTrack_histos ( int  count,
const TrackingParticle tp,
const TrackingParticle::Vector momentumTP,
const TrackingParticle::Point vertexTP,
double  dxy,
double  dz,
int  nSimHits,
const reco::Track track,
int  numVertices,
double  vertz 
)
pure virtual
virtual void MTVHistoProducerAlgo::fill_recoAssociated_simTrack_histos ( int  count,
const reco::GenParticle tp,
const TrackingParticle::Vector momentumTP,
const TrackingParticle::Point vertexTP,
double  dxy,
double  dz,
int  nSimHits,
const reco::Track track,
int  numVertices,
double  vertz 
)
pure virtual
virtual void MTVHistoProducerAlgo::fill_ResoAndPull_recoTrack_histos ( int  count,
const TrackingParticle::Vector momentumTP,
const TrackingParticle::Point vertexTP,
int  chargeTP,
const reco::Track track,
const math::XYZPoint bsPosition 
)
pure virtual
virtual void MTVHistoProducerAlgo::fill_simAssociated_recoTrack_histos ( int  count,
const reco::Track track 
)
pure virtual
virtual void MTVHistoProducerAlgo::fill_trackBased_histos ( int  count,
int  assTracks,
int  numRecoTracks,
int  numSimTracks 
)
pure virtual
virtual void MTVHistoProducerAlgo::fillHistosFromVectors ( int  counter)
pure virtual
void MTVHistoProducerAlgo::fillPlotFromVector ( MonitorElement h,
std::vector< int > &  vec 
)
protected

Definition at line 14 of file MTVHistoProducerAlgo.cc.

References j, and MonitorElement::setBinContent().

Referenced by MTVHistoProducerAlgoForTracker::fillHistosFromVectors().

14  {
15  for (unsigned int j=0; j<vec.size(); j++){
16  h->setBinContent(j+1, vec[j]);
17  }
18 }
void setBinContent(int binx, double content)
set content of bin (1-D)
int j
Definition: DBlmapReader.cc:9
void MTVHistoProducerAlgo::fillPlotFromVectors ( MonitorElement h,
std::vector< int > &  numerator,
std::vector< int > &  denominator,
std::string  type 
)
protected

Definition at line 20 of file MTVHistoProducerAlgo.cc.

References j, MonitorElement::setBinContent(), MonitorElement::setBinError(), mathSSE::sqrt(), and relativeConstraints::value.

Referenced by MTVHistoProducerAlgoForTracker::finalHistoFits().

23  {
24  double value,err;
25  for (unsigned int j=0; j<numerator.size(); j++){
26  if (denominator[j]!=0){
27  if (type=="effic"){
28  value = ((double) numerator[j])*1./((double) denominator[j]);
29  err = sqrt( value*(1-value)/(double) denominator[j] );
30  } else if (type=="fakerate"){
31  value = 1-((double) numerator[j])*1./((double) denominator[j]);
32  err = sqrt( value*(1-value)/(double) denominator[j] );
33  } else if (type=="pileup"){
34  value = ((double) numerator[j])*1./((double) denominator[j]);
35  err = sqrt( value*(1+value)/(double) denominator[j] );
36  } else return;
37  h->setBinContent(j+1, value);
38  h->setBinError(j+1, err);
39  }
40  else {
41  h->setBinContent(j+1, 0.);
42  h->setBinError(j+1, 0.);
43  }
44  }
45 }
type
Definition: HCALResponse.h:21
void setBinContent(int binx, double content)
set content of bin (1-D)
list numerator
Definition: cuy.py:483
list denominator
Definition: cuy.py:484
T sqrt(T t)
Definition: SSEVec.h:48
int j
Definition: DBlmapReader.cc:9
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
virtual void MTVHistoProducerAlgo::fillProfileHistosFromVectors ( int  counter)
pure virtual
virtual void MTVHistoProducerAlgo::finalHistoFits ( int  counter)
pure virtual
virtual double MTVHistoProducerAlgo::getEta ( double  eta)
protectedpure virtual
virtual double MTVHistoProducerAlgo::getPt ( double  pt)
protectedpure virtual
virtual void MTVHistoProducerAlgo::initialize ( )
pure virtual
void MTVHistoProducerAlgo::setDQMStore ( DQMStore dbe)
inline

Definition at line 36 of file MTVHistoProducerAlgo.h.

References dbe_.

36 {dbe_ = dbe;}

Member Data Documentation

DQMStore* MTVHistoProducerAlgo::dbe_
protected
const edm::ParameterSet& MTVHistoProducerAlgo::pset_
private

Definition at line 120 of file MTVHistoProducerAlgo.h.