1 #ifndef DPGAnalysis_SiStripTools_DigiCollectionProfile_H 2 #define DPGAnalysis_SiStripTools_DigiCollectionProfile_H 26 const std::vector<TH1F*>&,
27 const std::vector<TProfile*>&,
28 const std::vector<TH2F*>&)
const;
41 : m_folded(
false), m_want1dHisto(
false), m_wantProfile(
false), m_want2dHisto(
false), m_selections() {}
45 : m_folded(iConfig.getUntrackedParameter<
bool>(
"foldedStrips",
false)),
46 m_want1dHisto(iConfig.getUntrackedParameter<
bool>(
"want1dHisto",
true)),
47 m_wantProfile(iConfig.getUntrackedParameter<
bool>(
"wantProfile",
true)),
48 m_want2dHisto(iConfig.getUntrackedParameter<
bool>(
"want2dHisto",
false))
51 std::vector<edm::ParameterSet> selconfigs = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"selections");
53 for (std::vector<edm::ParameterSet>::const_iterator selconfig = selconfigs.begin(); selconfig != selconfigs.end();
62 const std::vector<TH1F*>&
hist,
63 const std::vector<TProfile*>& hprof,
64 const std::vector<TH2F*>& hist2d)
const {}
69 const std::vector<TH1F*>&
hist,
70 const std::vector<TProfile*>& hprof,
71 const std::vector<TH2F*>& hist2d)
const {
73 for (
unsigned int isel = 0; isel < m_selections.size(); ++isel) {
75 TH1F* tobefilled1d =
nullptr;
76 TProfile* tobefilledprof =
nullptr;
77 TH2F* tobefilled2d =
nullptr;
80 tobefilled1d =
hist[isel];
82 tobefilledprof = hprof[isel];
84 tobefilled2d = hist2d[isel];
87 if (digi->adc() > 0) {
88 unsigned int strip = digi->strip();
92 tobefilled1d->Fill(
strip);
94 tobefilledprof->Fill(
strip, digi->adc());
96 tobefilled2d->Fill(
strip, digi->adc());
107 const std::vector<TH1F*>&
hist,
108 const std::vector<TProfile*>& hprof,
109 const std::vector<TH2F*>& hist2d)
const {
111 for (
unsigned int isel = 0; isel < m_selections.size(); ++isel) {
113 TH1F* tobefilled1d =
nullptr;
114 TProfile* tobefilledprof =
nullptr;
115 TH2F* tobefilled2d =
nullptr;
118 tobefilled1d =
hist[isel];
120 tobefilledprof = hprof[isel];
122 tobefilled2d = hist2d[isel];
124 unsigned int istrip = 0;
126 if (digi->adc() > 0) {
127 unsigned int strip = istrip;
131 tobefilled1d->Fill(
strip);
133 tobefilledprof->Fill(
strip, digi->adc());
135 tobefilled2d->Fill(
strip, digi->adc());
146 const std::vector<TH1F*>&
hist,
147 const std::vector<TProfile*>& hprof,
148 const std::vector<TH2F*>& hist2d)
const {
150 for (
unsigned int isel = 0; isel < m_selections.size(); ++isel) {
152 TH1F* tobefilled1d =
nullptr;
153 TProfile* tobefilledprof =
nullptr;
154 TH2F* tobefilled2d =
nullptr;
157 tobefilled1d =
hist[isel];
159 tobefilledprof = hprof[isel];
161 tobefilled2d = hist2d[isel];
164 for (
unsigned int digi = 0; digi < clus->amplitudes().size(); ++digi) {
165 if (clus->amplitudes()[digi] > 0) {
166 unsigned int strip = clus->firstStrip() + digi;
170 tobefilled1d->Fill(
strip);
172 tobefilledprof->Fill(
strip, clus->amplitudes()[digi]);
174 tobefilled2d->Fill(
strip, clus->amplitudes()[digi]);
183 #endif // DPGAnalysis_SiStripTools_DigiCollectionProfile_H
T getParameter(std::string const &) const
std::vector< DetIdSelector > m_selections
data_type const * const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
bool isSelected(const std::vector< L1HPSPFTauQualityCut > &qualityCuts, const l1t::PFCandidate &pfCand, float_t primaryVertexZ)
void fill(edm::Handle< T > digis, const std::vector< TH1F *> &, const std::vector< TProfile *> &, const std::vector< TH2F *> &) const
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
T mod(const T &a, const T &b)
~DigiCollectionProfiler()