10 using namespace examples;
19 cout <<
">> booking histograms" << endl;
20 out.Add( h_pt =
new TH1F(
kPt ,
"pt" , 100, 0, 20 ) );
21 out.Add( h_eta =
new TH1F(
kEta,
"#eta", 100, -3, 3 ) );
25 cout <<
">> processing event " << endl;
27 event.getByLabel(
"ctfWithMaterialTracks", tracks );
29 cout <<
">> tracks found:" << tracks->size() << endl;
30 for (
size_t i = 0;
i < tracks->size(); ++
i ) {
31 const Track & track = ( * tracks )[
i ];
32 h_pt ->Fill( track.
pt() );
33 h_eta->Fill( track.
eta() );
34 cout <<
">> pt, eta: " << track.
pt() <<
", " << track.
eta() << endl;
39 cout <<
">> nothing to be done in post-processing" << endl;
43 cout <<
">> terminating" << endl;
45 draw( out, canvas,
kPt );
46 draw( out, canvas,
kEta );
50 TObject *
hist = out.FindObject( k );
53 canvas.SaveAs( (
string( k ) +
".jpg" ).c_str() );
55 cerr <<
">> no '" << k <<
"' histogram" << endl;
example_track example_track const char *const kPt
double eta() const
pseudorapidity of momentum vector
void process(const edm::Event &)
process one event
static void draw(const TList &, TCanvas &, const char *)
draw an histogram
double pt() const
track transverse momentum
static void terminate(TList &)
terminate processing
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
static const char * kPt
histogram names
TrackAnalysisAlgorithm(const TList *, TList &)
constructor
void postProcess(TList &)
post process