2 #include "TVirtualMCApplication.h"
3 #include "TGeoMaterial.h"
4 #include "TGeoManager.h"
5 #include "TFlukaCerenkov.h"
10 #include "TFlukaGeo.h"
13 #include "Fdimpar.h" //(DIMPAR) fluka include
14 #include "Ftrackr.h" //(TRACKR) fluka common
16 # define endraw endraw_
18 # define endraw ENDRAW
21 void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t& ysco, Double_t& zsco)
23 TFluka* fluka = (TFluka*) gMC;
25 fluka->SetIcode(icode);
32 cout << " For icode=" << icode << " Stepping is NOT called" << endl;
35 if (TRACKR.jtrack == -1) {
36 // Handle quantum efficiency the G3 way
37 printf("endraw: Cerenkov photon depositing energy: %d %e\n", mreg, rull);
38 TGeoMaterial* material = (gGeoManager->GetCurrentVolume())->GetMaterial();
39 Int_t nmat = material->GetIndex();
40 TFlukaCerenkov* cerenkov = dynamic_cast<TFlukaCerenkov*> (material->GetCerenkovProperties());
42 Double_t eff = (cerenkov->GetQuantumEfficiency(rull));
43 if (gRandom->Rndm() > eff) {
49 (TVirtualMCApplication::Instance())->Stepping();
50 fluka->SetTrackIsNew(kFALSE);
52 } // end of extern "C"