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
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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 20 of file DTLocalTriggerTPTest.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 36 of file DTLocalTriggerTPTest.cc.

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

Destructor.

Definition at line 46 of file DTLocalTriggerTPTest.cc.

46  {
47 
48 }

Member Function Documentation

void DTLocalTriggerTPTest::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 50 of file DTLocalTriggerTPTest.cc.

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

50  {
51 
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 
61  //Booking
62  if(parameters.getUntrackedParameter<bool>("staticBooking", true)){
63  for (; iTr != trEnd; ++iTr){
64  trigSource = (*iTr);
65  for (; iHw != hwEnd; ++iHw){
66  hwSource = (*iHw);
67  // Loop over the TriggerUnits
68  for (int wh=-2; wh<=2; ++wh){
69  bookWheelHistos(wh,"CorrectBXPhi");
70  bookWheelHistos(wh,"ResidualBXPhi");
71  }
72  }
73  }
74  }
75 
76 }
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 79 of file DTLocalTriggerTPTest.cc.

References DTLocalTriggerBaseTest::beginRun().

79  {
80 
82 
83 }
void beginRun(edm::Run const &run, edm::EventSetup const &context)
BeginRun.
void DTLocalTriggerTPTest::runClientDiagnostic ( )
protectedvirtual

Run client analysis.

Implements DTLocalTriggerBaseTest.

Definition at line 86 of file DTLocalTriggerTPTest.cc.

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

86  {
87 
88  // Loop over Trig & Hw sources
89  for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr){
90  trigSource = (*iTr);
91  for (vector<string>::const_iterator iHw = hwSources.begin(); iHw != hwSources.end(); ++iHw){
92  hwSource = (*iHw);
93  // Loop over the TriggerUnits
94  for (int stat=1; stat<=4; ++stat){
95  for (int wh=-2; wh<=2; ++wh){
96  for (int sect=1; sect<=12; ++sect){
97  DTChamberId chId(wh,stat,sect);
98  // int sector_id = (wh+3)+(sect-1)*5;
99  // uint32_t indexCh = chId.rawId();
100 
101 
102  // Perform DCC/DDU common plot analysis (Phi ones)
103  TH2F * BXvsQual = getHisto<TH2F>(dbe->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(wh,"ResidualBXPhi");
116  bookWheelHistos(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
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:38
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1473
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.