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

TwoB4JPairing.C

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

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