64 std::map< std::string, TH1D* >
hists_;
78 shift_(cfg.getParameter< double >(
"shift"))
83 hists_[
"globalMass"] = fileService->
make< TH1D >(
"globalMass" ,
"Mass_{Z} (global) (GeV)", 90, 30., 120.);
85 hists_[
"globalEta" ] = fileService->
make< TH1D >(
"globalEta" ,
"#eta (global)" , 48, -2.4, 2.4);
87 hists_[
"globalPt" ] = fileService->
make< TH1D >(
"globalPt" ,
"p_{T} (global) (GeV)" , 100, 0., 100.);
89 hists_[
"innerMass" ] = fileService->
make< TH1D >(
"innerMass" ,
"Mass_{Z} (inner) (GeV)" , 90, 30., 120.);
91 hists_[
"innerEta" ] = fileService->
make< TH1D >(
"innerEta" ,
"#eta (inner)" , 48, -2.4, 2.4);
93 hists_[
"innerPt" ] = fileService->
make< TH1D >(
"innerPt" ,
"p_{T} (inner) (GeV)" , 100, 0., 100.);
95 hists_[
"outerMass" ] = fileService->
make< TH1D >(
"outerMass" ,
"Mass_{Z} (outer) (GeV)" , 90, 30., 120.);
97 hists_[
"outerEta" ] = fileService->
make< TH1D >(
"outerEta" ,
"#eta (outer)" , 48, -2.4, 2.4);
99 hists_[
"outerPt" ] = fileService->
make< TH1D >(
"outerPt" ,
"p_{T} (outer) (GeV)" , 100, 0., 100.);
101 hists_[
"deltaPt" ] = fileService->
make< TH1D >(
"deltaPt" ,
"#Delta p_{T} (GeV)" , 100, -20., 20.);
103 hists_[
"deltaEta" ] = fileService->
make< TH1D >(
"deltaEta" ,
"#Delta #eta" , 100, -0.2, 0.2);
105 hists_[
"deltaPhi" ] = fileService->
make< TH1D >(
"deltaPhi" ,
"#Delta #phi" , 100, -0.2, 0.2);
140 if( mu1->charge()*mu2->charge()<0 ){
145 if(mu1->isGlobalMuon()){
146 fill(
"deltaPt" , mu1->outerTrack()->pt ()-mu1->globalTrack()->pt ());
147 fill(
"deltaEta", mu1->outerTrack()->eta()-mu1->globalTrack()->eta());
148 fill(
"deltaPhi", mu1->outerTrack()->phi()-mu1->globalTrack()->phi());
150 if(mu2->isGlobalMuon()){
151 fill(
"deltaPt" , mu2->outerTrack()->pt ()-mu2->globalTrack()->pt ());
152 fill(
"deltaEta", mu2->outerTrack()->eta()-mu2->globalTrack()->eta());
153 fill(
"deltaPhi", mu2->outerTrack()->phi()-mu2->globalTrack()->phi());
math::XYZVector Vector
typedef's to simplify get functions
#define DEFINE_FWK_MODULE(type)
def setup(process, global_tag, zero_tesla=False)
T * make(const Args &...args) const
make new ROOT object
bool booked(const std::string histName) const
check if histogram was booked
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
U second(std::pair< T, U > const &p)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup) override
everything that needs to be done during the event loop
auto const T2 &decltype(t1.eta()) t2
~PatZToMuMuAnalyzer()
default destructor
std::map< std::string, TH1D * > hists_
management of 1d histograms
Module to analyze the performance of muon reconstruction on the example of Z->mumu events...
edm::Service< TFileService > fileService
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void fill(const std::string histName, double value) const
fill histogram if it had been booked before
double mass(const math::XYZVector &t1, const math::XYZVector &t2) const
calculate the mass of the Z boson from the tracker momenta by hand
PatZToMuMuAnalyzer(const edm::ParameterSet &cfg)
default constructor
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::EDGetTokenT< edm::View< pat::Muon > > muonsToken_
input for muons
math::XYZTLorentzVector LorentzVector