- Timestamp:
- Mar 9, 2009, 9:47:21 PM (16 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/JetsUtil.cc
r286 r307 120 120 } 121 121 122 vector<fastjet::PseudoJet> JetsUtil::RunJets(const vector<fastjet::PseudoJet>& input_particles )122 vector<fastjet::PseudoJet> JetsUtil::RunJets(const vector<fastjet::PseudoJet>& input_particles, const vector<TRootTracks> & TrackCentral, vector<int> &NTrackJet) 123 123 { 124 124 inclusive_jets.clear(); … … 131 131 double ptmin = 5.0; 132 132 inclusive_jets = clust_seq.inclusive_jets(ptmin); 133 133 134 // sort jets into increasing pt 134 135 sorted_jets = sorted_by_pt(inclusive_jets); 136 137 //check number of tracks in jets 138 float iEtaTrack[TrackCentral.size()]; 139 float iPhiTrack[TrackCentral.size()]; 140 for(unsigned int t = 0; t < TrackCentral.size(); t++) 141 { 142 DET->BinEtaPhi(TrackCentral[t].PhiOuter,TrackCentral[t].EtaOuter,iPhiTrack[t],iEtaTrack[t]); 143 } 144 int numTrackJet; 145 for (unsigned int i = 0; i < sorted_jets.size(); i++) 146 { 147 numTrackJet=0; 148 vector<fastjet::PseudoJet> constituents = clust_seq.constituents(sorted_jets[i]); 149 for(unsigned int it = 0; it < TrackCentral.size(); it++) 150 { 151 for (unsigned int j = 0; j < constituents.size(); j++) 152 { 153 if(DeltaR(iPhiTrack[it], iEtaTrack[it], constituents[j].phi(), constituents[j].eta())<0.001)numTrackJet++; 154 } 155 } 156 NTrackJet.push_back(numTrackJet); 157 } 135 158 } 136 159 … … 138 161 } 139 162 140 void JetsUtil::RunJetBtagging(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchJet,const vector<fastjet::PseudoJet> & sorted_jets,const TSimpleArray<TRootGenParticle>& NFCentralQ) 163 164 165 void JetsUtil::RunJetBtagging(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchJet,const vector<fastjet::PseudoJet> & sorted_jets,const TSimpleArray<TRootGenParticle>& NFCentralQ, const vector<int> &NTrackJet) 141 166 { 142 167 TRootJet *elementJet; 143 168 TLorentzVector JET; 144 169 for (unsigned int i = 0; i < sorted_jets.size(); i++) { 170 145 171 JET.SetPxPyPzE(sorted_jets[i].px(),sorted_jets[i].py(),sorted_jets[i].pz(),sorted_jets[i].E()); 146 172 if(JET.Pt() > DET->PTCUT_jet) … … 148 174 elementJet = (TRootJet*) branchJet->NewEntry(); 149 175 elementJet->Set(JET); 176 elementJet->NTracks = NTrackJet[i]; 177 150 178 // b-jets 151 179 bool btag=false; … … 157 185 } 158 186 159 //void JetsUtil::RunTauJets(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchTauJet,const vector<fastjet::PseudoJet> & sorted_jets,const vector<PhysicsTower> & towers, const vector<TLorentzVector> & TrackCentral) 160 void JetsUtil::RunTauJets(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchTauJet,const vector<fastjet::PseudoJet> & sorted_jets,const vector<PhysicsTower> & towers, const vector<TRootTracks> & TrackCentral) 187 void JetsUtil::RunTauJets(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchTauJet,const vector<fastjet::PseudoJet> & sorted_jets,const vector<PhysicsTower> & towers, const vector<TRootTracks> & TrackCentral, const vector<int> &NTrackJet) 161 188 { 162 189 TRootTauJet *elementTauJet; … … 176 203 elementTauJet = (TRootTauJet*) branchTauJet->NewEntry(); 177 204 elementTauJet->Set(JET); 205 elementTauJet->NTracks=NTrackJet[i]; 178 206 elementTauJet->Charge = charge; 179 207 } // if tau jet -
trunk/src/LHCOConverter.cc
r288 r307 66 66 } 67 67 else { 68 outputfilename_.replace(r_find,5," .lhco");68 outputfilename_.replace(r_find,5,"_events.lhco"); 69 69 ofstream outfile( outputfilename_.c_str()); 70 70 outfile.close(); … … 138 138 139 139 outfile << setw(3) << line++ << setw(4) << " " << setw(7) << event << setw(7) << triginfo << endl; 140 outfile.close();141 140 142 141 // 0 photon data 143 //outfile << BranchReader(branchPhoton,line,lhcoPhotonID);144 142 BranchReader(branchPhoton,line,lhcoPhotonID); 145 143 … … 161 159 } // event loop 162 160 161 outfile.close(); 163 162 delete triggerTree; 164 163 delete analysisTree; … … 180 179 jmass = pmu.M(); 181 180 float ntrk = 0.0; 181 float btag =0; 182 double ratioE = 0; 183 182 184 if(lhcoID == lhcoElectronID) { TRootElectron elec(*((TRootElectron*) branch->At(i))); ntrk = elec.Charge; } 183 185 else if (lhcoID == lhcoMuonID) { TRootMuon muon(*((TRootMuon*) branch->At(i))); ntrk = muon.Charge; } 184 186 else if (lhcoID == lhcoTauJetID) { TRootTauJet taujet(*((TRootTauJet*) branch->At(i))); ntrk = taujet.Charge; } 185 float btag =0; 186 double ratioE = 0; 187 else if (lhcoID == lhcoJetID) { TRootJet jet(*((TRootJet*) branch->At(i))); ntrk = jet.NTracks; btag = jet.Btag;} 187 188 if(lhcoID != lhcoETmisID) { 188 189 outfile << fixed << setprecision(3) -
trunk/src/SmearUtil.cc
r306 r307 119 119 FLAG_bfield = 1; //1 to run the bfield propagation else 0 120 120 FLAG_vfd = 1; //1 to run the very forward detectors else 0 121 FLAG_RP = 1; //1 to run the zero degree calorimeter else 0121 FLAG_RP = 1; //1 to run the zero degree calorimeter else 0 122 122 FLAG_trigger = 1; //1 to run the trigger selection else 0 123 123 FLAG_frog = 1; //1 to run the FROG event display 124 FLAG_lhco = 1; 124 125 125 126 // In case BField propagation allowed … … 247 248 FLAG_trigger = DET.FLAG_trigger; 248 249 FLAG_frog = DET.FLAG_frog; 250 FLAG_lhco = DET.FLAG_lhco; 249 251 250 252 // In case BField propagation allowed … … 365 367 FLAG_trigger = DET.FLAG_trigger; 366 368 FLAG_frog = DET.FLAG_frog; 369 FLAG_lhco = DET.FLAG_lhco; 367 370 368 371 // In case BField propagation allowed … … 510 513 else if(strstr(temp_string.c_str(),"FLAG_trigger")) {curstring >> varname >> ivalue; FLAG_trigger = ivalue;} 511 514 else if(strstr(temp_string.c_str(),"FLAG_frog")) {curstring >> varname >> ivalue; FLAG_frog = ivalue;} 515 else if(strstr(temp_string.c_str(),"FLAG_lhco")) {curstring >> varname >> ivalue; FLAG_lhco = ivalue;} 512 516 else if(strstr(temp_string.c_str(),"NEvents_Frog")) {curstring >> varname >> ivalue; NEvents_Frog = ivalue;} 513 517 }
Note:
See TracChangeset
for help on using the changeset viewer.