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  unsigned short MinNumEntries_;
92  unsigned short MinNumEntriesPerStrip_;
93  double Nevents_;
94  double minNevents_;
95  long double occupancy_;
100 
102 
103  TFile* f;
104  TTree* striptree;
106  int detrawid;
107  int subdetid;
109  int disc;
110  int isback;
114  int isstereo;
119 
123 
124  int isHot;
129  double poissonProb;
130 
131  int ishot[768];
134  double stripoccupancy[768];
135  int striphits[768];
136  double poissonprob[768];
137 
138 
139  std::stringstream ss;
140 };
141 #endif
142 
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)