Locked History Actions

attachment:DrawStableNuclei.C of 核図表

Attachment 'DrawStableNuclei.C'

Download

#include "TBox.h"
#include "TLine.h"

#define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))

Int_t DrawStableNuclei() {
  return DrawStableNuclei(0);
}

Int_t DrawStableNuclei(Int_t fill) {
  Int_t surfZ[] = {
    1,  1,  2,  2,  3,  3,  4,  5,  5,  6,  6,  7,  7,  8,  8,  8,  9,  10, 10, 10,
    11, 12, 12, 12, 13, 14, 14, 14, 15, 16, 16, 16, 16, 17, 17, 18, 18, 18, 19, 19, 
    20, 20, 20, 21, 22, 22, 22, 22, 22, 23, 24, 24, 24, 25, 26, 26, 26, 26, 27, 28, 
    28, 28, 28, 28, 29, 29, 30, 30, 30, 30, 31, 31, 32, 32, 32, 32, 32, 33, 34, 34, 
    34, 34, 34, 34, 35, 35, 36, 36, 36, 36, 36, 37, 38, 38, 38, 38, 39, 40, 40, 40, 
    40, 41, 42, 42, 42, 42, 42, 42, 44, 44, 44, 44, 44, 44, 44, 45, 46, 46, 46, 46, 
    46, 46, 47, 47, 48, 48, 48, 48, 48, 48, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50, 
    50, 51, 51, 52, 52, 52, 52, 52, 53, 54, 54, 54, 54, 54, 54, 55, 56, 56, 56, 56, 
    56, 56, 57, 58, 59, 60, 60, 60, 60, 60, 62, 62, 62, 62, 62, 63, 64, 64, 64, 64, 
    64, 65, 66, 66, 66, 66, 66, 66, 66, 67, 68, 68, 68, 68, 68, 68, 69, 70, 70, 70, 
    70, 70, 70, 70, 71, 72, 72, 72, 72, 72, 73, 75, 76, 76, 76, 76, 76, 77, 77, 78, 
    78, 78, 78, 78, 79, 80, 80, 80, 80, 80, 80, 80, 81, 81, 82, 82, 82, 83};
  Int_t surfN[] = {
    0,  1,  1,  2,  3,  4,  5,  5,  6,  6,  7,  7,  8,  8,  9,  10, 10, 10, 11, 12, 
    12, 12, 13, 14, 14, 14, 15, 16, 16, 16, 17, 18, 20, 18, 20, 18, 20, 22, 20, 22, 
    22, 23, 24, 24, 24, 25, 26, 27, 28, 28, 28, 29, 30, 30, 28, 30, 31, 32, 32, 30, 
    32, 33, 34, 36, 34, 36, 34, 36, 37, 38, 38, 40, 38, 40, 41, 42, 44, 42, 40, 42, 
    43, 44, 46, 48, 44, 46, 44, 46, 47, 48, 50, 48, 46, 48, 49, 50, 50, 50, 51, 52, 
    54, 52, 50, 52, 53, 54, 55, 56, 52, 54, 55, 56, 57, 58, 60, 58, 56, 58, 59, 60, 
    62, 64, 60, 62, 58, 60, 62, 63, 64, 66, 64, 62, 64, 65, 66, 67, 68, 69, 70, 72, 
    74, 70, 72, 68, 70, 72, 73, 74, 74, 72, 74, 75, 76, 77, 78, 78, 74, 78, 79, 80, 
    81, 82, 82, 82, 82, 82, 83, 85, 86, 88, 82, 87, 88, 90, 92, 90, 90, 91, 92, 93, 
    94, 94, 90, 92, 94, 95, 96, 97, 98, 98, 94, 96, 98, 99, 100,102,100,98, 100,101, 
    102,103,104,106,104,104,105,106,107,108,108,110,111,112,113,114,116,114,116,114, 
    116,117,118,120,118,116,118,119,120,121,122,124,122,124,124,125,126,126};
  Int_t surfFlag[] = {
    13, 3,  12, 7,  13, 7,  11, 12, 3,  12, 3,  12, 3,  12, 5,  3,  10, 12, 5,  3,
    10, 12, 5,  3,  10, 12, 5,  3,  10, 12, 5,  3,  11, 10, 10, 14, 10, 11, 14, 10,
    12, 5,  3,  10, 12, 5,  5,  5,  3,  10, 12, 5,  3,  10, 15, 12, 5,  3,  10, 15,
    12, 5,  3,  11, 10, 10, 14, 12, 5,  3,  10, 11, 14, 12, 5,  3,  15, 10, 15, 12,
    5,  3,  11, 15, 10, 10, 14, 12, 5,  3,  15, 10, 15, 12, 5,  3,  10, 12, 5,  3,
    15, 10, 15, 12, 5,  5,  5,  7,  15, 13, 5,  5,  5,  3,  15, 10, 15, 12, 5,  3,
    11, 15, 10, 10, 15, 14, 12, 5,  3,  15, 10, 15, 12, 5,  5,  5,  5,  5,  3,  11,
    15, 10, 10, 15, 14, 12, 5,  3,  10, 15, 12, 5,  5,  5,  3,  10, 15, 12, 5,  5,
    5,  3,  10, 10, 10, 12, 7,  13, 7,  15, 15, 13, 7,  11, 15, 10, 12, 5,  5,  5,
    3,  10, 15, 15, 12, 5,  5,  5,  3,  10, 15, 15, 12, 5,  3,  15, 10, 15, 12, 5,
    5,  5,  3,  15, 10, 12, 5,  5,  5,  3,  14, 15, 13, 5,  5,  3,  11, 10, 10, 14,
    12, 5,  3,  15, 10, 15, 12, 5,  5,  5,  3,  11, 14, 10, 12, 5,  3,  14};

  if(ARRAYSIZE(surfZ) != ARRAYSIZE(surfN) || ARRAYSIZE(surfN) != ARRAYSIZE(surfFlag)){
    std::cout << "size of surfZ, surfN, surfN, is not same!!" << std::endl;
    return;
  }

  if (fill) {
    TBox *box1 = new TBox();
    box1->SetFillColor(1);
    for (Int_t i=0; i < ARRAYSIZE(surfZ); i++) {
      box1->DrawBox(surfN[i]-0.5, surfZ[i]-0.5, surfN[i]+0.5, surfZ[i]+0.5);
    }
    delete box1;
  }else{
    TLine *line1 = new TLine();
    //line1->SetLineColor(2);
    for (Int_t i=0; i < ARRAYSIZE(surfZ); i++) {
      if ((surfFlag[i] >> 0) & 0x1 ) {
        line1->DrawLine(surfN[i]-0.5, surfZ[i]-0.5, surfN[i]+0.5, surfZ[i]-0.5);
      }
      if ((surfFlag[i] >> 1) & 0x1 ) {
        line1->DrawLine(surfN[i]+0.5, surfZ[i]-0.5, surfN[i]+0.5, surfZ[i]+0.5);
      }
      if ((surfFlag[i] >> 2) & 0x1 ) {
        line1->DrawLine(surfN[i]-0.5, surfZ[i]+0.5, surfN[i]+0.5, surfZ[i]+0.5);
      }
      if ((surfFlag[i] >> 3) & 0x1 ) {
        line1->DrawLine(surfN[i]-0.5, surfZ[i]-0.5, surfN[i]-0.5, surfZ[i]+0.5);
      }
    }
    delete line1;
  }  
  return 0;
}

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2011-08-15 12:31:59, 11.7 KB) [[attachment:DrawKTUY05DripLine.C]]
  • [get | view] (2011-08-15 12:30:05, 4.2 KB) [[attachment:DrawStableNuclei.C]]
  • [get | view] (2011-08-15 10:52:12, 0.4 KB) [[attachment:Ini.C]]
  • [get | view] (2011-08-15 11:22:39, 423.9 KB) [[attachment:KTUY05_m246.dat]]
  • [get | view] (2011-08-15 11:21:45, 13.3 KB) [[attachment:KTUY05_m246.png]]
  • [get | view] (2011-08-15 11:19:56, 325.8 KB) [[attachment:KTUY05_m246.root]]
  • [get | view] (2011-08-15 12:44:15, 14.4 KB) [[attachment:KTUY_stable.png]]
  • [get | view] (2011-08-15 12:44:47, 9.9 KB) [[attachment:KTUYdl_stable.png]]
  • [get | view] (2011-08-15 11:40:48, 37.7 KB) [[attachment:LiseMassExcess.png]]
  • [get | view] (2011-08-15 11:55:08, 14.6 KB) [[attachment:LiseMassExcessType.png]]
  • [get | view] (2011-08-15 11:19:33, 3.1 KB) [[attachment:MakeKTUY05RootFile.C]]
  • [get | view] (2011-08-15 10:53:14, 1.2 KB) [[attachment:MakeStableNucleiRootFile.C]]
  • [get | view] (2011-08-11 17:37:50, 25.6 KB) [[attachment:NuclearWalletCardsSearch_GetStableNuclei.png]]
  • [get | view] (2011-09-03 04:16:45, 1.2 KB) [[attachment:PlotKTUY.C]]
  • [get | view] (2011-08-15 10:53:26, 0.5 KB) [[attachment:PlotStable.C]]
  • [get | view] (2011-08-15 10:49:44, 8.6 KB) [[attachment:StableNuclei.png]]
  • [get | view] (2011-08-15 10:53:40, 6.0 KB) [[attachment:StableNuclei.root]]
  • [get | view] (2011-08-11 17:50:57, 36.5 KB) [[attachment:StableNuclei.txt]]
  • [get | view] (2013-11-01 17:25:58, 15.2 KB) [[attachment:evenz_oddn_jpi.dat]]
  • [get | view] (2013-11-01 08:50:14, 12.0 KB) [[attachment:first2plus.dat]]
  • [get | view] (2013-11-01 09:06:27, 43.2 KB) [[attachment:first2plus_ss.png]]
  • [get | view] (2013-11-01 17:25:07, 14.7 KB) [[attachment:oddz_evenn_jpi.dat]]
  • [get | view] (2013-11-01 17:26:05, 2.0 KB) [[attachment:plot_evenz_oddn_jpi.C]]
  • [get | view] (2013-11-01 17:26:10, 11.9 KB) [[attachment:plot_evenz_oddn_jpi.png]]
  • [get | view] (2013-11-01 08:49:50, 1.5 KB) [[attachment:plot_first2plus.C]]
  • [get | view] (2013-11-01 08:50:03, 11.5 KB) [[attachment:plot_first2plus.png]]
  • [get | view] (2013-11-01 17:25:18, 2.0 KB) [[attachment:plot_oddz_evenn_jpi.C]]
  • [get | view] (2013-11-01 17:25:23, 11.8 KB) [[attachment:plot_oddz_evenn_jpi.png]]

You are not allowed to attach a file to this page.