3 #include "StjJetListReader.h"
16 jettree->SetBranchAddress(
"eventId" , &_jet_eventId );
17 jettree->SetBranchAddress(
"nJets" , &_jet_nJets );
18 jettree->SetBranchAddress(
"jetId" , _jet_jetId );
19 jettree->SetBranchAddress(
"pt" , _jet_pt );
20 jettree->SetBranchAddress(
"eta" , _jet_eta );
21 jettree->SetBranchAddress(
"detectorEta", _jet_detectorEta );
22 jettree->SetBranchAddress(
"phi" , _jet_phi );
23 jettree->SetBranchAddress(
"m" , _jet_m );
24 jettree->SetBranchAddress(
"neuRt" , _jet_neuRt );
25 jettree->SetBranchAddress(
"vertexZ" , &_jet_vertexZ );
26 jettree->SetBranchAddress(
"runNumber" , &_jet_runNumber );
28 fourtree->SetBranchAddress(
"eventId" , &_four_eventId );
29 fourtree->SetBranchAddress(
"nFourVecs" , &_four_nFourVecs );
30 fourtree->SetBranchAddress(
"jetId" , _four_jetId );
31 fourtree->SetBranchAddress(
"pt" , _four_pt );
32 fourtree->SetBranchAddress(
"eta" , _four_eta );
33 fourtree->SetBranchAddress(
"phi" , _four_phi );
34 fourtree->SetBranchAddress(
"towerId" , _four_towerId );
35 fourtree->SetBranchAddress(
"trackId" , _four_trackId );
36 fourtree->SetBranchAddress(
"mcparticleId", _four_mcparticleId );
37 fourtree->SetBranchAddress(
"m" , _four_m );
38 fourtree->SetBranchAddress(
"type" , _four_type );
39 fourtree->SetBranchAddress(
"detectorId" , _four_detectorId );
40 fourtree->SetBranchAddress(
"fourvecId" , _four_fourvecId );
41 fourtree->SetBranchAddress(
"runNumber" , &_four_runNumber );
42 fourtree->SetBranchAddress(
"vertexZ" , &_four_vertexZ );
45 void StjJetListReader::clearEntry()
50 void StjJetListReader::readEntry()
53 for(
int i = 0; i < _jet_nJets; ++i) {
55 jet.runNumber = _jet_runNumber;
56 jet.eventId = _jet_eventId;
57 jet.jetId = _jet_jetId[i];
59 jet.eta = _jet_eta[i];
60 jet.phi = _jet_phi[i];
62 jet.neuRt = _jet_neuRt[i];
63 jet.vertexZ = _jet_vertexZ;
64 jet.detectorEta = _jet_detectorEta[i];
66 for(
int j = 0; j < _four_nFourVecs; ++j) {
67 if(_four_jetId[j] != jet.jetId)
continue;
69 four.runNumber = _four_runNumber;
70 four.eventId = _four_eventId;
71 four.vertexZ = _four_vertexZ;
72 four.fourvecId = _four_fourvecId[j];
73 four.type = _four_type[j];
74 four.detectorId = _four_detectorId[j];
75 four.trackId = _four_trackId[j];
76 four.towerId = _four_towerId[j];
77 four.mcparticleId = _four_mcparticleId[j];
78 four.pt = _four_pt[j];
79 four.eta = _four_eta[j];
80 four.phi = _four_phi[j];
82 jet.fourVecList.push_back(four);