#ifndef WIN32
# define flukam flukam_
# define fluka_openinp fluka_openinp_
+# define fluka_openout fluka_openout_
# define fluka_closeinp fluka_closeinp_
# define mcihad mcihad_
# define mpdgha mpdgha_
#else
# define flukam FLUKAM
# define fluka_openinp FLUKA_OPENINP
+# define fluka_openout FLUKA_OPENOUT
# define fluka_closeinp FLUKA_CLOSEINP
# define mcihad MCIHAD
# define mpdgha MPDGHA
void type_of_call flukam(const int&);
void type_of_call newplo();
void type_of_call fluka_openinp(const int&, DEFCHARA);
+ void type_of_call fluka_openout(const int&, DEFCHARA);
void type_of_call fluka_closeinp(const int&);
int type_of_call mcihad(const int&);
int type_of_call mpdgha(const int&);
fStopEvent = 0;
fStopRun = 0;
fNEvent = 0;
+ PrintHeader();
}
//______________________________________________________________________________
const char* fname = fInputFileName;
fluka_openinp(lunin, PASSCHARA(fname));
+ fluka_openout(11, PASSCHARA("fluka.out"));
if (fVerbosityLevel >=2)
cout << "\t* Calling flukam..." << endl;
medium->SetCerenkovProperties(cerenkovProperties);
}
+void TFluka::SetCerenkov(Int_t itmed, Int_t npckov, Float_t* ppckov,
+ Float_t* absco, Float_t* effic, Float_t* rindex, Float_t* rfl) {
+//
+// Set Cerenkov properties for medium itmed
+//
+// npckov: number of sampling points
+// ppckov: energy values
+// absco: absorption length
+// effic: quantum efficiency
+// rindex: refraction index
+// rfl: reflectivity for boundary to medium itmed
+//
+//
+// Create object holding Cerenkov properties
+//
+ TFlukaCerenkov* cerenkovProperties = new TFlukaCerenkov(npckov, ppckov, absco, effic, rindex, rfl);
+//
+// Pass object to medium
+ TGeoMedium* medium = gGeoManager->GetMedium(itmed);
+ medium->SetCerenkovProperties(cerenkovProperties);
+}
+
+
//______________________________________________________________________________
void TFluka::SetCerenkov(Int_t /*itmed*/, Int_t /*npckov*/, Double_t * /*ppckov*/,
Double_t * /*absco*/, Double_t * /*effic*/, Double_t * /*rindex*/) {
//
-// Not implemented with TGeo - what G4 did ? Any FLUKA card generated?
- Warning("SetCerenkov", "Not implemented with TGeo");
+// Double_t version not implemented
}
-
+
+void TFluka::SetCerenkov(Int_t /*itmed*/, Int_t /*npckov*/, Double_t* /*ppckov*/,
+ Double_t* /*absco*/, Double_t* /*effic*/, Double_t* /*rindex*/, Double_t* /*rfl*/) {
+//
+// // Double_t version not implemented
+}
+
// Euclid
//______________________________________________________________________________
void TFluka::WriteEuclid(const char* /*fileName*/, const char* /*topVol*/,
//
// Check if new output file has to be opened
for (Int_t isci = 0; isci < isc; isci++) {
- mopi = dynamic_cast<TFlukaScoringOption*> (fUserScore->At(isc));
+
+
+ mopi = dynamic_cast<TFlukaScoringOption*> (fUserScore->At(isci));
if(strncmp(mopi->GetFileName(), fileName, size)==0) {
//
// No, the file already exists
if (caller == 11 || caller==12 || caller==6 || caller == 40) return 0.0;
Double_t sum = 0;
for ( Int_t j=0;j<TRACKR.mtrack;j++) {
- sum +=TRACKR.dtrack[j];
+ sum +=TRACKR.dtrack[j];
}
if (TRACKR.ntrack == 0 && TRACKR.mtrack == 0)
- return fRull + sum;
+ return fRull + sum;
else {
- return sum;
+ return sum;
}
}
tlife = ParticleLifeTime(pdg);
}
+void TFluka::PrintHeader()
+{
+ //
+ // Print a header
+ printf("\n");
+ printf("\n");
+ printf("------------------------------------------------------------------------------\n");
+ printf("- You are using the TFluka Virtual Monte Carlo Interface to FLUKA. -\n");
+ printf("- Please see the file fluka.out for FLUKA output and licensing information. -\n");
+ printf("------------------------------------------------------------------------------\n");
+ printf("\n");
+ printf("\n");
+}
+
#define pushcerenkovphoton pushcerenkovphoton_
fluka->SetZsco(z);
fluka->SetNCerenkov(nphot);
fluka->SetCaller(50);
- printf("userstepping ckv: %10d %10d %13.3f %13.3f %13.2f\n", nphot, mreg, x, y, z);
+ printf("userstepping ckv: %10d %10d %13.3f %13.3f %13.2f %s\n", nphot, mreg, x, y, z, fluka->CurrentVolName());
(TVirtualMCApplication::Instance())->Stepping();
}
}