32 @example_track #
include "FWCore/Utilities/interface/InputTag.h"
33 @example_track #
include "DataFormats/TrackReco/interface/Track.h"
34 @example_track #
include "DataFormats/TrackReco/interface/TrackFwd.h"
35 @example_histo #
include "FWCore/ServiceRegistry/interface/Service.h"
36 @example_histo #
include "CommonTools/UtilAlgos/interface/TFileService.h"
78 @example_track trackTags_(iConfig.getUntrackedParameter<
edm::InputTag>(
"tracks"))
83 @example_histo
histo = fs->make<TH1D>(
"charge" ,
"Charges" , 200 , -2 , 2 );
111 @example_track
for(TrackCollection::const_iterator itTrack =
tracks->begin();
112 @example_track itTrack !=
tracks->end();
113 @example_track ++itTrack) {
114 @example_track_histo
int charge = 0;
115 @example_track charge = itTrack->charge();
116 @example_histo
histo->Fill( charge );
119 #ifdef THIS_IS_AN_EVENT_EXAMPLE
124 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
126 iSetup.
get<SetupRecord>().
get(pSetup);
#define DEFINE_FWK_MODULE(type)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
virtual void endRun(edm::Run const &, edm::EventSetup const &)
std::vector< Track > TrackCollection
collection of Tracks
example_track edm::InputTag trackTags_
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
void addDefault(ParameterSetDescription const &psetDescription)
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool include(const CollT &coll, const ItemT &item)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
example_histo TH1D * histo
anlzrname(const edm::ParameterSet &)