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 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/medical/dna/pdb4dna/src/PDBbarycenter.cc (Version 11.3.0) and /examples/extended/medical/dna/pdb4dna/src/PDBbarycenter.cc (Version 10.3.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // This example is provided by the Geant4-DNA      26 // This example is provided by the Geant4-DNA collaboration
 27 // Any report or published results obtained us     27 // Any report or published results obtained using the Geant4-DNA software
 28 // shall cite the following Geant4-DNA collabo     28 // shall cite the following Geant4-DNA collaboration publication:
 29 // Med. Phys. 37 (2010) 4692-4708                  29 // Med. Phys. 37 (2010) 4692-4708
 30 // Delage et al. PDB4DNA: implementation of DN     30 // Delage et al. PDB4DNA: implementation of DNA geometry from the Protein Data
 31 //                  Bank (PDB) description for     31 //                  Bank (PDB) description for Geant4-DNA Monte-Carlo
 32 //                  simulations (submitted to      32 //                  simulations (submitted to Comput. Phys. Commun.)
 33 // The Geant4-DNA web site is available at htt     33 // The Geant4-DNA web site is available at http://geant4-dna.org
 34 //                                                 34 //
                                                   >>  35 // $Id$
 35 //                                                 36 //
 36 /// \file PDBbarycenter.cc                         37 /// \file PDBbarycenter.cc
 37 /// \brief Implementation of the PDBbarycenter     38 /// \brief Implementation of the PDBbarycenter class
 38                                                    39 
 39 #include "PDBbarycenter.hh"                        40 #include "PDBbarycenter.hh"
 40                                                    41 
 41 //....oooOO0OOooo........oooOO0OOooo........oo     42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 42                                                    43 
 43 Barycenter::Barycenter()                       <<  44 Barycenter::Barycenter():fBaryNum(0),fRadius(0),
 44   : fBaryNum(0),                               <<  45 fCenterX(0),fCenterY(0),fCenterZ(0),
 45     fRadius(0),                                <<  46 fCenterBaseX(0),fCenterBaseY(0),fCenterBaseZ(0),
 46     fCenterX(0),                               <<  47 fCenterSugarX(0),fCenterSugarY(0),fCenterSugarZ(0),
 47     fCenterY(0),                               <<  48 fCenterPhosphateX(0),fCenterPhosphateY(0),fCenterPhosphateZ(0),
 48     fCenterZ(0),                               <<  49 fpNext(0)
 49     fCenterBaseX(0),                           <<  50 {
 50     fCenterBaseY(0),                           <<  51   for ( int i = 0; i < 33; ++i )
 51     fCenterBaseZ(0),                           <<  52   {
 52     fCenterSugarX(0),                          <<  53     fDistanceTab[i] = 0.; //initialization
 53     fCenterSugarY(0),                          << 
 54     fCenterSugarZ(0),                          << 
 55     fCenterPhosphateX(0),                      << 
 56     fCenterPhosphateY(0),                      << 
 57     fCenterPhosphateZ(0),                      << 
 58     fpNext(0)                                  << 
 59 {                                              << 
 60   for (int i = 0; i < 33; ++i) {               << 
 61     fDistanceTab[i] = 0.;  // initialization   << 
 62   }                                                54   }
 63 }                                                  55 }
 64                                                    56 
 65 //....oooOO0OOooo........oooOO0OOooo........oo     57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 66                                                    58 
 67 Barycenter::Barycenter(int bNum, double x, dou <<  59 Barycenter::Barycenter(int bNum,double x,double y,double z,
 68                        double Bz,  // Base bar <<  60     double Bx,double By, double Bz, //Base barycenter coordinates
 69                        double Sx, double Sy, d <<  61     double Sx,double Sy, double Sz, //Sugar barycenter coordinates
 70                        double Px, double Py, d <<  62     double Px,double Py, double Pz)//Phosphate barycenter coordinates
 71 {                                              <<  63 {
 72   fBaryNum = bNum;  //!< Barycenter number     <<  64   fBaryNum=bNum;//!<Barycenter number
 73   fRadius = 0;                                 <<  65   fRadius=0;
 74   fCenterX = x;                                <<  66   fCenterX=x;
 75   fCenterY = y;                                <<  67   fCenterY=y;
 76   fCenterZ = z;                                <<  68   fCenterZ=z;
 77   for (int i = 0; i < 33; ++i) {               <<  69   for ( int i = 0; i < 33; ++i )
 78     fDistanceTab[i] = 0.;  // initialization   <<  70   {
                                                   >>  71     fDistanceTab[i] = 0.; //initialization
 79   }                                                72   }
 80   fCenterBaseX = Bx;  //!< "X coordinate" of t <<  73   fCenterBaseX=Bx;           //!< "X coordinate" of this Base Barycenter
 81   fCenterBaseY = By;  //!< "Y coordinate" of t <<  74   fCenterBaseY=By;           //!< "Y coordinate" of this Base Barycenter
 82   fCenterBaseZ = Bz;  //!< "Z coordinate" of t <<  75   fCenterBaseZ=Bz;           //!< "Z coordinate" of this Base Barycenter
 83   fCenterSugarX = Sx;  //!< "X coordinate" of  <<  76   fCenterSugarX=Sx;          //!< "X coordinate" of this Sugar Barycenter
 84   fCenterSugarY = Sy;  //!< "Y coordinate" of  <<  77   fCenterSugarY=Sy;          //!< "Y coordinate" of this Sugar Barycenter
 85   fCenterSugarZ = Sz;  //!< "Z coordinate" of  <<  78   fCenterSugarZ=Sz;          //!< "Z coordinate" of this Sugar Barycenter
 86   fCenterPhosphateX = Px;  //!< "X coordinate" <<  79   fCenterPhosphateX=Px;      //!< "X coordinate" of this Phosphate Barycenter
 87   fCenterPhosphateY = Py;  //!< "Y coordinate" <<  80   fCenterPhosphateY=Py;      //!< "Y coordinate" of this Phosphate Barycenter
 88   fCenterPhosphateZ = Pz;  //!< "Z coordinate" <<  81   fCenterPhosphateZ=Pz;      //!< "Z coordinate" of this Phosphate Barycenter
 89   fpNext = 0;                                  <<  82   fpNext=0;
 90 }                                                  83 }
 91                                                    84 
 92 //....oooOO0OOooo........oooOO0OOooo........oo     85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 93                                                    86 
 94 Barycenter* Barycenter::GetNext()              <<  87 Barycenter *Barycenter::GetNext()
 95 {                                                  88 {
 96   return fpNext;                                   89   return fpNext;
 97 }                                                  90 }
 98                                                    91 
 99 int Barycenter::GetID()                            92 int Barycenter::GetID()
100 {                                                  93 {
101   return fBaryNum;                                 94   return fBaryNum;
102 }                                                  95 }
103                                                    96 
104 //....oooOO0OOooo........oooOO0OOooo........oo     97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105                                                    98 
106 void Barycenter::SetNext(Barycenter* barycente <<  99 void Barycenter::SetNext(Barycenter *barycenterNext)
107 {                                                 100 {
108   fpNext = barycenterNext;                     << 101   fpNext=barycenterNext;
109 }                                                 102 }
110                                                   103 
111 //....oooOO0OOooo........oooOO0OOooo........oo    104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
112                                                   105 
113 void Barycenter::SetDistance(int i, double dis    106 void Barycenter::SetDistance(int i, double dist)
114 {                                                 107 {
115   fDistanceTab[i] = dist;                      << 108   fDistanceTab[i]=dist;
116 }                                                 109 }
117                                                   110 
118 //....oooOO0OOooo........oooOO0OOooo........oo    111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119                                                   112 
120 double Barycenter::GetDistance(int i)             113 double Barycenter::GetDistance(int i)
121 {                                                 114 {
122   return fDistanceTab[i];                         115   return fDistanceTab[i];
123 }                                                 116 }
124                                                   117 
125 //....oooOO0OOooo........oooOO0OOooo........oo    118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
126                                                   119 
127 void Barycenter::SetRadius(double rds)            120 void Barycenter::SetRadius(double rds)
128 {                                                 121 {
129   fRadius = rds;                               << 122   fRadius=rds;
130 }                                                 123 }
131                                                   124 
132 //....oooOO0OOooo........oooOO0OOooo........oo    125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
133                                                   126 
134 double Barycenter::GetRadius()                    127 double Barycenter::GetRadius()
135 {                                                 128 {
136   return fRadius;                                 129   return fRadius;
137 }                                                 130 }
                                                   >> 131 
138                                                   132