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
string OutputFileName
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
SiStripHotStripAlgorithmFromClusterOccupancy(const edm::ParameterSet &, const TrackerTopology *)
WriteOutputFile
Name of root file for histograms.
void evaluatePoissonian(std::vector< long double > &, long double &meanVal)
std::map< uint32_t, TH1F * > HistoMap
std::unordered_map< unsigned int, std::shared_ptr< TH1F > > QualityHistosMap
void extractBadStrips(SiStripQuality *, HistoMap &, const SiStripQuality *)
void iterativeSearch(pHisto &, std::vector< unsigned int > &, int)