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
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 ()
 
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 Bookings (DQMStore::IBooker &, DQMStore::IGetter &)
 
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 dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 Perform client diagnostic in online. 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::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
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 81 of file DTLocalTriggerTPTest.cc.

References DTLocalTriggerBaseTest::beginRun().

81  {
82 
84 
85 }
void beginRun(edm::Run const &run, edm::EventSetup const &context)
BeginRun.
void DTLocalTriggerTPTest::Bookings ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
protected

Definition at line 53 of file DTLocalTriggerTPTest.cc.

References Parameters::parameters.

53  {
54 
55  vector<string>::const_iterator iTr = trigSources.begin();
56  vector<string>::const_iterator trEnd = trigSources.end();
57  vector<string>::const_iterator iHw = hwSources.begin();
58  vector<string>::const_iterator hwEnd = hwSources.end();
59 
60  //Booking
61  if(parameters.getUntrackedParameter<bool>("staticBooking", true)){
62  for (; iTr != trEnd; ++iTr){
63  trigSource = (*iTr);
64  for (; iHw != hwEnd; ++iHw){
65  hwSource = (*iHw);
66  // Loop over the TriggerUnits
67  for (int wh=-2; wh<=2; ++wh){
68  bookWheelHistos(ibooker,wh,"CorrectBXPhi");
69  bookWheelHistos(ibooker,wh,"ResidualBXPhi");
70  }
71  }
72  }
73  }
74 
75 
76  bookingdone = 1;
77 
78 }
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 87 of file DTLocalTriggerTPTest.cc.

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

88  {
89  if (!bookingdone) Bookings(ibooker,igetter);
90 
91  // Loop over Trig & Hw sources
92  for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr){
93  trigSource = (*iTr);
94  for (vector<string>::const_iterator iHw = hwSources.begin(); iHw != hwSources.end(); ++iHw){
95  hwSource = (*iHw);
96  // Loop over the TriggerUnits
97  for (int stat=1; stat<=4; ++stat){
98  for (int wh=-2; wh<=2; ++wh){
99  for (int sect=1; sect<=12; ++sect){
100  DTChamberId chId(wh,stat,sect);
101 
102  // Perform DCC/DDU common plot analysis (Phi ones)
103  TH2F * BXvsQual = getHisto<TH2F>(igetter.get(getMEName("BXvsQual","LocalTriggerPhi", chId)));
104  if ( BXvsQual ) {
105 
106  if (BXvsQual->GetEntries()>1) {
107 
108  TH1D* BX = BXvsQual->ProjectionY();
109  int BXOK_bin = BX->GetMaximumBin();
110  double BXMean = BX->GetMean();
111  double BX_OK = BXvsQual->GetYaxis()->GetBinCenter(BXOK_bin);
112  delete BX;
113 
114  if( whME[wh].find(fullName("CorrectBXPhi")) == whME[wh].end() ){
115  bookWheelHistos(ibooker,wh,"ResidualBXPhi");
116  bookWheelHistos(ibooker,wh,"CorrectBXPhi");
117  }
118 
119  std::map<std::string,MonitorElement*> *innerME = &(whME[wh]);
120  innerME->find(fullName("CorrectBXPhi"))->second->setBinContent(sect,stat,BX_OK+0.00001);
121  innerME->find(fullName("ResidualBXPhi"))->second->setBinContent(sect,stat,round(25.*(BXMean-BX_OK))+0.00001);
122  }
123 
124  }
125  }
126  }
127  }
128  }
129  }
130 
131 }
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 Bookings(DQMStore::IBooker &, DQMStore::IGetter &)
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 43 of file DTLocalTriggerTPTest.h.