44 int findVFAT(
float min_,
float max_,
float x_,
int roll_);
50 std::unordered_map<UInt_t, MonitorElement*>
recHitME_;
61 float step =
abs(max_-min_)/3.0;
62 if ( x_ < (
min(min_,max_)+step) ) {
return 8 - roll_;}
63 else if ( x_ < (
min(min_,max_)+2.0*step) ) {
return 16 - roll_;}
64 else {
return 24 - roll_;}
72 GEMGeometry_ = &*hGeom;
75 edm::LogError(
"MuonGEMBaseValidation") <<
"+++ Error : GEM geometry is unavailable on event loop. +++\n";
90 descriptions.
add(
"GEMDQMSource", desc);
99 for (
auto sch : superChambers_){
100 int n_lay = sch->nChambers();
101 for (
int l=0;
l<n_lay;
l++){
109 string hName =
"recHit_Gemini_"+to_string(gid.
chamber())+
"_la_"+to_string(gid.
layer());
110 string hTitle =
"recHit Gemini chamber : "+to_string(gid.
chamber())+
", layer : "+to_string(gid.
layer());
113 string hName_2 =
"VFAT_vs_ClusterSize_Gemini_"+to_string(gid.
chamber())+
"_la_"+to_string(gid.
layer());
114 string hTitle_2 =
"VFAT vs ClusterSize Gemini chamber : "+to_string(gid.
chamber())+
", layer : "+to_string(gid.
layer());
117 string hName_fired =
"StripFired_Gemini_"+to_string(gid.
chamber())+
"_la_"+to_string(gid.
layer());
118 string hTitle_fired =
"StripsFired Gemini chamber : "+to_string(gid.
chamber())+
", layer : "+to_string(gid.
layer());
121 string hName_rh =
"recHit_x_Gemini_"+to_string(gid.
chamber())+
"_la_"+to_string(gid.
layer());
122 string hTitle_rh =
"recHit local x Gemini chamber : "+to_string(gid.
chamber())+
", layer : "+to_string(gid.
layer());
123 rh_vs_eta_[ ch.id() ] = ibooker.
book2D(hName_rh, hTitle_rh, 50, -25, 25, 8, 1,9);
130 if ( GEMGeometry_ ==
nullptr)
return;
133 event.getByToken( this->
tagRecHit_, gemRecHits);
135 edm::LogError(
"GEMDQMSource") <<
"GEM recHit is not valid.\n";
140 for(
auto roll : ch.etaPartitions()){
142 const auto& recHitsRange = gemRecHits->get(rId);
143 auto gemRecHit = recHitsRange.first;
144 for (
auto hit = gemRecHit;
hit != recHitsRange.second; ++
hit ) {
145 int nVfat =
findVFAT(1.0, 385.0,
hit->firstClusterStrip()+0.5*
hit->clusterSize(), rId.
roll());
149 for(
int i =
hit->firstClusterStrip();
i < (
hit->firstClusterStrip() +
hit->clusterSize());
i++){
T getParameter(std::string const &) const
edm::EDGetToken tagRecHit_
#define DEFINE_FWK_MODULE(type)
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_
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 endLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
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)
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
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