/*
$Log$
+Revision 1.26 2000/05/16 13:10:41 fca
+New method IsNewTrack and fix for a problem in Father-Daughter relations
+
+Revision 1.25 2000/04/07 11:12:35 fca
+G4 compatibility changes
+
+Revision 1.24 2000/02/28 21:03:57 fca
+Some additions to improve the compatibility with G4
+
+Revision 1.23 2000/02/23 16:25:25 fca
+AliVMC and AliGeant3 classes introduced
+ReadEuclid moved from AliRun to AliModule
+
+Revision 1.22 2000/01/18 15:40:13 morsch
+Interface to GEANT3 routines GFTMAT, GBRELM and GPRELM added
+Define geant particle type 51: Feedback Photon with Cherenkov photon properties.
+
Revision 1.21 2000/01/17 19:41:17 fca
Add SetERAN function
gcomad(PASSCHARD("GCNUM"), (int*&) fGcnum PASSCHARL("GCNUM"));
gcomad(PASSCHARD("GCSETS"),(int*&) fGcsets PASSCHARL("GCSETS"));
gcomad(PASSCHARD("GCPHYS"),(int*&) fGcphys PASSCHARL("GCPHYS"));
+ gcomad(PASSCHARD("GCPHLT"),(int*&) fGcphlt PASSCHARL("GCPHLT"));
gcomad(PASSCHARD("GCOPTI"),(int*&) fGcopti PASSCHARL("GCOPTI"));
gcomad(PASSCHARD("GCTLIT"),(int*&) fGctlit PASSCHARL("GCTLIT"));
gcomad(PASSCHARD("GCVDMA"),(int*&) fGcvdma PASSCHARL("GCVDMA"));
fNextVol=fGcvolu->nlevel;
}
+//____________________________________________________________________________
+void TGeant3::FinishGeometry()
+{
+ //Close the geometry structure
+ Ggclos();
+}
+
//____________________________________________________________________________
Int_t TGeant3::NextVolUp(Text_t *name, Int_t ©)
{
return 0;
}
+//_____________________________________________________________________________
+void TGeant3::BuildPhysics()
+{
+ Gphysi();
+}
+
//_____________________________________________________________________________
Int_t TGeant3::CurrentVolID(Int_t ©) const
{
}
//_____________________________________________________________________________
-Int_t TGeant3::VolId(Text_t *name) const
+Int_t TGeant3::VolId(const Text_t *name) const
{
//
// Return the unique numeric identifier for volume name
return fVolNames[id-1];
}
+//_____________________________________________________________________________
+void TGeant3::SetCut(const char* cutName, Float_t cutValue)
+{
+ if(!strcmp(cutName,"CUTGAM"))
+ fGccuts->cutgam=cutValue;
+ else if(!strcmp(cutName,"CUTGAM"))
+ fGccuts->cutele=cutValue;
+ else if(!strcmp(cutName,"CUTELE"))
+ fGccuts->cutneu=cutValue;
+ else if(!strcmp(cutName,"CUTHAD"))
+ fGccuts->cuthad=cutValue;
+ else if(!strcmp(cutName,"CUTMUO"))
+ fGccuts->cutmuo=cutValue;
+ else if(!strcmp(cutName,"BCUTE"))
+ fGccuts->bcute=cutValue;
+ else if(!strcmp(cutName,"BCUTM"))
+ fGccuts->bcutm=cutValue;
+ else if(!strcmp(cutName,"DCUTE"))
+ fGccuts->dcute=cutValue;
+ else if(!strcmp(cutName,"DCUTM"))
+ fGccuts->dcutm=cutValue;
+ else if(!strcmp(cutName,"PPCUTM"))
+ fGccuts->ppcutm=cutValue;
+ else if(!strcmp(cutName,"TOFMAX"))
+ fGccuts->tofmax=cutValue;
+ else Warning("SetCut","Cut %s not implemented\n",cutName);
+}
+
+//_____________________________________________________________________________
+void TGeant3::SetProcess(const char* flagName, Int_t flagValue)
+{
+ if(!strcmp(flagName,"PAIR"))
+ fGcphys->ipair=flagValue;
+ else if(!strcmp(flagName,"COMP"))
+ fGcphys->icomp=flagValue;
+ else if(!strcmp(flagName,"PHOT"))
+ fGcphys->iphot=flagValue;
+ else if(!strcmp(flagName,"PFIS"))
+ fGcphys->ipfis=flagValue;
+ else if(!strcmp(flagName,"DRAY"))
+ fGcphys->idray=flagValue;
+ else if(!strcmp(flagName,"ANNI"))
+ fGcphys->ianni=flagValue;
+ else if(!strcmp(flagName,"BREM"))
+ fGcphys->ibrem=flagValue;
+ else if(!strcmp(flagName,"HADR"))
+ fGcphys->ihadr=flagValue;
+ else if(!strcmp(flagName,"MUNU"))
+ fGcphys->imunu=flagValue;
+ else if(!strcmp(flagName,"DCAY"))
+ fGcphys->idcay=flagValue;
+ else if(!strcmp(flagName,"LOSS"))
+ fGcphys->iloss=flagValue;
+ else if(!strcmp(flagName,"MULS"))
+ fGcphys->imuls=flagValue;
+ else if(!strcmp(flagName,"RAYL"))
+ fGcphys->irayl=flagValue;
+ else if(!strcmp(flagName,"STRA"))
+ fGcphlt->istra=flagValue;
+ else if(!strcmp(flagName,"SYNC"))
+ fGcphlt->isync=flagValue;
+ else Warning("SetFlag","Flag %s not implemented\n",flagName);
+}
+
//_____________________________________________________________________________
Float_t TGeant3::Xsec(char* reac, Float_t energy, Int_t part, Int_t mate)
{
return fGctrak->sleng;
}
+//_____________________________________________________________________________
+Bool_t TGeant3::IsNewTrack() const
+{
+ //
+ // True if the track is not at the boundary of the current volume
+ //
+ return (fGctrak->sleng>0);
+}
+
//_____________________________________________________________________________
Bool_t TGeant3::IsTrackInside() const
{
return fGctmed->stemax;
}
-//_____________________________________________________________________________
-void TGeant3::SetColors()
-{
- //
- // Set the colors for all the volumes
- // this is done sequentially for all volumes
- // based on the number of their medium
- //
- Int_t kv, icol;
- Int_t jvolum=fGclink->jvolum;
- //Int_t jtmed=fGclink->jtmed;
- //Int_t jmate=fGclink->jmate;
- Int_t nvolum=fGcnum->nvolum;
- char name[5];
- //
- // Now for all the volumes
- for(kv=1;kv<=nvolum;kv++) {
- // Get the tracking medium
- Int_t itm=Int_t (fZq[fZlq[jvolum-kv]+4]);
- // Get the material
- //Int_t ima=Int_t (fZq[fZlq[jtmed-itm]+6]);
- // Get z
- //Float_t z=fZq[fZlq[jmate-ima]+7];
- // Find color number
- //icol = Int_t(z)%6+2;
- //icol = 17+Int_t(z*150./92.);
- //icol = kv%6+2;
- icol = itm%6+2;
- strncpy(name,(char*)&fZiq[jvolum+kv],4);
- name[4]='\0';
- Gsatt(name,"COLO",icol);
- }
-}
-
//_____________________________________________________________________________
void TGeant3::SetMaxStep(Float_t maxstep)
{
fGcphys->irayl = par;
}
+//_____________________________________________________________________________
+void TGeant3::SetSTRA(Int_t par)
+{
+ //
+ // To control energy loss fluctuations
+ // with the PhotoAbsorption Ionisation model.
+ // par =0 no Straggling.
+ // =1 Straggling yes => no Delta rays.
+ //
+ fGcphlt->istra = par;
+}
+
//_____________________________________________________________________________
void TGeant3::SetSWIT(Int_t sw, Int_t val)
{