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.10 2013/01/11 04:57:47 wmtan 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 
38 
49 
50 class SiStripQuality;
51 class TrackerTopology;
52 
54 
55 public:
57 
58 
60 
62 
63  void setProbabilityThreshold(long double prob){prob_=prob;}
64  void setMinNumEntries(unsigned short m){MinNumEntries_=m;}
66  void setOccupancyThreshold(long double occupancy){occupancy_=occupancy;minNevents_=occupancy_*Nevents_;}
67  void setNumberOfEvents(double Nevents);
69  void setTrackerGeometry(const TrackerGeometry* tkgeom){TkGeom = tkgeom;}
71 
72  private:
73 
74  // unsigned long long m_cacheID_;
75  //std::string dataLabel_;
76  //edm::FileInPath fp_;
77  //SiStripDetInfoFileReader* reader;
78 
79  struct pHisto{
80 
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  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;
130  double poissonProb;
131 
132  int ishot[768];
135  double stripoccupancy[768];
136  int striphits[768];
137  double poissonprob[768];
138 
139 
140  std::stringstream ss;
141 };
142 #endif
143 
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)