CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
54 public:
56 
57 
59 
61 
62  void setProbabilityThreshold(long double prob){prob_=prob;}
63  void setMinNumEntries(unsigned short m){MinNumEntries_=m;}
65  void setOccupancyThreshold(long double occupancy){occupancy_=occupancy;minNevents_=occupancy_*Nevents_;}
66  void setNumberOfEvents(double Nevents);
68  void setTrackerGeometry(const TrackerGeometry* tkgeom){TkGeom = tkgeom;}
70 
71  private:
72 
73  // unsigned long long m_cacheID_;
74  //std::string dataLabel_;
75  //edm::FileInPath fp_;
76  //SiStripDetInfoFileReader* reader;
77 
78  struct pHisto{
79 
81  TH1F* _th1f;
82  int _NEntries;
84  int _SubdetId;
85  };
86 
87  void iterativeSearch(pHisto&,std::vector<unsigned int>&,int);
88  void evaluatePoissonian(std::vector<long double>& , long double& meanVal);
89 
90  long double prob_;
91  long double ratio_;
92  unsigned short MinNumEntries_;
93  unsigned short MinNumEntriesPerStrip_;
94  double Nevents_;
95  double minNevents_;
96  long double occupancy_;
101 
103 
104  TFile* f;
105  TTree* striptree;
107  int detrawid;
108  int subdetid;
110  int disc;
111  int isback;
115  int isstereo;
120 
124 
125  int isHot;
131  double avgAPVHits;
132  double poissonProb;
133 
134  int ishot[768];
137  double stripoccupancy[768];
138  int striphits[768];
139  double poissonprob[768];
140  double medianapvhits[6];
141  double avgapvhits[6];
142 
143 
144  std::stringstream ss;
145 };
146 #endif
147 
string OutputFileName
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
SiStripHotStripAlgorithmFromClusterOccupancy(const edm::ParameterSet &, const TrackerTopology *)
void extractBadStrips(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
__gnu_cxx::hash_map< unsigned int, boost::shared_ptr< TH1F > > QualityHistosMap
void evaluatePoissonian(std::vector< long double > &, long double &meanVal)
void iterativeSearch(pHisto &, std::vector< unsigned int > &, int)