ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Validation/src/TracksValMod.cc
Revision: 1.2
Committed: Mon Jun 15 15:00:23 2009 UTC (15 years, 10 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_009c, Mit_009b
Changes since 1.1: +3 -2 lines
Log Message:
Added proper fwd defs plus split up complilation of MitAna/DataTree LinkDefs.

File Contents

# Content
1 // $Id: TracksValMod.cc,v 1.1 2009/03/23 09:09:15 loizides Exp $
2
3 #include "MitPhysics/Validation/interface/TracksValMod.h"
4 #include "MitAna/DataTree/interface/Names.h"
5 #include "MitAna/DataTree/interface/TrackCol.h"
6 #include <TH1D.h>
7
8 using namespace mithep;
9
10 ClassImp(mithep::TracksValMod)
11
12 //--------------------------------------------------------------------------------------------------
13 TracksValMod::TracksValMod(const char *name, const char *title) :
14 BaseMod(name,title),
15 fTrackName(Names::gkTrackBrn),
16 fTracks(0)
17 {
18 // Constructor.
19 }
20
21 //--------------------------------------------------------------------------------------------------
22 void TracksValMod::Process()
23 {
24 // Process entries of the tree. For this module, we just load
25 // the branch and fill the histograms.
26
27 LoadBranch(GetTrackName());
28
29 Int_t ents=fTracks->GetEntries();
30 for(Int_t i=0;i<ents;++i) {
31 const Track *t = fTracks->At(i);
32 fHs[0]->Fill(t->QOverP());
33 fHs[1]->Fill(t->QOverPErr());
34 fHs[2]->Fill(t->Lambda());
35 fHs[3]->Fill(t->LambdaErr());
36 fHs[4]->Fill(t->Phi0());
37 fHs[5]->Fill(t->Phi0Err());
38 fHs[6]->Fill(t->Dxy());
39 fHs[7]->Fill(t->DxyErr());
40 fHs[8]->Fill(t->EtaEcal());
41 fHs[9]->Fill(t->PhiEcal());
42 fHs[10]->Fill(t->RChi2());
43 }
44 }
45
46 //--------------------------------------------------------------------------------------------------
47 void TracksValMod::SlaveBegin()
48 {
49 // Run startup code on the computer (slave) doing the actual
50 // analysis. Here, we typically initialize histograms and
51 // other analysis objects and request branches. For this module,
52 // we request a branch of the MitTree.
53
54 ReqBranch(GetTrackName(), fTracks);
55
56 AddTH1(fHs[0],"hQoverP",";QoverP;#",100,-10,10);
57 AddTH1(fHs[1],"hQoverPErr",";QoverPErr;#",100,0,10);
58 AddTH1(fHs[2],"hLambda",";Lambda;#",100,-2,2);
59 AddTH1(fHs[3],"hLambdaErr",";LambdaErr;#",100,0,1);
60 AddTH1(fHs[4],"hPhi0",";Phi0;#",100,-2,2);
61 AddTH1(fHs[5],"hPhi0Err",";Phi0Err;#",100,0,1);
62 AddTH1(fHs[6],"hDxy",";Dxy;#",100,-5,5);
63 AddTH1(fHs[7],"hDxyErr",";DxyErr;#",100,0,1);
64 AddTH1(fHs[8],"hEtaEcal",";EtaEcal;#",100,-3,3);
65 AddTH1(fHs[9],"hPhiEcal",";PhiEcal;#",100,-2,2);
66 AddTH1(fHs[10],"hChi2perNdof",";Chi2perNdo;#",100,0,5);
67 }
68
69 //--------------------------------------------------------------------------------------------------
70 void TracksValMod::SlaveTerminate()
71 {
72 // Run finishing code on the computer (slave) that did the
73 // analysis. For this module, we dont do anything here.
74 }
75