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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

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 ()
 
- 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)
 
virtual ~GEMTrackMatch ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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 edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 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_
 

Detailed Description

Definition at line 16 of file GEMRecHitTrackMatch.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file GEMRecHitTrackMatch.cc.

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

12  : GEMTrackMatch(ps)
13 {
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:63
edm::EDGetToken simHitsToken_
Definition: GEMTrackMatch.h:64
edm::EDGetToken simVerticesToken_
Definition: GEMTrackMatch.h:66
edm::EDGetToken simTracksToken_
Definition: GEMTrackMatch.h:65
GEMTrackMatch(const edm::ParameterSet &cfg)
Definition: GEMTrackMatch.cc:6
edm::EDGetToken gem_recHitToken_
GEMRecHitTrackMatch::~GEMRecHitTrackMatch ( )

Definition at line 78 of file GEMRecHitTrackMatch.cc.

78 { }

Member Function Documentation

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

Implements GEMTrackMatch.

Definition at line 80 of file GEMRecHitTrackMatch.cc.

References begin, GEMTrackMatch::cfg_, relativeConstraints::chamber, GEMRecHitMatcher::chamberIds(), SimHitMatcher::chamberIdsGEM(), gather_cfg::cout, edmIntegrityCheck::d, end, MySimTrack::eta, lumiContext::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, hcalTTPDigis_cfi::id, GEMTrackMatch::isSimTrackGood(), edm::HandleBase::isValid(), MySimTrack::phi, edm::Handle< T >::product(), MySimTrack::pt, rh_eta, rh_phi, rh_sh_eta, rh_sh_phi, GEMTrackMatch::simHitsToken_, GEMTrackMatch::simTracksToken_, GEMTrackMatch::simVerticesToken_, lumiQTWidget::t, track_eta, and track_phi.

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

25  {
27  iSetup.get<MuonGeometryRecord>().get(hGeom);
28  const GEMGeometry& geom = *hGeom;
29  setGeometry(geom);
30 
31  ibooker.setCurrentFolder("MuonGEMRecHitsV/GEMRecHitsTask");
32  LogDebug("GEMRecHitTrackMatch")<<"ibooker set current folder\n";
33 
34  const float PI=TMath::Pi();
35  const char* l_suffix[4] = {"_l1","_l2","_l1or2","_l1and2"};
36  const char* s_suffix[2] = {"_st1","_st2"};
37  const char* c_suffix[3] = {"_even","_odd","_all"};
38 
39  nstation = geom.regions()[0]->stations().size();
40  for( unsigned int j=0 ; j<nstation ; j++) {
41  string track_eta_name = string("track_eta")+s_suffix[j];
42  string track_eta_title = string("track_eta")+";SimTrack |#eta|;# of tracks";
43  track_eta[j] = ibooker.book1D(track_eta_name.c_str(), track_eta_title.c_str(),140,minEta_,maxEta_);
44 
45  for ( unsigned int k = 0 ; k<3 ; k++) {
46  string suffix = string(s_suffix[j])+ string(c_suffix[k]);
47  string track_phi_name = string("track_phi")+suffix;
48  string track_phi_title = string("track_phi")+suffix+";SimTrack #phi;# of tracks";
49  track_phi[j][k] = ibooker.book1D(track_phi_name.c_str(), track_phi_title.c_str(),200,-PI,PI);
50  }
51 
52 
53  for( unsigned int i=0 ; i< 4; i++) {
54  string suffix = string(s_suffix[j])+string(l_suffix[i]);
55  string rh_eta_name = string("rh_eta")+suffix;
56  string rh_eta_title = rh_eta_name+"; tracks |#eta|; # of tracks";
57  rh_eta[i][j] = ibooker.book1D( rh_eta_name.c_str(), rh_eta_title.c_str(), 140, minEta_, maxEta_) ;
58 
59  string rh_sh_eta_name = string("rh_sh_eta")+suffix;
60  string rh_sh_eta_title = rh_sh_eta_name+"; tracks |#eta|; # of tracks";
61  rh_sh_eta[i][j] = ibooker.book1D( rh_sh_eta_name.c_str(), rh_sh_eta_title.c_str(), 140, minEta_, maxEta_) ;
62 
63  for ( unsigned int k = 0 ; k<3 ; k++) {
64  suffix = string(s_suffix[j])+string(l_suffix[i])+ string(c_suffix[k]);
65  string rh_phi_name = string("rh_phi")+suffix;
66  string rh_phi_title = rh_phi_name+"; tracks #phi; # of tracks";
67  rh_phi[i][j][k] = ibooker.book1D( (rh_phi_name).c_str(), rh_phi_title.c_str(), 200, -PI,PI) ;
68 
69  string rh_sh_phi_name = string("rh_sh_phi")+suffix;
70  string rh_sh_phi_title = rh_sh_phi_name+"; tracks #phi; # of tracks";
71  rh_sh_phi[i][j][k] = ibooker.book1D( (rh_sh_phi_name).c_str(), rh_sh_phi_title.c_str(), 200,-PI,PI) ;
72 
73  }
74  }
75  }
76 }
#define LogDebug(id)
const double Pi
unsigned int nstation
Definition: GEMTrackMatch.h:80
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:43
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
#define PI
Definition: QcdUeDQM.h:36
int k[5][pyjets_maxn]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
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 35 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and GEMRecHitTrackMatch().

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

Definition at line 28 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 31 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 29 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 33 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitTrackMatch::track_eta[3]
private

Definition at line 25 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 26 of file GEMRecHitTrackMatch.h.

Referenced by analyze(), and bookHistograms().