|
|
#include <GEMPadDigiClusterValidation.h>
|
void | analyze (const edm::Event &, const edm::EventSetup &) override |
|
void | bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override |
|
| GEMPadDigiClusterValidation (const edm::ParameterSet &) |
|
| ~GEMPadDigiClusterValidation () override |
|
| GEMBaseValidation (const edm::ParameterSet &, std::string) |
|
| ~GEMBaseValidation () override=0 |
|
void | accumulate (edm::Event const &event, edm::EventSetup const &setup) final |
|
void | beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final |
|
void | beginRun (edm::Run const &run, edm::EventSetup const &setup) final |
|
void | beginStream (edm::StreamID id) final |
|
virtual void | dqmBeginRun (edm::Run const &, edm::EventSetup const &) |
|
| DQMEDAnalyzer () |
|
void | endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final |
|
void | endRun (edm::Run const &run, edm::EventSetup const &setup) final |
|
virtual bool | getCanSaveByLumi () |
|
| EDProducer ()=default |
|
bool | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndProcessBlocks () const final |
|
bool | hasAbilityToProduceInEndRuns () const final |
|
|
typedef dqm::reco::DQMStore | DQMStore |
|
typedef dqm::reco::MonitorElement | MonitorElement |
|
typedef CacheContexts< T... > | CacheTypes |
|
typedef CacheTypes::GlobalCache | GlobalCache |
|
typedef AbilityChecker< T... > | HasAbility |
|
typedef CacheTypes::LuminosityBlockCache | LuminosityBlockCache |
|
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > | LuminosityBlockContext |
|
typedef CacheTypes::LuminosityBlockSummaryCache | LuminosityBlockSummaryCache |
|
typedef CacheTypes::RunCache | RunCache |
|
typedef RunContextT< RunCache, GlobalCache > | RunContext |
|
typedef CacheTypes::RunSummaryCache | RunSummaryCache |
|
static void | globalEndJob (DQMEDAnalyzerGlobalCache const *) |
|
static void | globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context) |
|
static void | globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context) |
|
static std::unique_ptr< DQMEDAnalyzerGlobalCache > | initializeGlobalCache (edm::ParameterSet const &) |
|
template<typename T > |
dqm::impl::MonitorElement * | bookDetectorOccupancy (DQMStore::IBooker &booker, const T &key, const GEMStation *station, const char *name_prfix, const char *title_prefix) |
|
template<typename T > |
dqm::impl::MonitorElement * | bookHist1D (DQMStore::IBooker &booker, const T &key, const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, const char *x_title="", const char *y_title="Entries") |
|
template<typename T > |
dqm::impl::MonitorElement * | bookHist2D (DQMStore::IBooker &booker, const T &key, const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup, const char *x_title="", const char *y_title="") |
|
template<typename T > |
dqm::impl::MonitorElement * | bookPIDHist (DQMStore::IBooker &booker, const T &key, const char *name, const char *title) |
|
template<typename T > |
dqm::impl::MonitorElement * | bookPolarOccupancy (DQMStore::IBooker &booker, const T &key, const char *name_prefix, const char *title_prefix) |
|
template<typename T > |
dqm::impl::MonitorElement * | bookXYOccupancy (DQMStore::IBooker &booker, const T &key, const char *name_prefix, const char *title_prefix) |
|
template<typename T > |
dqm::impl::MonitorElement * | bookZROccupancy (DQMStore::IBooker &booker, const T &key, const char *name_prfix, const char *title_prefix) |
|
dqm::impl::MonitorElement * | bookZROccupancy (DQMStore::IBooker &booker, Int_t region_id, const char *name_prfix, const char *title_prefix) |
|
Int_t | getDetOccBinX (Int_t num_layers, Int_t chamber_id, Int_t layer_id) |
|
Int_t | getPidIdx (Int_t pid) |
|
Bool_t | isMuonSimHit (const PSimHit &) |
|
Float_t | toDegree (Float_t radian) |
|
uint64_t | meId () const |
|
Bool_t | detail_plot_ |
|
std::vector< Double_t > | eta_range_ |
|
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > | geomToken_ |
|
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > | geomTokenBeginRun_ |
|
const std::string | kLogCategory_ |
|
const Int_t | kMuonPDGId_ = 13 |
|
std::vector< Int_t > | pid_list_ |
|
Int_t | xy_occ_num_bins_ |
|
std::vector< Int_t > | zr_occ_num_bins_ |
|
std::vector< Double_t > | zr_occ_range_ |
|
edm::EDPutTokenT< DQMToken > | lumiToken_ |
|
edm::EDPutTokenT< DQMToken > | runToken_ |
|
unsigned int | streamId_ |
|
◆ GEMPadDigiClusterValidation()
GEMPadDigiClusterValidation::GEMPadDigiClusterValidation |
( |
const edm::ParameterSet & |
pset | ) |
|
|
explicit |
◆ ~GEMPadDigiClusterValidation()
GEMPadDigiClusterValidation::~GEMPadDigiClusterValidation |
( |
| ) |
|
|
override |
◆ analyze()
Implements GEMBaseValidation.
Definition at line 158 of file GEMPadDigiClusterValidation.cc.
170 if (not digiSimLink.
isValid()) {
177 if (not simhit_container.
isValid()) {
182 std::map<ME3IdsKey, Int_t> total_cluster;
184 GEMDetId gemid = (*range_iter).first;
185 const auto&
range = (*range_iter).second;
187 if (
gem->idToDet(gemid) ==
nullptr) {
189 <<
"Maybe it comes from unmatched geometry." << std::endl;
196 Int_t region_id = gemid.
region();
197 Int_t station_id = gemid.
station();
198 Int_t layer_id = gemid.
layer();
199 Int_t chamber_id = gemid.
chamber();
201 Int_t num_layers = gemid.
nlayers();
204 ME3IdsKey key3(region_id, station_id, layer_id);
206 for (
auto digi =
range.first; digi !=
range.second; ++digi) {
211 const auto& padsVec = digi->pads();
212 if (padsVec.empty()) {
216 Int_t pad = padsVec[0];
218 total_cluster[key3]++;
221 Int_t
bx = digi->bx();
222 Int_t cls = digi->pads().size();
225 const GlobalPoint& global_pos = surface.toGlobal(local_pos);
227 Float_t g_r = global_pos.
perp();
228 Float_t g_phi = global_pos.
phi();
229 Float_t g_x = global_pos.
x();
230 Float_t g_y = global_pos.
y();
231 Float_t g_abs_z = std::fabs(global_pos.
z());
233 Int_t bin_x =
getDetOccBinX(num_layers, chamber_id, layer_id);
247 for (
const auto&
region :
gem->regions()) {
248 Int_t region_id =
region->region();
250 Int_t station_id =
station->station();
251 const auto& superChamberVec =
station->superChambers();
252 if (superChamberVec.empty()) {
254 <<
" and station = " << station_id;
258 if (super_chamber ==
nullptr) {
260 <<
" and station = " << station_id;
264 Int_t layer_id =
chamber->id().layer();
265 ME3IdsKey key3{region_id, station_id, layer_id};
272 for (
const auto& simhit : *simhit_container.
product()) {
275 if (
gem->idToDet(simhit.detUnitId()) ==
nullptr) {
280 GEMDetId simhit_gemid(simhit.detUnitId());
282 Int_t region_id = simhit_gemid.
region();
283 Int_t station_id = simhit_gemid.station();
284 Int_t layer_id = simhit_gemid.layer();
285 Int_t chamber_id = simhit_gemid.chamber();
286 Int_t
ieta = simhit_gemid.ieta();
287 Int_t num_layers = simhit_gemid.nlayers();
290 ME3IdsKey key3{region_id, station_id, layer_id};
294 const auto& simhit_local_pos = simhit.localPosition();
295 const auto& simhit_global_pos = roll->
surface().
toGlobal(simhit_local_pos);
297 Float_t simhit_g_eta =
std::abs(simhit_global_pos.eta());
298 Float_t simhit_g_phi =
toDegree(simhit_global_pos.phi());
300 auto simhit_trackId = simhit.trackId();
302 Int_t bin_x =
getDetOccBinX(num_layers, chamber_id, layer_id);
304 auto links = digiSimLink->find(simhit_gemid);
305 if (
links == digiSimLink->end())
308 Int_t simhit_strip = -1;
310 if (simhit_trackId ==
link.getTrackId()) {
311 simhit_strip =
link.getStrip();
315 Int_t simhit_pad = roll->
padOfStrip(simhit_strip);
317 for (
auto cluster =
range.first; cluster !=
range.second; ++cluster) {
References funct::abs(), l1GtPatternGenerator_cfi::bx, GEMEtaPartition::centreOfPad(), relativeConstraints::chamber, GEMDetId::chamber(), GEMSuperChamber::chambers(), universalConfigTemplate::collection, GEMBaseValidation::detail_plot_, digisimlink_token_, dqm::impl::MonitorElement::Fill(), GEMPadDigiCluster::GE21SplitStrip, geomToken_, GEMBaseValidation::getDetOccBinX(), LEDCalibrationChannels::ieta, GEMDetId::ieta(), GEMDetId::isGE21(), GEMBaseValidation::isMuonSimHit(), edm::HandleBase::isValid(), GEMBaseValidation::kLogCategory_, GEMDetId::layer(), MainPageGenerator::link, electronStore::links, matchClusterAgainstSimHit(), me_cls_, me_detail_bx_, me_detail_occ_det_, me_detail_occ_pad_, me_detail_occ_phi_pad_, me_detail_occ_xy_, me_detail_occ_zr_, me_detail_pad_cluster_occ_det_, me_pad_cluster_occ_eta_, me_pad_cluster_occ_phi_, me_total_cluster_, GEMDetId::nlayers(), pad_cluster_token_, GEMEtaPartition::padOfStrip(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), edm::Handle< T >::product(), FastTimerService_cff::range, GEMDetId::region(), HLT_FULL_cff::region, singleTopDQM_cfi::setup, simhit_token_, relativeConstraints::station, GEMDetId::station(), GeomDet::surface(), GEMBaseValidation::toDegree(), Surface::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
◆ bookHistograms()
Implements DQMEDAnalyzer.
Definition at line 21 of file GEMPadDigiClusterValidation.cc.
26 booker.
setCurrentFolder(
"MuonGEMDigisV/GEMDigisTask/PadCluster/ClusterSize");
28 TString cls_title =
"Cluster Size Distribution";
29 TString cls_x_title =
"Cluster size";
31 me_cls_ = booker.
book1D(
"cls", cls_title +
";" + cls_x_title +
";" +
"Entries", 10, 0.5, 10.5);
35 for (
const auto&
region :
gem->regions()) {
36 Int_t region_id =
region->region();
42 Int_t station_id =
station->station();
51 const auto& superChamberVec =
station->superChambers();
52 if (superChamberVec.empty()) {
54 <<
" and station = " << station_id;
58 if (super_chamber ==
nullptr) {
60 <<
" and station = " << station_id;
64 Int_t layer_id =
chamber->id().layer();
65 ME3IdsKey key3{region_id, station_id, layer_id};
67 const auto& etaPartitionVec =
chamber->etaPartitions();
68 if (etaPartitionVec.empty() || etaPartitionVec.front() ==
nullptr) {
70 <<
"Eta partition missing or null for region, station, super chamber, chamber = (" << region_id <<
", "
71 << station_id <<
", " << super_chamber->
id() <<
", " <<
chamber->id() <<
")";
74 Int_t num_pads = etaPartitionVec.front()->npads();
77 bookHist1D(booker, key3,
"total_pad_cluster",
"Number of pad digi cluster per event", 21, -0.5, 20.5);
81 "matched_pad_occ_eta",
82 "Matched Pad Cluster Eta Occupancy",
89 booker, key3,
"matched_pad_occ_phi",
"Matched Pad Cluster Phi Occupancy", 36, -5, 355,
"#phi [degrees]");
97 "Pad Cluster Occupancy",
108 bookHist1D(booker, key3,
"occ_pad",
"Pad Cluster Occupancy", num_pads, 0.5, num_pads + 0.5,
"Pad number");
116 booker.
setCurrentFolder(
"MuonGEMDigisV/GEMDigisTask/PadCluster/BunchCrossing");
118 for (
const auto&
region :
gem->regions()) {
119 Int_t region_id =
region->region();
121 Int_t station_id =
station->station();
123 const auto& superChamberVec =
station->superChambers();
124 if (superChamberVec.empty()) {
126 <<
" and station = " << station_id;
130 if (super_chamber ==
nullptr) {
132 <<
" and station = " << station_id;
136 Int_t layer_id =
chamber->id().layer();
137 ME3IdsKey key3(region_id, station_id, layer_id);
139 bookHist1D(booker, key3,
"bx",
"Pad Cluster Bunch Crossing", 5, -2.5, 2.5,
"Bunch crossing");
References dqm::implementation::IBooker::book1D(), GEMBaseValidation::bookDetectorOccupancy(), GEMBaseValidation::bookHist1D(), GEMBaseValidation::bookHist2D(), GEMBaseValidation::bookXYOccupancy(), GEMBaseValidation::bookZROccupancy(), relativeConstraints::chamber, GEMSuperChamber::chambers(), GEMBaseValidation::detail_plot_, GEMBaseValidation::eta_range_, geomTokenBeginRun_, GEMSuperChamber::id(), GEMBaseValidation::kLogCategory_, M_PI, me_cls_, me_detail_bx_, me_detail_occ_det_, me_detail_occ_pad_, me_detail_occ_phi_pad_, me_detail_occ_xy_, me_detail_occ_zr_, me_detail_pad_cluster_occ_det_, me_pad_cluster_occ_eta_, me_pad_cluster_occ_phi_, me_total_cluster_, HLT_FULL_cff::region, dqm::implementation::NavigatorBase::setCurrentFolder(), singleTopDQM_cfi::setup, and relativeConstraints::station.
◆ matchClusterAgainstSimHit()
◆ digisimlink_token_
◆ geomToken_
◆ geomTokenBeginRun_
◆ me_cls_
◆ me_detail_bx_
MEMap3Ids GEMPadDigiClusterValidation::me_detail_bx_ |
|
private |
◆ me_detail_occ_det_
MEMap2Ids GEMPadDigiClusterValidation::me_detail_occ_det_ |
|
private |
◆ me_detail_occ_pad_
MEMap3Ids GEMPadDigiClusterValidation::me_detail_occ_pad_ |
|
private |
◆ me_detail_occ_phi_pad_
MEMap3Ids GEMPadDigiClusterValidation::me_detail_occ_phi_pad_ |
|
private |
◆ me_detail_occ_xy_
MEMap3Ids GEMPadDigiClusterValidation::me_detail_occ_xy_ |
|
private |
◆ me_detail_occ_zr_
MEMap1Ids GEMPadDigiClusterValidation::me_detail_occ_zr_ |
|
private |
◆ me_detail_pad_cluster_occ_det_
MEMap2Ids GEMPadDigiClusterValidation::me_detail_pad_cluster_occ_det_ |
|
private |
◆ me_pad_cluster_occ_eta_
MEMap3Ids GEMPadDigiClusterValidation::me_pad_cluster_occ_eta_ |
|
private |
◆ me_pad_cluster_occ_phi_
MEMap3Ids GEMPadDigiClusterValidation::me_pad_cluster_occ_phi_ |
|
private |
◆ me_total_cluster_
MEMap3Ids GEMPadDigiClusterValidation::me_total_cluster_ |
|
private |
◆ pad_cluster_token_
◆ simhit_token_
MEMap2Ids me_detail_pad_cluster_occ_det_
std::tuple< Int_t, Int_t > ME2IdsKey
dqm::impl::MonitorElement * bookHist1D(DQMStore::IBooker &booker, const T &key, const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, const char *x_title="", const char *y_title="Entries")
const std::vector< const GEMChamber * > & chambers() const
Return the chambers in the super chamber.
T const * product() const
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomTokenBeginRun_
constexpr int layer() const
constexpr int region() const
dqm::impl::MonitorElement * bookDetectorOccupancy(DQMStore::IBooker &booker, const T &key, const GEMStation *station, const char *name_prfix, const char *title_prefix)
virtual void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< edm::DetSetVector< GEMDigiSimLink > > digisimlink_token_
Bool_t matchClusterAgainstSimHit(GEMPadDigiClusterCollection::const_iterator, Int_t)
constexpr int nlayers() const
edm::EDGetTokenT< GEMPadDigiClusterCollection > pad_cluster_token_
MEMap3Ids me_pad_cluster_occ_eta_
Bool_t isMuonSimHit(const PSimHit &)
dqm::impl::MonitorElement * bookZROccupancy(DQMStore::IBooker &booker, Int_t region_id, const char *name_prfix, const char *title_prefix)
const Plane & surface() const
The nominal surface of the GeomDet.
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
dqm::impl::MonitorElement * bookXYOccupancy(DQMStore::IBooker &booker, const T &key, const char *name_prefix, const char *title_prefix)
MEMap3Ids me_detail_occ_phi_pad_
dqm::impl::MonitorElement * bookHist2D(DQMStore::IBooker &booker, const T &key, const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup, const char *x_title="", const char *y_title="")
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
constexpr int chamber() const
MEMap2Ids me_detail_occ_det_
GEMBaseValidation(const edm::ParameterSet &, std::string)
std::vector< Double_t > eta_range_
MEMap3Ids me_detail_occ_xy_
MEMap3Ids me_total_cluster_
Log< level::Error, false > LogError
MEMap1Ids me_detail_occ_zr_
Float_t toDegree(Float_t radian)
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
constexpr int station() const
MEMap3Ids me_detail_occ_pad_
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< edm::PSimHitContainer > simhit_token_
MEMap3Ids me_pad_cluster_occ_phi_
constexpr int ieta() const
Int_t getDetOccBinX(Int_t num_layers, Int_t chamber_id, Int_t layer_id)
GEMDetId id() const
Return the GEMDetId of this super chamber.
Geom::Phi< T > phi() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
const std::string kLogCategory_