Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

FourJetPairing.C

Go to the documentation of this file.
00001 
00002 // Class FourJetPairing
00003 //
00004 // Author: Jenny Boehme, Anca Siebel
00005 // Last update: $Date: 2004/06/01 16:40:09 $
00006 //          by: $Author: blist $
00007 // 
00008 // Description: handle permutations of 2b jets and 4 light jets
00009 //               
00011 
00012 #include <iostream>
00013 #include "jbltools/kinfit/FourJetPairing.h"
00014 #include "jbltools/kinfit/JetFitObject.h"
00015 
00016 FourJetPairing::FourJetPairing (JetFitObject *jets_[])  {
00017        
00018   for (int i = 0; i < NJETS; ++i) jets[i] = jets_[i];
00019   iperm = 0;
00020    
00021   // this assumes jet 5 & 6 to be the b-jets !!
00022  
00023   int perms[NPERM][NJETS] = {{1, 2, 3, 4}, 
00024                              {1, 3, 2, 4}, 
00025                              {1, 4, 2, 3}};
00026                              
00027   for (int i = 0; i < NPERM; ++i) 
00028      for (int j = 0; j < NJETS; ++j) 
00029                           permutations[i][j] = perms[i][j];    
00030                                                    
00031 }
00032 
00033 int FourJetPairing::nextPermutation (JetFitObject *permObjects[]) {
00034     
00035   for (int ijet = 0; ijet < NJETS; ++ijet) {
00036     permObjects[ijet] = jets[permutations[iperm][ijet]-1];
00037   } 
00038   
00039   ++iperm;
00040   return iperm;
00041 }
00042 
00043 
00044 
00045 

Generated on Fri Sep 14 17:38:20 2007 for Kinfit by doxygen 1.3.2