CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DTLocalTriggerTPTest Class Reference

#include <DTLocalTriggerTPTest.h>

Inheritance diagram for DTLocalTriggerTPTest:
DTLocalTriggerBaseTest DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 DTLocalTriggerTPTest (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~DTLocalTriggerTPTest ()
 Destructor. More...
 
- Public Member Functions inherited from DTLocalTriggerBaseTest
 DTLocalTriggerBaseTest ()
 Constructor. More...
 
virtual ~DTLocalTriggerBaseTest ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 Perform client diagnostic in online. More...
 
void runClientDiagnostic (DQMStore::IBooker &, DQMStore::IGetter &)
 Run client analysis. More...
 
- Protected Member Functions inherited from DTLocalTriggerBaseTest
void bookCmsHistos (DQMStore::IBooker &, std::string hTag, std::string folder="", bool isGlb=false)
 Book the new MEs (CMS summary) More...
 
void bookSectorHistos (DQMStore::IBooker &, int wheel, int sector, std::string hTag, std::string folder="")
 Book the new MEs (for each sector) More...
 
void bookWheelHistos (DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="")
 Book the new MEs (for each wheel) More...
 
std::string category ()
 Get message logger name. More...
 
void endRun (edm::Run const &run, edm::EventSetup const &context)
 Perform client diagnostic in offline. More...
 
std::string fullName (std::string htype)
 Create fullname from histo partial name. More...
 
template<class T >
TgetHisto (MonitorElement *me)
 Convert ME to Histogram fo type T. More...
 
std::string getMEName (std::string histoTag, std::string subfolder, const DTChamberId &chambid)
 Get the ME name (by chamber) More...
 
std::string getMEName (std::string histoTag, std::string subfolder, int wh)
 Get the ME name (by wheel) More...
 
std::pair< float, float > phiRange (const DTChamberId &id)
 Calculate phi range for histograms. More...
 
void setConfig (const edm::ParameterSet &ps, std::string name)
 Set configuration variables. More...
 
std::string & topFolder (bool isDCC)
 Get top folder name. More...
 
- Protected Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 bookingdone
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DTLocalTriggerBaseTest
std::string baseFolderDCC
 
std::string baseFolderDDU
 
std::map< std::string,
MonitorElement * > 
cmsME
 
std::string hwSource
 
std::vector< std::string > hwSources
 
edm::ESHandle< DTGeometrymuonGeom
 
int nevents
 
unsigned int nLumiSegs
 
edm::ParameterSet parameters
 
int prescaleFactor
 
int run
 
bool runOnline
 
std::map< int, std::map
< std::string, MonitorElement * > > 
secME
 
std::string sourceFolder
 
std::string testName
 
std::string trigSource
 
std::vector< std::string > trigSources
 
std::map< int, std::map
< std::string, MonitorElement * > > 
whME
 

Detailed Description

Definition at line 21 of file DTLocalTriggerTPTest.h.

Constructor & Destructor Documentation

DTLocalTriggerTPTest::DTLocalTriggerTPTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 37 of file DTLocalTriggerTPTest.cc.

37  {
38 
39  setConfig(ps,"DTLocalTriggerTP");
40  baseFolderDCC = "DT/11-LocalTriggerTP-DCC/";
41  baseFolderDDU = "DT/12-LocalTriggerTP-DDU/";
42 
43  bookingdone = 0;
44 
45 }
void setConfig(const edm::ParameterSet &ps, std::string name)
Set configuration variables.
DTLocalTriggerTPTest::~DTLocalTriggerTPTest ( )
virtual

Destructor.

Definition at line 48 of file DTLocalTriggerTPTest.cc.

48  {
49 
50 }

Member Function Documentation

void DTLocalTriggerTPTest::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 84 of file DTLocalTriggerTPTest.cc.

References DTLocalTriggerBaseTest::beginRun().

84  {
85 
87 
88 }
void beginRun(edm::Run const &run, edm::EventSetup const &context)
BeginRun.
void DTLocalTriggerTPTest::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
protectedvirtual

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 136 of file DTLocalTriggerTPTest.cc.

136 {}
void DTLocalTriggerTPTest::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
protectedvirtual

Perform client diagnostic in online.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 53 of file DTLocalTriggerTPTest.cc.

References Parameters::parameters.

54  {
55 
56  if (bookingdone) return;
57 
58  vector<string>::const_iterator iTr = trigSources.begin();
59  vector<string>::const_iterator trEnd = trigSources.end();
60  vector<string>::const_iterator iHw = hwSources.begin();
61  vector<string>::const_iterator hwEnd = hwSources.end();
62 
63  //Booking
64  if(parameters.getUntrackedParameter<bool>("staticBooking", true)){
65  for (; iTr != trEnd; ++iTr){
66  trigSource = (*iTr);
67  for (; iHw != hwEnd; ++iHw){
68  hwSource = (*iHw);
69  // Loop over the TriggerUnits
70  for (int wh=-2; wh<=2; ++wh){
71  bookWheelHistos(ibooker,wh,"CorrectBXPhi");
72  bookWheelHistos(ibooker,wh,"ResidualBXPhi");
73  }
74  }
75  }
76  }
77 
78 
79  bookingdone = 1;
80 
81 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > trigSources
std::vector< std::string > hwSources
void bookWheelHistos(DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="")
Book the new MEs (for each wheel)
void DTLocalTriggerTPTest::runClientDiagnostic ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
protectedvirtual

Run client analysis.

Implements DTLocalTriggerBaseTest.

Definition at line 90 of file DTLocalTriggerTPTest.cc.

References rpcdqm::BX, end, spr::find(), newFWLiteAna::fullName, and DQMStore::IGetter::get().

91  {
92 
93  // Loop over Trig & Hw sources
94  for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr){
95  trigSource = (*iTr);
96  for (vector<string>::const_iterator iHw = hwSources.begin(); iHw != hwSources.end(); ++iHw){
97  hwSource = (*iHw);
98  // Loop over the TriggerUnits
99  for (int stat=1; stat<=4; ++stat){
100  for (int wh=-2; wh<=2; ++wh){
101  for (int sect=1; sect<=12; ++sect){
102  DTChamberId chId(wh,stat,sect);
103 
104  // Perform DCC/DDU common plot analysis (Phi ones)
105  TH2F * BXvsQual = getHisto<TH2F>(igetter.get(getMEName("BXvsQual","LocalTriggerPhi", chId)));
106  if ( BXvsQual ) {
107 
108  if (BXvsQual->GetEntries()>1) {
109 
110  TH1D* BX = BXvsQual->ProjectionY();
111  int BXOK_bin = BX->GetMaximumBin();
112  double BXMean = BX->GetMean();
113  double BX_OK = BXvsQual->GetYaxis()->GetBinCenter(BXOK_bin);
114  delete BX;
115 
116  if( whME[wh].find(fullName("CorrectBXPhi")) == whME[wh].end() ){
117  bookWheelHistos(ibooker,wh,"ResidualBXPhi");
118  bookWheelHistos(ibooker,wh,"CorrectBXPhi");
119  }
120 
121  std::map<std::string,MonitorElement*> *innerME = &(whME[wh]);
122  innerME->find(fullName("CorrectBXPhi"))->second->setBinContent(sect,stat,BX_OK+0.00001);
123  innerME->find(fullName("ResidualBXPhi"))->second->setBinContent(sect,stat,round(25.*(BXMean-BX_OK))+0.00001);
124  }
125 
126  }
127  }
128  }
129  }
130  }
131  }
132 
133 }
std::vector< std::string > trigSources
std::map< int, std::map< std::string, MonitorElement * > > whME
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
#define end
Definition: vmac.h:37
std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId &chambid)
Get the ME name (by chamber)
std::vector< std::string > hwSources
void bookWheelHistos(DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="")
Book the new MEs (for each wheel)
std::string fullName(std::string htype)
Create fullname from histo partial name.

Member Data Documentation

bool DTLocalTriggerTPTest::bookingdone
private

Definition at line 46 of file DTLocalTriggerTPTest.h.