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 {}
68 const std::vector<TH1F*>&
hist,
69 const std::vector<TProfile*>& hprof,
70 const std::vector<TH2F*>& hist2d)
const {
72 for (
unsigned int isel = 0; isel < m_selections.size(); ++isel) {
73 if (m_selections[isel].isSelected(
mod->detId())) {
74 TH1F* tobefilled1d =
nullptr;
75 TProfile* tobefilledprof =
nullptr;
76 TH2F* tobefilled2d =
nullptr;
79 tobefilled1d =
hist[isel];
81 tobefilledprof = hprof[isel];
83 tobefilled2d = hist2d[isel];
86 if (digi->adc() > 0) {
87 unsigned int strip = digi->strip();
91 tobefilled1d->Fill(
strip);
93 tobefilledprof->Fill(
strip, digi->adc());
95 tobefilled2d->Fill(
strip, digi->adc());
106 const std::vector<TH1F*>&
hist,
107 const std::vector<TProfile*>& hprof,
108 const std::vector<TH2F*>& hist2d)
const {
110 for (
unsigned int isel = 0; isel < m_selections.size(); ++isel) {
111 if (m_selections[isel].isSelected(
mod->detId())) {
112 TH1F* tobefilled1d =
nullptr;
113 TProfile* tobefilledprof =
nullptr;
114 TH2F* tobefilled2d =
nullptr;
117 tobefilled1d =
hist[isel];
119 tobefilledprof = hprof[isel];
121 tobefilled2d = hist2d[isel];
123 unsigned int istrip = 0;
125 if (digi->adc() > 0) {
126 unsigned int strip = istrip;
130 tobefilled1d->Fill(
strip);
132 tobefilledprof->Fill(
strip, digi->adc());
134 tobefilled2d->Fill(
strip, digi->adc());
145 const std::vector<TH1F*>&
hist,
146 const std::vector<TProfile*>& hprof,
147 const std::vector<TH2F*>& hist2d)
const {
149 for (
unsigned int isel = 0; isel < m_selections.size(); ++isel) {
150 if (m_selections[isel].isSelected(
mod->detId())) {
151 TH1F* tobefilled1d =
nullptr;
152 TProfile* tobefilledprof =
nullptr;
153 TH2F* tobefilled2d =
nullptr;
156 tobefilled1d =
hist[isel];
158 tobefilledprof = hprof[isel];
160 tobefilled2d = hist2d[isel];
163 for (
unsigned int digi = 0; digi < clus->amplitudes().size(); ++digi) {
164 if (clus->amplitudes()[digi] > 0) {
165 unsigned int strip = clus->firstStrip() + digi;
169 tobefilled1d->Fill(
strip);
171 tobefilledprof->Fill(
strip, clus->amplitudes()[digi]);
173 tobefilled2d->Fill(
strip, clus->amplitudes()[digi]);
182 #endif // DPGAnalysis_SiStripTools_DigiCollectionProfile_H