CMS 3D CMS Logo

Public Member Functions | Protected Member Functions

DTLocalTriggerTPTest Class Reference

#include <DTLocalTriggerTPTest.h>

Inheritance diagram for DTLocalTriggerTPTest:
DTLocalTriggerBaseTest edm::EDAnalyzer

List of all members.

Public Member Functions

 DTLocalTriggerTPTest (const edm::ParameterSet &ps)
 Constructor.
virtual ~DTLocalTriggerTPTest ()
 Destructor.

Protected Member Functions

void beginJob ()
 BeginJob.
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun.
void runClientDiagnostic ()
 Run client analysis.

Detailed Description

* DQM Test Client

Date:
2010/01/05 10:15:46
Revision:
1.2
Author:
C. Battilana S. Marcellini - INFN Bologna

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.

                                                                   {

  setConfig(ps,"DTLocalTriggerTP");
  baseFolderDCC = "DT/11-LocalTriggerTP-DCC/";
  baseFolderDDU = "DT/12-LocalTriggerTP-DDU/";
  

}
DTLocalTriggerTPTest::~DTLocalTriggerTPTest ( ) [virtual]

Destructor.

Definition at line 46 of file DTLocalTriggerTPTest.cc.

                                           {

}

Member Function Documentation

void DTLocalTriggerTPTest::beginJob ( void  ) [protected, virtual]

BeginJob.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 50 of file DTLocalTriggerTPTest.cc.

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

                                   {
  
  DTLocalTriggerBaseTest::beginJob();


  vector<string>::const_iterator iTr   = trigSources.begin();
  vector<string>::const_iterator trEnd = trigSources.end();
  vector<string>::const_iterator iHw   = hwSources.begin();
  vector<string>::const_iterator hwEnd = hwSources.end();


  //Booking
  if(parameters.getUntrackedParameter<bool>("staticBooking", true)){
    for (; iTr != trEnd; ++iTr){
      trigSource = (*iTr);
      for (; iHw != hwEnd; ++iHw){
        hwSource = (*iHw);
        // Loop over the TriggerUnits
        for (int wh=-2; wh<=2; ++wh){
          bookWheelHistos(wh,"CorrectBXPhi");
          bookWheelHistos(wh,"ResidualBXPhi");
        }
      }
    }
  }

}
void DTLocalTriggerTPTest::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

BeginRun.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 79 of file DTLocalTriggerTPTest.cc.

References DTLocalTriggerBaseTest::beginRun().

void DTLocalTriggerTPTest::runClientDiagnostic ( ) [protected, virtual]

Run client analysis.

Implements DTLocalTriggerBaseTest.

Definition at line 86 of file DTLocalTriggerTPTest.cc.

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

                                               {

  // Loop over Trig & Hw sources
  for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr){
    trigSource = (*iTr);
    for (vector<string>::const_iterator iHw = hwSources.begin(); iHw != hwSources.end(); ++iHw){
      hwSource = (*iHw);
      // Loop over the TriggerUnits
      for (int stat=1; stat<=4; ++stat){
        for (int wh=-2; wh<=2; ++wh){
          for (int sect=1; sect<=12; ++sect){
            DTChamberId chId(wh,stat,sect);
            // int sector_id = (wh+3)+(sect-1)*5;
            // uint32_t indexCh = chId.rawId();
            

            // Perform DCC/DDU common plot analysis (Phi ones)
            TH2F * BXvsQual      = getHisto<TH2F>(dbe->get(getMEName("BXvsQual","LocalTriggerPhi", chId)));
            if ( BXvsQual ) {

              if (BXvsQual->GetEntries()>1) {
              
                TH1D* BX    = BXvsQual->ProjectionY();
                int BXOK_bin  = BX->GetMaximumBin();
                double BXMean = BX->GetMean();
                double BX_OK  = BXvsQual->GetYaxis()->GetBinCenter(BXOK_bin);
                delete BX;

                if( whME[wh].find(fullName("CorrectBXPhi")) == whME[wh].end() ){
                  bookWheelHistos(wh,"ResidualBXPhi");
                  bookWheelHistos(wh,"CorrectBXPhi");
                }
           
                std::map<std::string,MonitorElement*> *innerME = &(whME[wh]);
                innerME->find(fullName("CorrectBXPhi"))->second->setBinContent(sect,stat,BX_OK+0.00001);
                innerME->find(fullName("ResidualBXPhi"))->second->setBinContent(sect,stat,round(25.*(BXMean-BX_OK))+0.00001);
              }
              
            }
          }
        }
      }
    }
  }     

}