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
DTLocalTriggerTPTest Class Reference

#include <DTLocalTriggerTPTest.h>

Inheritance diagram for DTLocalTriggerTPTest:
DTLocalTriggerBaseTest edm::EDAnalyzer 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 edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void beginJob ()
 BeginJob. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void runClientDiagnostic ()
 Run client analysis. More...
 
- Protected Member Functions inherited from DTLocalTriggerBaseTest
void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
 Perform begin lumiblock operations. More...
 
void bookCmsHistos (std::string hTag, std::string folder="", bool isGlb=false)
 Book the new MEs (CMS summary) More...
 
void bookSectorHistos (int wheel, int sector, std::string hTag, std::string folder="")
 Book the new MEs (for each sector) More...
 
void bookWheelHistos (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 endJob ()
 EndJob. More...
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
 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)
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Attributes inherited from DTLocalTriggerBaseTest
std::string baseFolderDCC
 
std::string baseFolderDDU
 
std::map< std::string,
MonitorElement * > 
cmsME
 
DQMStoredbe
 
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 18 of file DTLocalTriggerTPTest.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 34 of file DTLocalTriggerTPTest.cc.

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

Destructor.

Definition at line 44 of file DTLocalTriggerTPTest.cc.

44  {
45 
46 }

Member Function Documentation

void DTLocalTriggerTPTest::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 48 of file DTLocalTriggerTPTest.cc.

References DTLocalTriggerBaseTest::beginJob(), and Parameters::parameters.

48  {
49 
51 
52 
53  vector<string>::const_iterator iTr = trigSources.begin();
54  vector<string>::const_iterator trEnd = trigSources.end();
55  vector<string>::const_iterator iHw = hwSources.begin();
56  vector<string>::const_iterator hwEnd = hwSources.end();
57 
58 
59  //Booking
60  if(parameters.getUntrackedParameter<bool>("staticBooking", true)){
61  for (; iTr != trEnd; ++iTr){
62  trigSource = (*iTr);
63  for (; iHw != hwEnd; ++iHw){
64  hwSource = (*iHw);
65  // Loop over the TriggerUnits
66  for (int wh=-2; wh<=2; ++wh){
67  bookWheelHistos(wh,"CorrectBXPhi");
68  bookWheelHistos(wh,"ResidualBXPhi");
69  }
70  }
71  }
72  }
73 
74 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > trigSources
void bookWheelHistos(int wheel, std::string hTag, std::string folder="")
Book the new MEs (for each wheel)
std::vector< std::string > hwSources
void DTLocalTriggerTPTest::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 77 of file DTLocalTriggerTPTest.cc.

References DTLocalTriggerBaseTest::beginRun().

77  {
78 
80 
81 }
void beginRun(edm::Run const &run, edm::EventSetup const &context)
BeginRun.
void DTLocalTriggerTPTest::runClientDiagnostic ( )
protectedvirtual

Run client analysis.

Implements DTLocalTriggerBaseTest.

Definition at line 84 of file DTLocalTriggerTPTest.cc.

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

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