#include "AliConst.h"
#include "AliDigit.h"
#include "AliLoader.h"
+#include "AliLog.h"
+#include "AliMC.h"
#include "AliMagF.h"
#include "AliRun.h"
#include "AliTRD.h"
#include "AliTRDpoints.h"
#include "AliTRDrawData.h"
#include "AliTrackReference.h"
-#include "AliMC.h"
ClassImp(AliTRD)
// Create digits
//
AliTRDdigitizer digitizer("TRDdigitizer","TRD digitizer class");
- digitizer.SetDebug(GetDebug());
+ AliLog::SetClassDebugLevel("TRDdigitizer",AliDebugLevel());
// Initialization
digitizer.InitDetector();
AliTRDdigitizer digitizer("TRDdigitizer","TRD digitizer class");
// For the summable digits
digitizer.SetSDigits(kTRUE);
- digitizer.SetDebug(GetDebug());
+ AliLog::SetClassDebugLevel("TRDdigitizer",AliDebugLevel());
// Initialization
digitizer.InitDetector();
// Create the TRD digitizer
AliTRDdigitizer digitizer("TRDdigitizer","TRD digitizer class");
- digitizer.SetDebug(GetDebug());
+ AliLog::SetClassDebugLevel("TRDdigitizer",AliDebugLevel());
// Set the parameter
digitizer.SetEvent(gAlice->GetEvNumber());
// Read the s-digits via digits manager
AliTRDdigitsManager sdigitsManager;
- sdigitsManager.SetDebug(GetDebug());
+ AliLog::SetClassDebugLevel("TRDdigitisManager",AliDebugLevel());
sdigitsManager.SetSDigits(kTRUE);
sdigitsManager.CreateArrays();
// Check that FRAME is there otherwise we have no place where to put the TRD
AliModule* frame = gAlice->GetModule("FRAME");
if (!frame) {
- printf(" The TRD needs the FRAME to be defined first\n");
- return;
+ AliFatal("The TRD needs the FRAME to be defined first");
}
fGeometry->CreateGeometry(fIdtmed->GetArray() - 1299);
// Initialize the TRD detector after the geometry has been created
//
- Int_t i;
-
- if (fDebug) {
- printf("\n%s: ",ClassName());
- for (i = 0; i < 35; i++) printf("*");
- printf(" TRD_INIT ");
- for (i = 0; i < 35; i++) printf("*");
- printf("\n");
- }
+ AliDebug(1,"++++++++++++++++++++++++++++++++++++++++++++++");
if (fGeometry->IsVersion() == 1) {
- printf("%s: Full geometry version initialized\n",ClassName());
+ AliInfo("Full geometry version initialized");
if (fGeometry->GetPHOShole())
- printf("%s: Leave space in front of PHOS free\n",ClassName());
+ AliInfo("Leave space in front of PHOS free");
if (fGeometry->GetRICHhole())
- printf("%s: Leave space in front of RICH free\n",ClassName());
+ AliInfo("Leave space in front of RICH free");
}
else {
- printf("%s: Not a valid geometry\n",ClassName());
+ AliError("Not a valid geometry");
}
}
#include <TVirtualMC.h>
#include "AliConst.h"
+#include "AliLog.h"
+#include "AliMC.h"
#include "AliRun.h"
#include "AliTRDgeometry.h"
#include "AliTRDhit.h"
#include "AliTRDsim.h"
#include "AliTRDv1.h"
-#include "AliMC.h"
ClassImp(AliTRDv1)
Float_t pTot = mom.Rho();
fTR->CreatePhotons(iPdg,pTot,nTR,eTR);
if (nTR > kNTR) {
- printf("AliTRDv1::CreateTRhit -- ");
- printf("Boundary error: nTR = %d, kNTR = %d\n",nTR,kNTR);
- exit(1);
+ AliFatal(Form("Boundary error: nTR = %d, kNTR = %d",nTR,kNTR));
}
// Loop through the TR photons
AliTRD::Init();
- if(fDebug) printf("%s: Slow simulator\n",ClassName());
+ AliDebug(1,"Slow simulator\n");
if (fSensSelect) {
if (fSensPlane >= 0)
- printf(" Only plane %d is sensitive\n",fSensPlane);
+ AliInfo(Form("Only plane %d is sensitive"));
if (fSensChamber >= 0)
- printf(" Only chamber %d is sensitive\n",fSensChamber);
+ AliInfo(Form("Only chamber %d is sensitive",fSensChamber));
if (fSensSector >= 0) {
Int_t sens1 = fSensSector;
Int_t sens2 = fSensSector + fSensSectorRange;
sens2 -= ((Int_t) (sens2 / AliTRDgeometry::Nsect()))
* AliTRDgeometry::Nsect();
- printf(" Only sectors %d - %d are sensitive\n",sens1,sens2-1);
+ AliInfo(Form("Only sectors %d - %d are sensitive\n",sens1,sens2-1));
}
}
if (fTR)
- printf("%s: TR simulation on\n",ClassName());
+ AliInfo("TR simulation on")
else
- printf("%s: TR simulation off\n",ClassName());
- printf("\n");
+ AliInfo("TR simulation off");
// First ionization potential (eV) for the gas mixture (90% Xe + 10% CO2)
const Float_t kPoti = 12.1;
// Geant3 distribution for the delta-ray spectrum
fDeltaG = new TF1("deltaeg",IntSpecGeant,poti,eEnd,0);
- if(fDebug) {
- printf("%s: ",ClassName());
- for (Int_t i = 0; i < 80; i++) printf("*");
- printf("\n");
- }
+ AliDebug(1,"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
}
//
if ((iplane < 0) || (iplane > 5)) {
- printf("Wrong input value: %d\n",iplane);
- printf("Use standard setting\n");
+ AliWarning(Form("Wrong input value:%d",iplane));
+ AliWarning("Use standard setting");
fSensPlane = -1;
fSensSelect = 0;
return;
//
if ((ichamber < 0) || (ichamber > 4)) {
- printf("Wrong input value: %d\n",ichamber);
- printf("Use standard setting\n");
+ AliWarning(Form("Wrong input value: %d",ichamber));
+ AliWarning("Use standard setting");
fSensChamber = -1;
fSensSelect = 0;
return;
//
if ((isector < 0) || (isector > 17)) {
- printf("Wrong input value <isector>: %d\n",isector);
- printf("Use standard setting\n");
+ AliWarning(Form("Wrong input value <isector>: %d",isector));
+ AliWarning("Use standard setting");
fSensSector = -1;
fSensSectorRange = 0;
fSensSelect = 0;
}
if ((nsector < 1) || (nsector > 18)) {
- printf("Wrong input value <nsector>: %d\n",nsector);
- printf("Use standard setting\n");
+ AliWarning(Form("Wrong input value <nsector>: %d",nsector));
+ AliWarning("Use standard setting");
fSensSector = -1;
fSensSectorRange = 0;
fSensSelect = 0;
case 0 : StepManagerErmilova(); break; // 0 is Ermilova
case 1 : StepManagerGeant(); break; // 1 is Geant
case 2 : StepManagerFixedStep(); break; // 2 is fixed step
- default : printf("<AliTRDv1::StepManager>: Not a valid Step Manager.\n");
+ default : AliWarning("Not a valid Step Manager.");
}
}
//
if (t == 1) {
- printf("<AliTRDv1::SelectStepManager>: Sorry, Geant parametrization step"
- "manager is not implemented yet. Please ask K.Oyama for detail.\n");
+ AliWarning("Sorry, Geant parametrization step manager is not implemented yet. Please ask K.Oyama for detail.");
}
fTypeOfStepManager = t;
- printf("<AliTRDv1::SelectStepManager>: Step Manager type %d was selected.\n"
- , fTypeOfStepManager);
+ AliInfo(Form("Step Manager type %d was selected",fTypeOfStepManager));
}
// a spectrum taken from Geant3.
//
- printf("AliTRDv1::StepManagerGeant: Not implemented yet.\n");
+ AliWarning("Not implemented yet.");
}
if( energy < arr_e[i] ) break;
if( i == 0 )
- printf("Error in AliTRDv1::IntSpecGeant: "
- "given energy value is too small or zero.\n");
+ AliErrorGeneral("AliTRDv1","Given energy value is too small or zero");
// Interpolate
dnde = (arr_dndx[i-1] - arr_dndx[i]) / (arr_e[i] - arr_e[i-1]);