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