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 // $Id: SiStripHotStripAlgorithmFromClusterOccupancy.h,v 1.9 2010/11/04 14:12:13 muzaffar Exp $
17 //
18 //
19 
20 #ifndef CalibTracker_SiStripQuality_SiStripHotStripAlgorithmFromClusterOccupancy_H
21 #define CalibTracker_SiStripQuality_SiStripHotStripAlgorithmFromClusterOccupancy_H
22 
23 // system include files
24 #include <memory>
25 #include <vector>
26 #include <sstream>
27 #include <iostream>
28 
29 #include "TMath.h"
30 #include "TTree.h"
31 #include "TFile.h"
32 
42 
53 
54 class SiStripQuality;
55 
57 
58 public:
60 
61 
63 
65 
66  void setProbabilityThreshold(long double prob){prob_=prob;}
67  void setMinNumEntries(unsigned short m){MinNumEntries_=m;}
69  void setOccupancyThreshold(long double occupancy){occupancy_=occupancy;minNevents_=occupancy_*Nevents_;}
70  void setNumberOfEvents(double Nevents);
71  void setOutputFileName(std::string OutputFileName, bool WriteOutputFile){OutFileName_=OutputFileName; WriteOutputFile_=WriteOutputFile;}
72  void setTrackerGeometry(const TrackerGeometry* tkgeom){TkGeom = tkgeom;}
74 
75  private:
76 
77  // unsigned long long m_cacheID_;
78  //std::string dataLabel_;
79  //edm::FileInPath fp_;
80  //SiStripDetInfoFileReader* reader;
81 
82  struct pHisto{
83 
85  TH1F* _th1f;
86  int _NEntries;
88  int _SubdetId;
89  };
90 
91  void iterativeSearch(pHisto&,std::vector<unsigned int>&,int);
92  void evaluatePoissonian(std::vector<long double>& , long double& meanVal);
93 
94  long double prob_;
95  unsigned short MinNumEntries_;
96  unsigned short MinNumEntriesPerStrip_;
97  double Nevents_;
98  double minNevents_;
99  long double occupancy_;
100  std::string OutFileName_;
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;
132  double poissonProb;
133 
134  int ishot[768];
137  double stripoccupancy[768];
138  int striphits[768];
139  double poissonprob[768];
140 
141 
142  std::stringstream ss;
143 };
144 #endif
145 
string OutputFileName
void setOutputFileName(std::string OutputFileName, bool WriteOutputFile)
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)