CMS 3D CMS Logo

Public Member Functions | Private Attributes

MuonEnergyDepositAnalyzer Class Reference

#include <MuonEnergyDepositAnalyzer.h>

Inheritance diagram for MuonEnergyDepositAnalyzer:
MuonAnalyzerBase

List of all members.

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &, const reco::Muon &recoMu)
 Get the analysis.
void beginJob (DQMStore *dbe)
 Inizialize parameters for histo binning.
 MuonEnergyDepositAnalyzer (const edm::ParameterSet &, MuonServiceProxy *theService)
 Constructor.
virtual ~MuonEnergyDepositAnalyzer ()
 Destructor.

Private Attributes

MonitorElementecalDepEnergyBarrel
MonitorElementecalDepEnergyEndcap
MonitorElementecalS9DepEnergyBarrel
MonitorElementecalS9DepEnergyEndcap
MonitorElementecalS9PointingMuDepEnergy_Glb
MonitorElementecalS9PointingMuDepEnergy_Sta
MonitorElementecalS9PointingMuDepEnergy_Tk
int emNoBin
double emNoMax
double emNoMin
int emS9NoBin
double emS9NoMax
double emS9NoMin
int hadNoBin
double hadNoMax
double hadNoMin
int hadS9NoBin
double hadS9NoMax
double hadS9NoMin
MonitorElementhcalDepEnergyBarrel
MonitorElementhcalDepEnergyEndcap
MonitorElementhcalS9DepEnergyBarrel
MonitorElementhcalS9DepEnergyEndcap
MonitorElementhcalS9PointingMuDepEnergy_Glb
MonitorElementhcalS9PointingMuDepEnergy_Sta
MonitorElementhcalS9PointingMuDepEnergy_Tk
MonitorElementhoDepEnergy
int hoNoBin
double hoNoMax
double hoNoMin
MonitorElementhoS9DepEnergy
int hoS9NoBin
double hoS9NoMax
double hoS9NoMin
MonitorElementhoS9PointingMuDepEnergy_Glb
MonitorElementhoS9PointingMuDepEnergy_Sta
MonitorElementhoS9PointingMuDepEnergy_Tk
std::string metname
edm::ParameterSet parameters
edm::InputTag theSTACollectionLabel

Detailed Description

Definition at line 28 of file MuonEnergyDepositAnalyzer.h.


Constructor & Destructor Documentation

MuonEnergyDepositAnalyzer::MuonEnergyDepositAnalyzer ( const edm::ParameterSet pSet,
MuonServiceProxy *  theService 
)

Constructor.

Definition at line 32 of file MuonEnergyDepositAnalyzer.cc.

References parameters.

MuonEnergyDepositAnalyzer::~MuonEnergyDepositAnalyzer ( ) [virtual]

Destructor.

Definition at line 38 of file MuonEnergyDepositAnalyzer.cc.

{ }

Member Function Documentation

void MuonEnergyDepositAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const reco::Muon recoMu 
)

Get the analysis.

Definition at line 134 of file MuonEnergyDepositAnalyzer.cc.

References abs, reco::Muon::calEnergy(), ecalDepEnergyBarrel, ecalDepEnergyEndcap, ecalS9DepEnergyBarrel, ecalS9DepEnergyEndcap, ecalS9PointingMuDepEnergy_Glb, ecalS9PointingMuDepEnergy_Sta, ecalS9PointingMuDepEnergy_Tk, reco::MuonEnergy::em, reco::MuonEnergy::emS9, reco::LeafCandidate::eta(), MonitorElement::Fill(), edm::EventSetup::get(), TrajectoryStateOnSurface::globalPosition(), reco::Muon::globalTrack(), reco::MuonEnergy::had, reco::MuonEnergy::hadS9, hcalDepEnergyBarrel, hcalDepEnergyEndcap, hcalS9DepEnergyBarrel, hcalS9DepEnergyEndcap, hcalS9PointingMuDepEnergy_Glb, hcalS9PointingMuDepEnergy_Sta, hcalS9PointingMuDepEnergy_Tk, reco::MuonEnergy::ho, hoDepEnergy, reco::MuonEnergy::hoS9, hoS9DepEnergy, hoS9PointingMuDepEnergy_Glb, hoS9PointingMuDepEnergy_Sta, hoS9PointingMuDepEnergy_Tk, reco::TransientTrack::impactPointState(), reco::Muon::innerTrack(), reco::Muon::isGlobalMuon(), reco::Muon::isStandAloneMuon(), reco::Muon::isTrackerMuon(), LogTrace, metname, reco::Muon::outerTrack(), PV3DBase< T, PVType, FrameType >::perp(), and PV3DBase< T, PVType, FrameType >::z().

                                                                                                                   {

  LogTrace(metname)<<"[MuonEnergyDepositAnalyzer] Filling the histos";

  // get all the mu energy deposits
  reco::MuonEnergy muEnergy = recoMu.calEnergy();
  
  // energy deposited in ECAL
  LogTrace(metname) << "Energy deposited in ECAL: "<<muEnergy.em;
  if (fabs(recoMu.eta()) > 1.479) 
    ecalDepEnergyEndcap->Fill(muEnergy.em);
  else
    ecalDepEnergyBarrel->Fill(muEnergy.em);

  // energy deposited in HCAL
  LogTrace(metname) << "Energy deposited in HCAL: "<<muEnergy.had;
  if (fabs(recoMu.eta()) > 1.4)
    hcalDepEnergyEndcap->Fill(muEnergy.had);
  else
    hcalDepEnergyBarrel->Fill(muEnergy.had);
  
  // energy deposited in HO
  LogTrace(metname) << "Energy deposited in HO: "<<muEnergy.ho;
  if (fabs(recoMu.eta()) < 1.26)
    hoDepEnergy->Fill(muEnergy.ho);
  
  // energy deposited in ECAL in 3*3 towers
  LogTrace(metname) << "Energy deposited in ECAL: "<<muEnergy.emS9;
  if (fabs(recoMu.eta()) > 1.479) 
    ecalS9DepEnergyEndcap->Fill(muEnergy.emS9);
  else
    ecalS9DepEnergyBarrel->Fill(muEnergy.emS9);
     
  // energy deposited in HCAL in 3*3 crystals
  LogTrace(metname) << "Energy deposited in HCAL: "<<muEnergy.hadS9;
  if (fabs(recoMu.eta()) > 1.4)
    hcalS9DepEnergyEndcap->Fill(muEnergy.hadS9);
  else
    hcalS9DepEnergyBarrel->Fill(muEnergy.hadS9);
  
  // energy deposited in HO in 3*3 crystals
  LogTrace(metname) << "Energy deposited in HO: "<<muEnergy.hoS9;
  if (fabs(recoMu.eta()) < 1.26)
    hoS9DepEnergy->Fill(muEnergy.hoS9);
  
  // plot for energy tests
  edm::ESHandle<TransientTrackBuilder> theB;
  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder",theB);
  reco::TransientTrack TransTrack;
  
  if(recoMu.isGlobalMuon())
    TransTrack = theB->build(recoMu.globalTrack());
  if(recoMu.isTrackerMuon() && !(recoMu.isGlobalMuon()))
    TransTrack = theB->build(recoMu.innerTrack());
  if(recoMu.isStandAloneMuon() && !(recoMu.isGlobalMuon()))
    TransTrack = theB->build(recoMu.outerTrack());

  TrajectoryStateOnSurface TSOS;
  TSOS = TransTrack.impactPointState();
  // section for vertex pointing muon
  if((abs(TSOS.globalPosition().z())<30) && (abs(TSOS.globalPosition().perp())<20)){
    // GLB muon
    if(recoMu.isGlobalMuon()){
      ecalS9PointingMuDepEnergy_Glb->Fill(muEnergy.emS9);
      hcalS9PointingMuDepEnergy_Glb->Fill(muEnergy.hadS9);
      hoS9PointingMuDepEnergy_Glb->Fill(muEnergy.hoS9);
    }
    // TK muon
    if(recoMu.isTrackerMuon() && !(recoMu.isGlobalMuon())){
      ecalS9PointingMuDepEnergy_Tk->Fill(muEnergy.emS9);
      hcalS9PointingMuDepEnergy_Tk->Fill(muEnergy.hadS9);
      hoS9PointingMuDepEnergy_Tk->Fill(muEnergy.hoS9);
    }
    // STA muon
    if(recoMu.isStandAloneMuon() && !(recoMu.isGlobalMuon())){
      ecalS9PointingMuDepEnergy_Sta->Fill(muEnergy.emS9);
      hcalS9PointingMuDepEnergy_Sta->Fill(muEnergy.hadS9);
      hoS9PointingMuDepEnergy_Sta->Fill(muEnergy.hoS9);
    } 
  }

}
void MuonEnergyDepositAnalyzer::beginJob ( DQMStore dbe) [virtual]

Inizialize parameters for histo binning.

Implements MuonAnalyzerBase.

Definition at line 41 of file MuonEnergyDepositAnalyzer.cc.

References DQMStore::book1D(), ecalDepEnergyBarrel, ecalDepEnergyEndcap, ecalS9DepEnergyBarrel, ecalS9DepEnergyEndcap, ecalS9PointingMuDepEnergy_Glb, ecalS9PointingMuDepEnergy_Sta, ecalS9PointingMuDepEnergy_Tk, emNoBin, emNoMax, emNoMin, emS9NoBin, emS9NoMax, emS9NoMin, edm::ParameterSet::getParameter(), hadNoBin, hadNoMax, hadNoMin, hadS9NoBin, hadS9NoMax, hadS9NoMin, hcalDepEnergyBarrel, hcalDepEnergyEndcap, hcalS9DepEnergyBarrel, hcalS9DepEnergyEndcap, hcalS9PointingMuDepEnergy_Glb, hcalS9PointingMuDepEnergy_Sta, hcalS9PointingMuDepEnergy_Tk, hoDepEnergy, hoNoBin, hoNoMax, hoNoMin, hoS9DepEnergy, hoS9NoBin, hoS9NoMax, hoS9NoMin, hoS9PointingMuDepEnergy_Glb, hoS9PointingMuDepEnergy_Sta, hoS9PointingMuDepEnergy_Tk, LogTrace, metname, parameters, MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().

                                                        {

  metname = "muEnergyDepositAnalyzer";

  LogTrace(metname)<<"[MuonEnergyDepositAnalyzer] Parameters initialization";
  dbe->setCurrentFolder("Muons/MuonEnergyDepositAnalyzer");
  std::string AlgoName = parameters.getParameter<std::string>("AlgoName");

  emNoBin = parameters.getParameter<int>("emSizeBin");
  emNoMin = parameters.getParameter<double>("emSizeMin");
  emNoMax = parameters.getParameter<double>("emSizeMax");
  std::string histname = "ecalDepositedEnergyBarrel_";
  ecalDepEnergyBarrel = dbe->book1D(histname+AlgoName, "Energy deposited in the ECAL barrel cells", emNoBin, emNoMin, emNoMax);
  ecalDepEnergyBarrel->setAxisTitle("GeV");
  histname = "ecalDepositedEnergyEndcap_";
  ecalDepEnergyEndcap = dbe->book1D(histname+AlgoName, "Energy deposited in the ECAL endcap cells", emNoBin, emNoMin, emNoMax);
  ecalDepEnergyEndcap->setAxisTitle("GeV");

  emS9NoBin = parameters.getParameter<int>("emS9SizeBin");
  emS9NoMin = parameters.getParameter<double>("emS9SizeMin");
  emS9NoMax = parameters.getParameter<double>("emS9SizeMax");
  histname = "ecalS9DepositedEnergyBarrel_";
  ecalS9DepEnergyBarrel = dbe->book1D(histname+AlgoName, "Energy deposited in the ECAL barrel 3*3 towers", emS9NoBin, emS9NoMin, emS9NoMax);
  ecalS9DepEnergyBarrel->setAxisTitle("GeV");
  histname = "ecalS9DepositedEnergyEndcap_";
  ecalS9DepEnergyEndcap = dbe->book1D(histname+AlgoName, "Energy deposited in the ECAL endcap 3*3 towers", emS9NoBin, emS9NoMin, emS9NoMax);
  ecalS9DepEnergyEndcap->setAxisTitle("GeV");
  histname = "ecalS9PointingMuDepositedEnergy_Glb_";
  ecalS9PointingMuDepEnergy_Glb = dbe->book1D(histname+AlgoName, "Pointing glb muons energy deposited in the ECAL 3*3 towers", emS9NoBin, emS9NoMin, emS9NoMax);
  ecalS9PointingMuDepEnergy_Glb->setAxisTitle("GeV"); 
  histname = "ecalS9PointingMuDepositedEnergy_Tk_";
  ecalS9PointingMuDepEnergy_Tk = dbe->book1D(histname+AlgoName, "Pointing tk muons energy deposited in the ECAL 3*3 towers", emS9NoBin, emS9NoMin, emS9NoMax);
  ecalS9PointingMuDepEnergy_Tk->setAxisTitle("GeV"); 
  histname = "ecalS9PointingMuDepositedEnergy_Sta_";
  ecalS9PointingMuDepEnergy_Sta = dbe->book1D(histname+AlgoName, "Pointing sta muons energy deposited in the ECAL 3*3 towers", emS9NoBin, emS9NoMin, emS9NoMax);
  ecalS9PointingMuDepEnergy_Sta->setAxisTitle("GeV"); 
  
  hadNoBin = parameters.getParameter<int>("hadSizeBin");
  hadNoMin = parameters.getParameter<double>("hadSizeMin");
  hadNoMax = parameters.getParameter<double>("hadSizeMax");
  histname = "hadDepositedEnergyBarrel_";
  hcalDepEnergyBarrel = dbe->book1D(histname+AlgoName, "Energy deposited in the HCAL barrel cells", hadNoBin, hadNoMin, hadNoMax);
  hcalDepEnergyBarrel->setAxisTitle("GeV");
  histname = "hadDepositedEnergyEndcap_";
  hcalDepEnergyEndcap = dbe->book1D(histname+AlgoName, "Energy deposited in the HCAL endcap cells", hadNoBin, hadNoMin, hadNoMax);
  hcalDepEnergyEndcap->setAxisTitle("GeV");
 
  hadS9NoBin = parameters.getParameter<int>("hadS9SizeBin");
  hadS9NoMin = parameters.getParameter<double>("hadS9SizeMin");
  hadS9NoMax = parameters.getParameter<double>("hadS9SizeMax");
  histname = "hadS9DepositedEnergyBarrel_";
  hcalS9DepEnergyBarrel = dbe->book1D(histname+AlgoName, "Energy deposited in the HCAL barrel 3*3 towers", hadS9NoBin, hadS9NoMin, hadS9NoMax);
  hcalS9DepEnergyBarrel->setAxisTitle("GeV");
  histname = "hadS9DepositedEnergyEndcap_";
  hcalS9DepEnergyEndcap = dbe->book1D(histname+AlgoName, "Energy deposited in the HCAL endcap 3*3 towers", hadS9NoBin, hadS9NoMin, hadS9NoMax);
  hcalS9DepEnergyEndcap->setAxisTitle("GeV");
  histname = "hadS9PointingMuDepositedEnergy_Glb_";
  hcalS9PointingMuDepEnergy_Glb = dbe->book1D(histname+AlgoName, "Pointing glb muons energy deposited in the HCAL endcap 3*3 towers", hadS9NoBin, hadS9NoMin, hadS9NoMax);
  hcalS9PointingMuDepEnergy_Glb->setAxisTitle("GeV");
  histname = "hadS9PointingMuDepositedEnergy_Tk_";
  hcalS9PointingMuDepEnergy_Tk = dbe->book1D(histname+AlgoName, "Pointing tk muons energy deposited in the HCAL endcap 3*3 towers", hadS9NoBin, hadS9NoMin, hadS9NoMax);
  hcalS9PointingMuDepEnergy_Tk->setAxisTitle("GeV");
  histname = "hadS9PointingMuDepositedEnergy_Sta_";
  hcalS9PointingMuDepEnergy_Sta = dbe->book1D(histname+AlgoName, "Pointing sta muons energy deposited in the HCAL endcap 3*3 towers", hadS9NoBin, hadS9NoMin, hadS9NoMax);
  hcalS9PointingMuDepEnergy_Sta->setAxisTitle("GeV");

  hoNoBin = parameters.getParameter<int>("hoSizeBin");
  hoNoMin = parameters.getParameter<double>("hoSizeMin");
  hoNoMax = parameters.getParameter<double>("hoSizeMax");
  histname = "hoDepositedEnergy_";
  hoDepEnergy = dbe->book1D(histname+AlgoName, "Energy deposited in the HO cells", hoNoBin, hoNoMin, hoNoMax);
  hoDepEnergy->setAxisTitle("GeV");

  hoS9NoBin = parameters.getParameter<int>("hoS9SizeBin");
  hoS9NoMin = parameters.getParameter<double>("hoS9SizeMin");
  hoS9NoMax = parameters.getParameter<double>("hoS9SizeMax");
  histname = "hoS9DepositedEnergy_";
  hoS9DepEnergy = dbe->book1D(histname+AlgoName, "Energy deposited in the HO 3*3 towers", hoS9NoBin, hoS9NoMin, hoS9NoMax);
  hoS9DepEnergy->setAxisTitle("GeV");
  histname = "hoS9PointingMuDepositedEnergy_Glb_";
  hoS9PointingMuDepEnergy_Glb = dbe->book1D(histname+AlgoName, "Pointing glb muons energy deposited in the HO 3*3 towers", hoS9NoBin, hoS9NoMin, hoS9NoMax);
  hoS9PointingMuDepEnergy_Glb->setAxisTitle("GeV");
  histname = "hoS9PointingMuDepositedEnergy_Tk_";
  hoS9PointingMuDepEnergy_Tk = dbe->book1D(histname+AlgoName, "Pointing tk muons energy deposited in the HO 3*3 towers", hoS9NoBin, hoS9NoMin, hoS9NoMax);
  hoS9PointingMuDepEnergy_Tk->setAxisTitle("GeV");
  histname = "hoS9PointingMuDepositedEnergy_Sta_";
  hoS9PointingMuDepEnergy_Sta = dbe->book1D(histname+AlgoName, "Pointing sta muons energy deposited in the HO 3*3 towers", hoS9NoBin, hoS9NoMin, hoS9NoMax);
  hoS9PointingMuDepEnergy_Sta->setAxisTitle("GeV");

}

Member Data Documentation

Definition at line 79 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 83 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 80 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 84 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 89 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 95 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 92 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 54 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 56 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 55 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 58 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 60 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 59 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 62 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 64 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 63 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 66 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 68 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 67 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 81 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 85 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 82 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 86 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 90 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 96 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 93 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 87 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 70 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 72 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 71 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 88 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 74 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 76 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 75 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob().

Definition at line 91 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 97 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 94 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

std::string MuonEnergyDepositAnalyzer::metname [private]

Definition at line 49 of file MuonEnergyDepositAnalyzer.h.

Referenced by analyze(), and beginJob().

Definition at line 47 of file MuonEnergyDepositAnalyzer.h.

Referenced by beginJob(), and MuonEnergyDepositAnalyzer().

Definition at line 51 of file MuonEnergyDepositAnalyzer.h.