42 int findVFAT(
float min_,
float max_,
float x_,
int roll_);
48 std::unordered_map<UInt_t, MonitorElement*>
recHitME_;
59 float step =
abs(max_-min_)/3.0;
60 if ( x_ < (
min(min_,max_)+step) ) {
return 8 - roll_;}
61 else if ( x_ < (
min(min_,max_)+2.0*step) ) {
return 16 - roll_;}
62 else {
return 24 - roll_;}
70 GEMGeometry_ = &*hGeom;
73 edm::LogError(
"MuonGEMBaseValidation") <<
"+++ Error : GEM geometry is unavailable on event loop. +++\n";
88 descriptions.
add(
"GEMDQMSource", desc);
97 for (
auto sch : superChambers_){
98 int n_lay = sch->nChambers();
99 for (
int l=0;
l<n_lay;
l++){
107 string hName =
"recHit_Gemini_"+to_string(gid.
chamber())+
"_la_"+to_string(gid.
layer());
108 string hTitle =
"recHit Gemini chamber : "+to_string(gid.
chamber())+
", layer : "+to_string(gid.
layer());
111 string hName_2 =
"VFAT_vs_ClusterSize_Gemini_"+to_string(gid.
chamber())+
"_la_"+to_string(gid.
layer());
112 string hTitle_2 =
"VFAT vs ClusterSize Gemini chamber : "+to_string(gid.
chamber())+
", layer : "+to_string(gid.
layer());
115 string hName_fired =
"StripFired_Gemini_"+to_string(gid.
chamber())+
"_la_"+to_string(gid.
layer());
116 string hTitle_fired =
"StripsFired Gemini chamber : "+to_string(gid.
chamber())+
", layer : "+to_string(gid.
layer());
119 string hName_rh =
"recHit_x_Gemini_"+to_string(gid.
chamber())+
"_la_"+to_string(gid.
layer());
120 string hTitle_rh =
"recHit local x Gemini chamber : "+to_string(gid.
chamber())+
", layer : "+to_string(gid.
layer());
121 rh_vs_eta_[ ch.id() ] = ibooker.
book2D(hName_rh, hTitle_rh, 50, -25, 25, 8, 1,9);
128 if ( GEMGeometry_ ==
nullptr)
return;
131 event.getByToken( this->
tagRecHit_, gemRecHits);
133 edm::LogError(
"GEMDQMSource") <<
"GEM recHit is not valid.\n";
138 for(
auto roll : ch.etaPartitions()){
140 const auto& recHitsRange = gemRecHits->get(rId);
141 auto gemRecHit = recHitsRange.first;
142 for (
auto hit = gemRecHit;
hit != recHitsRange.second; ++
hit ) {
143 int nVfat =
findVFAT(1.0, 385.0,
hit->firstClusterStrip()+0.5*
hit->clusterSize(), rId.
roll());
147 for(
int i =
hit->firstClusterStrip();
i < (
hit->firstClusterStrip() +
hit->clusterSize());
i++){
T getParameter(std::string const &) const
edm::EDGetToken tagRecHit_
int findVFAT(float min_, float max_, float x_, int roll_)
const GEMGeometry * GEMGeometry_
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
std::unordered_map< UInt_t, MonitorElement * > VFAT_vs_ClusterSize_
std::unordered_map< UInt_t, MonitorElement * > StripsFired_vs_eta_
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
int layer() const
Layer id: each station have two layers of chambers: layer 1 is the inner chamber and layer 2 is the o...
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const GEMGeometry * initGeometry(edm::EventSetup const &iSetup)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::unordered_map< UInt_t, MonitorElement * > recHitME_
const std::vector< const GEMSuperChamber * > & superChambers() const
Return a vector of all GEM super chambers.
MonitorElement * book2D(Args &&...args)
std::unordered_map< UInt_t, MonitorElement * > rh_vs_eta_
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
GEMDQMSource(const edm::ParameterSet &cfg)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< GEMChamber > gemChambers_
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override