Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporary PR to be able to make comments inline #61

Open
wants to merge 55 commits into
base: CMSSW_6_2_0_SLHC14/TT-GMT-analysis-ttiRedigiJun14ana-gem-sw
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
11b2081
dublication of DataFormats/L1TrackTrigger has been commented
Jan 13, 2015
e591118
start using a simple structure L1TkMuonCand
Jan 13, 2015
e35ddbf
update struct L1TkMuonCand
Jan 14, 2015
6a9fc34
update struct L1TkMuonCand
Jan 14, 2015
c549374
update struct L1TkMuonCand
Jan 14, 2015
b34b3e6
update struct L1TkMuonCand
Jan 14, 2015
fdfd3f8
update loop for muons
Jan 21, 2015
0fcbb65
add structure for L1TkCand
Jan 21, 2015
67a4ccd
add structure for L1TkCand
Jan 22, 2015
2d78d49
add structure for L1TkCand
Jan 22, 2015
163c320
add structure for L1TkCand
Jan 22, 2015
d4eefb0
add structure for L1TkCand
Jan 22, 2015
8b6bf41
update two names L1MuonCand and L1TkMuonCand
Jan 26, 2015
d62e810
update two names L1MuonCand and L1TkMuonCand
Jan 27, 2015
d8ae210
updat L1MuonCand and L1TkMuonCand
Jan 27, 2015
d6623cd
updat L1MuonCand and L1TkMuonCand
Jan 28, 2015
f6b5023
updat L1MuonCand and L1TkMuonCand
Jan 28, 2015
6858f72
add keepMuons and keepTracks
Feb 3, 2015
5f2a7f3
add keepMuons and keepTracks
Feb 4, 2015
3274175
add keepTkCand
Feb 4, 2015
7f80093
update keepTkCand
Feb 5, 2015
4a21376
update names loadMuons & load Tracks
Feb 6, 2015
a5ecd0b
rename L1Muon L1Track
Feb 6, 2015
99aa6be
add computeTkMuCandidates
Feb 6, 2015
e7308d3
add computeTkMuCandidates
Feb 6, 2015
ae41b0b
filling of L1TkMuonCand
Feb 6, 2015
db09220
add loadTkMuCandidatesToEvent
Feb 9, 2015
fe095a9
update loadTkMuCandidatesToEvent
Feb 9, 2015
f6d0e25
update L1Track and L1Cand
Feb 11, 2015
4edd367
TrackMax = 400
May 8, 2015
a451e8b
add diapasons for Muons and Tracks
May 19, 2015
f1500e5
add interface/L1MUTK.h python/L1MUTK_cfi.py python/candMaker_cfi.py s…
May 29, 2015
a0c6b44
updated python/L1TMonitor_cff.py src/SealModule.cc
May 29, 2015
e7c39a9
Up
May 29, 2015
1d16ae2
candInputTag has been added
Jun 1, 2015
aa38959
GEM DQM histograms wrere added
Jun 2, 2015
3de4ad0
remove L1MuTkCandMaker.cc
Jun 2, 2015
66ecfe2
The version has been updated to 0.02
Jun 2, 2015
c547043
Cuts have been added
Jun 9, 2015
d442367
add 3 types of histograms L1 GEM: All, barrel & endcap
Jun 16, 2015
a631095
warning cleaning
Jun 16, 2015
7b7f04c
update to LogDebug
Jun 16, 2015
b6abf33
update to LogDebug, clean cout
Jun 16, 2015
ca1b747
update variables ranges
Jun 17, 2015
b09133f
LogDebug should be
Jun 17, 2015
9043ff4
rm
Jun 19, 2015
0429754
propagateToGMT has been moved to computeTkMuCandidates
Jun 23, 2015
83fb765
add bits for Pt(6) Phi,Eta(8) Z(4)
Jun 29, 2015
1d8be4b
add bits for Pt(6) Phi,Eta(8) Z(4)
Jun 29, 2015
d9efac4
Pt(6 Bits), Eta,Phi(8) & Z(4)
Jun 30, 2015
7295eb5
nL1TkCand has been updated, IF added
Jun 30, 2015
8dc4481
L1MUTK has been removed
Jul 6, 2015
7bf0335
removed
Jul 6, 2015
8333c27
removed
Jul 6, 2015
7c5ac81
L1TkMuonMonitor files have been added
Jul 6, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions DQM/L1TMonitor/interface/L1TkMuonMonitor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#ifndef DQM_L1TMonitor_L1TkMuonMonitor_h
#define DQM_L1TMonitor_L1TkMuonMonitor_h

/*
* \file L1TkMuonMonitor.h
*
* Date: 2015/06/16 12:00:00
* Revision: 0.03
* \author S.Baranov
*
*/

// system include files
#include <memory>

// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include "DataFormats/Candidate/interface/LeafCandidate.h"

#include <iostream>
#include <fstream>
#include <vector>

//
// class decleration
//

class L1TkMuonMonitor : public edm::EDAnalyzer {

public:

// Constructor
L1TkMuonMonitor(const edm::ParameterSet& ps);

// Destructor
virtual ~L1TkMuonMonitor();

protected:
// Analyze
void analyze(const edm::Event& e, const edm::EventSetup& c);

// BeginJob
void beginJob(void);

// BeginRun
void beginRun(const edm::Run& r, const edm::EventSetup& c);

// EndJob
void endJob(void);

private:
// ----------member data ---------------------------
DQMStore * dbe;

MonitorElement *l1tkmu_Pt, *l1tkmu_Pt_barrel, *l1tkmu_Pt_endcap;
MonitorElement *l1tkmu_Eta, *l1tkmu_Eta_barrel, *l1tkmu_Eta_endcap;
MonitorElement *l1tkmu_Phi, *l1tkmu_Phi_barrel, *l1tkmu_Phi_endcap;
MonitorElement *l1tkmu_Dxy, *l1tkmu_Dxy_barrel, *l1tkmu_Dxy_endcap,;
MonitorElement *l1tkmu_Z, *l1tkmu_Z_barrel, *l1tkmu_Z_endcap;
MonitorElement *l1tkmu_Q, *l1tkmu_Q_barrel, *l1tkmu_Q_endcap;
MonitorElement *l1tkmu_Pdgid, *l1tkmu_Pdgid_barrel, *l1tkmu_Pdgid_endcap;

int nev_; // Number of events processed
std::string outputFile_; //file name for ROOT ouput
bool verbose_;
bool monitorDaemon_;
ofstream logFile_;
edm::InputTag gmtSource_ ;

static const double piconv_;
double phiconv_(float phi);
void book_(const edm::EventSetup& c);

edm::InputTag candInputTag_;

};
#endif
4 changes: 4 additions & 0 deletions DQM/L1TMonitor/python/L1TMonitor_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
# GMT DQM module
from DQM.L1TMonitor.L1TGMT_cfi import *

# MUTK DQM module
from DQM.L1TMonitor.L1MUTK_cfi import *

# GT DQM module
from DQM.L1TMonitor.L1TGT_cfi import *

Expand Down Expand Up @@ -110,6 +113,7 @@
l1tCsctf +
l1tRpctf +
l1tGmt +
l1MuTk +
l1tGt +
l1ExtraDqmSeq +
l1tBPTX +
Expand Down
9 changes: 9 additions & 0 deletions DQM/L1TMonitor/python/L1TkMuonMonitor_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import FWCore.ParameterSet.Config as cms

L1TkMuonMonitor = cms.EDAnalyzer("L1TkMuonMonitor",
disableROOToutput = cms.untracked.bool(True),
verbose = cms.untracked.bool(False),
gmtSource = cms.InputTag("gtDigis"),
DQMStore = cms.untracked.bool(True),
candInputTag = cms.InputTag("L1TkMuonsMerge")
)
242 changes: 242 additions & 0 deletions DQM/L1TMonitor/src/L1TkMuonMonitor.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
/*
* \file L1TkMuonMonitor.cc
*
* Date: 2015/06/16 12:00:00
* Revision: 0.03
* \author S.Baranov
*
*/

#include "DQM/L1TMonitor/interface/L1TkMuonMonitor.h"
#include "DQMServices/Core/interface/DQMStore.h"

#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"

using namespace std;
using namespace edm;
using namespace reco;

typedef edm::View<reco::LeafCandidate> CandView;

const double L1TkMuonMonitor::piconv_ = 180./M_PI;

L1TkMuonMonitor::L1TkMuonMonitor(const ParameterSet& ps)
: gmtSource_( ps.getParameter< InputTag >("gmtSource") )
{

// verbosity switch
verbose_ = ps.getUntrackedParameter<bool>("verbose", false);

if(verbose_) cout << "L1TkMuonMonitor: constructor...." << endl;

dbe = NULL;
if ( ps.getUntrackedParameter<bool>("DQMStore", false) )
{
dbe = Service<DQMStore>().operator->();
dbe->setVerbose(0);
}

outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
if ( outputFile_.size() != 0 ) {
LogInfo("L1TkMuonMonitor") << "L1T Monitoring histograms will be saved to " << outputFile_.c_str();
}

bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
if(disable){
outputFile_="";
}

// input tags
candInputTag_ = ps.getParameter<edm::InputTag>("candInputTag");
LogInfo("L1TkMuonMonitor") << " L1TkMuonMonitor::L1TkMuonMonitor candInputTag " << candInputTag_;

if ( dbe !=NULL ) {
dbe->setCurrentFolder("L1T/L1TkMuon");
}

}

L1TkMuonMonitor::~L1TkMuonMonitor()
{
}

void L1TkMuonMonitor::beginJob()
{
nev_ = 0;
}

void L1TkMuonMonitor::beginRun(const edm::Run& r, const edm::EventSetup& c)
{
if(nev_==0) {
book_(c);
}
}

void L1TkMuonMonitor::endJob(void)
{
if(verbose_) cout << "L1TkMuonMonitor: end job...." << endl;
LogInfo("EndJob") << "analyzed " << nev_ << " events";

if ( outputFile_.size() != 0 && dbe ) dbe->save(outputFile_);

return;
}

void L1TkMuonMonitor::analyze(const Event& e, const EventSetup& c)
{

nev_++;

edm::Handle<CandView> aH;
e.getByLabel(candInputTag_, aH);

if(!aH.isValid()){
LogDebug("L1TkMuonMonitor") << " ::analyze Can't find CandView with label **candInputTag**";
}

const CandView& cands(*aH.product());

int track = 0, trackPt=0;
double maxPt = 0.;
double dxy;
for (auto cand : cands){
track++;
if (cand.pt() >= maxPt){
trackPt = track;
maxPt = cand.pt();
}
}

track = 0;
for (auto cand : cands){
track++;
if ( track == trackPt ){
dxy = cand.vx()*sin(cand.phi())-cand.vy()*cos(cand.phi());

LogDebug("L1TkMuonMonitor") << " ::analyze track "
<< track << " Pt " << cand.pt() << " Phi " << cand.phi() << " Eta " << cand.eta() << " Dxy " << dxy
<< " Z " << cand.vz() << " Q " << cand.charge() << " cand.pdgId " << cand.pdgId();

l1tkmu_Pt->Fill(cand.pt());
l1tkmu_Phi->Fill(cand.phi());
l1tkmu_Eta->Fill(cand.eta());
l1tkmu_Dxy->Fill(dxy);
l1tkmu_Z->Fill(cand.vz());
l1tkmu_Q->Fill(float(cand.charge()));
l1tkmu_Pdgid->Fill(float(cand.pdgId()));

if ( std::abs(cand.eta()) <= 1.1 ){
// Barrel
l1tkmu_Pt_barrel->Fill(cand.pt());
l1tkmu_Phi_barrel->Fill(cand.phi());
l1tkmu_Eta_barrel->Fill(cand.eta());
l1tkmu_Dxy_barrel->Fill(dxy);
l1tkmu_Z_barrel->Fill(cand.vz());
l1tkmu_Q_barrel->Fill(float(cand.charge()));
l1tkmu_Pdgid_barrel->Fill(float(cand.pdgId()));
} else {
// Endcap
l1tkmu_Pt_endcap->Fill(cand.pt());
l1tkmu_Phi_endcap->Fill(cand.phi());
l1tkmu_Eta_endcap->Fill(cand.eta());
l1tkmu_Dxy_endcap->Fill(dxy);
l1tkmu_Z_endcap->Fill(cand.vz());
l1tkmu_Q_endcap->Fill(float(cand.charge()));
l1tkmu_Pdgid_endcap->Fill(float(cand.pdgId()));
}
}
}
}

void L1TkMuonMonitor::book_(const EventSetup& c)
{
// get hold of back-end interface
DQMStore* dbe = 0;
dbe = Service<DQMStore>().operator->();

if ( dbe ) {
dbe->setCurrentFolder("L1T/L1TkMuon");
dbe->rmdir("L1T/L1TkMuon");
}

if ( dbe )
{
dbe->setCurrentFolder("L1T/L1TkMuon");

/*
* All
*/
l1tkmu_Pt = dbe->book1D("l1tkmu_Pt","L1 Muon Pt", 100, 0.,250. );
l1tkmu_Pt->setAxisTitle("l1tkmu_Pt",1);

l1tkmu_Phi = dbe->book1D("l1tkmu_Phi","L1 Muon Phi", 100, -3.,3. );
l1tkmu_Phi->setAxisTitle("l1tkmu_Phi",1);

l1tkmu_Eta = dbe->book1D("l1tkmu_Eta","L1 Muon Eta", 100, -3.,3. );
l1tkmu_Eta->setAxisTitle("l1tkmu_Eta",1);

l1tkmu_Dxy = dbe->book1D("l1tkmu_Dxy","L1 Muon Dxy", 100,-15.,15. );
l1tkmu_Dxy->setAxisTitle("l1tkmu_Dxy",1);

l1tkmu_Z = dbe->book1D("l1tkmu_Z","L1 Muon Z", 100,-20.,20. );
l1tkmu_Z->setAxisTitle("l1tkmu_Z",1);

l1tkmu_Q = dbe->book1D("l1tkmu_Q","L1 Muon Q", 4, -2.,2. );
l1tkmu_Q->setAxisTitle("l1tkmu_Q",1);

l1tkmu_Pdgid = dbe->book1D("l1tkmu_Pdgid","L1 Muon Pdgid", 100,-50.,50. );
l1tkmu_Pdgid->setAxisTitle("l1tkmu_Pdgid",1);

/*
* "barrel" (|eta|<=1.1)
*/
l1tkmu_Pt_barrel = dbe->book1D("l1tkmu_Pt_barrel","L1 Muon Pt barrel", 100, 0.,250. );
l1tkmu_Pt_barrel->setAxisTitle("l1tkmu_Pt_barrel",1);

l1tkmu_Phi_barrel = dbe->book1D("l1tkmu_Phi_barrel","L1 Muon Phi barrel", 100, -3.,3. );
l1tkmu_Phi_barrel->setAxisTitle("l1tkmu_Phi_barrel",1);

l1tkmu_Eta_barrel = dbe->book1D("l1tkmu_Eta_barrel","L1 Muon Eta barrel", 100, -3.,3. );
l1tkmu_Eta_barrel->setAxisTitle("l1tkmu_Eta_barrel",1);

l1tkmu_Dxy_barrel = dbe->book1D("l1tkmu_Dxy_barrel","L1 Muon Dxy barrel", 100,-15.,15. );
l1tkmu_Dxy_barrel->setAxisTitle("l1tkmu_Dxy_barrel",1);

l1tkmu_Z_barrel = dbe->book1D("l1tkmu_Z_barrel","L1 Muon Z barrel", 100,-20.,20. );
l1tkmu_Z_barrel->setAxisTitle("l1tkmu_Z_barrel",1);

l1tkmu_Q_barrel = dbe->book1D("l1tkmu_Q_barrel","L1 Muon Q barrel", 4, -2.,2. );
l1tkmu_Q_barrel->setAxisTitle("l1tkmu_Q_barrel",1);

l1tkmu_Pdgid_barrel = dbe->book1D("l1tkmu_Pdgid_barrel","L1 Muon Pdgid barrel", 100,-50.,50. );
l1tkmu_Pdgid_barrel->setAxisTitle("l1tkmu_Pdgid_barrel",1);

/*
* "endcap" (|eta|>1.1)
*/
l1tkmu_Pt_endcap = dbe->book1D("l1tkmu_Pt_endcap","L1 Muon Pt endcap", 100,0.,250. );
l1tkmu_Pt_endcap->setAxisTitle("l1tkmu_Pt_endcap",1);

l1tkmu_Phi_endcap = dbe->book1D("l1tkmu_Phi_endcap","L1 Muon Phi endcap", 100,-3.,3. );
l1tkmu_Phi_endcap->setAxisTitle("l1tkmu_Phi_endcap",1);

l1tkmu_Eta_endcap = dbe->book1D("l1tkmu_Eta_endcap","L1 Muon Eta endcap", 100,-3.,3. );
l1tkmu_Eta_endcap->setAxisTitle("l1tkmu_Eta_endcap",1);

l1tkmu_Dxy_endcap = dbe->book1D("l1tkmu_Dxy_endcap","L1 Muon Dxy endcap", 100,-15.,15. );
l1tkmu_Dxy_endcap->setAxisTitle("l1tkmu_Dxy_endcap",1);

l1tkmu_Z_endcap = dbe->book1D("l1tkmu_Z_endcap","L1 Muon Z endcap", 100,-20.,20. );
l1tkmu_Z_endcap->setAxisTitle("l1tkmu_Z_endcap",1);

l1tkmu_Q_endcap = dbe->book1D("l1tkmu_Q_endcap","L1 Muon Q endcap", 4, -2.,2. );
l1tkmu_Q_endcap->setAxisTitle("l1tkmu_Q_endcap",1);

l1tkmu_Pdgid_endcap = dbe->book1D("l1tkmu_Pdgid_endcap","L1 Muon Pdgid endcap", 100,-50.,50. );
l1tkmu_Pdgid_endcap->setAxisTitle("l1tkmu_Pdgid_endcap",1);

}
}

DEFINE_FWK_MODULE(L1TkMuonMonitor);
1 change: 0 additions & 1 deletion DQM/L1TMonitor/src/SealModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ DEFINE_FWK_MODULE(L1TRPCTF);
#include <DQM/L1TMonitor/interface/L1TGMT.h>
DEFINE_FWK_MODULE(L1TGMT);


#include <DQM/L1TMonitor/interface/L1TGCT.h>
DEFINE_FWK_MODULE(L1TGCT);

Expand Down
2 changes: 1 addition & 1 deletion GeneratorInterface/HiGenCommon/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<use name="SimDataFormats/GeneratorProducts"/>
<use name="SimGeneral/HepPDTRecord"/>
<use name="FWCore/ParameterSet"/>
<use name="IOMC/EventVertexGenerators"/>
<!-- <use name="IOMC/EventVertexGenerators"/> -->
<export>
<lib name="1"/>
</export>
2 changes: 1 addition & 1 deletion HLTrigger/HLTanalyzers/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<use name="DataFormats/L1GlobalTrigger"/>
<use name="DataFormats/L1Trigger"/>
<use name="DataFormats/METReco"/>
<use name="DataFormats/MuonData"/>
<!-- <use name="DataFormats/MuonData"/> -->
<use name="DataFormats/MuonReco"/>
<use name="DataFormats/RPCDigi"/>
<use name="DataFormats/RecoCandidate"/>
Expand Down
Loading