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 
48 
49 class SiStripQuality;
50 class TrackerTopology;
51 
53 public:
55 
57 
59 
60  void setProbabilityThreshold(long double prob) { prob_ = prob; }
61  void setMinNumEntries(unsigned short m) { MinNumEntries_ = m; }
62  void setMinNumEntriesPerStrip(unsigned short m) { MinNumEntriesPerStrip_ = m; }
63  void setOccupancyThreshold(long double occupancy) {
64  occupancy_ = occupancy;
66  }
67  void setNumberOfEvents(double Nevents);
68  void setOutputFileName(std::string OutputFileName, bool WriteOutputFile) {
70  WriteOutputFile_ = WriteOutputFile;
71  }
72  void setTrackerGeometry(const TrackerGeometry* tkgeom) { TkGeom = tkgeom; }
74 
75 private:
76  // unsigned long long m_cacheID_;
77  //std::string dataLabel_;
78  //edm::FileInPath fp_;
79  //SiStripDetInfoFileReader* reader;
80 
81  struct pHisto {
83  TH1F* _th1f;
84  int _NEntries;
86  int _SubdetId;
87  };
88 
89  void iterativeSearch(pHisto&, std::vector<unsigned int>&, int);
90  void evaluatePoissonian(std::vector<long double>&, long double& meanVal);
91 
92  long double prob_;
93  long double ratio_;
94  unsigned short MinNumEntries_;
95  unsigned short MinNumEntriesPerStrip_;
96  double Nevents_;
97  double minNevents_;
98  long double occupancy_;
103 
105 
106  TFile* f;
107  TTree* striptree;
109  int detrawid;
110  int subdetid;
112  int disc;
113  int isback;
117  int isstereo;
122 
126 
127  int isHot;
133  double avgAPVHits;
134  double poissonProb;
135 
136  int ishot[768];
139  double stripoccupancy[768];
140  int striphits[768];
141  double poissonprob[768];
142  double medianapvhits[6];
143  double avgapvhits[6];
144 
145  std::stringstream ss;
146 };
147 #endif
string OutputFileName
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
SiStripHotStripAlgorithmFromClusterOccupancy(const edm::ParameterSet &, const TrackerTopology *)
void extractBadStrips(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
void evaluatePoissonian(std::vector< long double > &, long double &meanVal)
__gnu_cxx::hash_map< unsigned int, boost::shared_ptr< TH1F > > QualityHistosMap
void iterativeSearch(pHisto &, std::vector< unsigned int > &, int)