CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Attributes
MuonDTDigis Class Reference

#include <MuonDTDigis.h>

Inheritance diagram for MuonDTDigis:
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

 MuonDTDigis (const edm::ParameterSet &pset)
 
 ~MuonDTDigis () 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)
 

Protected Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
hDigis * WheelHistos (int wheel)
 
- 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)
 

Private Types

typedef std::map< DTWireId, std::vector< const PSimHit * > > DTWireIdMap
 

Private Attributes

edm::EDGetTokenT< DTDigiCollectionDigiToken_
 
std::unique_ptr< hHits > hAllHits
 
std::unique_ptr< hDigis > hDigis_global
 
std::unique_ptr< hDigis > hDigis_W0
 
std::unique_ptr< hDigis > hDigis_W1
 
std::unique_ptr< hDigis > hDigis_W2
 
MonitorElementmeDigiEfficiency_
 
MonitorElementmeDigiEfficiencyMu_
 
MonitorElementmeDigiHisto_
 
MonitorElementmeDigiTimeBox_
 
std::vector< MonitorElement * > meDigiTimeBox_SL_
 
MonitorElementmeDigiTimeBox_wheel0_
 
MonitorElementmeDigiTimeBox_wheel1m_
 
MonitorElementmeDigiTimeBox_wheel1p_
 
MonitorElementmeDigiTimeBox_wheel2m_
 
MonitorElementmeDigiTimeBox_wheel2p_
 
MonitorElementmeDoubleDigi_
 
MonitorElementmeMB1_digi_occup_
 
MonitorElementmeMB1_sim_occup_
 
MonitorElementmeMB2_digi_occup_
 
MonitorElementmeMB2_sim_occup_
 
MonitorElementmeMB3_digi_occup_
 
MonitorElementmeMB3_sim_occup_
 
MonitorElementmeMB4_digi_occup_
 
MonitorElementmeMB4_sim_occup_
 
MonitorElementmeSimvsDigi_
 
MonitorElementmeWire_DoubleDigi_
 
edm::EDGetTokenT< edm::PSimHitContainerSimHitToken_
 
bool verbose_
 

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 Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Analyse the the muon-drift-tubes digitizer.

Authors
: R. Bellan

Definition at line 48 of file MuonDTDigis.h.

Member Typedef Documentation

typedef std::map<DTWireId, std::vector<const PSimHit *> > MuonDTDigis::DTWireIdMap
private

Definition at line 64 of file MuonDTDigis.h.

Constructor & Destructor Documentation

MuonDTDigis::MuonDTDigis ( const edm::ParameterSet pset)
explicit

Definition at line 19 of file MuonDTDigis.cc.

References edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

19  {
20  // ----------------------
21  // Get the debug parameter for verbose output
22  verbose_ = pset.getUntrackedParameter<bool>("verbose", false);
23 
24  // the name of the Digi collection
25  SimHitToken_ = consumes<edm::PSimHitContainer>(pset.getParameter<edm::InputTag>("SimHitLabel"));
26 
27  // the name of the Digi collection
28  DigiToken_ = consumes<DTDigiCollection>(pset.getParameter<edm::InputTag>(("DigiLabel")));
29 
30  hDigis_global = std::make_unique<hDigis>("Global");
31  hDigis_W0 = std::make_unique<hDigis>("Wheel0");
32  hDigis_W1 = std::make_unique<hDigis>("Wheel1");
33  hDigis_W2 = std::make_unique<hDigis>("Wheel2");
34  hAllHits = std::make_unique<hHits>("AllHits");
35 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< DTDigiCollection > DigiToken_
Definition: MuonDTDigis.h:67
std::unique_ptr< hDigis > hDigis_global
Definition: MuonDTDigis.h:100
edm::EDGetTokenT< edm::PSimHitContainer > SimHitToken_
Definition: MuonDTDigis.h:66
std::unique_ptr< hDigis > hDigis_W1
Definition: MuonDTDigis.h:102
std::unique_ptr< hDigis > hDigis_W0
Definition: MuonDTDigis.h:101
std::unique_ptr< hHits > hAllHits
Definition: MuonDTDigis.h:104
std::unique_ptr< hDigis > hDigis_W2
Definition: MuonDTDigis.h:103
bool verbose_
Definition: MuonDTDigis.h:70
MuonDTDigis::~MuonDTDigis ( )
override

Definition at line 37 of file MuonDTDigis.cc.

References gather_cfg::cout.

37  {
38  if (verbose_)
39  cout << "[MuonDTDigis] Destructor called" << endl;
40 }
bool verbose_
Definition: MuonDTDigis.h:70

Member Function Documentation

void MuonDTDigis::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overrideprotected

Definition at line 162 of file MuonDTDigis.cc.

References funct::abs(), begin, gather_cfg::cout, edm::EventSetup::get(), M_PI, mag(), amptDefaultParameters_cff::mu, castor_dqm_sourceclient_file_cfg::path, FastTimerService_cff::range, FastTrackerRecHitCombiner_cfi::simHits, relativeConstraints::station, theta(), makeMuonMisalignmentScenario::wheel, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

162  {
163  if (verbose_)
164  cout << "--- [MuonDTDigis] Analysing Event: #Run: " << event.id().run() << " #Event: " << event.id().event()
165  << endl;
166 
167  // Get the DT Geometry
168  ESHandle<DTGeometry> muonGeom;
169  eventSetup.get<MuonGeometryRecord>().get(muonGeom);
170 
171  // Get the Digi collection from the event
172  Handle<DTDigiCollection> dtDigis;
173  event.getByToken(DigiToken_, dtDigis);
174 
175  // Get simhits
177  event.getByToken(SimHitToken_, simHits);
178 
179  int num_mudigis;
180  int num_musimhits;
181  int num_digis;
182  int num_digis_layer;
183  int cham_num;
184  int wire_touched;
185  num_digis = 0;
186  num_mudigis = 0;
187  num_musimhits = 0;
188  DTWireIdMap wireMap;
189 
190  for (vector<PSimHit>::const_iterator hit = simHits->begin(); hit != simHits->end(); hit++) {
191  // Create the id of the wire, the simHits in the DT known also the wireId
192  DTWireId wireId(hit->detUnitId());
193  // cout << " PSimHits wire id " << wireId << " part type " <<
194  // hit->particleType() << endl;
195 
196  // Fill the map
197  wireMap[wireId].push_back(&(*hit));
198 
199  LocalPoint entryP = hit->entryPoint();
200  LocalPoint exitP = hit->exitPoint();
201  int partType = hit->particleType();
202  if (abs(partType) == 13)
203  num_musimhits++;
204 
205  if (wireId.station() == 1 && abs(partType) == 13)
206  meMB1_sim_occup_->Fill(wireId.wire());
207  if (wireId.station() == 2 && abs(partType) == 13)
208  meMB2_sim_occup_->Fill(wireId.wire());
209  if (wireId.station() == 3 && abs(partType) == 13)
210  meMB3_sim_occup_->Fill(wireId.wire());
211  if (wireId.station() == 4 && abs(partType) == 13)
212  meMB4_sim_occup_->Fill(wireId.wire());
213 
214  float path = (exitP - entryP).mag();
215  float path_x = fabs((exitP - entryP).x());
216 
217  hAllHits->Fill(entryP.x(),
218  exitP.x(),
219  entryP.y(),
220  exitP.y(),
221  entryP.z(),
222  exitP.z(),
223  path,
224  path_x,
225  partType,
226  hit->processType(),
227  hit->pabs());
228  }
229 
230  // cout << "num muon simhits " << num_musimhits << endl;
231 
233  for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end(); ++detUnitIt) {
234  const DTLayerId &id = (*detUnitIt).first;
235  const DTDigiCollection::Range &range = (*detUnitIt).second;
236 
237  num_digis_layer = 0;
238  cham_num = 0;
239  wire_touched = 0;
240 
241  // Loop over the digis of this DetUnit
242  for (DTDigiCollection::const_iterator digiIt = range.first; digiIt != range.second; ++digiIt) {
243  // cout<<" Wire: "<<(*digiIt).wire()<<endl
244  // <<" digi time (ns): "<<(*digiIt).time()<<endl;
245 
246  num_digis++;
247  num_digis_layer++;
248  if (num_digis_layer > 1) {
249  if ((*digiIt).wire() == wire_touched) {
250  meWire_DoubleDigi_->Fill((*digiIt).wire());
251  // cout << "old & new wire " << wire_touched << " " <<
252  // (*digiIt).wire() << endl;
253  }
254  }
255  wire_touched = (*digiIt).wire();
256 
257  meDigiTimeBox_->Fill((*digiIt).time());
258  if (id.wheel() == -2)
259  meDigiTimeBox_wheel2m_->Fill((*digiIt).time());
260  if (id.wheel() == -1)
261  meDigiTimeBox_wheel1m_->Fill((*digiIt).time());
262  if (id.wheel() == 0)
263  meDigiTimeBox_wheel0_->Fill((*digiIt).time());
264  if (id.wheel() == 1)
265  meDigiTimeBox_wheel1p_->Fill((*digiIt).time());
266  if (id.wheel() == 2)
267  meDigiTimeBox_wheel2p_->Fill((*digiIt).time());
268 
269  // Superlayer number and fill histo with digi timebox
270 
271  cham_num = (id.wheel() + 2) * 12 + (id.station() - 1) * 3 + id.superlayer();
272  // cout << " Histo number " << cham_num << endl;
273 
274  meDigiTimeBox_SL_[cham_num]->Fill((*digiIt).time());
275 
276  // cout << " size de digis " << (*digiIt).size() << endl;
277 
278  DTWireId wireId(id, (*digiIt).wire());
279  if (wireId.station() == 1)
280  meMB1_digi_occup_->Fill((*digiIt).wire());
281  if (wireId.station() == 2)
282  meMB2_digi_occup_->Fill((*digiIt).wire());
283  if (wireId.station() == 3)
284  meMB3_digi_occup_->Fill((*digiIt).wire());
285  if (wireId.station() == 4)
286  meMB4_digi_occup_->Fill((*digiIt).wire());
287 
288  int mu = 0;
289  float theta = 0;
290 
291  for (vector<const PSimHit *>::iterator hit = wireMap[wireId].begin(); hit != wireMap[wireId].end(); hit++)
292  if (abs((*hit)->particleType()) == 13) {
293  theta = atan((*hit)->momentumAtEntry().x() / (-(*hit)->momentumAtEntry().z())) * 180 / M_PI;
294  // cout<<"momentum x: "<<(*hit)->momentumAtEntry().x()<<endl
295  // <<"momentum z: "<<(*hit)->momentumAtEntry().z()<<endl
296  // <<"atan: "<<theta<<endl;
297  mu++;
298  }
299 
300  if (mu)
301  num_mudigis++;
302 
303  if (mu && theta) {
304  hDigis_global->Fill((*digiIt).time(), theta, id.superlayer());
305  // filling digi histos for wheel and for RZ and RPhi
306  WheelHistos(id.wheel())->Fill((*digiIt).time(), theta, id.superlayer());
307  }
308 
309  } // for digis in layer
310 
311  meDoubleDigi_->Fill((float)num_digis_layer);
312 
313  } // for layers
314 
315  // cout << "num_digis " << num_digis << "mu digis " << num_mudigis << endl;
316 
317  if (num_musimhits != 0) {
318  meDigiEfficiencyMu_->Fill((float)num_mudigis / (float)num_musimhits);
319  meDigiEfficiency_->Fill((float)num_digis / (float)num_musimhits);
320  }
321 
322  meSimvsDigi_->Fill((float)num_musimhits, (float)num_digis);
323  // cout<<"--------------"<<endl;
324 }
MonitorElement * meDoubleDigi_
Definition: MuonDTDigis.h:81
MonitorElement * meWire_DoubleDigi_
Definition: MuonDTDigis.h:83
std::vector< MonitorElement * > meDigiTimeBox_SL_
Definition: MuonDTDigis.h:94
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Geom::Theta< T > theta() const
T y() const
Definition: PV3DBase.h:60
MonitorElement * meMB2_digi_occup_
Definition: MuonDTDigis.h:88
edm::EDGetTokenT< DTDigiCollection > DigiToken_
Definition: MuonDTDigis.h:67
MonitorElement * meMB3_sim_occup_
Definition: MuonDTDigis.h:89
std::map< DTWireId, std::vector< const PSimHit * > > DTWireIdMap
Definition: MuonDTDigis.h:64
MonitorElement * meDigiEfficiencyMu_
Definition: MuonDTDigis.h:80
std::unique_ptr< hDigis > hDigis_global
Definition: MuonDTDigis.h:100
MonitorElement * meDigiTimeBox_wheel2m_
Definition: MuonDTDigis.h:74
void Fill(long long x)
MonitorElement * meDigiTimeBox_wheel1m_
Definition: MuonDTDigis.h:75
MonitorElement * meDigiTimeBox_wheel0_
Definition: MuonDTDigis.h:76
edm::EDGetTokenT< edm::PSimHitContainer > SimHitToken_
Definition: MuonDTDigis.h:66
MonitorElement * meMB4_sim_occup_
Definition: MuonDTDigis.h:91
MonitorElement * meMB1_sim_occup_
Definition: MuonDTDigis.h:85
MonitorElement * meMB2_sim_occup_
Definition: MuonDTDigis.h:87
MonitorElement * meMB3_digi_occup_
Definition: MuonDTDigis.h:90
T z() const
Definition: PV3DBase.h:61
MonitorElement * meDigiTimeBox_
Definition: MuonDTDigis.h:73
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * meDigiTimeBox_wheel1p_
Definition: MuonDTDigis.h:77
MonitorElement * meMB4_digi_occup_
Definition: MuonDTDigis.h:92
std::unique_ptr< hHits > hAllHits
Definition: MuonDTDigis.h:104
hDigis * WheelHistos(int wheel)
Definition: MuonDTDigis.cc:326
#define M_PI
MonitorElement * meSimvsDigi_
Definition: MuonDTDigis.h:82
std::pair< const_iterator, const_iterator > Range
std::vector< DigiType >::const_iterator const_iterator
MonitorElement * meDigiEfficiency_
Definition: MuonDTDigis.h:79
#define begin
Definition: vmac.h:32
T get() const
Definition: EventSetup.h:73
bool verbose_
Definition: MuonDTDigis.h:70
MonitorElement * meDigiTimeBox_wheel2p_
Definition: MuonDTDigis.h:78
T x() const
Definition: PV3DBase.h:59
MonitorElement * meMB1_digi_occup_
Definition: MuonDTDigis.h:86
void MuonDTDigis::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 42 of file MuonDTDigis.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), and dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder().

44  {
45  meDigiTimeBox_ = nullptr;
46  meDigiTimeBox_wheel2m_ = nullptr;
47  meDigiTimeBox_wheel1m_ = nullptr;
48  meDigiTimeBox_wheel0_ = nullptr;
49  meDigiTimeBox_wheel1p_ = nullptr;
50  meDigiTimeBox_wheel2p_ = nullptr;
51  meDigiEfficiency_ = nullptr;
52  meDigiEfficiencyMu_ = nullptr;
53  meDoubleDigi_ = nullptr;
54  meSimvsDigi_ = nullptr;
55  meWire_DoubleDigi_ = nullptr;
56 
57  meMB1_sim_occup_ = nullptr;
58  meMB1_digi_occup_ = nullptr;
59  meMB2_sim_occup_ = nullptr;
60  meMB2_digi_occup_ = nullptr;
61  meMB3_sim_occup_ = nullptr;
62  meMB3_digi_occup_ = nullptr;
63  meMB4_sim_occup_ = nullptr;
64  meMB4_digi_occup_ = nullptr;
65 
66  meDigiHisto_ = nullptr;
67 
68  // ----------------------
69  // We go
70  // ----------------------
71 
72  Char_t histo_n[100];
73  Char_t histo_t[100];
74 
75  iBooker.setCurrentFolder("MuonDTDigisV/DTDigiValidationTask");
76 
77  sprintf(histo_n, "DigiTimeBox");
78  sprintf(histo_t, "Digi Time Box");
79  meDigiTimeBox_ = iBooker.book1D(histo_n, histo_t, 1536, 0, 1200);
80 
81  sprintf(histo_n, "DigiTimeBox_wheel2m");
82  sprintf(histo_t, "Digi Time Box wheel -2");
83  meDigiTimeBox_wheel2m_ = iBooker.book1D(histo_n, histo_t, 384, 0, 1200);
84 
85  sprintf(histo_n, "DigiTimeBox_wheel1m");
86  sprintf(histo_t, "Digi Time Box wheel -1");
87  meDigiTimeBox_wheel1m_ = iBooker.book1D(histo_n, histo_t, 384, 0, 1200);
88 
89  sprintf(histo_n, "DigiTimeBox_wheel0");
90  sprintf(histo_t, "Digi Time Box wheel 0");
91  meDigiTimeBox_wheel0_ = iBooker.book1D(histo_n, histo_t, 384, 0, 1200);
92 
93  sprintf(histo_n, "DigiTimeBox_wheel1p");
94  sprintf(histo_t, "Digi Time Box wheel 1");
95  meDigiTimeBox_wheel1p_ = iBooker.book1D(histo_n, histo_t, 384, 0, 1200);
96 
97  sprintf(histo_n, "DigiTimeBox_wheel2p");
98  sprintf(histo_t, "Digi Time Box wheel 2");
99  meDigiTimeBox_wheel2p_ = iBooker.book1D(histo_n, histo_t, 384, 0, 1200);
100 
101  sprintf(histo_n, "DigiEfficiencyMu");
102  sprintf(histo_t, "Ratio (#Digis Mu)/(#SimHits Mu)");
103  meDigiEfficiencyMu_ = iBooker.book1D(histo_n, histo_t, 100, 0., 5.);
104 
105  sprintf(histo_n, "DigiEfficiency");
106  sprintf(histo_t, "Ratio (#Digis)/(#SimHits)");
107  meDigiEfficiency_ = iBooker.book1D(histo_n, histo_t, 100, 0., 5.);
108 
109  sprintf(histo_n, "Number_Digi_per_layer");
110  sprintf(histo_t, "Number_Digi_per_layer");
111  meDoubleDigi_ = iBooker.book1D(histo_n, histo_t, 10, 0., 10.);
112 
113  sprintf(histo_n, "Number_simhit_vs_digi");
114  sprintf(histo_t, "Number_simhit_vs_digi");
115  meSimvsDigi_ = iBooker.book2D(histo_n, histo_t, 100, 0., 140., 100, 0., 140.);
116 
117  sprintf(histo_n, "Wire_Number_with_double_Digi");
118  sprintf(histo_t, "Wire_Number_with_double_Digi");
119  meWire_DoubleDigi_ = iBooker.book1D(histo_n, histo_t, 100, 0., 100.);
120 
121  sprintf(histo_n, "Simhit_occupancy_MB1");
122  sprintf(histo_t, "Simhit_occupancy_MB1");
123  meMB1_sim_occup_ = iBooker.book1D(histo_n, histo_t, 55, 0., 55.);
124 
125  sprintf(histo_n, "Digi_occupancy_MB1");
126  sprintf(histo_t, "Digi_occupancy_MB1");
127  meMB1_digi_occup_ = iBooker.book1D(histo_n, histo_t, 55, 0., 55.);
128 
129  sprintf(histo_n, "Simhit_occupancy_MB2");
130  sprintf(histo_t, "Simhit_occupancy_MB2");
131  meMB2_sim_occup_ = iBooker.book1D(histo_n, histo_t, 63, 0., 63.);
132 
133  sprintf(histo_n, "Digi_occupancy_MB2");
134  sprintf(histo_t, "Digi_occupancy_MB2");
135  meMB2_digi_occup_ = iBooker.book1D(histo_n, histo_t, 63, 0., 63.);
136 
137  sprintf(histo_n, "Simhit_occupancy_MB3");
138  sprintf(histo_t, "Simhit_occupancy_MB3");
139  meMB3_sim_occup_ = iBooker.book1D(histo_n, histo_t, 75, 0., 75.);
140 
141  sprintf(histo_n, "Digi_occupancy_MB3");
142  sprintf(histo_t, "Digi_occupancy_MB3");
143  meMB3_digi_occup_ = iBooker.book1D(histo_n, histo_t, 75, 0., 75.);
144 
145  sprintf(histo_n, "Simhit_occupancy_MB4");
146  sprintf(histo_t, "Simhit_occupancy_MB4");
147  meMB4_sim_occup_ = iBooker.book1D(histo_n, histo_t, 99, 0., 99.);
148 
149  sprintf(histo_n, "Digi_occupancy_MB4");
150  sprintf(histo_t, "Digi_occupancy_MB4");
151  meMB4_digi_occup_ = iBooker.book1D(histo_n, histo_t, 99, 0., 99.);
152 
153  // Begona's option
154  char stringcham[40];
155  for (int slnum = 1; slnum < 62; ++slnum) {
156  sprintf(stringcham, "DigiTimeBox_slid_%d", slnum);
157  meDigiHisto_ = iBooker.book1D(stringcham, stringcham, 100, 0, 1200);
158  meDigiTimeBox_SL_.push_back(meDigiHisto_);
159  }
160 }
MonitorElement * meDoubleDigi_
Definition: MuonDTDigis.h:81
MonitorElement * meWire_DoubleDigi_
Definition: MuonDTDigis.h:83
std::vector< MonitorElement * > meDigiTimeBox_SL_
Definition: MuonDTDigis.h:94
MonitorElement * meDigiHisto_
Definition: MuonDTDigis.h:95
MonitorElement * meMB2_digi_occup_
Definition: MuonDTDigis.h:88
MonitorElement * meMB3_sim_occup_
Definition: MuonDTDigis.h:89
MonitorElement * meDigiEfficiencyMu_
Definition: MuonDTDigis.h:80
MonitorElement * meDigiTimeBox_wheel2m_
Definition: MuonDTDigis.h:74
MonitorElement * meDigiTimeBox_wheel1m_
Definition: MuonDTDigis.h:75
MonitorElement * meDigiTimeBox_wheel0_
Definition: MuonDTDigis.h:76
MonitorElement * meMB4_sim_occup_
Definition: MuonDTDigis.h:91
MonitorElement * meMB1_sim_occup_
Definition: MuonDTDigis.h:85
MonitorElement * meMB2_sim_occup_
Definition: MuonDTDigis.h:87
MonitorElement * meMB3_digi_occup_
Definition: MuonDTDigis.h:90
MonitorElement * meDigiTimeBox_
Definition: MuonDTDigis.h:73
MonitorElement * meDigiTimeBox_wheel1p_
Definition: MuonDTDigis.h:77
MonitorElement * meMB4_digi_occup_
Definition: MuonDTDigis.h:92
MonitorElement * meSimvsDigi_
Definition: MuonDTDigis.h:82
MonitorElement * meDigiEfficiency_
Definition: MuonDTDigis.h:79
MonitorElement * meDigiTimeBox_wheel2p_
Definition: MuonDTDigis.h:78
MonitorElement * meMB1_digi_occup_
Definition: MuonDTDigis.h:86
hDigis * MuonDTDigis::WheelHistos ( int  wheel)
protected

Definition at line 326 of file MuonDTDigis.cc.

References funct::abs(), and DEFINE_FWK_MODULE.

326  {
327  switch (abs(wheel)) {
328  case 0:
329  return hDigis_W0.get();
330 
331  case 1:
332  return hDigis_W1.get();
333 
334  case 2:
335  return hDigis_W2.get();
336 
337  default:
338  return nullptr;
339  }
340 }
std::unique_ptr< hDigis > hDigis_W1
Definition: MuonDTDigis.h:102
std::unique_ptr< hDigis > hDigis_W0
Definition: MuonDTDigis.h:101
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::unique_ptr< hDigis > hDigis_W2
Definition: MuonDTDigis.h:103

Member Data Documentation

edm::EDGetTokenT<DTDigiCollection> MuonDTDigis::DigiToken_
private

Definition at line 67 of file MuonDTDigis.h.

std::unique_ptr<hHits> MuonDTDigis::hAllHits
private

Definition at line 104 of file MuonDTDigis.h.

std::unique_ptr<hDigis> MuonDTDigis::hDigis_global
private

Definition at line 100 of file MuonDTDigis.h.

std::unique_ptr<hDigis> MuonDTDigis::hDigis_W0
private

Definition at line 101 of file MuonDTDigis.h.

std::unique_ptr<hDigis> MuonDTDigis::hDigis_W1
private

Definition at line 102 of file MuonDTDigis.h.

std::unique_ptr<hDigis> MuonDTDigis::hDigis_W2
private

Definition at line 103 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meDigiEfficiency_
private

Definition at line 79 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meDigiEfficiencyMu_
private

Definition at line 80 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meDigiHisto_
private

Definition at line 95 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meDigiTimeBox_
private

Definition at line 73 of file MuonDTDigis.h.

std::vector<MonitorElement *> MuonDTDigis::meDigiTimeBox_SL_
private

Definition at line 94 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meDigiTimeBox_wheel0_
private

Definition at line 76 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meDigiTimeBox_wheel1m_
private

Definition at line 75 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meDigiTimeBox_wheel1p_
private

Definition at line 77 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meDigiTimeBox_wheel2m_
private

Definition at line 74 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meDigiTimeBox_wheel2p_
private

Definition at line 78 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meDoubleDigi_
private

Definition at line 81 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meMB1_digi_occup_
private

Definition at line 86 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meMB1_sim_occup_
private

Definition at line 85 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meMB2_digi_occup_
private

Definition at line 88 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meMB2_sim_occup_
private

Definition at line 87 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meMB3_digi_occup_
private

Definition at line 90 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meMB3_sim_occup_
private

Definition at line 89 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meMB4_digi_occup_
private

Definition at line 92 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meMB4_sim_occup_
private

Definition at line 91 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meSimvsDigi_
private

Definition at line 82 of file MuonDTDigis.h.

MonitorElement* MuonDTDigis::meWire_DoubleDigi_
private

Definition at line 83 of file MuonDTDigis.h.

edm::EDGetTokenT<edm::PSimHitContainer> MuonDTDigis::SimHitToken_
private

Definition at line 66 of file MuonDTDigis.h.

bool MuonDTDigis::verbose_
private

Definition at line 70 of file MuonDTDigis.h.