// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // // $Id: G3NegVolPars.cc,v 1.13 2006/06/29 18:13:08 gunter Exp $ // GEANT4 tag $Name: geant4-09-02-ref-02 $ // // modified by I. Hrivnacova, 13.10.99 #include "globals.hh" #include "G3VolTable.hh" #include "G4VSolid.hh" #include "G3toG4.hh" #include G4bool G3CalcParamsFn(G4double *Rpar, G4int npar, G4double *Rparm, G4String shape, G4String shapem) // Returns true only in case the parameters *after* processing // this method remain negative. { G4bool NegPresent = FALSE; // for normal single volume positioning, just substitute for the // negative parameters // treat only the legal cases if (shapem == shape) { if (shape == "BOX" || shape == "TRD1" || shape == "TRD2" || shape == "ELTU") { for (G4int i=0;iGetShape(); G4double* Rpar = vte->GetRpar(); G4int npar = vte->GetNpar(); if (npar ==0) { // no solid parameters are defined in vte npar = *nparpt; Rpar = pars; } else { // solid parameters are already defined in vte // pars[], nparpt are ignored // TO DO: check if g3 ignores them too or resets // vte parameters according to this new ones !! } // mother G4String shapem = mvte->GetShape(); G4double* Rparm = mvte->GetRpar(); if (strcmp(routine,"GSPOS") == 0 || strcmp(routine,"GSVOLU") == 0) { NegPresent = G3CalcParamsFn(Rpar,npar,Rparm,shape,shapem); } if (strcmp(routine,"GSDVN") == 0) { // just set the flag. The parametrization function figures out // what to do. for (G4int i=0;i