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 
47 
48 class SiStripQuality;
49 class TrackerTopology;
50 
52 public:
54 
56 
58 
59  void setProbabilityThreshold(long double prob) { prob_ = prob; }
60  void setMinNumEntries(unsigned short m) { MinNumEntries_ = m; }
61  void setMinNumEntriesPerStrip(unsigned short m) { MinNumEntriesPerStrip_ = m; }
62  void setOccupancyThreshold(long double occupancy) {
63  occupancy_ = occupancy;
65  }
66  void setNumberOfEvents(double Nevents);
70  }
71  void setTrackerGeometry(const TrackerGeometry* tkgeom) { TkGeom = tkgeom; }
73 
74 private:
75  // unsigned long long m_cacheID_;
76  //std::string dataLabel_;
77  //edm::FileInPath fp_;
78  //SiStripDetInfoFileReader* reader;
79 
80  struct pHisto {
82  TH1F* _th1f;
83  int _NEntries;
85  int _SubdetId;
86  };
87 
88  void iterativeSearch(pHisto&, std::vector<unsigned int>&, int);
89  void evaluatePoissonian(std::vector<long double>&, long double& meanVal);
90 
91  long double prob_;
92  long double ratio_;
93  unsigned short MinNumEntries_;
94  unsigned short MinNumEntriesPerStrip_;
95  double Nevents_;
96  double minNevents_;
97  long double occupancy_;
102 
104 
105  TFile* f;
106  TTree* striptree;
108  int detrawid;
109  int subdetid;
111  int disc;
112  int isback;
116  int isstereo;
121 
125 
126  int isHot;
132  double avgAPVHits;
133  double poissonProb;
134 
135  int ishot[768];
138  double stripoccupancy[768];
139  int striphits[768];
140  double poissonprob[768];
141  double medianapvhits[6];
142  double avgapvhits[6];
143 
144  std::stringstream ss;
145 };
146 #endif
SiStripQualityHistos.h
SiStripHotStripAlgorithmFromClusterOccupancy::medianapvhits
double medianapvhits[6]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:141
SiStripHotStripAlgorithmFromClusterOccupancy::medianAPVHits
double medianAPVHits
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:131
SiStripHotStripAlgorithmFromClusterOccupancy::poissonProb
double poissonProb
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:133
SiStripHotStripAlgorithmFromClusterOccupancy::avgAPVHits
double avgAPVHits
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:132
SiStripHotStripAlgorithmFromClusterOccupancy::isexternalstring
int isexternalstring
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:113
SiStripHotStripAlgorithmFromClusterOccupancy::setOccupancyThreshold
void setOccupancyThreshold(long double occupancy)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:62
StripGeomDetUnit.h
MessageLogger.h
TrackerGeometry.h
SiStripHotStripAlgorithmFromClusterOccupancy::iszminusside
int iszminusside
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:114
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:80
SiStripHotStripAlgorithmFromClusterOccupancy::setMinNumEntriesPerStrip
void setMinNumEntriesPerStrip(unsigned short m)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:61
SiStripHotStripAlgorithmFromClusterOccupancy::setProbabilityThreshold
void setProbabilityThreshold(long double prob)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:59
SiStripHotStripAlgorithmFromClusterOccupancy::setNumberOfEvents
void setNumberOfEvents(double Nevents)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:323
TrackerTopology
Definition: TrackerTopology.h:16
SiStripHotStripAlgorithmFromClusterOccupancy::prob_
long double prob_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:91
SiStripHotStripAlgorithmFromClusterOccupancy::layer_ring
int layer_ring
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:110
SiStripHotStripAlgorithmFromClusterOccupancy::isHot
int isHot
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:126
StripTopology.h
SiStripHotStripAlgorithmFromClusterOccupancy::isback
int isback
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:112
OutputFileName
string OutputFileName
Definition: PFMETBenchmarkAnalyzer.cc:73
SiStripHotStripAlgorithmFromClusterOccupancy::ss
std::stringstream ss
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:144
SiStripHotStripAlgorithmFromClusterOccupancy::striptree
TTree * striptree
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:106
SiStripHotStripAlgorithmFromClusterOccupancy::detrawid
int detrawid
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:108
SiStripHotStripAlgorithmFromClusterOccupancy::iterativeSearch
void iterativeSearch(pHisto &, std::vector< unsigned int > &, int)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:250
FileInPath.h
SiStripHotStripAlgorithmFromClusterOccupancy::extractBadStrips
void extractBadStrips(SiStripQuality *, HistoMap &, const SiStripQuality *)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:24
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto::_NEmptyBins
int _NEmptyBins
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:84
SiStripHotStripAlgorithmFromClusterOccupancy::occupancy_
long double occupancy_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:97
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto::_NEntries
int _NEntries
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:83
SiStripHotStripAlgorithmFromClusterOccupancy::setMinNumEntries
void setMinNumEntries(unsigned short m)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:60
Service.h
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
SiStripHotStripAlgorithmFromClusterOccupancy::stripoccupancy
double stripoccupancy[768]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:138
SiStripHotStripAlgorithmFromClusterOccupancy::hotStripsPerModule
int hotStripsPerModule
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:128
SiStripHotStripAlgorithmFromClusterOccupancy::ratio_
long double ratio_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:92
SiStrip::QualityHistosMap
__gnu_cxx::hash_map< unsigned int, std::shared_ptr< TH1F > > QualityHistosMap
Definition: SiStripQualityHistos.h:8
SiStripHotStripAlgorithmFromClusterOccupancy::subdetid
int subdetid
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:109
SiStripDetInfoFileReader.h
SiStripHotStripAlgorithmFromClusterOccupancy::setOutputFileName
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:67
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripHotStripAlgorithmFromClusterOccupancy::global_position_x
float global_position_x
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:122
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripHotStripAlgorithmFromClusterOccupancy::rodstringpetal
int rodstringpetal
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:115
SiStripHotStripAlgorithmFromClusterOccupancy::striphits
int striphits[768]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:139
SiStripHotStripAlgorithmFromClusterOccupancy::ishot
int ishot[768]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:135
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:71
SiStripHotStripAlgorithmFromClusterOccupancy::MinNumEntriesPerStrip_
unsigned short MinNumEntriesPerStrip_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:94
SiStripHotStripAlgorithmFromClusterOccupancy::global_position_y
float global_position_y
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:123
SiStripHotStripAlgorithmFromClusterOccupancy::f
TFile * f
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:105
SiStripHotStripAlgorithmFromClusterOccupancy::number_strips
int number_strips
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:118
SiStripHotStripAlgorithmFromClusterOccupancy::pQuality
SiStripQuality * pQuality
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:103
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto::pHisto
pHisto()
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:81
SiStripHotStripAlgorithmFromClusterOccupancy::HistoMap
SiStrip::QualityHistosMap HistoMap
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:53
SiStripHotStripAlgorithmFromClusterOccupancy::tTopo
const TrackerTopology * tTopo
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:101
SiStripHotStripAlgorithmFromClusterOccupancy::UseInputDB_
bool UseInputDB_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:107
SiStripHotStripAlgorithmFromClusterOccupancy::~SiStripHotStripAlgorithmFromClusterOccupancy
virtual ~SiStripHotStripAlgorithmFromClusterOccupancy()
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:19
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:98
SiStripHotStripAlgorithmFromClusterOccupancy::minNevents_
double minNevents_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:96
SiStripHotStripAlgorithmFromClusterOccupancy::stripHits
int stripHits
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:130
SiStripHotStripAlgorithmFromClusterOccupancy::avgapvhits
double avgapvhits[6]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:142
SiStripHotStripAlgorithmFromClusterOccupancy::apv_channel
int apv_channel
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:120
DetId.h
SiStripQuality.h
SiStripHotStripAlgorithmFromClusterOccupancy::stripOccupancy
double stripOccupancy
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:129
SiStripQualityRcd.h
SiStripHotStripAlgorithmFromClusterOccupancy
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:51
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto::_SubdetId
int _SubdetId
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:85
SiStripHotStripAlgorithmFromClusterOccupancy::poissonprob
double poissonprob[768]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:140
EventSetup.h
SiStripHotStripAlgorithmFromClusterOccupancy::disc
int disc
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:111
SiStripHotStripAlgorithmFromClusterOccupancy::TkGeom
const TrackerGeometry * TkGeom
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:100
SiStripHotStripAlgorithmFromClusterOccupancy::global_position_z
float global_position_z
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:124
ParameterSet.h
SiStripHotStripAlgorithmFromClusterOccupancy::Nevents_
double Nevents_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:95
SiStripHotStripAlgorithmFromClusterOccupancy::strip_number
int strip_number
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:119
TtFullHadEvtBuilder_cfi.prob
prob
Definition: TtFullHadEvtBuilder_cfi.py:33
SiStripHotStripAlgorithmFromClusterOccupancy::hotstripspermodule
int hotstripspermodule
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:137
SiStripHotStripAlgorithmFromClusterOccupancy::hotStripsPerAPV
int hotStripsPerAPV
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:127
SiStripHotStripAlgorithmFromClusterOccupancy::isstereo
int isstereo
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:116
SiStripHotStripAlgorithmFromClusterOccupancy::module_position
int module_position
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:117
SiStripHotStripAlgorithmFromClusterOccupancy::hotstripsperapv
int hotstripsperapv[6]
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:136
SiStripHotStripAlgorithmFromClusterOccupancy::WriteOutputFile_
bool WriteOutputFile_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:99
SiStripHotStripAlgorithmFromClusterOccupancy::SiStripHotStripAlgorithmFromClusterOccupancy
SiStripHotStripAlgorithmFromClusterOccupancy(const edm::ParameterSet &, const TrackerTopology *)
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.cc:5
SiStripHotStripAlgorithmFromClusterOccupancy::MinNumEntries_
unsigned short MinNumEntries_
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:93
TrackerGeometry
Definition: TrackerGeometry.h:14
SiStripQuality
Definition: SiStripQuality.h:32
SiStripHotStripAlgorithmFromClusterOccupancy::pHisto::_th1f
TH1F * _th1f
Definition: SiStripHotStripAlgorithmFromClusterOccupancy.h:81