- Timestamp:
- Mar 10, 2009, 11:59:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SmearUtil.cc
r307 r319 1034 1034 for(unsigned int i=0; i < tracks.size(); i++) { 1035 1035 if(tracks[i].PT < pt_track ) continue; 1036 //float dr = DeltaR(phi,eta,tracks[i].PhiOuter,tracks[i].EtaOuter); 1036 1037 float dr = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta); 1037 1038 if (dr > TAU_track_scone) continue; … … 1041 1042 return numbtrack; 1042 1043 } 1043 /*1044 unsigned int RESOLution::NumTracks(unsigned int& NumTracksR, float& charge, const vector<TRootTracks> &tracks, const float pt_track, const float eta, const float phi, const float R) {1045 unsigned int numbtrack=0; // number of track in the tau-jet cone, which is smaller than R;1046 charge=0; NumTracksR=0; // total number of tracks1047 if (R<TAU_track_scone) cout << "Warning: jet radius smaller than tau-jet radius in RESOLution::NumTracks\n";1048 for(unsigned int i=0; i < tracks.size(); i++) {1049 if(tracks[i].PT < pt_track ) continue;1050 float dr = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta);1051 if (dr > R) continue;1052 1053 NumTracksR++;1054 if(dr < TAU_track_scone) {// previously R==TAU_track_scone, for tau-jets only1055 numbtrack++;1056 charge += tracks[i].Charge; // total charge in the cone for Tau-jet1057 }1058 1059 }1060 return numbtrack;1061 }1062 */1063 1064 1044 1065 1045 //*** Returns the PID of the particle with the highest energy, in a cone with a radius CONERADIUS and an axis (eta,phi) ********* 1066 1046 //used by Btaggedjet 1067 1047 ///// Attention : bug removed => CONERADIUS/2 -> CONERADIUS !! 1068 int RESOLution::Bjets(const TSimpleArray< TRootGenParticle> &subarray, const float eta, const floatphi) {1048 int RESOLution::Bjets(const TSimpleArray<GenParticle> &subarray, const float& eta, const float& phi) { 1069 1049 float emax=0; 1070 1050 int Ppid=0; … … 1083 1063 1084 1064 //******************** Simulates the b-tagging efficiency for real bjet, or the misendentification for other jets**************** 1085 bool RESOLution::Btaggedjet(const TLorentzVector &JET, const TSimpleArray< TRootGenParticle> &subarray){1065 bool RESOLution::Btaggedjet(const TLorentzVector &JET, const TSimpleArray<GenParticle> &subarray) { 1086 1066 if( rand()%100 < (BTAG_b+1) && Bjets(subarray,JET.Eta(),JET.Phi())==pB ) return true; // b-tag of b-jets is 40% 1087 1067 else if( rand()%100 < (BTAG_mistag_c+1) && Bjets(subarray,JET.Eta(),JET.Phi())==pC ) return true; // b-tag of c-jets is 10% … … 1092 1072 //***********************Isolation criteria*********************** 1093 1073 //**************************************************************** 1094 //bool RESOLution::Isolation(const float phi, const float eta,const vector<TLorentzVector> &tracks, const float pt_second_track) 1095 bool RESOLution::Isolation(const float phi, const float eta,const vector<TRootTracks> &tracks, const float pt_second_track, const float isolCone) 1074 bool RESOLution::Isolation(const float phi, const float eta,const vector<TRootTracks> &tracks, const float& pt_second_track, const float& isolCone) 1096 1075 { 1097 1076 bool isolated = false; … … 1121 1100 iEta = (eta>0) ? TOWER_eta_edges[i-1] : -TOWER_eta_edges[i]; 1122 1101 index = i-1; 1123 //cout << setw(15) << left << eta << "\t" << iEta << endl;1124 1102 break; 1125 1103 }
Note:
See TracChangeset
for help on using the changeset viewer.