CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

SusyPostProcessor Class Reference

#include <SusyPostProcessor.h>

Inheritance diagram for SusyPostProcessor:
edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup)
virtual void beginJob (void)
virtual void beginRun (const edm::Run &, const edm::EventSetup &iSetup)
virtual void endJob ()
void endRun (const edm::Run &, const edm::EventSetup &)
 SusyPostProcessor (const edm::ParameterSet &pSet)
 ~SusyPostProcessor ()

Private Member Functions

void QuantilePlots (MonitorElement *ME, double q_value)

Private Attributes

std::vector< std::string > Dirs
DQMStoredqm
std::vector< MonitorElement * > histoVector
edm::ParameterSet iConfig
std::string SUSYFolder

Detailed Description

Definition at line 26 of file SusyPostProcessor.h.


Constructor & Destructor Documentation

SusyPostProcessor::SusyPostProcessor ( const edm::ParameterSet pSet) [explicit]
SusyPostProcessor::~SusyPostProcessor ( )

Definition at line 20 of file SusyPostProcessor.cc.

                                     {
}

Member Function Documentation

void SusyPostProcessor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 29 of file SusyPostProcessor.cc.

                                                                                  {
}
void SusyPostProcessor::beginJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 23 of file SusyPostProcessor.cc.

                                    {
}
void SusyPostProcessor::beginRun ( const edm::Run ,
const edm::EventSetup iSetup 
) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 26 of file SusyPostProcessor.cc.

                                                                          {
}
void SusyPostProcessor::endJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 90 of file SusyPostProcessor.cc.

{}
void SusyPostProcessor::endRun ( const edm::Run ,
const edm::EventSetup  
) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 64 of file SusyPostProcessor.cc.

References gather_cfg::cout, newFWLiteAna::found, and i.

{
  //std::cout<<"here 1"<<std::endl;
  dqm->setCurrentFolder(SUSYFolder);
  Dirs = dqm->getSubdirs();
  for (int i=0; i<int(Dirs.size()); i++)
    {
      //std::cout<<Dirs[i]<<std::endl;
      size_t found = Dirs[i].find("Alpha");
      if (found!=string::npos) continue;
      //std::cout<<string::npos<<std::endl;
      if(!dqm->dirExists(Dirs[i])){
        cout << "Directory "<<Dirs[i]<<" doesn't exist!!" << std::endl;
        continue;
      }
      
      vector<MonitorElement*> histoVector = dqm->getContents(Dirs[i]);

      for (int i=0; i<int(histoVector.size()); i++) {
        std::cout<<histoVector[i]->getTH1()->GetName()<<std::endl;
        QuantilePlots(histoVector[i],0.05);
      } 
    }
}
void SusyPostProcessor::QuantilePlots ( MonitorElement ME,
double  q_value 
) [private]

Definition at line 32 of file SusyPostProcessor.cc.

References MonitorElement::Fill(), MonitorElement::getPathname(), MonitorElement::getTH1(), timingPdfMaker::mean, mergeVDriftHistosByStation::name, and lumiQueryAPI::q.

{
  if(ME->getTH1()->GetEntries()>0.)
    {
      Quantile q(static_cast<const TH1*>(ME->getTH1()));
      Float_t mean=q[q_value].first;
      Float_t RMS=q[q_value].second;
      
      Float_t xLow=-5.5;
      Float_t xUp=9.5;
      Int_t NBin=15;
      
      if(mean>0.)
        {
          Float_t DBin=RMS*TMath::Sqrt(12.)/2.;
          xLow=mean-int(mean/DBin+2)*DBin;
          xUp=int(0.2*mean/DBin)*DBin+mean+5*DBin;
          NBin=(xUp-xLow)/DBin;
        }

      dqm->setCurrentFolder(ME->getPathname());
      TString name=ME->getTH1()->GetName();
      name+="_quant";
      //std::cout<<name<<std::endl;
      ME=dqm->book1D(name,"",NBin, xLow, xUp);
      ME->Fill(mean-RMS);
      ME->Fill(mean+RMS);
    }
}

Member Data Documentation

std::vector<std::string> SusyPostProcessor::Dirs [private]

Definition at line 48 of file SusyPostProcessor.h.

Definition at line 46 of file SusyPostProcessor.h.

Definition at line 47 of file SusyPostProcessor.h.

Definition at line 41 of file SusyPostProcessor.h.

std::string SusyPostProcessor::SUSYFolder [private]

Definition at line 44 of file SusyPostProcessor.h.