ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Validation/src/TracksValMod.cc
Revision: 1.3
Committed: Fri Jul 10 14:04:44 2009 UTC (15 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_029c, Mit_029b, Mit_029a, Mit_028a, Mit_028, Mit_027, Mit_027a, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010, HEAD
Changes since 1.2: +1 -2 lines
Log Message:
Cleanup

File Contents

# User Rev Content
1 loizides 1.3 // $Id: TracksValMod.cc,v 1.2 2009/06/15 15:00:23 loizides Exp $
2 loizides 1.1
3     #include "MitPhysics/Validation/interface/TracksValMod.h"
4 loizides 1.2 #include "MitAna/DataTree/interface/Names.h"
5     #include "MitAna/DataTree/interface/TrackCol.h"
6 loizides 1.1 #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     }