//
// Standard constructor
//
+ fDebug = kFALSE;
fLastMaterial = 0;
fNextRegion = 0;
fNextLattice = 0;
//
// Default constructor
//
+ fDebug = kFALSE;
fLastMaterial = 0;
fNextRegion = 0;
fNextLattice = 0;
Float_t &dens, Float_t &radl, Float_t &absl,
Float_t* /*ubuf*/, Int_t& /*nbuf*/)
{
- printf("Gfmate %i\n", imat);
+ if (fDebug) printf("Gfmate %i\n", imat);
TGeoMaterial *mat;
TIter next (gGeoManager->GetListOfMaterials());
while ((mat = (TGeoMaterial*)next())) {
dens = mat->GetDensity();
radl = mat->GetRadLen();
absl = mat->GetIntLen();
- printf(" ->material found : %s a=%g, z=%g, dens=%g, radl=%g, absl=%g\n", name, a,z,dens,radl,absl);
+ if (fDebug) printf(" ->material found : %s a=%g, z=%g, dens=%g, radl=%g, absl=%g\n", name, a,z,dens,radl,absl);
}
//_____________________________________________________________________________
Double_t &dens, Double_t &radl, Double_t &absl,
Double_t* /*ubuf*/, Int_t& /*nbuf*/)
{
- printf("Gfmate %i\n", imat);
- TGeoMaterial *mat;
+ if (fDebug) printf("Gfmate %i\n", imat);
+ TGeoMaterial *mat;
TIter next (gGeoManager->GetListOfMaterials());
while ((mat = (TGeoMaterial*)next())) {
if (mat->GetUniqueID() == (UInt_t)imat) break;
dens = mat->GetDensity();
radl = mat->GetRadLen();
absl = mat->GetIntLen();
- printf(" ->material found : %s a=%g, z=%g, dens=%g, radl=%g, absl=%g\n", name, a,z,dens,radl,absl);
+ if (fDebug) printf(" ->material found : %s a=%g, z=%g, dens=%g, radl=%g, absl=%g\n", name, a,z,dens,radl,absl);
}
//_____________________________________________________________________________
kmat = gGeoManager->GetListOfMaterials()->GetSize();
gGeoManager->Material(name, a, z, dens, kmat, radl, absl);
- printf("Material %s: kmat=%i, a=%g, z=%g, dens=%g\n", name, kmat, a, z, dens);
+ if (fDebug) printf("Material %s: kmat=%i, a=%g, z=%g, dens=%g\n", name, kmat, a, z, dens);
}
//_____________________________________________________________________________
}
}
kmat = gGeoManager->GetListOfMaterials()->GetSize();
- printf("Mixture %s with %i elem: kmat=%i, dens=%g\n", name, nlmat, kmat, dens);
- for (Int_t j=0; j<nlmat; j++) printf(" Elem %i: z=%g a=%g w=%g\n",j,z[j],a[j],wmat[j]);
+ if (fDebug) {
+ printf("Mixture %s with %i elem: kmat=%i, dens=%g\n", name, nlmat, kmat, dens);
+ for (Int_t j=0; j<nlmat; j++) printf(" Elem %i: z=%g a=%g w=%g\n",j,z[j],a[j],wmat[j]);
+ }
gGeoManager->Mixture(name, a, z, dens, nlmat, wmat, kmat);
}
//_____________________________________________________________________________
TGeoNode *node = gGeoManager->GetCurrentNode();
if (!node) imed = gGeoManager->GetTopNode()->GetVolume()->GetMedium()->GetId();
else imed = node->GetVolume()->GetMedium()->GetId();
- printf("GetMedium=%i\n", imed);
+ if (fDebug) printf("GetMedium=%i\n", imed);
return imed;
}
kmed = gGeoManager->GetListOfMedia()->GetSize()+1;
gGeoManager->Medium(name,kmed,nmat, isvol, ifield, fieldm, tmaxfd, stemax,deemax, epsil, stmin);
- printf("Medium %s: kmed=%i, nmat=%i, isvol=%i\n", name, kmed, nmat,isvol);
+ if (fDebug) printf("Medium %s: kmed=%i, nmat=%i, isvol=%i\n", name, kmed, nmat,isvol);
}
//_____________________________________________________________________________
krot = gGeoManager->GetListOfMatrices()->GetEntriesFast();
gGeoManager->Matrix(krot, thex, phix, they, phiy, thez, phiz);
- printf("Rotation %i defined\n", krot);
+ if (fDebug) printf("Rotation %i defined\n", krot);
}
//_____________________________________________________________________________
Vname(shape,vshape);
TGeoVolume* vol = gGeoManager->Volume(vname, shape, nmed, upar, npar);
- printf("Volume %s: id=%i shape=%s, nmed=%i\n", vname, vol->GetNumber(), shape, nmed);
+ if (fDebug) printf("Volume %s: id=%i shape=%s, nmed=%i\n", vname, vol->GetNumber(), shape, nmed);
return vol->GetNumber();
}
Vname(mother,vmother);
gGeoManager->Division(vname, vmother, iaxis, ndiv, 0, 0, 0, "n");
- printf("Division %s: mother=%s iaxis=%i ndiv=%i\n", vname, vmother, iaxis, ndiv);
+ if (fDebug) printf("Division %s: mother=%s iaxis=%i ndiv=%i\n", vname, vmother, iaxis, ndiv);
}
//_____________________________________________________________________________
Double_t *upar=0;
gGeoManager->Node(vname, nr, vmother, x, y, z, irot, isOnly, upar);
- printf("Adding daughter %s to %s: cpy=%i irot=%i only=%s\n", vname,vmother,nr,irot,only.Data());
+ if (fDebug) printf("Adding daughter %s to %s: cpy=%i irot=%i only=%s\n", vname,vmother,nr,irot,only.Data());
}
//_____________________________________________________________________________
Vname(mother,vmother);
gGeoManager->Node(vname,nr,vmother, x,y,z,irot,isOnly,upar,np);
- printf("Adding daughter(s) %s to %s: cpy=%i irot=%i only=%s\n", vname,vmother,nr,irot,only.Data());
+ if (fDebug) printf("Adding daughter(s) %s to %s: cpy=%i irot=%i only=%s\n", vname,vmother,nr,irot,only.Data());
}
//_____________________________________________________________________________
printf("VolId: Volume %s not found\n",name);
return 0;
}
- printf("VolId for %s: %i\n", name, uid);
+ if (fDebug) printf("VolId for %s: %i\n", name, uid);
return uid;
}
Error("VolName","volume with id=%d does not exist",id);
return "NULL";
}
- printf("VolName for id=%i: %s\n", id, volume->GetName());
+ if (fDebug) printf("VolName for id=%i: %s\n", id, volume->GetName());
return volume->GetName();
}
}
TGeoMedium *med = volume->GetMedium();
if (!med) return 0;
- printf("VolId2Mate id=%i: idmed=%i\n", id, med->GetId());
+ if (fDebug) printf("VolId2Mate id=%i: idmed=%i\n", id, med->GetId());
return med->GetId();
}
TGeoNode *node = gGeoManager->GetCurrentNode();
copyNo = node->GetNumber();
Int_t id = node->GetVolume()->GetNumber();
- printf("CurrentVolId(cpy=%i) = %i\n", copyNo, id);
+ if (fDebug) printf("CurrentVolId(cpy=%i) = %i\n", copyNo, id);
return id;
}
TGeoNode *node = gGeoManager->GetMother(off);
if (!node) return 0;
copyNo = node->GetNumber();
- printf("CurrentVolOffId(off=%i,cpy=%i) = %i\n", off,copyNo,node->GetVolume()->GetNumber() );
+ if (fDebug) printf("CurrentVolOffId(off=%i,cpy=%i) = %i\n", off,copyNo,node->GetVolume()->GetNumber() );
return node->GetVolume()->GetNumber();
}
// FLUKA specific
// Returns the current volume name
//
if (gGeoManager->IsOutside()) return 0;
- printf("CurrentVolName : %s\n", gGeoManager->GetCurrentVolume()->GetName());
+ if (fDebug) printf("CurrentVolName : %s\n", gGeoManager->GetCurrentVolume()->GetName());
return gGeoManager->GetCurrentVolume()->GetName();
}
//_____________________________________________________________________________
if (off==0) return CurrentVolName();
TGeoNode *node = gGeoManager->GetMother(off);
if (!node) return 0;
- printf("CurrentVolOffName(off=%i) : %s\n", off,node->GetVolume()->GetName());
+ if (fDebug) printf("CurrentVolOffName(off=%i) : %s\n", off,node->GetVolume()->GetName());
return node->GetVolume()->GetName();
}
char digit[3];
Bool_t found = kFALSE;
- printf("Creating materials and compounds\n");
+ if (fDebug) printf("Creating materials and compounds\n");
for (i=0; i<nmater; i++) {
mat = (TGeoMaterial*)matlist->At(i);
if (mat->GetZ()<1E-1) {
if (fNextLattice!=999999999) gGeoManager->CdNode(fNextLattice-1);
return;
}
- printf("ERROR: mreg=%i neither current nor next region\n", mreg);
+ if (fDebug) printf("ERROR: mreg=%i neither current nor next region\n", mreg);
}
//_____________________________________________________________________________
// card in fluka input), returns 1 if user wants Fluka always to
// use DNEAR (in this case, be sure that GEANT4 DNEAR is unique,
// coming from all directions!!!)
- printf("========== Dummy IDNRWR\n");
+ if (mcgeom->IsDebugging()) printf("========== Dummy IDNRWR\n");
return 0;
}
// particle and all variables that fluka G1 computes.
// Initialize current point/direction
- printf("========== Inside G1WR\n");
- printf(" point/dir:(%14.9f, %14.9f, %14.9f, %g, %g, %g)\n", pSx,pSy,pSz,pV[0],pV[1],pV[2]);
+ if (mcgeom->IsDebugging()) {
+ printf("========== Inside G1WR\n");
+ printf(" point/dir:(%14.9f, %14.9f, %14.9f, %g, %g, %g)\n", pSx,pSy,pSz,pV[0],pV[1],pV[2]);
+ }
gGeoManager->SetCurrentPoint(pSx, pSy, pSz);
gGeoManager->SetCurrentDirection(pV);
- printf(" oldReg=%i oldLttc=%i pstep=%f\n",oldReg, oldLttc, propStep);
+ if (mcgeom->IsDebugging()) printf(" oldReg=%i oldLttc=%i pstep=%f\n",oldReg, oldLttc, propStep);
if (oldLttc==999999999) printf("WOOPS - wrong old lattice\n");
if (gGeoManager->IsOutside()) {
gGeoManager->SetOutside(kFALSE);
}
Int_t curLttc = gGeoManager->GetCurrentNodeId()+1;
Int_t curreg = gGeoManager->GetCurrentVolume()->GetNumber();
- printf(" curReg=%i curLttc=%i curPath=%s\n", curreg, curLttc, gGeoManager->GetPath());
+ if (mcgeom->IsDebugging()) printf(" curReg=%i curLttc=%i curPath=%s\n", curreg, curLttc, gGeoManager->GetPath());
Bool_t regsame = (curreg==oldReg)?kTRUE:kFALSE;
- if (!regsame) printf(" REGIONS DOES NOT MATCH\n");
+ if (!regsame && mcgeom->IsDebugging()) printf(" REGIONS DOES NOT MATCH\n");
if (oldLttc != curLttc) {
- printf(" HISTORIES DOES NOT MATCH\n");
+ if (mcgeom->IsDebugging()) printf(" HISTORIES DOES NOT MATCH\n");
gGeoManager->CdNode(oldLttc-1);
curLttc = gGeoManager->GetCurrentNodeId()+1;
curreg = gGeoManager->GetCurrentVolume()->GetNumber();
- printf(" re-initialized point: curReg=%i curLttc=%i curPath=%s\n", curreg, curLttc, gGeoManager->GetPath());
+ if (mcgeom->IsDebugging()) printf(" re-initialized point: curReg=%i curLttc=%i curPath=%s\n", curreg, curLttc, gGeoManager->GetPath());
}
lttcFlag = 0;
sLt[lttcFlag] = 0.;
while (!done) {
gGeoManager->FindNextBoundary(-propStep);
snext = gGeoManager->GetStep();
- printf(" FindNextBoundary(%g) snext=%g\n", propStep, snext);
+ if (mcgeom->IsDebugging()) printf(" FindNextBoundary(%g) snext=%g\n", propStep, snext);
if (steptot == 0) {
saf = gGeoManager->GetSafeDistance();
- printf(" Safety: %g\n", saf);
+ if (mcgeom->IsDebugging()) printf(" Safety: %g\n", saf);
}
sLt[lttcFlag] = propStep;
jrLt[lttcFlag] = gGeoManager->GetCurrentNodeId()+1;
for (i=0;i<3;i++) point[i]+=(snext+1E-6)*dir[i];
gGeoManager->FindNode();
istep = 0;
- printf(" boundary: step made %g\n", snext);
+ if (mcgeom->IsDebugging()) printf(" boundary: step made %g\n", snext);
while (gGeoManager->IsSameLocation() && steptot<propStep) {
if (istep>1E3) {
printf("Geometry error: could not cross boundary after extra 10 microns\n");
// !!!!!!!!!!
while (newReg==oldReg && steptot<propStep) {
- printf(" Entered SAME region... continue\n");
+ if (mcgeom->IsDebugging()) printf(" Entered SAME region... continue\n");
pst = propStep-steptot;
gGeoManager->FindNextBoundary(-pst);
snext = gGeoManager->GetStep();
}
newReg = (gGeoManager->IsOutside())?(mcgeom->NofVolumes()+1):gGeoManager->GetCurrentVolume()->GetNumber();
newLttc = (gGeoManager->IsOutside())?999999999:gGeoManager->GetCurrentNodeId()+1;
- printf("Found newreg=%i, newLttc=%i, lttFlag is: %i\n", newReg, newLttc, lttcFlag);
+ if (mcgeom->IsDebugging()) printf("Found newreg=%i, newLttc=%i, lttFlag is: %i\n", newReg, newLttc, lttcFlag);
sLt[lttcFlag-1] += snext; // correct step in old region
sLt[lttcFlag] = propStep-snext;
jrLt[lttcFlag] = newLttc;
if (newReg != oldReg) break; // lttcFlag=1
lttcFlag++;
} else {
- printf("Not crossing next\n");
+ if (mcgeom->IsDebugging()) printf("Not crossing next\n");
lttcFlag--; //0
retStep=steptot;
sLt[lttcFlag] = retStep;
}
lttcFlag++; //2
- if (!gGeoManager->IsOutside()) {
- printf(" ENTERED region %i, newLttc=%i in: %s\n", newReg,newLttc,gGeoManager->GetPath());
- } else printf(" EXIT GEOMETRY: BLKHOLE reg=%i\n", newReg);
+ if (mcgeom->IsDebugging()) {
+ if (!gGeoManager->IsOutside()) {
+ printf(" ENTERED region %i, newLttc=%i in: %s\n", newReg,newLttc,gGeoManager->GetPath());
+ } else printf(" EXIT GEOMETRY: BLKHOLE reg=%i\n", newReg);
+ }
}
// no boundary within proposed step
lttcFlag--;
done = kTRUE;
}
- printf("=> newReg=%i newLttc=%i lttcFlag=%i\n", newReg, newLttc, lttcFlag);
+ if (mcgeom->IsDebugging()) printf("=> newReg=%i newLttc=%i lttcFlag=%i\n", newReg, newLttc, lttcFlag);
mcgeom->SetNextRegion(newReg, newLttc);
- printf("=> snext=%g safe=%g\n", snext, saf);
- for (Int_t i=0; i<lttcFlag+1; i++) printf(" jrLt[%i]=%i sLt[%i]=%g\n", i,jrLt[i],i,sLt[i]);
+ if (mcgeom->IsDebugging()) {
+ printf("=> snext=%g safe=%g\n", snext, saf);
+ for (Int_t i=0; i<lttcFlag+1; i++) printf(" jrLt[%i]=%i sLt[%i]=%g\n", i,jrLt[i],i,sLt[i]);
+ }
if (newLttc!=oldLttc) {
if (gGeoManager->IsOutside()) {
gGeoManager->SetOutside(kFALSE);
}
gGeoManager->CdNode(oldLttc-1);
}
- printf("<= G1WR (in: %s)\n", gGeoManager->GetPath());
+ if (mcgeom->IsDebugging()) printf("<= G1WR (in: %s)\n", gGeoManager->GetPath());
}
//_____________________________________________________________________________
void g1rtwr()
{
- printf("========== Dummy G1RTWR\n");
+ if (mcgeom->IsDebugging()) printf("========== Dummy G1RTWR\n");
}
//_____________________________________________________________________________
void conhwr(Int_t & /*intHist*/, Int_t * /*incrCount*/)
{
- printf("========== Dummy CONHWR\n");
+ if (mcgeom->IsDebugging()) printf("========== Dummy CONHWR\n");
}
//_____________________________________________________________________________
void inihwr(Int_t &intHist)
{
- printf("========== Inside INIHWR -> reinitializing history: %i\n", intHist);
+ if (mcgeom->IsDebugging()) printf("========== Inside INIHWR -> reinitializing history: %i\n", intHist);
if (gGeoManager->IsOutside()) gGeoManager->CdTop();
if (intHist<=0) {
// printf("=== wrong history number\n");
}
if (intHist==0) gGeoManager->CdTop();
else gGeoManager->CdNode(intHist-1);
- printf(" --- current path: %s\n", gGeoManager->GetPath());
- printf("<= INIHWR\n");
+ if (mcgeom->IsDebugging()) {
+ printf(" --- current path: %s\n", gGeoManager->GetPath());
+ printf("<= INIHWR\n");
+ }
}
//_____________________________________________________________________________
// Geometry initialization wrapper called by FLUKAM. Provides to FLUKA the
// number of regions (volumes in TGeo)
// build application geometry
- printf("========== Inside JOMIWR\n");
+ if (mcgeom->IsDebugging()) printf("========== Inside JOMIWR\n");
flukaReg = gGeoManager->GetListOfUVolumes()->GetEntriesFast();
- printf("<= JOMIWR: last region=%i\n", flukaReg);
+ if (mcgeom->IsDebugging()) printf("<= JOMIWR: last region=%i\n", flukaReg);
}
//_____________________________________________________________________________
Double_t * /*pV*/, const Int_t &oldReg, const Int_t &oldLttc,
Int_t &newReg, Int_t &flagErr, Int_t &newLttc)
{
- printf("========== Inside LKDBWR (%f, %f, %f)\n",pSx, pSy, pSz);
-// printf(" in: pV=(%f, %f, %f)\n", pV[0], pV[1], pV[2]);
- printf(" in: oldReg=%i oldLttc=%i\n", oldReg, oldLttc);
+ if (mcgeom->IsDebugging()) {
+ printf("========== Inside LKDBWR (%f, %f, %f)\n",pSx, pSy, pSz);
+// printf(" in: pV=(%f, %f, %f)\n", pV[0], pV[1], pV[2]);
+ printf(" in: oldReg=%i oldLttc=%i\n", oldReg, oldLttc);
+ }
TGeoNode *node = gGeoManager->FindNode(pSx, pSy, pSz);
if (gGeoManager->IsOutside()) {
- printf("OUTSIDE\n");
newReg = mcgeom->NofVolumes()+1;
// newLttc = gGeoManager->GetCurrentNodeId();
newLttc = 999999999;
- printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
- printf("<= LKMGWR\n");
+ if (mcgeom->IsDebugging()) {
+ printf("OUTSIDE\n");
+ printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
+ printf("<= LKMGWR\n");
+ }
flagErr = newReg;
return;
}
newReg = node->GetVolume()->GetNumber();
newLttc = gGeoManager->GetCurrentNodeId()+1;
flagErr = newReg;
- printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
- printf("<= LKDBWR\n");
+ if (mcgeom->IsDebugging()) {
+ printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
+ printf("<= LKDBWR\n");
+ }
}
//_____________________________________________________________________________
Double_t * /*pV*/, const Int_t &oldReg, const Int_t &oldLttc,
Int_t &newReg, Int_t &flagErr, Int_t &newLttc)
{
- printf("========== Inside LKFXWR (%f, %f, %f)\n",pSx, pSy, pSz);
-// printf(" in: pV=(%f, %f, %f)\n", pV[0], pV[1], pV[2]);
- printf(" in: oldReg=%i oldLttc=%i\n", oldReg, oldLttc);
+ if (mcgeom->IsDebugging()) {
+ printf("========== Inside LKFXWR (%f, %f, %f)\n",pSx, pSy, pSz);
+// printf(" in: pV=(%f, %f, %f)\n", pV[0], pV[1], pV[2]);
+ printf(" in: oldReg=%i oldLttc=%i\n", oldReg, oldLttc);
+ }
TGeoNode *node = gGeoManager->FindNode(pSx, pSy, pSz);
if (gGeoManager->IsOutside()) {
- printf("OUTSIDE\n");
newReg = mcgeom->NofVolumes()+1;
// newLttc = gGeoManager->GetCurrentNodeId();
newLttc = 999999999;
- printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
- printf("<= LKMGWR\n");
+ if (mcgeom->IsDebugging()) {
+ printf("OUTSIDE\n");
+ printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
+ printf("<= LKMGWR\n");
+ }
flagErr = newReg;
return;
}
newReg = node->GetVolume()->GetNumber();
newLttc = gGeoManager->GetCurrentNodeId()+1;
flagErr = newReg;
- printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
- printf("<= LKFXWR\n");
+ if (mcgeom->IsDebugging()) {
+ printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
+ printf("<= LKFXWR\n");
+ }
}
//_____________________________________________________________________________
Double_t * /*pV*/, const Int_t &oldReg, const Int_t &oldLttc,
Int_t &flagErr, Int_t &newReg, Int_t &newLttc)
{
- printf("========== Inside LKMGWR (%f, %f, %f)\n",pSx, pSy, pSz);
-// printf(" in: pV=(%f, %f, %f)\n", pV[0], pV[1], pV[2]);
- printf(" in: oldReg=%i oldLttc=%i\n", oldReg, oldLttc);
+ if (mcgeom->IsDebugging()) {
+ printf("========== Inside LKMGWR (%f, %f, %f)\n",pSx, pSy, pSz);
+// printf(" in: pV=(%f, %f, %f)\n", pV[0], pV[1], pV[2]);
+ printf(" in: oldReg=%i oldLttc=%i\n", oldReg, oldLttc);
+ }
TGeoNode *node = gGeoManager->FindNode(pSx, pSy, pSz);
if (gGeoManager->IsOutside()) {
- printf("OUTSIDE\n");
newReg = mcgeom->NofVolumes()+1;
// newLttc = gGeoManager->GetCurrentNodeId();
newLttc = 999999999;
- printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
- printf("<= LKMGWR\n");
+ if (mcgeom->IsDebugging()) {
+ printf("OUTSIDE\n");
+ printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
+ printf("<= LKMGWR\n");
+ }
flagErr = newReg;
return;
}
newReg = node->GetVolume()->GetNumber();
newLttc = gGeoManager->GetCurrentNodeId()+1;
flagErr = newReg;
- printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
- printf("<= LKMGWR\n");
+ if (mcgeom->IsDebugging()) {
+ printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
+ printf("<= LKMGWR\n");
+ }
}
//_____________________________________________________________________________
Double_t * /*pV*/, const Int_t &oldReg, const Int_t &oldLttc,
Int_t &newReg, Int_t &flagErr, Int_t &newLttc)
{
- printf("========== Inside LKWR (%f, %f, %f)\n",pSx, pSy, pSz);
-// printf(" in: pV=(%f, %f, %f)\n", pV[0], pV[1], pV[2]);
- printf(" in: oldReg=%i oldLttc=%i\n", oldReg, oldLttc);
+ if (mcgeom->IsDebugging()) {
+ printf("========== Inside LKWR (%f, %f, %f)\n",pSx, pSy, pSz);
+// printf(" in: pV=(%f, %f, %f)\n", pV[0], pV[1], pV[2]);
+ printf(" in: oldReg=%i oldLttc=%i\n", oldReg, oldLttc);
+ }
TGeoNode *node = gGeoManager->FindNode(pSx, pSy, pSz);
if (gGeoManager->IsOutside()) {
- printf("OUTSIDE\n");
newReg = mcgeom->NofVolumes()+1;
// newLttc = gGeoManager->GetCurrentNodeId();
newLttc = 999999999;
- printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
- printf("<= LKMGWR\n");
+ if (mcgeom->IsDebugging()) {
+ printf("OUTSIDE\n");
+ printf(" out: newReg=%i newLttc=%i\n", newReg, newLttc);
+ printf("<= LKMGWR\n");
+ }
flagErr = newReg;
return;
}
newReg = node->GetVolume()->GetNumber();
newLttc = gGeoManager->GetCurrentNodeId()+1;
flagErr = newReg;
- printf(" out: newReg=%i newLttc=%i in %s\n", newReg, newLttc, gGeoManager->GetPath());
- printf("<= LKWR\n");
+ if (mcgeom->IsDebugging()) {
+ printf(" out: newReg=%i newLttc=%i in %s\n", newReg, newLttc, gGeoManager->GetPath());
+ printf("<= LKWR\n");
+ }
}
//_____________________________________________________________________________
Double_t *norml, const Int_t &oldReg,
const Int_t &newReg, Int_t &flagErr)
{
- printf("========== Inside NRMLWR (%g, %g, %g, %g, %g, %g)\n", pSx,pSy,pSz,pVx,pVy,pVz);
- printf(" oldReg=%i, newReg=%i\n", oldReg,newReg);
+ if (mcgeom->IsDebugging()) {
+ printf("========== Inside NRMLWR (%g, %g, %g, %g, %g, %g)\n", pSx,pSy,pSz,pVx,pVy,pVz);
+ printf(" oldReg=%i, newReg=%i\n", oldReg,newReg);
+ }
Int_t curreg = (gGeoManager->IsOutside())?(mcgeom->NofVolumes()+1):gGeoManager->GetCurrentVolume()->GetNumber();
Int_t curLttc = gGeoManager->GetCurrentNodeId()+1;
- printf(" curReg=%i, curLttc=%i in: %s\n", curreg, curLttc, gGeoManager->GetPath());
+ if (mcgeom->IsDebugging()) printf(" curReg=%i, curLttc=%i in: %s\n", curreg, curLttc, gGeoManager->GetPath());
Bool_t regsame = (curreg==oldReg)?kTRUE:kFALSE;
gGeoManager->SetCurrentPoint(pSx, pSy, pSz);
gGeoManager->SetCurrentDirection(pVx,pVy,pVz);
if (!regsame) {
- printf(" REGIONS DOEN NOT MATCH\n");
+ if (mcgeom->IsDebugging()) printf(" REGIONS DOEN NOT MATCH\n");
gGeoManager->FindNode();
curreg = (gGeoManager->IsOutside())?(mcgeom->NofVolumes()+1):gGeoManager->GetCurrentVolume()->GetNumber();
curLttc = gGeoManager->GetCurrentNodeId()+1;
- printf(" re-initialized point: curReg=%i curLttc=%i curPath=%s\n", curreg, curLttc, gGeoManager->GetPath());
+ if (mcgeom->IsDebugging()) printf(" re-initialized point: curReg=%i curLttc=%i curPath=%s\n", curreg, curLttc, gGeoManager->GetPath());
}
Double_t *dnorm = gGeoManager->FindNormalFast();
flagErr = 0;
norml[0] = -dnorm[0];
norml[1] = -dnorm[1];
norml[2] = -dnorm[2];
- printf(" normal to boundary: (%g, %g, %g)\n", norml[0], norml[1], norml[2]);
+ if (mcgeom->IsDebugging()) printf(" normal to boundary: (%g, %g, %g)\n", norml[0], norml[1], norml[2]);
curreg = (gGeoManager->IsOutside())?(mcgeom->NofVolumes()+1):gGeoManager->GetCurrentVolume()->GetNumber();
curLttc = gGeoManager->GetCurrentNodeId()+1;
- printf(" final location: curReg=%i, curLttc=%i in %s\n", curreg,curLttc,gGeoManager->GetPath());
- printf("<= NRMLWR\n");
+ if (mcgeom->IsDebugging()) {
+ printf(" final location: curReg=%i, curLttc=%i in %s\n", curreg,curLttc,gGeoManager->GetPath());
+ printf("<= NRMLWR\n");
+ }
}
//_____________________________________________________________________________
void rgrpwr(const Int_t & /*flukaReg*/, const Int_t & /*ptrLttc*/, Int_t & /*g4Reg*/,
Int_t * /*indMother*/, Int_t * /*repMother*/, Int_t & /*depthFluka*/)
{
- printf("=> Dummy RGRPWR\n");
+ if (mcgeom->IsDebugging()) printf("=> Dummy RGRPWR\n");
}
//_____________________________________________________________________________
// For TGeo, just return the current node ID. No copy need to be made.
- printf("=> Inside ISVHWR\n");
+ if (mcgeom->IsDebugging()) printf("=> Inside ISVHWR\n");
if (check<0) return intHist;
Int_t histInt = gGeoManager->GetCurrentNodeId()+1;
- printf("<= ISVHWR: history is: %i in: %s\n", histInt, gGeoManager->GetPath());
+ if (mcgeom->IsDebugging()) printf("<= ISVHWR: history is: %i in: %s\n", histInt, gGeoManager->GetPath());
return histInt;
}