19 #include <fmt/printf.h> 62 ibook.
book1D(
"clusterBarycenter",
"cluster barycenter;cluster barycenter;#clusters", 7680., 0., 7680.);
63 h_width_ = ibook.
book1D(
"clusterWidth",
"cluster width;cluster width;#clusters", 128, -0.5, 127.5);
65 "clusterAvgCharge",
"average strip charge;average strip charge [ADC counts];#clusters", 256, -0.5, 255.5);
68 "clusterCharge",
"total cluster charge;total cluster charge [ADC counts];#clusters", 300, -0.5, 2999.5);
70 h_isSaturated_ = ibook.
book1D(
"clusterSaturation",
"cluster saturation;is saturated?;#clusters", 3, -1.5, 1.5);
155 compareClusters_(iConfig.getParameter<
bool>(
"compareClusters")),
157 approxClustersToken_(
159 stripFEDErrorsToken_(consumes<
DetIdVector>(iConfig.getParameter<
edm::
InputTag>(
"SiStripFEDErrorVector"))) {
177 const auto tkDets = tkGeom->dets();
182 if (!approx_cluster_detsetvector.
isValid()) {
184 <<
"SiStripApproximate cluster collection is not valid!" << std::endl;
193 if (!sistripFEDErrorsVector.
isValid()) {
195 <<
" DetIdVector collection of SiStrip FED errors is not valid!" << std::endl;
206 if (!cluster_detsetvector.
isValid()) {
208 <<
"Requested to perform comparison, but regular SiStrip cluster collection is not valid!" << std::endl;
215 int nApproxClusters{0};
220 const auto&
detid = detClusters.id();
226 <<
"Input SiStrip Cluster collecction was empty, skipping event! " << std::endl;
235 strip_clusters_detset = (*isearch);
238 <<
"No edmNew::DetSet<SiStripCluster> was found for detid " <<
detid << std::endl;
242 for (
const auto& cluster : detClusters) {
251 auto det = std::find_if(tkDets.begin(), tkDets.end(), [
detid](
auto& elem) ->
bool {
252 return (elem->geographicalId().rawId() ==
detid);
261 for (
const auto&
stripCluster : strip_clusters_detset) {
279 if (closestCluster) {
314 h_nclusters_ = ibook.
book1D(
"numberOfClusters",
"total N. of clusters;N. of clusters;# events", 500., 0., 500000.);
316 "numberOfFEDErrors",
"number of SiStrip modules in FED Error;N. of Modules in Error; #events", 100, 0, 1000);
329 ibook.
book1D(
"deltaBarycenter",
"#Delta barycenter;#Delta barycenter;cluster pairs", 101, -50.5, 50.5);
330 h_deltaSize_ = ibook.
book1D(
"deltaSize",
"#Delta size;#Delta size;cluster pairs", 201, -100.5, 100.5);
331 h_deltaCharge_ = ibook.
book1D(
"deltaCharge",
"#Delta charge;#Delta charge;cluster pairs", 401, -200.5, 200.5);
334 ibook.
book1D(
"deltaFirstStrip",
"#Delta FirstStrip; #Delta firstStrip;cluster pairs", 101, -50.5, 50.5);
336 ibook.
book1D(
"deltaEndStrip",
"#Delta EndStrip; #Delta endStrip; cluster pairs", 101, -50.5, 50.5);
341 constexpr float maxStrip = maxNStrips - 0.5f;
350 fmt::sprintf(
"; %s;Approx %s", toRep, toRep),
358 toRep =
"SiStrip Cluster Size";
360 fmt::sprintf(
"; %s;Approx %s", toRep, toRep),
368 toRep =
"SiStrip Cluster Charge";
370 fmt::sprintf(
"; %s;Approx %s", toRep, toRep),
376 maxCluCharge - 0.5
f);
378 toRep =
"SiStrip Cluster First Strip number";
380 fmt::sprintf(
"; %s;Approx %s", toRep, toRep),
388 toRep =
"SiStrip Cluster Last Strip number";
390 fmt::sprintf(
"; %s;Approx %s", toRep, toRep),
398 h_isMatched_ = ibook.
book1D(
"isClusterMatched",
"cluster matching;is matched?;#clusters", 3, -1.5, 1.5);
407 desc.setComment(
"Monitor SiStripApproximateCluster collection and compare with regular SiStrip clusters");
408 desc.add<
bool>(
"compareClusters",
false)->setComment(
"if true, will compare with regualr Strip clusters");
410 ->setComment(
"approxmate clusters collection");
412 ->setComment(
"SiStrip FED Errors collection");
414 ->setComment(
"regular clusters collection");
415 desc.add<
std::string>(
"folder",
"SiStripApproximateClusters")->setComment(
"Top Level Folder");
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
MonitorElement * h2_CompareEndStrip_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
siStripRawPrime::monitorApproxCluster unMatchedClusters
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * h_deltaFirstStrip_
const edm::EDGetTokenT< DetIdVector > stripFEDErrorsToken_
T const * product() const
cms_uint8_t width() const
dqm::reco::MonitorElement * h_width_
dqm::reco::MonitorElement * h_barycenter_
MonitorElement * h_isMatched_
Log< level::Error, false > LogError
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
dqm::reco::MonitorElement * h_avgCharge_
dqm::reco::MonitorElement * h_charge_
dqm::reco::MonitorElement * h_passPeakFilter_
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
const_iterator end(bool update=false) const
cms_uint8_t avgCharge() const
void fill(const SiStripApproximateCluster &cluster)
MonitorElement * h2_CompareCharge_
MonitorElement * h_deltaSize_
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripClustersToken_
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * h_deltaBarycenter_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
MonitorElement * h2_CompareSize_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
std::vector< DetId > DetIdVector
MonitorElement * h_deltaCharge_
SiStripMonitorApproximateCluster(const edm::ParameterSet &)
dqm::reco::MonitorElement * h_numberFEDErrors_
~SiStripMonitorApproximateCluster() override=default
siStripRawPrime::monitorApproxCluster allClusters
Constants and enumerated types for FED/FEC systems.
const edm::EDGetTokenT< SiStripApproximateClusterCollection > approxClustersToken_
const edmNew::DetSetVector< SiStripCluster > * stripClusterCollection_
MonitorElement * h2_CompareBarycenter_
const_iterator find(id_type i, bool update=false) const
static const uint16_t STRIPS_PER_APV
MonitorElement * h_deltaEndStrip_
dqm::reco::MonitorElement * h_passFilter_
cms_uint16_t barycenter() const
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * h2_CompareFirstStrip_
Log< level::Warning, false > LogWarning
dqm::reco::MonitorElement * h_isSaturated_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * h_nclusters_
MonitorElement * book2I(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void book(dqm::implementation::DQMStore::IBooker &ibook, const std::string &folder)
siStripRawPrime::monitorApproxCluster matchedClusters