1 | #define analysis_8_proto_cxx
|
---|
2 | // The class definition in analysis_8_proto.h has been generated automatically
|
---|
3 | // by the ROOT utility TTree::MakeSelector(). This class is derived
|
---|
4 | // from the ROOT class TSelector. For more information on the TSelector
|
---|
5 | // framework see $ROOTSYS/README/README.SELECTOR or the ROOT User Manual.
|
---|
6 |
|
---|
7 | // The following methods are defined in this file:
|
---|
8 | // Begin(): called every time a loop on the tree starts,
|
---|
9 | // a convenient place to create your histograms.
|
---|
10 | // SlaveBegin(): called after Begin(), when on PROOF called only on the
|
---|
11 | // slave servers.
|
---|
12 | // Process(): called for each event, in this function you decide what
|
---|
13 | // to read and fill your histograms.
|
---|
14 | // SlaveTerminate: called at the end of the loop on the tree, when on PROOF
|
---|
15 | // called only on the slave servers.
|
---|
16 | // Terminate(): called at the end of the loop on the tree,
|
---|
17 | // a convenient place to draw/fit your histograms.
|
---|
18 | //
|
---|
19 | // To use this file, try the following session on your Tree T:
|
---|
20 | //
|
---|
21 | // Root > T->Process("analysis_8_proto.C")
|
---|
22 | // Root > T->Process("analysis_8_proto.C","some options")
|
---|
23 | // Root > T->Process("analysis_8_proto.C+")
|
---|
24 | //
|
---|
25 |
|
---|
26 | #include "analysis_8_proto.h"
|
---|
27 | #include <TH2.h>
|
---|
28 | #include <TStyle.h>
|
---|
29 |
|
---|
30 |
|
---|
31 | void analysis_8_proto::Begin(TTree * /*tree*/)
|
---|
32 | {
|
---|
33 | // The Begin() function is called at the start of the query.
|
---|
34 | // When running with PROOF Begin() is only called on the client.
|
---|
35 | // The tree argument is deprecated (on PROOF 0 is passed).
|
---|
36 |
|
---|
37 | TString option = GetOption();
|
---|
38 |
|
---|
39 | }
|
---|
40 |
|
---|
41 | void analysis_8_proto::SlaveBegin(TTree * /*tree*/)
|
---|
42 | {
|
---|
43 | // The SlaveBegin() function is called after the Begin() function.
|
---|
44 | // When running with PROOF SlaveBegin() is called on each slave server.
|
---|
45 | // The tree argument is deprecated (on PROOF 0 is passed).
|
---|
46 |
|
---|
47 | TString option = GetOption();
|
---|
48 |
|
---|
49 | }
|
---|
50 |
|
---|
51 | Bool_t analysis_8_proto::Process(Long64_t entry)
|
---|
52 | {
|
---|
53 | // The Process() function is called for each entry in the tree (or possibly
|
---|
54 | // keyed object in the case of PROOF) to be processed. The entry argument
|
---|
55 | // specifies which entry in the currently loaded tree is to be processed.
|
---|
56 | // It can be passed to either analysis_8_proto::GetEntry() or TBranch::GetEntry()
|
---|
57 | // to read either all or the required parts of the data. When processing
|
---|
58 | // keyed objects with PROOF, the object is already loaded and is available
|
---|
59 | // via the fObject pointer.
|
---|
60 | //
|
---|
61 | // This function should contain the "body" of the analysis. It can contain
|
---|
62 | // simple or elaborate selection criteria, run algorithms on the data
|
---|
63 | // of the event and typically fill histograms.
|
---|
64 | //
|
---|
65 | // The processing can be stopped by calling Abort().
|
---|
66 | //
|
---|
67 | // Use fStatus to set the return value of TTree::Process().
|
---|
68 | //
|
---|
69 | // The return value is currently not used.
|
---|
70 |
|
---|
71 | GetEntry(entry);
|
---|
72 | // finding the total number of entries
|
---|
73 | nentries = fChain->GetEntries();
|
---|
74 |
|
---|
75 | // ANALYSIS PART
|
---|
76 | printf("Analysing event n.%d of %d\r",entry+1,nentries);
|
---|
77 | if(Jet_>0 && Jet_PT[0]>110){
|
---|
78 | nev++;
|
---|
79 | }
|
---|
80 | // END ANALYSIS PART
|
---|
81 |
|
---|
82 | return kTRUE;
|
---|
83 | }
|
---|
84 |
|
---|
85 | void analysis_8_proto::SlaveTerminate()
|
---|
86 | {
|
---|
87 | // The SlaveTerminate() function is called after all entries or objects
|
---|
88 | // have been processed. When running with PROOF SlaveTerminate() is called
|
---|
89 | // on each slave server.
|
---|
90 |
|
---|
91 | }
|
---|
92 |
|
---|
93 | void analysis_8_proto::Terminate()
|
---|
94 | {
|
---|
95 |
|
---|
96 | // The Terminate() function is the last function to be called during
|
---|
97 | // a query. It always runs on the client, it can be used to present
|
---|
98 | // the results graphically or save the results to file.
|
---|
99 |
|
---|
100 | }
|
---|