60 std::vector<reco::LeafCandidate>
muons;
61 typename std::vector<T>::const_iterator
track;
62 for (track = tracks.begin(); track != tracks.end(); ++
track) {
65 track->px(), track->py(), track->pz(),
sqrt(track->p() * track->p() + 0.011163612));
69 muons.push_back(
muon);
98 : theMuonLabel_(iConfig.getParameter<edm::
InputTag>(
"MuonLabel")),
102 theMuonType_(iConfig.getParameter<int>(
"MuonType")),
103 theRootFileName_(iConfig.getUntrackedParameter<std::
string>(
"OutputFileName")) {
107 sigmaPt_ =
new TProfile(
"sigmaPtOverPt",
"sigmaPt/Pt vs muon Pt", 1000, 0, 100);
117 TCanvas
canvas(
"sigmaPtOverPt",
"sigmaPt/Pt vs muon Pt", 1000, 800);
119 sigmaPt_->GetXaxis()->SetTitle(
"Pt(GeV)");
151 std::vector<reco::LeafCandidate>
muons;
168 std::vector<reco::LeafCandidate>::const_iterator recMuon =
muons.begin();
169 for (; recMuon !=
muons.end(); ++recMuon) {
T getUntrackedParameter(std::string const &, T const &) const
TestResolution(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::TrackCollection > saMuonsToken_
std::vector< Track > TrackCollection
collection of Tracks
auto const & tracks
cannot be loose
std::string theRootFileName_
std::vector< Muon > MuonCollection
collection of Muon objects
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
~TestResolution() override
std::vector< reco::LeafCandidate > fillMuonCollection(const std::vector< T > &tracks)
edm::EDGetTokenT< reco::MuonCollection > glbMuonsToken_
void analyze(const edm::Event &, const edm::EventSetup &) override
std::unique_ptr< ResolutionFunction > resolutionFunction_
edm::InputTag theMuonLabel_
math::XYZTLorentzVector LorentzVector
Lorentz vector.