CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes

ZdcSimHitStudy Class Reference

#include <ZdcSimHitStudy.h>

Inheritance diagram for ZdcSimHitStudy:
edm::EDAnalyzer

List of all members.

Public Member Functions

 ZdcSimHitStudy (const edm::ParameterSet &ps)
 ~ZdcSimHitStudy ()

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
void analyzeHits (std::vector< PCaloHit > &)
void beginJob ()
void endJob ()
int FillHitValHist (int side, int section, int channel, double energy, double time)

Private Attributes

bool checkHit_
DQMStoredbe_
double enetot
double enetotEmN
double enetotEmP
double enetotHadN
double enetotHadP
double enetotN
double enetotP
std::string g4Label
MonitorElementmeAllZdcNHit_
MonitorElementmeBadZdcDetHit_
MonitorElementmeBadZdcIdHit_
MonitorElementmeBadZdcSecHit_
MonitorElementmeZdc10Ene_
MonitorElementmeZdc10EneP_
MonitorElementmeZdcChannelHit_
MonitorElementmeZdcCorEEmNEHadN_
MonitorElementmeZdcCorEEmPEHadP_
MonitorElementmeZdcCorEtotNEtotP_
MonitorElementmeZdcDetectHit_
MonitorElementmeZdcEEMCh_
MonitorElementmeZdcEHadCh_
MonitorElementmeZdcEMEnergyHit_
MonitorElementmeZdcEML10EneP_
MonitorElementmeZdcEneEmN1_
MonitorElementmeZdcEneEmN2_
MonitorElementmeZdcEneEmN3_
MonitorElementmeZdcEneEmN4_
MonitorElementmeZdcEneEmN5_
MonitorElementmeZdcEneEmNTot_
MonitorElementmeZdcEneEmP1_
MonitorElementmeZdcEneEmP2_
MonitorElementmeZdcEneEmP3_
MonitorElementmeZdcEneEmP4_
MonitorElementmeZdcEneEmP5_
MonitorElementmeZdcEneEmPTot_
MonitorElementmeZdcEneHadN1_
MonitorElementmeZdcEneHadN2_
MonitorElementmeZdcEneHadN3_
MonitorElementmeZdcEneHadN4_
MonitorElementmeZdcEneHadNTot_
MonitorElementmeZdcEneHadP1_
MonitorElementmeZdcEneHadP2_
MonitorElementmeZdcEneHadP3_
MonitorElementmeZdcEneHadP4_
MonitorElementmeZdcEneHadPTot_
MonitorElementmeZdcEneNTot_
MonitorElementmeZdcEnePTot_
MonitorElementmeZdcEnergyHit_
MonitorElementmeZdcEneTEmN1_
MonitorElementmeZdcEneTEmN2_
MonitorElementmeZdcEneTEmN3_
MonitorElementmeZdcEneTEmN4_
MonitorElementmeZdcEneTEmN5_
MonitorElementmeZdcEneTEmP1_
MonitorElementmeZdcEneTEmP2_
MonitorElementmeZdcEneTEmP3_
MonitorElementmeZdcEneTEmP4_
MonitorElementmeZdcEneTEmP5_
MonitorElementmeZdcEneTHadN1_
MonitorElementmeZdcEneTHadN2_
MonitorElementmeZdcEneTHadN3_
MonitorElementmeZdcEneTHadN4_
MonitorElementmeZdcEneTHadP1_
MonitorElementmeZdcEneTHadP2_
MonitorElementmeZdcEneTHadP3_
MonitorElementmeZdcEneTHadP4_
MonitorElementmeZdcEneTot_
MonitorElementmeZdcETime_
MonitorElementmeZdcHadEnergyHit_
MonitorElementmeZdcHadL10EneP_
MonitorElementmeZdcNHit_
MonitorElementmeZdcNHitEM_
MonitorElementmeZdcNHitHad_
MonitorElementmeZdcNHitLum_
MonitorElementmeZdcSectionHit_
MonitorElementmeZdcSideHit_
MonitorElementmeZdcTimeHit_
MonitorElementmeZdcTimeWHit_
std::string outFile_
bool verbose_
std::string zdcHits

Detailed Description

Definition at line 28 of file ZdcSimHitStudy.h.


Constructor & Destructor Documentation

ZdcSimHitStudy::ZdcSimHitStudy ( const edm::ParameterSet ps)

Definition at line 7 of file ZdcSimHitStudy.cc.

References checkHit_, dbe_, g4Label, edm::ParameterSet::getUntrackedParameter(), cmsCodeRules::cppFunctionSkipper::operator, outFile_, DQMStore::setVerbose(), DQMStore::showDirStructure(), stor::utils::sleep(), verbose_, and zdcHits.

                                                        {

  g4Label  = ps.getUntrackedParameter<std::string>("moduleLabel","g4SimHits");
  zdcHits = ps.getUntrackedParameter<std::string>("HitCollection","ZdcHits");
  outFile_ = ps.getUntrackedParameter<std::string>("outputFile", "zdcHitStudy.root");
  verbose_ = ps.getUntrackedParameter<bool>("Verbose", false);
  checkHit_= true;

  edm::LogInfo("ZdcSimHitStudy") 
    //std::cout
    << "Module Label: " << g4Label << "   Hits: "
    << zdcHits << " / "<< checkHit_ 
    << "   Output: " << outFile_;

  dbe_ = edm::Service<DQMStore>().operator->();
  if (dbe_) {
    if (verbose_) {
      dbe_->setVerbose(1);
      sleep (3);
      dbe_->showDirStructure();
    } else {
      dbe_->setVerbose(0);
    }
  }
}
ZdcSimHitStudy::~ZdcSimHitStudy ( )

Definition at line 33 of file ZdcSimHitStudy.cc.

{}

Member Function Documentation

void ZdcSimHitStudy::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Implements edm::EDAnalyzer.

Definition at line 116 of file ZdcSimHitStudy.cc.

References analyzeHits(), checkHit_, edm::EventID::event(), g4Label, edm::Event::getByLabel(), edm::EventBase::id(), edm::HandleBase::isValid(), LogDebug, edm::EventID::run(), and zdcHits.

                                                                     {

  LogDebug("ZdcSimHitStudy") 
    //std::cout
    << "Run = " << e.id().run() << " Event = " 
    << e.id().event();
  //std::cout<<std::endl;
  
  std::vector<PCaloHit>               caloHits;
  edm::Handle<edm::PCaloHitContainer> hitsZdc;

  bool getHits = false;
  if (checkHit_) {
    e.getByLabel(g4Label,zdcHits,hitsZdc); 
    if (hitsZdc.isValid()) getHits = true;
  }

  LogDebug("ZdcSim") << "ZdcValidation: Input flags Hits " << getHits;

  if (getHits) {
    caloHits.insert(caloHits.end(),hitsZdc->begin(),hitsZdc->end());
    LogDebug("ZdcSimHitStudy") 
      //std::cout
      << "ZdcValidation: Hit buffer " 
      << caloHits.size();
      //<< std::endl;
    analyzeHits (caloHits);
  }
}
void ZdcSimHitStudy::analyzeHits ( std::vector< PCaloHit > &  hits) [protected]

Definition at line 146 of file ZdcSimHitStudy.cc.

References dbe_, HcalZDCDetId::EM, relval_parameters_module::energy, enetot, enetotEmN, enetotEmP, enetotHadN, enetotHadP, enetotN, enetotP, MonitorElement::Fill(), FillHitValHist(), HcalZDCDetId::HAD, i, LogDebug, HcalZDCDetId::LUM, meAllZdcNHit_, meBadZdcDetHit_, meBadZdcIdHit_, meBadZdcSecHit_, meZdc10Ene_, meZdcChannelHit_, meZdcCorEEmNEHadN_, meZdcCorEEmPEHadP_, meZdcCorEtotNEtotP_, meZdcDetectHit_, meZdcEEMCh_, meZdcEHadCh_, meZdcEMEnergyHit_, meZdcEML10EneP_, meZdcEneEmNTot_, meZdcEneEmPTot_, meZdcEneHadNTot_, meZdcEneHadPTot_, meZdcEnePTot_, meZdcEnergyHit_, meZdcEneTot_, meZdcETime_, meZdcHadEnergyHit_, meZdcHadL10EneP_, meZdcNHitEM_, meZdcNHitHad_, meZdcNHitLum_, meZdcSectionHit_, meZdcSideHit_, meZdcTimeHit_, meZdcTimeWHit_, and cond::rpcobgas::time.

Referenced by analyze().

                                                         {
  int nHit = hits.size();
  int nZdcEM = 0, nZdcHad = 0, nZdcLum = 0; 
  int nBad1=0, nBad2=0, nBad=0;
  std::vector<double> encontZdcEM(140, 0.);
  std::vector<double> encontZdcHad(140, 0.);
  double entotZdcEM = 0;
  double entotZdcHad = 0;
 
  enetotEmN = 0;
  enetotHadN = 0.;
  enetotN = 0;  
  enetotEmP = 0;
  enetotHadP = 0;
  enetotP = 0;
  enetot = 0;
  
  for (int i=0; i<nHit; i++) {
    double energy    = hits[i].energy();
    double log10en   = log10(energy);
    int log10i       = int( (log10en+10.)*10. );
    double time      = hits[i].time();
    unsigned int id_ = hits[i].id();
    HcalZDCDetId id  = HcalZDCDetId(id_);
    int det          = id.det();
    int side         = id.zside();
    int section      = id.section();
    int channel      = id.channel();

    FillHitValHist(side,section,channel,energy,time);
  
    
    LogDebug("ZdcSimHitStudy") 
      //std::cout
      << "Hit[" << i << "] ID " << std::hex << id_ 
      << std::dec <<" DetID "<<id
      << " Det "<< det << " side "<< side 
      << " Section " << section
      << " channel "<< channel
      << " E " << energy 
      << " time \n" << time;
      //<<std::endl;

    if(det == 5) { // Check DetId.h
      if(section == HcalZDCDetId::EM)nZdcEM++;
      else if(section == HcalZDCDetId::HAD)nZdcHad++;
      else if(section == HcalZDCDetId::LUM)nZdcLum++;
      else    { nBad++;  nBad2++;}
    } else    { nBad++;  nBad1++;}
    if (dbe_) {
      meZdcDetectHit_->Fill(double(det));
      if (det ==  5) {
        meZdcSideHit_->Fill(double(side));
        meZdcSectionHit_->Fill(double(section));
        meZdcChannelHit_->Fill(double(channel));
        meZdcEnergyHit_->Fill(energy);
      if(section == HcalZDCDetId::EM){
        meZdcEMEnergyHit_->Fill(energy);
        meZdcEEMCh_->Fill(energy,channel);
        if( log10i >=0 && log10i < 140 )encontZdcEM[log10i] += energy;
        entotZdcEM += energy;
      }
      if(section == HcalZDCDetId::HAD){
        meZdcHadEnergyHit_->Fill(energy);
        meZdcEHadCh_->Fill(energy,channel);
        if( log10i >=0 && log10i < 140 )encontZdcHad[log10i] += energy;
        entotZdcHad += energy;
      } 
      meZdcTimeHit_->Fill(time);
      meZdcTimeWHit_->Fill(double(time),energy);
      meZdc10Ene_->Fill(log10en);
      meZdcETime_->Fill(energy, double(time));
      }
    }
  }

  if( entotZdcEM  != 0 ) for( int i=0; i<140; i++ ) meZdcEML10EneP_->Fill( -10.+(float(i)+0.5)/10., encontZdcEM[i]/entotZdcEM);
  if( entotZdcHad != 0 ) for( int i=0; i<140; i++ ) meZdcHadL10EneP_->Fill( -10.+(float(i)+0.5)/10.,encontZdcHad[i]/entotZdcHad);
  
  if (dbe_ && nHit>0) {
    meAllZdcNHit_->Fill(double(nHit));
    meBadZdcDetHit_->Fill(double(nBad1));
    meBadZdcSecHit_->Fill(double(nBad2));
    meBadZdcIdHit_->Fill(double(nBad));
    meZdcNHitEM_->Fill(double(nZdcEM));
    meZdcNHitHad_->Fill(double(nZdcHad));
    meZdcNHitLum_->Fill(double(nZdcLum)); 
    meZdcEnePTot_->Fill(enetotP);
    meZdcEneHadNTot_->Fill(enetotHadN);
    meZdcEneHadPTot_->Fill(enetotHadP);
    meZdcEneEmNTot_->Fill(enetotEmN);
    meZdcEneEmPTot_->Fill(enetotEmP);
    meZdcCorEEmNEHadN_->Fill(enetotEmN,enetotHadN);
    meZdcCorEEmPEHadP_->Fill(enetotEmP,enetotHadP);
    meZdcCorEtotNEtotP_->Fill(enetotN,enetotP);
    meZdcEneTot_->Fill(enetot);
  }
  LogDebug("HcalSimHitStudy") 
  //std::cout
    <<"HcalSimHitStudy::analyzeHits: Had " << nZdcHad 
    << " EM "<< nZdcEM
    << " Bad " << nBad << " All " << nHit;
    //<<std::endl;
}
void ZdcSimHitStudy::beginJob ( void  ) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 35 of file ZdcSimHitStudy.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), checkHit_, dbe_, meAllZdcNHit_, meBadZdcDetHit_, meBadZdcIdHit_, meBadZdcSecHit_, meZdc10Ene_, meZdcChannelHit_, meZdcCorEEmNEHadN_, meZdcCorEEmPEHadP_, meZdcCorEtotNEtotP_, meZdcDetectHit_, meZdcEEMCh_, meZdcEHadCh_, meZdcEMEnergyHit_, meZdcEML10EneP_, meZdcEneEmN1_, meZdcEneEmN2_, meZdcEneEmN3_, meZdcEneEmN4_, meZdcEneEmN5_, meZdcEneEmNTot_, meZdcEneEmP1_, meZdcEneEmP2_, meZdcEneEmP3_, meZdcEneEmP4_, meZdcEneEmP5_, meZdcEneEmPTot_, meZdcEneHadN1_, meZdcEneHadN2_, meZdcEneHadN3_, meZdcEneHadN4_, meZdcEneHadNTot_, meZdcEneHadP1_, meZdcEneHadP2_, meZdcEneHadP3_, meZdcEneHadP4_, meZdcEneHadPTot_, meZdcEneNTot_, meZdcEnePTot_, meZdcEnergyHit_, meZdcEneTEmN1_, meZdcEneTEmN2_, meZdcEneTEmN3_, meZdcEneTEmN4_, meZdcEneTEmN5_, meZdcEneTEmP1_, meZdcEneTEmP2_, meZdcEneTEmP3_, meZdcEneTEmP4_, meZdcEneTEmP5_, meZdcEneTHadN1_, meZdcEneTHadN2_, meZdcEneTHadN3_, meZdcEneTHadN4_, meZdcEneTHadP1_, meZdcEneTHadP2_, meZdcEneTHadP3_, meZdcEneTHadP4_, meZdcEneTot_, meZdcETime_, meZdcHadEnergyHit_, meZdcHadL10EneP_, meZdcNHitEM_, meZdcNHitHad_, meZdcNHitLum_, meZdcSectionHit_, meZdcSideHit_, meZdcTimeHit_, meZdcTimeWHit_, and DQMStore::setCurrentFolder().

                              {
  if (dbe_) {
    dbe_->setCurrentFolder("ZdcHitsV/ZdcSimHitsTask");
    //Histograms for Hits
    if (checkHit_) {
      meAllZdcNHit_ = dbe_->book1D("Hit01","Number of All Hits in Zdc",100,0.,100.);
      meBadZdcDetHit_= dbe_->book1D("Hit02","Hits with wrong Det in Zdc",100,0.,100.);
      meBadZdcSecHit_= dbe_->book1D("Hit03","Hits with wrong Section in Zdc",100,0.,100.);
      meBadZdcIdHit_ = dbe_->book1D("Hit04","Hits with wrong ID in Zdc",100,0.,100.);
      meZdcNHitEM_   = dbe_->book1D("Hit05","Number of Hits in Zdc EM",100,0.,100.);
      meZdcNHitHad_   = dbe_->book1D("Hit06","Number of Hits in Zdc Had",100,0.,100.);
      meZdcNHitLum_   = dbe_->book1D("Hit07","Number of Hits in Zdc Lum",100,0.,100.);
      meZdcDetectHit_= dbe_->book1D("Hit08","Calo Detector ID",50,0.,50.);
      meZdcSideHit_ = dbe_->book1D("Hit09","Side in Zdc",4,-2,2.);
      meZdcSectionHit_   = dbe_->book1D("Hit10","Section in Zdc",4,0.,4.);
      meZdcChannelHit_   = dbe_->book1D("Hit11","Channel in Zdc",10,0.,10.);
      meZdcEnergyHit_= dbe_->book1D("Hit12","Hits Energy",4000,0.,8000.);
      meZdcHadEnergyHit_= dbe_->book1D("Hit13","Hits Energy in Had Section",4000,0.,8000.);
      meZdcEMEnergyHit_ = dbe_->book1D("Hit14","Hits Energy in EM Section",4000,0.,8000.);
      meZdcTimeHit_  = dbe_->book1D("Hit15","Time in Zdc",300,0.,600.);
      meZdcTimeWHit_ = dbe_->book1D("Hit16","Time in Zdc (E wtd)", 300,0.,600.);
      meZdc10Ene_ = dbe_->book1D("Hit17","Log10Energy in Zdc", 140, -20., 20. );
      meZdcHadL10EneP_ = dbe_->bookProfile("Hit18","Log10Energy in Had Zdc vs Hit contribution", 140, -1., 20., 100, 0., 1. );
      meZdcEML10EneP_ = dbe_->bookProfile("Hit19","Log10Energy in EM Zdc vs Hit contribution", 140, -1., 20., 100, 0., 1. );
      meZdcEHadCh_ = dbe_->book2D("Hit20","Zdc Had Section Energy vs Channel", 4000, 0., 8000., 6, 0., 6. );
      meZdcEEMCh_ = dbe_->book2D("Hit21","Zdc EM Section Energy vs Channel", 4000, 0., 8000., 6, 0., 6. );
      meZdcETime_ = dbe_->book2D("Hit22","Hits Zdc Energy vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneEmN1_  = dbe_->book1D("HitVal01","Energy EM module N1",4000,0.,8000.);
      meZdcEneEmN2_  = dbe_->book1D("HitVal02","Energy EM module N2",4000,0.,8000.);
      meZdcEneEmN3_  = dbe_->book1D("HitVal03","Energy EM module N3",4000,0.,8000.);
      meZdcEneEmN4_  = dbe_->book1D("HitVal04","Energy EM module N4",4000,0.,8000.);
      meZdcEneEmN5_  = dbe_->book1D("HitVal05","Energy EM module N5",4000,0.,8000.);
      meZdcEneHadN1_ = dbe_->book1D("HitVal06","Energy HAD module N1",4000,0.,8000.);
      meZdcEneHadN2_ = dbe_->book1D("HitVal07","Energy HAD module N2",4000,0.,8000.);
      meZdcEneHadN3_ = dbe_->book1D("HitVal08","Energy HAD module N3",4000,0.,8000.);
      meZdcEneHadN4_ = dbe_->book1D("HitVal09","Energy HAD module N4",4000,0.,8000.);
      meZdcEneTEmN1_ = dbe_->book2D("HitVal11","Energy EM mod N1 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTEmN2_ = dbe_->book2D("HitVal12","Energy EM mod N2 vs Time", 4000, 0., 8000., 300, 0., 600. ); 
      meZdcEneTEmN3_ = dbe_->book2D("HitVal13","Energy EM mod N3 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTEmN4_ = dbe_->book2D("HitVal14","Energy EM mod N4 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTEmN5_ = dbe_->book2D("HitVal15","Energy EM mod N5 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTHadN1_ = dbe_->book2D("HitVal16","Energy HAD mod N1 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTHadN2_ = dbe_->book2D("HitVal17","Energy HAD mod N2 vs Time", 4000, 0., 8000., 300, 0., 600. ); 
      meZdcEneTHadN3_ = dbe_->book2D("HitVal18","Energy HAD mod N3 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTHadN4_ = dbe_->book2D("HitVal19","Energy HAD mod N4 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneHadNTot_ = dbe_->book1D("HitVal20","Total HAD Energy N",4000,0.,8000.);
      meZdcEneEmNTot_  = dbe_->book1D("HitVal21","Total EM Energy N",4000,0.,8000.);
      meZdcEneNTot_    = dbe_->book1D("HitVal22","Total Energy N",4000,0.,8000.);
      meZdcEneEmP1_  = dbe_->book1D("HitVal23","Energy EM module P1",4000,0.,8000.);
      meZdcEneEmP2_  = dbe_->book1D("HitVal24","Energy EM module P2",4000,0.,8000.);
      meZdcEneEmP3_  = dbe_->book1D("HitVal25","Energy EM module P3",4000,0.,8000.);
      meZdcEneEmP4_  = dbe_->book1D("HitVal26","Energy EM module P4",4000,0.,8000.);
      meZdcEneEmP5_  = dbe_->book1D("HitVal27","Energy EM module P5",4000,0.,8000.);
      meZdcEneHadP1_ = dbe_->book1D("HitVal29","Energy HAD module P1",4000,0.,8000.);
      meZdcEneHadP2_ = dbe_->book1D("HitVal29","Energy HAD module P2",4000,0.,8000.);
      meZdcEneHadP3_ = dbe_->book1D("HitVal30","Energy HAD module P3",4000,0.,8000.);
      meZdcEneHadP4_ = dbe_->book1D("HitVal31","Energy HAD module P4",4000,0.,8000.);
      meZdcEneTEmP1_ = dbe_->book2D("HitVal32","Energy EM mod P1 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTEmP2_ = dbe_->book2D("HitVal33","Energy EM mod P2 vs Time", 4000, 0., 8000., 300, 0., 600. ); 
      meZdcEneTEmP3_ = dbe_->book2D("HitVal34","Energy EM mod P3 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTEmP4_ = dbe_->book2D("HitVal35","Energy EM mod P4 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTEmP5_ = dbe_->book2D("HitVal36","Energy EM mod P5 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTHadP1_ = dbe_->book2D("HitVal37","Energy HAD mod P1 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTHadP2_ = dbe_->book2D("HitVal38","Energy HAD mod P2 vs Time", 4000, 0., 8000., 300, 0., 600. ); 
      meZdcEneTHadP3_ = dbe_->book2D("HitVal39","Energy HAD mod P3 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneTHadP4_ = dbe_->book2D("HitVal40","Energy HAD mod P4 vs Time", 4000, 0., 8000., 300, 0., 600. );
      meZdcEneHadPTot_ = dbe_->book1D("HitVal41","Total HAD Energy P",4000,0.,8000.);
      meZdcEneEmPTot_  = dbe_->book1D("HitVal42","Total EM Energy P",4000,0.,8000.);
      meZdcEnePTot_    = dbe_->book1D("HitVal43","Total Energy P",4000,0.,8000.);
      meZdcCorEEmNEHadN_= dbe_->book2D("HitVal47","Energy EMN vs HADN", 4000, 0., 8000.,4000, 0., 8000.);
      meZdcCorEEmPEHadP_= dbe_->book2D("HitVal44","Energy EMP vs HADP", 4000, 0., 8000.,4000, 0., 8000.);
      meZdcCorEtotNEtotP_ = dbe_->book2D("HitVal45","Energy N vs P", 4000, 0., 8000.,4000, 0., 8000.);
      meZdcEneTot_ = dbe_->book1D("HitVal46","Total Energy ZDCs",4000,0.,8000.);
    }
  }
}
void ZdcSimHitStudy::endJob ( void  ) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 112 of file ZdcSimHitStudy.cc.

References dbe_, outFile_, and DQMStore::save().

                            {
  if (dbe_ && outFile_.size() > 0) dbe_->save(outFile_);
}
int ZdcSimHitStudy::FillHitValHist ( int  side,
int  section,
int  channel,
double  energy,
double  time 
) [protected]

Definition at line 251 of file ZdcSimHitStudy.cc.

References HcalZDCDetId::EM, relval_parameters_module::energy, enetot, enetotEmN, enetotEmP, enetotHadN, enetotHadP, enetotN, enetotP, MonitorElement::Fill(), HcalZDCDetId::HAD, meZdcEneEmN1_, meZdcEneEmN2_, meZdcEneEmN3_, meZdcEneEmN4_, meZdcEneEmP1_, meZdcEneEmP2_, meZdcEneEmP3_, meZdcEneEmP4_, meZdcEneHadN1_, meZdcEneHadN2_, meZdcEneHadN3_, meZdcEneHadN4_, meZdcEneHadP1_, meZdcEneHadP2_, meZdcEneHadP3_, meZdcEneHadP4_, meZdcEneTEmN1_, meZdcEneTEmN2_, meZdcEneTEmN3_, meZdcEneTEmN4_, meZdcEneTEmP1_, meZdcEneTEmP2_, meZdcEneTEmP3_, meZdcEneTEmP4_, meZdcEneTHadN1_, meZdcEneTHadN2_, meZdcEneTHadN3_, meZdcEneTHadN4_, meZdcEneTHadP1_, meZdcEneTHadP2_, meZdcEneTHadP3_, and meZdcEneTHadP4_.

Referenced by analyzeHits().

                                                                                            {  
  enetot += enetot;
  if(side == -1){
    enetotN += energy;
    if(section == HcalZDCDetId::EM){
      enetotEmN += energy;
      switch(channel){
      case 1 :
        meZdcEneEmN1_->Fill(energy);
        meZdcEneTEmN1_->Fill(energy,time);
        break;
      case 2 :
       meZdcEneEmN2_->Fill(energy);
       meZdcEneTEmN2_->Fill(energy,time);
        break;
      case 3 :
        meZdcEneEmN3_->Fill(energy);
       meZdcEneTEmN3_->Fill(energy,time);
        break;
      case 4 :
        meZdcEneEmN4_->Fill(energy);
        meZdcEneTEmN4_->Fill(energy,time);
        break; 
     case 5 :
        meZdcEneEmN4_->Fill(energy);
        meZdcEneTEmN4_->Fill(energy,time);
        break;
      }
    }
    if(section == HcalZDCDetId::HAD){
      enetotHadN += energy;
      switch(channel){
      case 1 :
        meZdcEneHadN1_->Fill(energy);
        meZdcEneTHadN1_->Fill(energy,time);
        break;
      case 2 :
        meZdcEneHadN2_->Fill(energy);
        meZdcEneTHadN2_->Fill(energy,time);
        break;
      case 3 :
        meZdcEneHadN3_->Fill(energy);
        meZdcEneTHadN3_->Fill(energy,time);
        break;
      case 4 :
        meZdcEneHadN4_->Fill(energy);
        meZdcEneTHadN4_->Fill(energy,time);
        break;
      }
    }
  }
  if(side == 1){
    enetotP += energy;
    if(section == HcalZDCDetId::EM){
      enetotEmP += energy;
      switch(channel){
      case 1 :
        meZdcEneEmP1_->Fill(energy);
        meZdcEneTEmP1_->Fill(energy,time);
        break;
      case 2 :
        meZdcEneEmP2_->Fill(energy);
        meZdcEneTEmP2_->Fill(energy,time);
        break;
      case 3 :
        meZdcEneEmP3_->Fill(energy);
        meZdcEneTEmP3_->Fill(energy,time);
        break;
      case 4 :
        meZdcEneEmP4_->Fill(energy);
        meZdcEneTEmP4_->Fill(energy,time);
        break; 
      case 5 :
        meZdcEneEmP4_->Fill(energy);
        meZdcEneTEmP4_->Fill(energy,time);
        break;
      }
    }
    if(section == HcalZDCDetId::HAD){
      enetotHadP += energy;
      switch(channel){
      case 1 :
        meZdcEneHadP1_->Fill(energy);
        meZdcEneTHadP1_->Fill(energy,time);
        break;
      case 2 :
        meZdcEneHadP2_->Fill(energy);
        meZdcEneTHadP2_->Fill(energy,time);
        break;
      case 3 :
        meZdcEneHadP3_->Fill(energy);
        meZdcEneTHadP3_->Fill(energy,time);
        break;
      case 4 :
        meZdcEneHadP4_->Fill(energy);
        meZdcEneTHadP4_->Fill(energy,time);
        break;
      }
    }
  }       
  return 0;
}

Member Data Documentation

bool ZdcSimHitStudy::checkHit_ [private]

Definition at line 49 of file ZdcSimHitStudy.h.

Referenced by analyze(), beginJob(), and ZdcSimHitStudy().

Definition at line 50 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), beginJob(), endJob(), and ZdcSimHitStudy().

double ZdcSimHitStudy::enetot [private]

Definition at line 45 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and FillHitValHist().

double ZdcSimHitStudy::enetotEmN [private]

Definition at line 43 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and FillHitValHist().

double ZdcSimHitStudy::enetotEmP [private]

Definition at line 44 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and FillHitValHist().

double ZdcSimHitStudy::enetotHadN [private]

Definition at line 43 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and FillHitValHist().

double ZdcSimHitStudy::enetotHadP [private]

Definition at line 44 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and FillHitValHist().

double ZdcSimHitStudy::enetotN [private]

Definition at line 43 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and FillHitValHist().

double ZdcSimHitStudy::enetotP [private]

Definition at line 44 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and FillHitValHist().

std::string ZdcSimHitStudy::g4Label [private]

Definition at line 48 of file ZdcSimHitStudy.h.

Referenced by analyze(), and ZdcSimHitStudy().

Definition at line 52 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 52 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 52 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 52 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 54 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 57 of file ZdcSimHitStudy.h.

Definition at line 55 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 63 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 69 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 69 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 53 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 57 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 57 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 56 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 57 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 58 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 58 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 58 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 58 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 58 of file ZdcSimHitStudy.h.

Referenced by beginJob().

Definition at line 62 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 64 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 64 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 64 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 64 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 64 of file ZdcSimHitStudy.h.

Referenced by beginJob().

Definition at line 68 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 59 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 59 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 59 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 59 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 62 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 65 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 65 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 65 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 65 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 68 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 62 of file ZdcSimHitStudy.h.

Referenced by beginJob().

Definition at line 68 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 55 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 60 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 60 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 60 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 60 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 60 of file ZdcSimHitStudy.h.

Referenced by beginJob().

Definition at line 66 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 66 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 66 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 66 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 66 of file ZdcSimHitStudy.h.

Referenced by beginJob().

Definition at line 61 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 61 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 61 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 61 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 67 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 67 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 67 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 67 of file ZdcSimHitStudy.h.

Referenced by beginJob(), and FillHitValHist().

Definition at line 69 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 53 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 56 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 56 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 53 of file ZdcSimHitStudy.h.

Definition at line 54 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 54 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 54 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 55 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 53 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 56 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

Definition at line 55 of file ZdcSimHitStudy.h.

Referenced by analyzeHits(), and beginJob().

std::string ZdcSimHitStudy::outFile_ [private]

Definition at line 48 of file ZdcSimHitStudy.h.

Referenced by endJob(), and ZdcSimHitStudy().

bool ZdcSimHitStudy::verbose_ [private]

Definition at line 49 of file ZdcSimHitStudy.h.

Referenced by ZdcSimHitStudy().

std::string ZdcSimHitStudy::zdcHits [private]

Definition at line 48 of file ZdcSimHitStudy.h.

Referenced by analyze(), and ZdcSimHitStudy().