8 kGEMCSCSegmentCollectionToken_(
11 kMinCSCRecHits_(ps.getUntrackedParameter<
int>(
"minCSCRecHits")),
12 kModeDev_(ps.getUntrackedParameter<
bool>(
"modeDev")),
13 kUseMuonSegment_(ps.getUntrackedParameter<
bool>(
"useMuonSegment")),
14 kFolder_(ps.getUntrackedParameter<
std::
string>(
"folder")) {}
24 desc.addUntracked<
bool>(
"monitorGE11",
true);
25 desc.addUntracked<
bool>(
"monitorGE21",
false);
26 desc.addUntracked<
bool>(
"monitorGE0",
false);
27 desc.addUntracked<
bool>(
"maskChamberWithError",
false);
28 desc.addUntracked<
std::string>(
"logCategory",
"GEMEffByGEMCSCSegmentSource");
33 desc.addUntracked<
int>(
"minCSCRecHits", 6);
34 desc.addUntracked<
bool>(
"useMuonSegment",
false);
35 desc.addUntracked<
bool>(
"modeDev",
false);
36 desc.addUntracked<
std::string>(
"folder",
"GEM/Efficiency/GEMCSCSegment");
55 const int region_id =
station->region();
56 const int station_id =
station->station();
61 if (station_id == 1) {
65 const std::vector<const GEMSuperChamber*> superchamber_vec =
station->superChambers();
71 const std::vector<const GEMChamber*> chamber_vec = superchamber_vec.front()->chambers();
79 const int layer_id =
chamber->id().layer();
118 const TString&
title) {
121 for (
int chamber_type = 1; chamber_type <= 10; chamber_type++) {
125 return monitor_element;
134 gemcsc_segment_collection =
handle.product();
144 muon_collection =
handle.product();
156 oh_status_collection =
handle.product();
163 vfat_status_collection =
handle.product();
173 if (gemcsc_segment_collection->size() < 1) {
183 iter != gemcsc_segment_collection->end();
202 const GEMRecHit* ge11_hit_layer1 =
nullptr;
203 const GEMRecHit* ge11_hit_layer2 =
nullptr;
207 const GEMDetId gem_id = gem_hit.gemId();
209 if (not gem_id.
isGE11()) {
211 <<
". skip this GEMCSCSegment." 212 <<
"check if RecoLocalMuon/GEMCSCSegment/plugins/GEMCSCSegAlgoRR.cc has changed.";
225 ge11_hit_layer1 = &gem_hit;
227 }
else if (
layer == 2) {
228 ge11_hit_layer2 = &gem_hit;
244 if (trigger_layer_hit ==
nullptr) {
249 const GEMDetId trigger_layer_id = trigger_layer_hit->
gemId();
250 const int detection_layer = trigger_layer_id.
layer() == 1 ? 2 : 1;
258 const int num_csc_hits =
static_cast<int>(gemcsc_segment.
cscRecHits().size());
267 if (detection_layer_hit) {
287 if (detection_layer_hit) {
299 if (muon_collection ==
nullptr) {
304 for (
unsigned int idx = 0;
idx < muon_collection->size();
idx++) {
312 const CSCDetId csc_id{chamber_match.id};
313 if (not csc_id.isME11()) {
332 if (not csc_id.
isME11()) {
337 if (csc_id != matched_segment->cscDetId())
339 if (csc_segment.
localPosition().
x() != matched_segment->localPosition().x())
341 if (csc_segment.
localPosition().
y() != matched_segment->localPosition().y())
343 if (csc_segment.
localPosition().
z() != matched_segment->localPosition().z())
345 if (csc_segment.
time() != matched_segment->time())
const bool kMaskChamberWithError_
GEMEffByGEMCSCSegmentSource(const edm::ParameterSet &)
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > kGEMGeometryTokenBeginRun_
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
constexpr int station() const
const bool kUseMuonSegment_
constexpr int region() const
LocalPoint localPosition() const override
bool skipGEMStation(const int)
TString getSuffixName(Int_t region_id)
MEMap me_csc_reduced_chi2_matched_
CSCSegmentRef cscSegmentRef
MEMap me_csc_chamber_type_matched_
virtual void setCurrentFolder(std::string const &fullpath)
void checkCoincidenceGE11(const GEMRecHit *, const GEMRecHit *, const GEMCSCSegment &)
const std::vector< GEMRecHit > & gemRecHits() const
MEMap me_chamber_matched_
void fillMEWithinLimits(MonitorElement *, const double)
const int kMinCSCRecHits_
MEMap me_num_csc_hits_matched_
const edm::EDGetTokenT< reco::MuonCollection > kMuonCollectionToken_
bool maskChamberWithError(const GEMDetId &chamber_id, const GEMOHStatusCollection *, const GEMVFATStatusCollection *)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
static void fillDescriptions(edm::ConfigurationDescriptions &)
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Log< level::Error, false > LogError
TString getSuffixTitle(Int_t region_id)
constexpr int layer() const
unsigned short iChamberType() const
const edm::EDGetTokenT< GEMVFATStatusCollection > kGEMVFATStatusCollectionToken_
static const unsigned int BestInStationByDR
constexpr int chamber() const
std::vector< Muon > MuonCollection
collection of Muon objects
void fillME(MEMap &, const GEMDetId &, const double)
MEMap me_csc_reduced_chi2_
void findMatchedME11Segments(const reco::MuonCollection *)
double chi2() const override
Chi2 of the segment fit.
MonitorElement * bookCSCChamberType(DQMStore::IBooker &, const TString &, const TString &)
MEMap me_csc_chamber_type_
MEMap me_chamber_muon_segment_matched_
std::string chamberName() const
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
CSCDetId cscDetId() const
bool isMask(unsigned int flag=Arbitrated) const
MonitorElement * bookChamber(DQMStore::IBooker &, const TString &, const TString &, const GEMStation *)
const std::string kLogCategory_
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)
void analyzeGE11ME11Segment(const GEMCSCSegment &, const GEMOHStatusCollection *, const GEMVFATStatusCollection *)
const edm::EDGetTokenT< GEMOHStatusCollection > kGEMOHStatusCollectionToken_
const std::vector< CSCRecHit2D > & cscRecHits() const
bool checkRefs(const std::vector< T *> &)
GEMDetId gemId() const
Return the gemId.
CSCDetId cscDetId() const
bool isME11SegmentMatched(const CSCSegment &)
T const * get() const
Returns C++ pointer to the item.
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
constexpr GEMDetId chamberId() const
std::vector< const CSCSegment * > matched_me11_segment_vector_
~GEMEffByGEMCSCSegmentSource() override
GEMDetId getReStLaKey(const GEMDetId &)
const CSCSegment cscSegment() const
Log< level::Warning, false > LogWarning
MEMap me_chamber_muon_segment_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
const std::string kFolder_
const edm::EDGetTokenT< GEMCSCSegmentCollection > kGEMCSCSegmentCollectionToken_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...