CMS 3D CMS Logo

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

#include <DTRecHitClients.h>

Inheritance diagram for DTRecHitClients:
DQMEDHarvester edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DTRecHitClients (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTRecHitClients () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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
 
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)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 End Job. More...
 
- 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)
 

Private Attributes

bool doall_
 
bool doStep1_
 
bool doStep2_
 
bool doStep3_
 
bool local_
 

Additional Inherited Members

- 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 DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 15 of file DTRecHitClients.h.

Constructor & Destructor Documentation

DTRecHitClients::DTRecHitClients ( const edm::ParameterSet ps)

Constructor.

Definition at line 12 of file DTRecHitClients.cc.

References edm::ParameterSet::getUntrackedParameter().

13 {
14  // Switches for analysis at various steps
15  doStep1_ = pset.getUntrackedParameter<bool>("doStep1", false);
16  doStep2_ = pset.getUntrackedParameter<bool>("doStep2", false);
17  doStep3_ = pset.getUntrackedParameter<bool>("doStep3", false);
18  doall_ = pset.getUntrackedParameter<bool>("doall", false);
19  local_ = pset.getUntrackedParameter<bool>("local", true);
20 }
DTRecHitClients::~DTRecHitClients ( )
override

Destructor.

Definition at line 22 of file DTRecHitClients.cc.

23 {
24 }

Member Function Documentation

void DTRecHitClients::dqmEndJob ( DQMStore::IBooker booker,
DQMStore::IGetter getter 
)
overrideprotectedvirtual

End Job.

Implements DQMEDHarvester.

Definition at line 26 of file DTRecHitClients.cc.

References DEFINE_FWK_MODULE, Tutils::drawGFit(), DQMStore::IGetter::get(), MonitorElement::getTH1(), alignCSCRings::s, and w.

27 {
28  MonitorElement * hRes_S3RPhi = getter.get("DT/1DRecHits/Res/1D_S3RPhi_hRes");
29  MonitorElement * hRes_S3RZ = getter.get("DT/1DRecHits/Res/1D_S3RZ_hRes");
30  MonitorElement * hRes_S3RZ_W0 = getter.get("DT/1DRecHits/Res/1D_S3RZ_W0_hRes");
31  MonitorElement * hRes_S3RZ_W1 = getter.get("DT/1DRecHits/Res/1D_S3RZ_W1_hRes");
32  MonitorElement * hRes_S3RZ_W2 = getter.get("DT/1DRecHits/Res/1D_S3RZ_W2_hRes");
33 
34  MonitorElement * hPull_S3RPhi = getter.get("DT/1DRecHits/Pull/1D_S3RPhi_hPull");
35  MonitorElement * hPull_S3RZ = getter.get("DT/1DRecHits/Pull/1D_S3RZ_hPull");
36  MonitorElement * hPull_S3RZ_W0 = getter.get("DT/1DRecHits/Pull/1D_S3RZ_W0_hPull");
37  MonitorElement * hPull_S3RZ_W1 = getter.get("DT/1DRecHits/Pull/1D_S3RZ_W1_hPull");
38  MonitorElement * hPull_S3RZ_W2 = getter.get("DT/1DRecHits/Pull/1D_S3RZ_W2_hPull");
39 
40  Tutils util;
41  util.drawGFit(hRes_S3RPhi->getTH1(),-0.2,0.2,-0.1,0.1);
42  util.drawGFit(hRes_S3RZ->getTH1(),-0.2,0.2,-0.1,0.1);
43  util.drawGFit(hRes_S3RZ_W0->getTH1(),-0.2,0.2,-0.1,0.1);
44  util.drawGFit(hRes_S3RZ_W1->getTH1(),-0.2,0.2,-0.1,0.1);
45  util.drawGFit(hRes_S3RZ_W2->getTH1(),-0.2,0.2,-0.1,0.1);
46 
47  util.drawGFit(hPull_S3RPhi->getTH1(),-5,5,-5,5);
48  util.drawGFit(hPull_S3RZ->getTH1(),-5,5,-5,5);
49  util.drawGFit(hPull_S3RZ_W0->getTH1(),-5,5,-5,5);
50  util.drawGFit(hPull_S3RZ_W1->getTH1(),-5,5,-5,5);
51  util.drawGFit(hPull_S3RZ_W2->getTH1(),-5,5,-5,5);
52 
53  if (doall_) {
54  HEff1DHitHarvest hEff_S3RPhi("S3RPhi", booker, getter);
55  HEff1DHitHarvest hEff_S3RZ("S3RZ", booker, getter);
56  HEff1DHitHarvest hEff_S3RZ_W0("S3RZ_W0", booker, getter);
57  HEff1DHitHarvest hEff_S3RZ_W1("S3RZ_W1", booker, getter);
58  HEff1DHitHarvest hEff_S3RZ_W2("S3RZ_W2", booker, getter);
59 
60  if (doStep1_) {
61  HEff1DHitHarvest hEff_S1RPhi("S1RPhi", booker, getter);
62  HEff1DHitHarvest hEff_S1RZ("S1RZ", booker, getter);
63  HEff1DHitHarvest hEff_S1RZ_W0("S1RZ_W0", booker, getter);
64  HEff1DHitHarvest hEff_S1RZ_W1("S1RZ_W1", booker, getter);
65  HEff1DHitHarvest hEff_S1RZ_W2("S1RZ_W2", booker, getter);
66  }
67 
68  if (doStep2_) {
69  HEff1DHitHarvest hEff_S2RPhi("S2RPhi", booker, getter);
70  HEff1DHitHarvest hEff_S2RZ_W0("S2RZ_W0", booker, getter);
71  HEff1DHitHarvest hEff_S2RZ_W1("S2RZ_W1", booker, getter);
72  HEff1DHitHarvest hEff_S2RZ_W2("S2RZ_W2", booker, getter);
73  HEff1DHitHarvest hEff_S2RZ("S2RZ", booker, getter);
74  }
75  }
76 
77  if (local_) {
78  // Plots with finer granularity, not to be included in DQM
79  TString name1 = "RPhi_W";
80  TString name2 = "RZ_W";
81  for (long w = 0; w <= 2; ++w) {
82  for (long s = 1;s <= 4; ++s) {
83  HEff1DHitHarvest hEff_S1RPhiWS(("S1"+name1+w+"_St"+s).Data(), booker, getter);
84  HEff1DHitHarvest hEff_S3RPhiWS(("S3"+name1+w+"_St"+s).Data(), booker, getter);
85  if (s != 4) {
86  HEff1DHitHarvest hEff_S1RZWS(("S1"+name2+w+"_St"+s).Data(), booker, getter);
87  HEff1DHitHarvest hEff_S3RZWS(("S3"+name2+w+"_St"+s).Data(), booker, getter);
88  }
89  }
90  }
91  }
92 }
Definition: __init__.py:1
const double w
Definition: UKUtility.cc:23
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
TH1 * getTH1() const
void drawGFit(TH1 *h1, float nsigmas, float min, float max)
Definition: utils.h:9
A set of histograms fo efficiency computation for 1D RecHits (harvesting)
Definition: Histograms.h:178

Member Data Documentation

bool DTRecHitClients::doall_
private

Definition at line 33 of file DTRecHitClients.h.

bool DTRecHitClients::doStep1_
private

Definition at line 29 of file DTRecHitClients.h.

bool DTRecHitClients::doStep2_
private

Definition at line 30 of file DTRecHitClients.h.

bool DTRecHitClients::doStep3_
private

Definition at line 31 of file DTRecHitClients.h.

bool DTRecHitClients::local_
private

Definition at line 32 of file DTRecHitClients.h.