Changeset 41 in svn for trunk/Utilities/Fastjet
- Timestamp:
- Nov 18, 2008, 5:00:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh
r37 r41 4 4 // Modified by X. Rouby for integration in Delphes 5 5 // !!! the numbering of the towers (iEta, iPhi) is **NOT** following any convention of the corresponding experiment 6 // v3 -- not working 6 7 7 8 #include <cmath> 9 #include <iostream> 8 10 9 11 #ifndef M_PI … … 13 15 const double pi = acos(-1); 14 16 15 /* // CDF data : 22 towers. step=2.7° at the beginning, and after, it changes 17 static bool einmal=true; 18 /* 19 // CDF data : 22 towers. step=2.7° at the beginning, and after, it changes 16 20 const unsigned int ntower = 22; 17 21 const double TOWER_THETA[ntower+1] = {3.000, 5.700, 8.400, 11.100, 13.800, 16.500, 19.200, 21.900, 24.600, 27.300, 30.000,// step=2.7° 18 22 33.524, 36.822, 40.261, 43.614, 47.436, 51.790, 56.735, 62.310, 68.516, 75.297, 82.526, 90.000 }; 19 const couble tower_eta_edges[ntower+1] = {23 const double tower_eta_edges[ntower+1] = { 20 24 0.0, 0.130817437415, 0.259479460739, 0.384075299436, 0.503273260393, 0.616250691646, 0.72264587494, 0.822472442947, 21 25 0.916007799535, 1.00361552815, 1.10000635195, 1.19999982651, 1.31695789692, 1.41531379676, 1.52309848418, 1.64260787639, 22 26 1.77704423284, 1.93106912741, 2.1118548488, 2.33129451223, 2.61134904017, 3.00008274261, 3.64253335732 }; 23 const inttower_dphi[ntower] = { // list of the tower size in phi (in degrees)24 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 15 ,25 15 , 15, 15, 15, 15, 7.5, 7.57.5,27 const double tower_dphi[ntower] = { // list of the tower size in phi (in degrees) 28 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 15., 29 15., 15., 15., 15., 15., 7.5, 7.5, 7.5, 26 30 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 }; 27 31 */ 28 32 29 33 // CMS data 30 const unsigned int ntower = 4 1;34 const unsigned int ntower = 40; 31 35 const double tower_eta_edges[ntower+1] = { // list of the edges of each tower, in eta, for eta>0, assuming a symmetric detector in eta<0 32 36 0., // lower limit of the most central tower … … 36 40 4.700, // lower limit of the most forward tower 37 41 5.000}; // higher limit of the most forward tower 42 38 43 const double tower_dphi[ntower] = { // list of the tower size in phi (in degrees) 39 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 40 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 41 20,20 }; 44 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 45 10,10,10,10,10, 10,10,10,10,10, 10,10,10,10,10, 10,10,10,20, 20 }; 42 46 43 47 … … 52 56 CalTower(const double Et0, const double eta0, const double phi0): Et(Et0), eta(eta0), phi(phi0) 53 57 { 58 54 59 if (fabs(eta) > tower_eta_edges[ntower]) {iEta = -1; iPhi = -1; } // outside the detector 55 60 else { … … 57 62 double all_towers[nn]; 58 63 unsigned int i =0; 59 for(unsigned int j= ntower-1; j>=0; j++, i++) all_towers[i] = -tower_eta_edges[j];60 for(unsigned int j= 1; j <ntower+1; j++, i++) all_towers[i] = tower_eta_edges[j];61 for(i = 0; i< nn; i++) if(eta < all_towers[i]) iEta=i;64 for(unsigned int j= ntower-1; i<ntower; j--,i++) { all_towers[i] = -tower_eta_edges[j];} 65 for(unsigned int j= 1; j <ntower+1; j++, i++) { all_towers[i] = tower_eta_edges[j]; } 66 for(i = 0; i< nn; i++) { if(eta < all_towers[i]) {iEta=i; break;} } 62 67 63 68 for(unsigned int j=0; j<ntower; j++) { 64 int wedge = int(360./tower_dphi[ i]);65 iPhi = int(phi/(2.*pi)* wedge)%wedge;69 int wedge = int(360./tower_dphi[j]); 70 iPhi = 0; int(phi/(2.*pi)* wedge)%wedge; 66 71 } 67 72 } 68 69 /* if(fabs(eta) < pseudorapidity(TOWER_THETA[0])) { // |eta| < 3.6470 if(eta <= 0){ // central particle, but negative eta71 for(unsigned int i = 0; i < ntower-1; i++)72 if(eta < pseudorapidity(180 - TOWER_THETA[i + 1])){ // eta < -3 ; -2.61 ; ... ; 073 iEta = 4 + i; // <-- pourquio on commence à 4 ????74 break;75 }76 } // central particle but negative eta77 else{ // central particle but positive eta78 for(unsigned int i = 0; i < ntower-1; i++)79 if(-eta < pseudorapidity(180 - TOWER_THETA[i + 1])){ // eta > 3 ; 2.61 ; ... ; 080 iEta = 5+ 2*(ntower-2) - i; //CDF iEta = 47 - i;81 break;82 }83 } // central particle but positive eta84 if( (iEta >= 8 && iEta < 14) || (iEta >= 38 && iEta < 44) )85 iPhi = int(phi/(2*pi)*48)%48;86 else87 iPhi = int(phi/(2*pi)*24)%24;88 }89 else{ // particle beyond detector reach :90 iEta = -1;91 iPhi = -1;92 }93 */94 73 } 95 74 … … 102 81 } 103 82 104 / * // converts theta angle [degrees] into pseudorapidity83 // converts theta angle [degrees] into pseudorapidity 105 84 double pseudorapidity(const double theta) { 106 85 return -log(tan( (theta/2.) * (pi/180.) )); 107 } */86 } 108 87 109 88 };
Note:
See TracChangeset
for help on using the changeset viewer.