#include <AliMC.h> //StepManager()
#include <AliRun.h> //CreateMaterials()
#include <AliMagF.h> //CreateMaterials()
+#include "AliGeomManager.h" //AddAlignableVolumes()
+#include <AliCDBEntry.h> //CreateMaterials()
+#include <AliCDBManager.h> //CreateMaterials()
#include <TF1.h> //DefineOpticalProperties()
#include <TF2.h> //DefineOpticalProperties()
-#include <TLorentzVector.h> //IsLostByFresnel()
-#include <AliCDBManager.h> //CreateMaterials()
-#include <AliCDBEntry.h> //CreateMaterials()
+#include <TGeoGlobalMagField.h>
#include <TGeoPhysicalNode.h> //AddAlignableVolumes()
-#include "AliGeomManager.h" //AddAlignableVolumes()
+#include <TLorentzVector.h> //IsLostByFresnel()
ClassImp(AliHMPIDv2)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
modUID = AliGeomManager::LayerToVolUID(idHMPID,modnum++);
if(!gGeoManager->SetAlignableEntry(Form("/HMPID/Chamber%i",iCh),Form("ALIC_1/Hmp_%i",iCh),modUID))
- AliFatal("AliHMPIDv3::Unable to set alignable entry!!"); //aligment without AliCluster3D
+ AliError("AliHMPIDv3::Unable to set alignable entry!!"); //aligment without AliCluster3D
//Get Tracking To Local matricies for alignment with AliCluster3D
TGeoPNEntry *eCh = gGeoManager->GetAlignableEntryByUID(modUID);
TGeoHMatrix *globMatrix = eCh->GetGlobalOrig();
Int_t matId=0; //tmp material id number
Int_t unsens = 0, sens=1; //sensitive or unsensitive medium
- Int_t itgfld = gAlice->Field()->Integ(); //type of field intergration 0 no field -1 user in guswim 1 Runge Kutta 2 helix 3 const field along z
- Float_t maxfld = gAlice->Field()->Max(); //max field value
+ Int_t itgfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ(); //type of field intergration 0 no field -1 user in guswim 1 Runge Kutta 2 helix 3 const field along z
+ Float_t maxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max(); //max field value
Float_t tmaxfd = -10.0; //max deflection angle due to magnetic field in one step
Float_t deemax = - 0.2; //max fractional energy loss in one step
Float_t stemax = - 0.1; //max step allowed [cm]
gMC->GetRandom()->RndmArray(2,ranf); //Sample direction
cthf=ranf[0]*2-1.0;
if(cthf<0) continue;
- sthf = TMath::Sqrt((1 - cthf) * (1 + cthf));
+ sthf = TMath::Sqrt((1. - cthf) * (1. + cthf));
phif = ranf[1] * 2 * TMath::Pi();
if(Double_t randomNumber=gMC->GetRandom()->Rndm()<=0.57)
//FORMULAE FROM HANDBOOK OF OPTICS, 33.23 OR
//W.R. HUNTER, J.O.S.A. 54 (1964),15 , J.O.S.A. 55(1965),1197
- Float_t sinin=TMath::Sqrt(1-pdoti*pdoti);
+ Float_t sinin=TMath::Sqrt((1.-pdoti)*(1.+pdoti));
Float_t tanin=sinin/pdoti;
Float_t c1=cn*cn-ck*ck-sinin*sinin;
}
TString flag="fanny combination";
- if(gMC->IsTrackAlive())
- if(gMC->IsTrackEntering()) flag="enters to";
- else if(gMC->IsTrackExiting()) flag="exits from";
- else if(gMC->IsTrackInside()) flag="inside";
- else
- if(gMC->IsTrackStop()) flag="stoped in";
+ if(gMC->IsTrackAlive()) {
+ if(gMC->IsTrackEntering()) flag="enters to";
+ else if(gMC->IsTrackExiting()) flag="exits from";
+ else if(gMC->IsTrackInside()) flag="inside";
+ } else {
+ if(gMC->IsTrackStop()) flag="stopped in";
+ }
Int_t vid=0,copy=0;
TString path=gMC->CurrentVolName(); path.Prepend("-");path.Prepend(gMC->CurrentVolOffName(1));//current volume and his mother are always there