- Timestamp:
- Mar 3, 2009, 12:44:54 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SmearUtil.cc
r270 r287 985 985 // 2) be inside a cone with a radius R and the axis defined by (eta,phi) 986 986 // IMPORTANT REMARK !!!!! 987 // previously, the argument 'phi' was before the argument 'eta' 988 // this has been changed for consistency with the other functions 989 // double check your running code that uses NumTracks ! 990 unsigned int RESOLution::NumTracks(const vector<TLorentzVector> &tracks, const float pt_track, const float eta, const float phi) { 991 unsigned int numtrack=0; 987 // NEW : "charge" will contain the sum of all charged tracks in the cone TAU_track_scone 988 unsigned int RESOLution::NumTracks(float& charge, const vector<TRootTracks> &tracks, const float pt_track, const float eta, const float phi) { 989 unsigned int numbtrack=0; // number of track in the tau-jet cone, which is smaller than R; 990 charge=0; 992 991 for(unsigned int i=0; i < tracks.size(); i++) { 993 if((tracks[i].Pt() < pt_track )|| 994 (DeltaR(phi,eta,tracks[i].Phi(),tracks[i].Eta()) > TAU_track_scone) 995 )continue; 996 numtrack++; 997 } 998 return numtrack; 999 } 992 if(tracks[i].PT < pt_track ) continue; 993 float dr = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta); 994 if (dr > TAU_track_scone) continue; 995 numbtrack++; 996 charge += tracks[i].Charge; // total charge in the cone for Tau-jet 997 } 998 return numbtrack; 999 } 1000 /* 1001 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) { 1002 unsigned int numbtrack=0; // number of track in the tau-jet cone, which is smaller than R; 1003 charge=0; NumTracksR=0; // total number of tracks 1004 if (R<TAU_track_scone) cout << "Warning: jet radius smaller than tau-jet radius in RESOLution::NumTracks\n"; 1005 for(unsigned int i=0; i < tracks.size(); i++) { 1006 if(tracks[i].PT < pt_track ) continue; 1007 float dr = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta); 1008 if (dr > R) continue; 1009 1010 NumTracksR++; 1011 if(dr < TAU_track_scone) {// previously R==TAU_track_scone, for tau-jets only 1012 numbtrack++; 1013 charge += tracks[i].Charge; // total charge in the cone for Tau-jet 1014 } 1015 1016 } 1017 return numbtrack; 1018 } 1019 */ 1000 1020 1001 1021 … … 1029 1049 //***********************Isolation criteria*********************** 1030 1050 //**************************************************************** 1031 bool RESOLution::Isolation(const float phi, const float eta,const vector<TLorentzVector> &tracks, const float pt_second_track) 1051 //bool RESOLution::Isolation(const float phi, const float eta,const vector<TLorentzVector> &tracks, const float pt_second_track) 1052 bool RESOLution::Isolation(const float phi, const float eta,const vector<TRootTracks> &tracks, const float pt_second_track) 1032 1053 { 1033 1054 bool isolated = false; … … 1036 1057 for(unsigned int i=0; i < tracks.size(); i++) 1037 1058 { 1038 if(tracks[i].P t()< pt_second_track)continue;1039 float genDeltaR = DeltaR(phi,eta,tracks[i].Phi (),tracks[i].Eta());1059 if(tracks[i].PT < pt_second_track)continue; 1060 float genDeltaR = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta); 1040 1061 if( 1041 1062 (genDeltaR > deltar) ||
Note:
See TracChangeset
for help on using the changeset viewer.