19 #include <fmt/printf.h> 58 ibook.
book1D(
"clusterBarycenter",
"cluster barycenter;cluster barycenter;#clusters", 7680., 0., 7680.);
59 h_width_ = ibook.
book1D(
"clusterWidth",
"cluster width;cluster width;#clusters", 128, -0.5, 127.5);
61 ibook.
book1D(
"clusterAvgCharge",
"average strip charge;average strip charge;#clusters", 256, -0.5, 255.5);
62 h_isSaturated_ = ibook.
book1D(
"clusterSaturation",
"cluster saturation;is saturated?;#clusters", 3, -1.5, 1.5);
128 compareClusters_(iConfig.getParameter<
bool>(
"compareClusters")),
131 iConfig.getParameter<
edm::
InputTag>(
"ApproxClustersProducer"))) {
149 const auto tkDets = tkGeom->dets();
154 if (!approx_cluster_detsetvector.
isValid()) {
156 <<
"SiStripApproximate cluster collection is not valid!" << std::endl;
167 if (!cluster_detsetvector.
isValid()) {
169 <<
"Requested to perform comparison, but regular SiStrip cluster collection is not valid!" << std::endl;
176 int nApproxClusters{0};
181 const auto& detid = detClusters.
id();
187 strip_clusters_detset = (*isearch);
190 for (
const auto& cluster : detClusters) {
199 auto det = std::find_if(tkDets.begin(), tkDets.end(), [detid](
auto& elem) ->
bool {
200 return (elem->geographicalId().rawId() == detid);
209 for (
const auto&
stripCluster : strip_clusters_detset) {
227 if (closestCluster) {
261 h_nclusters_ = ibook.
book1D(
"numberOfClusters",
"total N. of clusters;N. of clusters;#clusters", 500., 0., 500000.);
273 ibook.
book1D(
"deltaBarycenter",
"#Delta barycenter;#Delta barycenter;cluster pairs", 101, -50.5, 50.5);
274 h_deltaSize_ = ibook.
book1D(
"deltaSize",
"#Delta size;#Delta size;cluster pairs", 201, -100.5, 100.5);
275 h_deltaCharge_ = ibook.
book1D(
"deltaCharge",
"#Delta charge;#Delta charge;cluster pairs", 401, -200.5, 200.5);
278 ibook.
book1D(
"deltaFirstStrip",
"#Delta FirstStrip; #Delta firstStrip;cluster pairs", 101, -50.5, 50.5);
280 ibook.
book1D(
"deltaEndStrip",
"#Delta EndStrip; #Delta endStrip; cluster pairs", 101, -50.5, 50.5);
284 constexpr
float minStrip = -0.5f;
285 constexpr
float maxStrip = maxNStrips - 0.5f;
288 constexpr
float maxCluSize = 50;
289 constexpr
float maxCluCharge = 700;
294 fmt::sprintf(
"; %s;Approx %s", toRep, toRep),
302 toRep =
"SiStrip Cluster Size";
304 fmt::sprintf(
"; %s;Approx %s", toRep, toRep),
312 toRep =
"SiStrip Cluster Charge";
314 fmt::sprintf(
"; %s;Approx %s", toRep, toRep),
320 maxCluCharge - 0.5
f);
322 toRep =
"SiStrip Cluster First Strip number";
324 fmt::sprintf(
"; %s;Approx %s", toRep, toRep),
332 toRep =
"SiStrip Cluster Last Strip number";
334 fmt::sprintf(
"; %s;Approx %s", toRep, toRep),
342 h_isMatched_ = ibook.
book1D(
"isClusterMatched",
"cluster matching;is matched?;#clusters", 3, -1.5, 1.5);
351 desc.setComment(
"Monitor SiStripApproximateCluster collection and compare with regular SiStrip clusters");
352 desc.add<
bool>(
"compareClusters",
false)->setComment(
"if true, will compare with regualr Strip clusters");
354 ->setComment(
"approxmate clusters collection");
356 ->setComment(
"regular clusters collection");
357 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_
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_
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
cms_uint8_t avgCharge() const
void fill(const SiStripApproximateCluster &cluster)
MonitorElement * h2_CompareCharge_
MonitorElement * h_deltaSize_
edm::EDGetTokenT< SiStripApproximateClusterCollection > approxClustersToken_
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_
MonitorElement * h_deltaBarycenter_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
MonitorElement * h2_CompareSize_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * h_deltaCharge_
SiStripMonitorApproximateCluster(const edm::ParameterSet &)
~SiStripMonitorApproximateCluster() override=default
siStripRawPrime::monitorApproxCluster allClusters
Constants and enumerated types for FED/FEC systems.
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_
cms_uint16_t barycenter() const
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * h2_CompareFirstStrip_
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