CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GEMRecHitTrackMatch Class Reference

#include <GEMRecHitTrackMatch.h>

Inheritance diagram for GEMRecHitTrackMatch:
GEMTrackMatch DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 GEMRecHitTrackMatch (const edm::ParameterSet &ps)
 
 ~GEMRecHitTrackMatch () override
 
- Public Member Functions inherited from GEMTrackMatch
void buildLUT (const int maxChamberId)
 
void FillWithTrigger (MonitorElement *me[3], Float_t eta)
 
void FillWithTrigger (MonitorElement *me[3][3], Float_t eta, Float_t phi, bool odd[3], bool even[3])
 
void FillWithTrigger (MonitorElement *me[4][3], bool array[3][2], Float_t value)
 
void FillWithTrigger (MonitorElement *me[4][3][3], bool array[3][2], Float_t eta, Float_t phi, bool odd[3], bool even[3])
 
 GEMTrackMatch (const edm::ParameterSet &cfg)
 
std::pair< int, int > getClosestChambers (const int maxChamberId, int region, float phi)
 
std::pair< double, double > getEtaRange (int station, int chamber)
 
std::pair< double, double > getEtaRangeForPhi (int station)
 
bool isSimTrackGood (const SimTrack &)
 
void setGeometry (const GEMGeometry &geom)
 
 ~GEMTrackMatch () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

edm::EDGetToken gem_recHitToken_
 
MonitorElementrh_eta [4][3]
 
MonitorElementrh_phi [4][3][3]
 
MonitorElementrh_sh_eta [4][3]
 
MonitorElementrh_sh_phi [4][3][3]
 
MonitorElementtrack_eta [3]
 
MonitorElementtrack_phi [3][3]
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from GEMTrackMatch
edm::ParameterSet cfg_
 
float chamberHeight_
 
bool detailPlot_
 
std::vector< double > etaRangeForPhi
 
const GEMGeometrygem_geom_
 
float maxEta_
 
float minEta_
 
float minPt_
 
std::pair< std::vector< float >, std::vector< int > > negativeLUT_
 
unsigned int nstation
 
std::pair< std::vector< float >, std::vector< int > > positiveLUT_
 
float radiusCenter_
 
edm::EDGetToken simHitsToken_
 
edm::EDGetToken simTracksToken_
 
edm::EDGetToken simVerticesToken_
 
int useRoll_
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 15 of file GEMRecHitTrackMatch.h.

Constructor & Destructor Documentation

GEMRecHitTrackMatch::GEMRecHitTrackMatch ( const edm::ParameterSet ps)
explicit

Definition at line 13 of file GEMRecHitTrackMatch.cc.

References GEMTrackMatch::cfg_, GEMTrackMatch::detailPlot_, gem_recHitToken_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLT_2018_cff::InputTag, GEMTrackMatch::simHitsToken_, GEMTrackMatch::simTracksToken_, GEMTrackMatch::simVerticesToken_, and AlCaHLTBitMon_QueryRunRegistry::string.

13  : GEMTrackMatch(ps) {
14  std::string simInputLabel_ = ps.getUntrackedParameter<std::string>("simInputLabel");
15  simHitsToken_ = consumes<edm::PSimHitContainer>(edm::InputTag(simInputLabel_, "MuonGEMHits"));
16  simTracksToken_ = consumes<edm::SimTrackContainer>(ps.getParameter<edm::InputTag>("simTrackCollection"));
17  simVerticesToken_ = consumes<edm::SimVertexContainer>(ps.getParameter<edm::InputTag>("simVertexCollection"));
18 
19  gem_recHitToken_ = consumes<GEMRecHitCollection>(ps.getParameter<edm::InputTag>("gemRecHitInput"));
20 
21  detailPlot_ = ps.getParameter<bool>("detailPlot");
22  cfg_ = ps;
23 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet cfg_
Definition: GEMTrackMatch.h:60
edm::EDGetToken simHitsToken_
Definition: GEMTrackMatch.h:61
edm::EDGetToken simVerticesToken_
Definition: GEMTrackMatch.h:63
edm::EDGetToken simTracksToken_
Definition: GEMTrackMatch.h:62
GEMTrackMatch(const edm::ParameterSet &cfg)
Definition: GEMTrackMatch.cc:5
edm::EDGetToken gem_recHitToken_
GEMRecHitTrackMatch::~GEMRecHitTrackMatch ( )
override

Definition at line 81 of file GEMRecHitTrackMatch.cc.

81 {}

Member Function Documentation

void GEMRecHitTrackMatch::analyze ( const edm::Event e,
const edm::EventSetup iSetup 
)
overridevirtual

Implements GEMTrackMatch.

Definition at line 83 of file GEMRecHitTrackMatch.cc.

References begin, GEMTrackMatch::cfg_, relativeConstraints::chamber, GEMRecHitMatcher::chamberIds(), SimHitMatcher::chamberIdsGEM(), ztail::d, end, MySimTrack::eta, ntuplemaker::fill, GEMTrackMatch::FillWithTrigger(), gem_recHitToken_, MySimTrack::gem_rh, MySimTrack::gem_sh, relativeConstraints::geom, edm::EventSetup::get(), edm::Event::getByToken(), MySimTrack::hitEven, MySimTrack::hitOdd, mps_fire::i, triggerObjects_cff::id, GEMTrackMatch::isSimTrackGood(), edm::HandleBase::isValid(), dqmiolumiharvest::j, MySimTrack::phi, edm::Handle< T >::product(), MySimTrack::pt, rh_eta, rh_phi, rh_sh_eta, rh_sh_phi, HLTBitAnalyser_cfi::simhits, GEMTrackMatch::simHitsToken_, GEMTrackMatch::simTracksToken_, GEMTrackMatch::simVerticesToken_, OrderedSet::t, track_eta, and track_phi.

83  {
84  edm::LogInfo("GEMRecHitTrackMatch") << "GEM RecHitTrackMatch :: analyze" << std::endl;
86  iSetup.get<MuonGeometryRecord>().get(hGeom);
87  const GEMGeometry &geom = *hGeom;
88 
91  // edm::Handle<edm::SimVertexContainer> sim_vertices;
92  iEvent.getByToken(simHitsToken_, simhits);
93  iEvent.getByToken(simTracksToken_, sim_tracks);
94  // iEvent.getByToken(simVerticesToken_, sim_vertices);
95  // if ( !simhits.isValid() || !sim_tracks.isValid() ||
96  // !sim_vertices.isValid()) return;
97  if (!simhits.isValid() || !sim_tracks.isValid())
98  return;
99 
100  // const edm::SimVertexContainer & sim_vert = *sim_vertices.product();
101  const edm::SimTrackContainer &sim_trks = *sim_tracks.product();
102 
103  MySimTrack track_;
104  for (auto &t : sim_trks) {
105  if (!isSimTrackGood(t)) {
106  continue;
107  }
108 
109  // match hits and rechits to this SimTrack
110 
111  const SimHitMatcher &match_sh =
113  const GEMRecHitMatcher &match_rh = GEMRecHitMatcher(match_sh, iEvent, geom, cfg_, gem_recHitToken_);
114 
115  track_.pt = t.momentum().pt();
116  // std::cout << "SimTrack pt value : " << track_.pt << "\n";
117  track_.phi = t.momentum().phi();
118  track_.eta = t.momentum().eta();
119  std::fill(std::begin(track_.hitOdd), std::end(track_.hitOdd), false);
120  std::fill(std::begin(track_.hitEven), std::end(track_.hitEven), false);
121 
122  for (int i = 0; i < 3; i++) {
123  for (int j = 0; j < 2; j++) {
124  track_.gem_sh[i][j] = false;
125  track_.gem_rh[i][j] = false;
126  }
127  }
128 
129  // ** GEM SimHits ** //
130  const auto gem_sh_ids_ch = match_sh.chamberIdsGEM();
131  for (auto d : gem_sh_ids_ch) {
132  const GEMDetId id(d);
133  if (id.chamber() % 2 == 0)
134  track_.hitEven[id.station() - 1] = true;
135  else if (id.chamber() % 2 == 1)
136  track_.hitOdd[id.station() - 1] = true;
137  else {
138  edm::LogInfo("GEMRecHitTrackMatch") << "Error to get chamber id" << std::endl;
139  }
140 
141  track_.gem_sh[id.station() - 1][(id.layer() - 1)] = true;
142  }
143  // ** GEM RecHits ** //
144  const auto gem_rh_ids_ch = match_rh.chamberIds();
145 
146  for (auto d : gem_rh_ids_ch) {
147  const GEMDetId id(d);
148  track_.gem_rh[id.station() - 1][(id.layer() - 1)] = true;
149  }
150 
151  FillWithTrigger(track_eta, fabs(track_.eta));
152  FillWithTrigger(track_phi, fabs(track_.eta), track_.phi, track_.hitOdd, track_.hitEven);
153 
154  FillWithTrigger(rh_sh_eta, track_.gem_sh, fabs(track_.eta));
155  FillWithTrigger(rh_eta, track_.gem_rh, fabs(track_.eta));
156 
157  // Separate station.
158 
159  FillWithTrigger(rh_sh_phi, track_.gem_sh, fabs(track_.eta), track_.phi, track_.hitOdd, track_.hitEven);
160  FillWithTrigger(rh_phi, track_.gem_rh, fabs(track_.eta), track_.phi, track_.hitOdd, track_.hitEven);
161 
162  /*
163 
164  // Calculation of the localXY efficiency
165  GlobalPoint gp_track(match_sh.propagatedPositionGEM());
166 
167  float track_angle = gp_track.phi().degrees();
168  if (track_angle < 0.) track_angle += 360.;
169  const int track_region = (gp_track.z() > 0 ? 1 : -1);
170 
171  // closest chambers in phi
172  const auto mypair = getClosestChambers(track_region, track_angle);
173 
174  GEMDetId detId_first(mypair.first);
175  GEMDetId detId_second(mypair.second);
176 
177  // assignment of local even and odd chambers (there is always an even and an
178  odd chamber) bool firstIsOdd = detId_first.chamber() & 1;
179 
180  GEMDetId detId_even_L1(firstIsOdd ? detId_second : detId_first);
181  GEMDetId detId_odd_L1(firstIsOdd ? detId_first : detId_second);
182 
183  auto even_partition = theGEMGeometry->idToDetUnit(detId_even_L1)->surface();
184  auto odd_partition = theGEMGeometry->idToDetUnit(detId_odd_L1)->surface();
185 
186  LocalPoint p0(0.,0.,0.);
187  GlobalPoint gp_even_partition = even_partition.toGlobal(p0);
188  GlobalPoint gp_odd_partition = odd_partition.toGlobal(p0);
189 
190  LocalPoint lp_track_even_partition = even_partition.toLocal(gp_track);
191  LocalPoint lp_track_odd_partition = odd_partition.toLocal(gp_track);
192 
193  // track chamber local x is the same as track partition local x
194  track_.gem_lx_even = lp_track_even_partition.x();
195  track_.gem_lx_odd = lp_track_odd_partition.x();
196 
197  // track chamber local y is the same as track partition local y
198  // corrected for partition's local y WRT chamber
199  track_.gem_ly_even = lp_track_even_partition.y() + (gp_even_partition.perp()
200  - radiusCenter_); track_.gem_ly_odd = lp_track_odd_partition.y() +
201  (gp_odd_partition.perp() - radiusCenter_);
202 
203  GEMDetId id_ch_even_L1(detId_even_L1.region(), detId_even_L1.ring(),
204  detId_even_L1.station(), 1, detId_even_L1.chamber(), 0); GEMDetId
205  id_ch_odd_L1(detId_odd_L1.region(), detId_odd_L1.ring(),
206  detId_odd_L1.station(), 1, detId_odd_L1.chamber(), 0); GEMDetId
207  id_ch_even_L2(detId_even_L1.region(), detId_even_L1.ring(),
208  detId_even_L1.station(), 2, detId_even_L1.chamber(), 0); GEMDetId
209  id_ch_odd_L2(detId_odd_L1.region(), detId_odd_L1.ring(),
210  detId_odd_L1.station(), 2, detId_odd_L1.chamber(), 0);
211 
212  if(gem_sh_ids_ch.count(id_ch_even_L1)!=0) track_.has_gem_sh_l1 |= 2;
213  if(gem_sh_ids_ch.count(id_ch_odd_L1)!=0) track_.has_gem_sh_l1 |= 1;
214  if(gem_sh_ids_ch.count(id_ch_even_L2)!=0) track_.has_gem_sh_l2 |= 2;
215  if(gem_sh_ids_ch.count(id_ch_odd_L2)!=0) track_.has_gem_sh_l2 |= 1;
216 
217  // check if track has dg
218  if(gem_dg_ids_ch.count(id_ch_even_L1)!=0){
219  track_.has_gem_dg_l1 |= 2;
220  track_.has_gem_pad_l1 |= 2;
221  }
222  if(gem_dg_ids_ch.count(id_ch_odd_L1)!=0){
223  track_.has_gem_dg_l1 |= 1;
224  track_.has_gem_pad_l1 |= 1;
225  }
226  if(gem_dg_ids_ch.count(id_ch_even_L2)!=0){
227  track_.has_gem_dg_l2 |= 2;
228  track_.has_gem_pad_l2 |= 2;
229  }
230  if(gem_dg_ids_ch.count(id_ch_odd_L2)!=0){
231  track_.has_gem_dg_l2 |= 1;
232  track_.has_gem_pad_l2 |= 1;
233  }
234  dg_lx_even->Fill( track_.gem_lx_even);
235  dg_lx_odd->Fill( track_.gem_lx_odd);
236  dg_ly_even->Fill( track_.gem_ly_even);
237  dg_ly_odd->Fill( track_.gem_ly_odd);
238 
239  if ( track_.has_gem_dg_l1 /2 >= 1 ) {
240  dg_lx_even_l1->Fill ( track_.gem_lx_even);
241  dg_ly_even_l1->Fill ( track_.gem_ly_even);
242  }
243  if ( track_.has_gem_dg_l1 %2 == 1 ) {
244  dg_lx_odd_l1->Fill ( track_.gem_lx_odd);
245  dg_ly_odd_l1->Fill ( track_.gem_ly_odd);
246  }
247  if ( track_.has_gem_dg_l2 /2 >=1 ) {
248  dg_lx_even_l2->Fill ( track_.gem_lx_even);
249  dg_ly_even_l2->Fill ( track_.gem_ly_even);
250  }
251  if ( track_.has_gem_dg_l2 %2 == 1 ) {
252  dg_lx_odd_l2->Fill ( track_.gem_lx_odd);
253  dg_ly_odd_l2->Fill ( track_.gem_ly_odd);
254  }
255  if ( track_.has_gem_dg_l1 /2 >=1 || track_.has_gem_dg_l2 /2 >=1 ) {
256  dg_lx_even_l1or2->Fill ( track_.gem_lx_even);
257  dg_ly_even_l1or2->Fill ( track_.gem_ly_even);
258  }
259  if ( track_.has_gem_dg_l1 %2 ==1 || track_.has_gem_dg_l2 %2 ==1 ) {
260  dg_lx_odd_l1or2->Fill ( track_.gem_lx_odd);
261  dg_ly_odd_l1or2->Fill ( track_.gem_ly_odd);
262  }
263  if ( track_.has_gem_dg_l1 /2 >=1 && track_.has_gem_dg_l2 /2 >=1 ) {
264  dg_lx_even_l1and2->Fill ( track_.gem_lx_even);
265  dg_ly_even_l1and2->Fill ( track_.gem_ly_even);
266  }
267  if ( track_.has_gem_dg_l1 %2 ==1 && track_.has_gem_dg_l2 %2 ==1 ) {
268  dg_lx_odd_l1and2->Fill ( track_.gem_lx_odd);
269  dg_ly_odd_l1and2->Fill ( track_.gem_ly_odd);
270  }
271 */
272  }
273 }
std::set< unsigned int > chamberIds() const
MonitorElement * rh_phi[4][3][3]
MonitorElement * track_phi[3][3]
edm::ParameterSet cfg_
Definition: GEMTrackMatch.h:60
std::set< unsigned int > chamberIdsGEM() const
GEM chamber detIds with SimHits.
edm::EDGetToken simHitsToken_
Definition: GEMTrackMatch.h:61
edm::EDGetToken simVerticesToken_
Definition: GEMTrackMatch.h:63
MonitorElement * rh_sh_phi[4][3][3]
bool hitOdd[3]
Definition: GEMTrackMatch.h:36
Float_t eta
Definition: GEMTrackMatch.h:25
MonitorElement * rh_sh_eta[4][3]
int iEvent
Definition: GenABIO.cc:224
edm::EDGetToken simTracksToken_
Definition: GEMTrackMatch.h:62
#define end
Definition: vmac.h:39
edm::EDGetToken gem_recHitToken_
bool isValid() const
Definition: HandleBase.h:70
d
Definition: ztail.py:151
bool hitEven[3]
Definition: GEMTrackMatch.h:37
Float_t pt
Definition: GEMTrackMatch.h:25
T const * product() const
Definition: Handle.h:69
MonitorElement * track_eta[3]
void FillWithTrigger(MonitorElement *me[3], Float_t eta)
#define begin
Definition: vmac.h:32
T get() const
Definition: EventSetup.h:73
MonitorElement * rh_eta[4][3]
Float_t phi
Definition: GEMTrackMatch.h:25
bool isSimTrackGood(const SimTrack &)
bool gem_rh[3][2]
Definition: GEMTrackMatch.h:35
bool gem_sh[3][2]
Definition: GEMTrackMatch.h:32
std::vector< SimTrack > SimTrackContainer
void GEMRecHitTrackMatch::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 25 of file GEMRecHitTrackMatch.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), GEMDetLabel::c_suffix, relativeConstraints::geom, edm::EventSetup::get(), mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, GEMDetLabel::l_suffix, GEMTrackMatch::maxEta_, GEMTrackMatch::minEta_, GEMTrackMatch::nstation, Pi, PI, GEMGeometry::regions(), rh_eta, rh_phi, rh_sh_eta, rh_sh_phi, GEMDetLabel::s_suffix, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), GEMTrackMatch::setGeometry(), AlCaHLTBitMon_QueryRunRegistry::string, createPayload::suffix, track_eta, and track_phi.

27  {
28  edm::LogInfo("GEMRecHitTrackMatch") << "GEM RecHitTrackMatch :: bookHistograms" << std::endl;
30  iSetup.get<MuonGeometryRecord>().get(hGeom);
31  const GEMGeometry &geom = *hGeom;
32  edm::LogInfo("GEMRecHitTrackMatch") << "GEM RecHitTrackMatch :: about to set the geometry" << std::endl;
33  setGeometry(geom);
34  edm::LogInfo("GEMRecHitTrackMatch") << "GEM RecHitTrackMatch :: successfully set the geometry" << std::endl;
35  edm::LogInfo("GEMRecHitTrackMatch") << "GEM RecHitTrackMatch :: geom = " << &geom << std::endl;
36 
37  ibooker.setCurrentFolder("MuonGEMRecHitsV/GEMRecHitsTask");
38  edm::LogInfo("GEMRecHitTrackMatch") << "ibooker set current folder\n";
39 
40  const float PI = TMath::Pi();
41 
42  using namespace GEMDetLabel;
43 
44  nstation = geom.regions()[0]->stations().size();
45  for (unsigned int j = 0; j < nstation; j++) {
46  string track_eta_name = string("track_eta") + s_suffix.at(j);
47  string track_eta_title = string("track_eta") + ";SimTrack |#eta|;# of tracks";
48  track_eta[j] = ibooker.book1D(track_eta_name.c_str(), track_eta_title.c_str(), 140, minEta_, maxEta_);
49 
50  for (unsigned int k = 0; k < c_suffix.size(); k++) {
51  string suffix = string(s_suffix[j]) + string(c_suffix[k]);
52  string track_phi_name = string("track_phi") + suffix;
53  string track_phi_title = string("track_phi") + suffix + ";SimTrack #phi;# of tracks";
54  track_phi[j][k] = ibooker.book1D(track_phi_name.c_str(), track_phi_title.c_str(), 200, -PI, PI);
55  }
56 
57  for (unsigned int i = 0; i < l_suffix.size(); i++) {
58  string suffix = string(s_suffix[j]) + string(l_suffix[i]);
59  string rh_eta_name = string("rh_eta") + suffix;
60  string rh_eta_title = rh_eta_name + "; tracks |#eta|; # of tracks";
61  rh_eta[i][j] = ibooker.book1D(rh_eta_name.c_str(), rh_eta_title.c_str(), 140, minEta_, maxEta_);
62 
63  string rh_sh_eta_name = string("rh_sh_eta") + suffix;
64  string rh_sh_eta_title = rh_sh_eta_name + "; tracks |#eta|; # of tracks";
65  rh_sh_eta[i][j] = ibooker.book1D(rh_sh_eta_name.c_str(), rh_sh_eta_title.c_str(), 140, minEta_, maxEta_);
66 
67  for (unsigned int k = 0; k < c_suffix.size(); k++) {
68  suffix = string(s_suffix[j]) + string(l_suffix[i]) + string(c_suffix[k]);
69  string rh_phi_name = string("rh_phi") + suffix;
70  string rh_phi_title = rh_phi_name + "; tracks #phi; # of tracks";
71  rh_phi[i][j][k] = ibooker.book1D((rh_phi_name).c_str(), rh_phi_title.c_str(), 200, -PI, PI);
72 
73  string rh_sh_phi_name = string("rh_sh_phi") + suffix;
74  string rh_sh_phi_title = rh_sh_phi_name + "; tracks #phi; # of tracks";
75  rh_sh_phi[i][j][k] = ibooker.book1D((rh_sh_phi_name).c_str(), rh_sh_phi_title.c_str(), 200, -PI, PI);
76  }
77  }
78  }
79 }
const double Pi
unsigned int nstation
Definition: GEMTrackMatch.h:76
static const std::array< std::string, 4 > l_suffix
Definition: GEMDetLabel.h:4
MonitorElement * rh_phi[4][3][3]
MonitorElement * track_phi[3][3]
MonitorElement * rh_sh_phi[4][3][3]
void setGeometry(const GEMGeometry &geom)
MonitorElement * rh_sh_eta[4][3]
static const std::array< std::string, 2 > s_suffix
Definition: GEMDetLabel.h:5
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
Definition: GEMGeometry.cc:30
#define PI
Definition: QcdUeDQM.h:37
MonitorElement * track_eta[3]
MonitorElement * rh_eta[4][3]
static const std::array< std::string, 3 > c_suffix
Definition: GEMDetLabel.h:6

Member Data Documentation

edm::EDGetToken GEMRecHitTrackMatch::gem_recHitToken_
private

Definition at line 33 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and GEMRecHitTrackMatch().

MonitorElement* GEMRecHitTrackMatch::rh_eta[4][3]
private

Definition at line 26 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitTrackMatch::rh_phi[4][3][3]
private

Definition at line 29 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitTrackMatch::rh_sh_eta[4][3]
private

Definition at line 27 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitTrackMatch::rh_sh_phi[4][3][3]
private

Definition at line 31 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitTrackMatch::track_eta[3]
private

Definition at line 23 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitTrackMatch::track_phi[3][3]
private

Definition at line 24 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().