CMS 3D CMS Logo

SiStripHotStripAlgorithmFromClusterOccupancy.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiStripQuality
4 // Class: SiStripHotStripAlgorithmFromClusterOccupancy
5 //
13 //
14 // Original Author: Domenico GIORDANO
15 // Created: Wed Oct 3 12:11:10 CEST 2007
16 //
17 //
18 
19 #ifndef CalibTracker_SiStripQuality_SiStripHotStripAlgorithmFromClusterOccupancy_H
20 #define CalibTracker_SiStripQuality_SiStripHotStripAlgorithmFromClusterOccupancy_H
21 
22 // system include files
23 #include <memory>
24 #include <vector>
25 #include <sstream>
26 #include <iostream>
27 
28 #include "TMath.h"
29 #include "TTree.h"
30 #include "TFile.h"
31 
37 
46 
47 class SiStripQuality;
48 class TrackerTopology;
49 
51 public:
53 
55 
57 
58  void setProbabilityThreshold(long double prob) { prob_ = prob; }
59  void setMinNumEntries(unsigned short m) { MinNumEntries_ = m; }
60  void setMinNumEntriesPerStrip(unsigned short m) { MinNumEntriesPerStrip_ = m; }
61  void setOccupancyThreshold(long double occupancy) {
62  occupancy_ = occupancy;
64  }
65  void setNumberOfEvents(double Nevents);
69  }
70  void setTrackerGeometry(const TrackerGeometry* tkgeom) { TkGeom = tkgeom; }
72 
73 private:
74  struct pHisto {
76  TH1F* _th1f;
77  int _NEntries;
79  int _SubdetId;
80  };
81 
82  void iterativeSearch(pHisto&, std::vector<unsigned int>&, int);
83  void evaluatePoissonian(std::vector<long double>&, long double& meanVal);
84 
85  long double prob_;
86  long double ratio_;
87  unsigned short MinNumEntries_;
88  unsigned short MinNumEntriesPerStrip_;
89  double Nevents_;
90  double minNevents_;
91  long double occupancy_;
96 
98 
99  TFile* f;
100  TTree* striptree;
102  int detrawid;
103  int subdetid;
105  int disc;
106  int isback;
110  int isstereo;
115 
119 
120  int isHot;
126  double avgAPVHits;
127  double poissonProb;
128 
129  int ishot[768];
132  double stripoccupancy[768];
133  int striphits[768];
134  double poissonprob[768];
135  double medianapvhits[6];
136  double avgapvhits[6];
137 
138  std::stringstream ss;
139 };
140 #endif
SiStripQualityHistos.h
SiStripHotStripAlgorithmFromClusterOccupancy::medianapvhits
double medianapvhits[6]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:135
SiStripHotStripAlgorithmFromClusterOccupancy::medianAPVHits
double medianAPVHits
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:125
SiStripHotStripAlgorithmFromClusterOccupancy::poissonProb
double poissonProb
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:127
SiStripHotStripAlgorithmFromClusterOccupancy::avgAPVHits
double avgAPVHits
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:126
SiStripHotStripAlgorithmFromClusterOccupancy::isexternalstring
int isexternalstring
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:107
SiStripHotStripAlgorithmFromClusterOccupancy::setOccupancyThreshold
void setOccupancyThreshold(long double occupancy)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:61
StripGeomDetUnit.h
MessageLogger.h
TrackerGeometry.h
SiStripHotStripAlgorithmFromClusterOccupancy::iszminusside
int iszminusside
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:108
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:74
SiStripHotStripAlgorithmFromClusterOccupancy::setMinNumEntriesPerStrip
void setMinNumEntriesPerStrip(unsigned short m)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:60
SiStripHotStripAlgorithmFromClusterOccupancy::setProbabilityThreshold
void setProbabilityThreshold(long double prob)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:58
SiStripHotStripAlgorithmFromClusterOccupancy::setNumberOfEvents
void setNumberOfEvents(double Nevents)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:323
TrackerTopology
Definition: TrackerTopology.h:16
SiStripHotStripAlgorithmFromClusterOccupancy::prob_
long double prob_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:85
SiStripHotStripAlgorithmFromClusterOccupancy::layer_ring
int layer_ring
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:104
SiStripHotStripAlgorithmFromClusterOccupancy::isHot
int isHot
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:120
StripTopology.h
SiStripHotStripAlgorithmFromClusterOccupancy::isback
int isback
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:106
OutputFileName
string OutputFileName
Definition: PFMETBenchmarkAnalyzer.cc:73
SiStripHotStripAlgorithmFromClusterOccupancy::ss
std::stringstream ss
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:138
SiStripHotStripAlgorithmFromClusterOccupancy::striptree
TTree * striptree
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:100
SiStripHotStripAlgorithmFromClusterOccupancy::detrawid
int detrawid
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:102
SiStripHotStripAlgorithmFromClusterOccupancy::iterativeSearch
void iterativeSearch(pHisto &, std::vector< unsigned int > &, int)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:250
SiStripHotStripAlgorithmFromClusterOccupancy::extractBadStrips
void extractBadStrips(SiStripQuality *, HistoMap &, const SiStripQuality *)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:24
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto::_NEmptyBins
int _NEmptyBins
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:78
SiStripHotStripAlgorithmFromClusterOccupancy::occupancy_
long double occupancy_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:91
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto::_NEntries
int _NEntries
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:77
SiStripHotStripAlgorithmFromClusterOccupancy::setMinNumEntries
void setMinNumEntries(unsigned short m)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:59
Service.h
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:78
SiStripHotStripAlgorithmFromClusterOccupancy::stripoccupancy
double stripoccupancy[768]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:132
SiStripHotStripAlgorithmFromClusterOccupancy::hotStripsPerModule
int hotStripsPerModule
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:122
SiStripHotStripAlgorithmFromClusterOccupancy::ratio_
long double ratio_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:86
SiStripHotStripAlgorithmFromClusterOccupancy::subdetid
int subdetid
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:103
SiStripHotStripAlgorithmFromClusterOccupancy::setOutputFileName
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:66
FileInPath.h
SiStripHotStripAlgorithmFromClusterOccupancy::global_position_x
float global_position_x
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:116
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripHotStripAlgorithmFromClusterOccupancy::rodstringpetal
int rodstringpetal
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:109
SiStripHotStripAlgorithmFromClusterOccupancy::striphits
int striphits[768]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:133
SiStripHotStripAlgorithmFromClusterOccupancy::ishot
int ishot[768]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:129
SiStrip::QualityHistosMap
std::unordered_map< unsigned int, std::shared_ptr< TH1F > > QualityHistosMap
Definition: SiStripQualityHistos.h:8
rctMonitor_cfi.WriteOutputFile
WriteOutputFile
Name of root file for histograms.
Definition: rctMonitor_cfi.py:8
SiStripHotStripAlgorithmFromClusterOccupancy::setTrackerGeometry
void setTrackerGeometry(const TrackerGeometry *tkgeom)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:70
SiStripHotStripAlgorithmFromClusterOccupancy::MinNumEntriesPerStrip_
unsigned short MinNumEntriesPerStrip_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:88
SiStripHotStripAlgorithmFromClusterOccupancy::global_position_y
float global_position_y
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:117
SiStripHotStripAlgorithmFromClusterOccupancy::f
TFile * f
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:99
SiStripHotStripAlgorithmFromClusterOccupancy::number_strips
int number_strips
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:112
SiStripHotStripAlgorithmFromClusterOccupancy::pQuality
SiStripQuality * pQuality
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:97
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto::pHisto
pHisto()
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:75
SiStripHotStripAlgorithmFromClusterOccupancy::HistoMap
SiStrip::QualityHistosMap HistoMap
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:52
SiStripHotStripAlgorithmFromClusterOccupancy::tTopo
const TrackerTopology * tTopo
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:95
SiStripHotStripAlgorithmFromClusterOccupancy::UseInputDB_
bool UseInputDB_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:101
SiStripHotStripAlgorithmFromClusterOccupancy::~SiStripHotStripAlgorithmFromClusterOccupancy
virtual ~SiStripHotStripAlgorithmFromClusterOccupancy()
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:19
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackerMap.h
SiStripHotStripAlgorithmFromClusterOccupancy::evaluatePoissonian
void evaluatePoissonian(std::vector< long double > &, long double &meanVal)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:316
SiStripHotStripAlgorithmFromClusterOccupancy::OutFileName_
std::string OutFileName_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:92
SiStripHotStripAlgorithmFromClusterOccupancy::minNevents_
double minNevents_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:90
SiStripHotStripAlgorithmFromClusterOccupancy::stripHits
int stripHits
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:124
SiStripHotStripAlgorithmFromClusterOccupancy::avgapvhits
double avgapvhits[6]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:136
SiStripHotStripAlgorithmFromClusterOccupancy::apv_channel
int apv_channel
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:114
DetId.h
SiStripQuality.h
SiStripHotStripAlgorithmFromClusterOccupancy::stripOccupancy
double stripOccupancy
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:123
SiStripQualityRcd.h
SiStripHotStripAlgorithmFromClusterOccupancy
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:50
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto::_SubdetId
int _SubdetId
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:79
SiStripHotStripAlgorithmFromClusterOccupancy::poissonprob
double poissonprob[768]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:134
EventSetup.h
SiStripHotStripAlgorithmFromClusterOccupancy::disc
int disc
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:105
SiStripHotStripAlgorithmFromClusterOccupancy::TkGeom
const TrackerGeometry * TkGeom
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:94
SiStripHotStripAlgorithmFromClusterOccupancy::global_position_z
float global_position_z
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:118
ParameterSet.h
SiStripHotStripAlgorithmFromClusterOccupancy::Nevents_
double Nevents_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:89
SiStripHotStripAlgorithmFromClusterOccupancy::strip_number
int strip_number
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:113
TtFullHadEvtBuilder_cfi.prob
prob
Definition: TtFullHadEvtBuilder_cfi.py:33
SiStripHotStripAlgorithmFromClusterOccupancy::hotstripspermodule
int hotstripspermodule
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:131
SiStripHotStripAlgorithmFromClusterOccupancy::hotStripsPerAPV
int hotStripsPerAPV
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:121
SiStripHotStripAlgorithmFromClusterOccupancy::isstereo
int isstereo
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:110
SiStripHotStripAlgorithmFromClusterOccupancy::module_position
int module_position
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:111
SiStripHotStripAlgorithmFromClusterOccupancy::hotstripsperapv
int hotstripsperapv[6]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:130
SiStripHotStripAlgorithmFromClusterOccupancy::WriteOutputFile_
bool WriteOutputFile_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:93
SiStripHotStripAlgorithmFromClusterOccupancy::SiStripHotStripAlgorithmFromClusterOccupancy
SiStripHotStripAlgorithmFromClusterOccupancy(const edm::ParameterSet &, const TrackerTopology *)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:5
SiStripHotStripAlgorithmFromClusterOccupancy::MinNumEntries_
unsigned short MinNumEntries_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:87
TrackerGeometry
Definition: TrackerGeometry.h:14
SiStripQuality
Definition: SiStripQuality.h:32
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto::_th1f
TH1F * _th1f
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:75