64 std::map< std::string, TH1D* >
hists_;
77 muonsToken_(consumes<edm::
View<pat::
Muon> >(cfg.getParameter< edm::InputTag >(
"muons"))),
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)
T * make(const Args &...args) const
make new ROOT object
bool booked(const std::string histName) const
check if histogram was booked
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
~PatZToMuMuAnalyzer()
default destructor
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")