Double_t AliPHOS::fgTimeMax = 2.56E-5 ; // each sample is over 100 ns fTimeMax/fTimeBins
Double_t AliPHOS::fgTimePeak = 4.1E-6 ; // 4 micro seconds
Double_t AliPHOS::fgTimeTrigger = 100E-9 ; // 100ns, just for a reference
-
//____________________________________________________________________________
AliPHOS:: AliPHOS() : AliDetector()
TObject::Copy(phos) ;
// fQATask = AliPHOSQAChecker::Copy(*(phos.fQATask)) ;
phos.fTreeQA = fTreeQA->CloneTree() ;
+ phos.fHighCharge = fHighCharge ;
+ phos.fHighGain = fHighGain ;
+ phos.fHighLowGainFactor = fHighLowGainFactor ;
+ phos.fLowGainOffset = fLowGainOffset;
}
//____________________________________________________________________________
TClonesArray* digits = loader->Digits() ;
if (!digits) {
- Error("Digits2Raw", "no digits found !");
+ AliError(Form("No digits found !"));
return;
}
// get the geometry
AliPHOSGeometry* geom = GetGeometry();
if (!geom) {
- Error("Digits2Raw", "no geometry found !");
+ AliError(Form("No geometry found !"));
return;
}
TBranch *branch;
char branchname[20];
sprintf(branchname,"%s",GetName());
-
// Branch address for hit tree
- TTree *treeH = TreeH();
+ TTree *treeH = TreeH();
if (treeH) {
branch = treeH->GetBranch(branchname);
if (branch)
{
if (fHits == 0x0) fHits= new TClonesArray("AliPHOSHit",1000);
- //Info("SetTreeAddress","<%s> Setting Hits Address",GetName());
+ //AliInfo(Form("<%s> Setting Hits Address",GetName()));
branch->SetAddress(&fHits);
}
}
if (alarmsF == 0x0)
{
- Error("WriteQA","Can not find folder with qa alarms");
+ AliError(Form("Can not find folder with qa alarms"));
return;
}
TString branchName(alarmsF->GetName());
// --- AliRoot header files ---
#include "AliDetector.h"
+#include "AliLog.h"
#include "AliPHOSGeometry.h"
class AliPHOSQAChecker ;
virtual ~AliPHOS() ;
virtual void AddHit(Int_t, Int_t*, Float_t *) {
// do not use this definition but the one below
- Fatal("AddHit(Int_t, Int_t*, Float_t *)", "do not use") ;
+ AliFatal(Form("do not use")) ;
}
virtual void AddHit( Int_t shunt, Int_t primary, Int_t track,
// --- AliRoot header files ---
-//#include "AliRun.h"
+#include "AliLog.h"
#include "AliStack.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSAnalyze.h"
fRunLoader = AliRunLoader::Open(fileName,"AliPHOSAnalyze");
if (fRunLoader == 0x0)
{
- Error("AliPHOSAnalyze","Error Loading session");
+ AliError(Form("Error Loading session"));
}
}
//========== Create ObjectLoader
if (fRunLoader == 0x0)
{
- Error("DrawRecon","Error Loading session");
+ AliError(Form("Error Loading session"));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("DrawRecon","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
if(Nevent >= fRunLoader->GetNumberOfEvents() ) {
- Error("DrawRecon", "There is no event %d only %d events available", Nevent, fRunLoader->GetNumberOfEvents() ) ;
+ AliError(Form("There is no event %d only %d events available", Nevent, fRunLoader->GetNumberOfEvents() )) ;
return ;
}
const AliPHOSGeometry * phosgeom = gime->PHOSGeometry() ;
TString message ;
message = "Number of EMC + CPV SDigits per module: \n" ;
message += "%d %d %d %d %d\n";
- Info("DrawRecon", message.Data(), nsdig[0], nsdig[1], nsdig[2], nsdig[3], nsdig[4] ) ;
+ AliInfo(Form(message.Data(), nsdig[0], nsdig[1], nsdig[2], nsdig[3], nsdig[4] )) ;
//Plot digits
Int_t iDigit ;
if (fRunLoader == 0x0)
{
- Error("Ls","Error Loading session");
+ AliError(Form("Error Loading session"));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("Ls","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
{
if (gime->LoadSDigits("READ"))
{
- Error("Ls","Problems with loading summable digits");
+ AliError(Form("Problems with loading summable digits"));
return;
}
}
{
if (gime->LoadDigits("READ"))
{
- Error("Ls","Problems with loading digits");
+ AliError(Form("Problems with loading digits"));
return;
}
}
{
if (gime->LoadRecPoints("READ"))
{
- Error("Ls","Problems with loading rec points");
+ AliError(Form("Problems with loading rec points"));
return;
}
}
message += "\n" ;
}
}
- Info("LS", message.Data()) ;
+ AliInfo(Form(message.Data())) ;
}
//____________________________________________________________________________
void AliPHOSAnalyze::InvariantMass()
// Calculates Real and Mixed invariant mass distributions
if (fRunLoader == 0x0)
{
- Error("DrawRecon","Error Loading session");
+ AliError(Form("Error Loading session"));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("DrawRecon","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
Int_t iRecParticle ;
TClonesArray * rp = gime->RecParticles() ;
if(!rp){
- Error("InvariantMass", "Can't find RecParticles") ;
+ AliError(Form("Can't find RecParticles")) ;
return ;
}
if (fRunLoader == 0x0)
{
- Error("DrawRecon","Error Loading session");
+ AliError(Form("Error Loading session"));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("DrawRecon","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
Int_t iRecParticle ;
TClonesArray * rp = gime->RecParticles() ;
if(!rp) {
- Error("EnergyResolution", "Event %d, Can't find RecParticles ", ievent) ;
+ AliError(Form("Event %d, Can't find RecParticles ", ievent)) ;
return ;
}
TClonesArray * ts = gime->TrackSegments() ;
if(!ts) {
- Error("EnergyResolution", "Event %d, Can't find TrackSegments", ievent) ;
+ AliError(Form("Event %d, Can't find TrackSegments", ievent)) ;
return ;
}
TObjArray * emcrp = gime->EmcRecPoints() ;
if(!emcrp){
- Error("EnergyResolution", "Event %d, Can't find EmcRecPoints") ;
+ AliError(Form("Event %d, Can't find EmcRecPoints")) ;
return ;
}
if (fRunLoader == 0x0)
{
- Error("DrawRecon","Error Loading session");
+ AliError(Form("Error Loading session"));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("DrawRecon","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
fRunLoader->GetEvent(ievent) ;
TClonesArray * rp = gime->RecParticles() ;
if(!rp) {
- Error("PositionResolution", "Event %d, Can't find RecParticles", ievent) ;
+ AliError(Form("Event %d, Can't find RecParticles", ievent)) ;
return ;
}
TClonesArray * ts = gime->TrackSegments() ;
if(!ts) {
- Error("PositionResolution", "Event %d, Can't find TrackSegments", ievent) ;
+ AliError(Form("Event %d, Can't find TrackSegments", ievent)) ;
return ;
}
TObjArray * emcrp = gime->EmcRecPoints() ;
if(!emcrp){
- Error("PositionResolution", "Event %d, Can't find EmcRecPoints", ievent) ;
+ AliError(Form("Event %d, Can't find EmcRecPoints", ievent)) ;
return ;
}
if (fRunLoader == 0x0)
{
- Error("DrawRecon","Error Loading session");
+ AliError(Form("Error Loading session"));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("DrawRecon","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
TClonesArray * rp = gime->RecParticles() ;
if(!rp) {
- Error("Contamination", "Event %d, Can't find RecParticles", ievent) ;
+ AliError(Form("Event %d, Can't find RecParticles", ievent)) ;
return ;
}
TClonesArray * ts = gime->TrackSegments() ;
if(!ts) {
- Error("Contamination", "Event %d, Can't find TrackSegments", ievent) ;
+ AliError(Form("Event %d, Can't find TrackSegments", ievent)) ;
return ;
}
TObjArray * emcrp = gime->EmcRecPoints() ;
if(!emcrp){
- Error("Contamination", "Event %d, Can't find EmcRecPoints", ievent) ;
+ AliError(Form("Event %d, Can't find EmcRecPoints", ievent)) ;
return ;
}
totalInd+=counter[i1][i2] ;
message += "Indentified particles: %d" ;
- Info("Contamination", message.Data(), maxevent,
+ AliInfo(Form(message.Data(), maxevent,
counter[2][0], counter[2][1], counter[2][2], counter[2][3], counter[2][4],
counter[3][0], counter[3][1], counter[3][2], counter[3][3], counter[3][4],
counter[0][0], counter[0][1], counter[0][2], counter[0][3], counter[0][4],
counter[5][0], counter[5][1], counter[5][2], counter[5][3], counter[5][4],
counter[6][0], counter[6][1], counter[6][2], counter[6][3], counter[6][4],
counter[7][0], counter[7][1], counter[7][2], counter[7][3], counter[7][4],
- totalInd ) ;
+ totalInd )) ;
}
// --- Standard library ---
// --- AliRoot header files ---
+#include "AliLog.h"
#include "AliPHOSGetter.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSClusterizerv1.h"
if(strstr(option,"tim")){
gBenchmark->Stop("PHOSClusterizer");
- Info("Exec", " took %f seconds for Clusterizing %f seconds per event \n",
+ AliInfo(Form("took %f seconds for Clusterizing %f seconds per event \n",
gBenchmark->GetCpuTime("PHOSClusterizer"),
- gBenchmark->GetCpuTime("PHOSClusterizer")/nEvents ) ;
+ gBenchmark->GetCpuTime("PHOSClusterizer")/nEvents )) ;
}
}
else
message = " AliPHOSClusterizerv1 not initialized " ;
- Info("Print", message.Data(),
+ AliInfo(Form("%s, %s %s %s %s %s %s %s %s %s %s", message.Data(),
taskName.Data(),
GetTitle(),
taskName.Data(),
fW0,
fCpvClusteringThreshold,
fCpvLocMaxCut,
- fW0CPV ) ;
+ fW0CPV )) ;
}
TObjArray * emcRecPoints = gime->EmcRecPoints() ;
TObjArray * cpvRecPoints = gime->CpvRecPoints() ;
- printf("\nevent %d \n", gAlice->GetEvNumber()) ;
- printf(" Found %d EMC RecPoints and %d CPV RecPoints \n",
- emcRecPoints->GetEntriesFast(),cpvRecPoints->GetEntriesFast()) ;
+ AliInfo(Form("\nevent %d \n Found %d EMC RecPoints and %d CPV RecPoints",
+ gAlice->GetEvNumber(),
+ emcRecPoints->GetEntriesFast(),
+ cpvRecPoints->GetEntriesFast() )) ;
fRecPointsInRun += emcRecPoints->GetEntriesFast() ;
fRecPointsInRun += cpvRecPoints->GetEntriesFast() ;
// --- Standard library ---
// --- AliRoot header files ---
+#include "AliLog.h"
#include "AliPHOSClusterizerv2.h"
#include "AliPHOSGetter.h"
#include "TFolder.h"
gime->Event(ievent,"D") ;
- Info("Exec", "MakeClusters invoked..") ;
+ AliInfo(Form("MakeClusters invoked..")) ;
MakeClusters() ;
- Info("Exec", "MakeClusters done.") ;
+ AliInfo(Form("MakeClusters done.")) ;
//SmartRecPoints will communicate with wPool.
wPoolF->Remove(recCpv);
delete recCpv;
- Info("Exec", " %d", gime->CpvRecPoints()->GetEntries() ) ;
- Info("Exec", " %d cpvRecPoints", cpvRecPoints->GetEntries() ) ;
+ AliInfo(Form(" %d", gime->CpvRecPoints()->GetEntries() )) ;
+ AliInfo(Form(" %d cpvRecPoints", cpvRecPoints->GetEntries() )) ;
// Now Emc reconstruction
message += " %d\n" ;
message += " %d emcRecPoints\n" ;
- Info("Exec", message.Data(),
+ AliInfo(Form("%s", message.Data(),
nOldCpv,
gime->CpvRecPoints()->GetEntries(),cpvRecPoints->GetEntries(),
nOldEmc,
- gime->EmcRecPoints()->GetEntries(), emcRecPoints->GetEntries() ) ;
+ gime->EmcRecPoints()->GetEntries(), emcRecPoints->GetEntries() ));
WriteRecPoints();
if(strstr(option,"tim")) {
gBenchmark->Stop("PHOSClusterizer");
- Info("Exec","took %f seconds for Clusterizing", gBenchmark->GetCpuTime("PHOSClusterizer") ) ;
+ AliInfo(Form("took %f seconds for Clusterizing", gBenchmark->GetCpuTime("PHOSClusterizer") )) ;
}
}
// --- Standard library ---
// --- AliRoot header files ---
+#include "AliLog.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSConTableDB.h"
//assuming, that prototype is centered in the third module of the PHOS
fNcrInProto =fProtoRaws*fProtoColumns ;
if(!fNcrInProto){
- Error("BuildDB", "configuratio of prototype is not known!!!\n Specify number of raws and columns in prototype") ;
+ AliError(Form("configuratio of prototype is not known!!!\n Specify number of raws and columns in prototype"));
return ;
}
fRawOffset = (fGeom->GetNPhi() - fProtoRaws)/2 ;
else
message += " null \n" ;
- Info("Print", message.Data(), GetName(), GetTitle(), fGeom->GetName(), fGeom->GetTitle() ) ;
+ AliInfo(Form(message.Data(), GetName(), GetTitle(), fGeom->GetName(), fGeom->GetTitle() )) ;
message = "\n-------Prototype parameters--------\n" ;
message += " number of columns: %d \n" ;
message += " col: %d of %d\n" ;
message += "------------------------------------ \n" ;
- Info("Print", message.Data(), fProtoColumns, fProtoRaws, fRawOffset, fGeom->GetNPhi(), fColOffset,fGeom->GetNZ() );
+ AliInfo(Form(message.Data(), fProtoColumns, fProtoRaws, fRawOffset, fGeom->GetNPhi(), fColOffset,fGeom->GetNZ() ));
}
//____________________________________________________________________________
AliPHOSConTableDB& AliPHOSConTableDB::operator=(const AliPHOSConTableDB& cdb){
// --- Standard library ---
// --- AliRoot header files ---
+#include "AliLog.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSDigit.h"
#include "AliPHOSCpvRecPoint.h"
x = -1e6 ;
z = -1e6 ;
if (fMulDigit != 0)
- Warning(":EvalLocalPosition", "Too low log weight factor to evaluate cluster's center" ) ;
+ AliWarning(Form("Too low log weight factor to evaluate cluster's center" )) ;
}
fLocPos.SetX(x) ;
fLocPos.SetY(0.) ;
TString message ;
message = "AliPHOSCpvRecPoint: " ;
message += "Digits # " ;
- Info("Print", message.Data()) ;
+ AliInfo(Form(message.Data())) ;
Int_t iDigit;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- Info("Print", " %d ", fDigitsList[iDigit]) ;
+ printf(" %d \n", fDigitsList[iDigit]) ;
- Info("Print", "Energies: ") ;
+ printf("Energies: \n") ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
- Info("Print", " %f ", fEnergyList[iDigit]) ;
+ printf(" %f ", fEnergyList[iDigit]) ;
message = " Multiplicity = %d\n" ;
message += " Cluster Energy = %f\n" ;
message += " Stored at position %d\n" ;
- Info("Print", message.Data(), fMulDigit, fAmp, GetIndexInList() ) ;
+ printf(message.Data(), fMulDigit, fAmp, GetIndexInList() ) ;
}
// --- Standard library ---
// --- AliRoot header files ---
-
+#include "AliLog.h"
#include "AliRunDigitizer.h"
#include "AliPHOSDigit.h"
#include "AliPHOSGetter.h"
Int_t ReadEvent = event ;
if (fManager)
ReadEvent = dynamic_cast<AliStream*>(fManager->GetInputStream(0))->GetCurrentEventNumber() ;
- Info("Digitize", "Adding event %d from input stream 0 %s %s", ReadEvent, GetTitle(), fEventFolderName.Data()) ;
+ AliInfo(Form("Adding event %d from input stream 0 %s %s",
+ ReadEvent, GetTitle(), fEventFolderName.Data())) ;
gime->Event(ReadEvent, "S") ;
TClonesArray * digits = gime->Digits() ;
digits->Clear() ;
AliPHOSSDigitizer * sDigitizer = gime->SDigitizer();
if ( !sDigitizer )
- Fatal("Digitize", "SDigitizer with name %s %s not found", GetTitle(), fEventFolderName.Data() ) ;
+ AliFatal(Form("SDigitizer with name %s %s not found",
+ GetTitle(), fEventFolderName.Data() )) ;
//take all the inputs to add together and load the SDigits
TObjArray * sdigArray = new TObjArray(fInput) ;
AliPHOSGetter * gime = AliPHOSGetter::Instance(fInputFileNames[i], tempo) ;
if (fManager)
ReadEvent = dynamic_cast<AliStream*>(fManager->GetInputStream(i))->GetCurrentEventNumber() ;
- Info("Digitize", "Adding event %d from input stream %d %s %s", ReadEvent, i, fInputFileNames[i].Data(), tempo.Data()) ;
+ AliInfo(Form("Adding event %d from input stream %d %s %s",
+ ReadEvent, i, fInputFileNames[i].Data(), tempo.Data())) ;
gime->Event(ReadEvent,"S");
sdigArray->AddAt(gime->SDigits(), i) ;
}
// by default fLastEvent = fFirstEvent (process only one event)
if (!fInit) { // to prevent overwrite existing file
- Error( "Exec", "Give a version name different from %s", fEventFolderName.Data() ) ;
+ AliError(Form("Give a version name different from %s",
+ fEventFolderName.Data() )) ;
return ;
}
gBenchmark->Stop("PHOSDigitizer");
TString message ;
message = " took %f seconds for Digitizing %f seconds per event\n" ;
- Info("Exec", message.Data(),
+ AliInfo(Form( message.Data(),
gBenchmark->GetCpuTime("PHOSDigitizer"),
- gBenchmark->GetCpuTime("PHOSDigitizer")/nEvents );
+ gBenchmark->GetCpuTime("PHOSDigitizer")/nEvents ));
}
}
fInit = kTRUE ;
AliPHOSGetter * gime = AliPHOSGetter::Instance(GetTitle(), fEventFolderName) ;
if ( gime == 0 ) {
- Fatal("Init" ,"Could not obtain the Getter object for file %s and event %s !", GetTitle(), fEventFolderName.Data()) ;
+ AliFatal(Form("Could not obtain the Getter object for file %s and event %s !",
+ GetTitle(), fEventFolderName.Data()));
return kFALSE;
}
TString opt("Digits") ;
if(gime->VersionExists(opt) ) {
- Error( "Init", "Give a version name different from %s", fEventFolderName.Data() ) ;
+ AliError(Form("Give a version name different from %s",
+ fEventFolderName.Data() )) ;
fInit = kFALSE ;
}
}
// looking for file which contains AliRun
if (gSystem->AccessPathName(alirunFileName)) {// file does not exist
- Error("MixWith", "File %s does not exist!", alirunFileName.Data()) ;
+ AliError(Form("File %s does not exist!", alirunFileName.Data())) ;
return ;
}
// looking for the file which contains SDigits
if ( eventFolderName != AliConfig::GetDefaultEventFolderName()) // only if not the default folder name
fileName = fileName.ReplaceAll(".root", "") + "_" + eventFolderName + ".root" ;
if ( (gSystem->AccessPathName(fileName)) ) {
- Error("MixWith", "The file %s does not exist!", fileName.Data()) ;
+ AliError(Form("The file %s does not exist!", fileName.Data())) ;
return ;
}
// need to increase the arrays
void AliPHOSDigitizer::Print()const
{
// Print Digitizer's parameters
- Info("Print", "\n------------------- %s -------------", GetName() ) ;
+ AliInfo(Form("\n------------------- %s -------------", GetName() )) ;
if( strcmp(fEventFolderName.Data(), "") != 0 ){
printf(" Writing Digits to branch with title %s\n", fEventFolderName.Data()) ;
printf(" ---------------------------------------------------\n") ;
}
else
- Info("Print", "AliPHOSDigitizer not initialized" ) ;
+ AliInfo(Form("AliPHOSDigitizer not initialized" )) ;
}
AliPHOSGetter * gime = AliPHOSGetter::Instance(GetTitle(), fEventFolderName) ;
TClonesArray * digits = gime->Digits() ;
- Info("PrintDigits", "%d", digits->GetEntriesFast()) ;
+ AliInfo(Form("%d", digits->GetEntriesFast())) ;
printf("\nevent %d", gAlice->GetEvNumber()) ;
printf("\n Number of entries in Digits list %d", digits->GetEntriesFast() ) ;
// --- Standard library ---
// --- AliRoot header files ---
+#include "AliLog.h"
#include "AliPHOSLoader.h"
#include "AliGenerator.h"
#include "AliPHOSGeometry.h"
AliRunLoader* rn = AliRunLoader::GetRunLoader(AliConfig::GetDefaultEventFolderName());
if (rn == 0x0)
{
- Error("ExecuteEvent","Can not find Run Loader in Default Event Folder");
+ AliError(Form("Cannot find Run Loader in Default Event Folder"));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
if (gime == 0x0)
{
- Error("ExecuteEvent","Can not find PHOS Loader from Run Loader");
+ AliError(Form("Cannot find PHOS Loader from Run Loader"));
return;
}
TString message ;
message = "AliPHOSEmcRecPoint:\n" ;
message += " digits # = " ;
- Info("Print", message.Data()) ;
+ AliInfo(Form(message.Data())) ;
Int_t iDigit;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
printf(" %d ", fDigitsList[iDigit] ) ;
- Info("Print", " Energies = ") ;
+ printf(" Energies = ") ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
printf(" %f ", fEnergyList[iDigit] ) ;
printf("\n") ;
- Info("Print", " Primaries ") ;
+ printf(" Primaries ") ;
for(iDigit = 0;iDigit < fMulTrack; iDigit++)
printf(" %d ", fTracksList[iDigit]) ;
printf("\n") ;
message += " Number of primaries %d" ;
message += " Stored at position %d" ;
- Info("Print", message.Data(), fMulDigit, fAmp, fMulTrack,GetIndexInList() ) ;
+ printf(message.Data(), fMulDigit, fAmp, fMulTrack,GetIndexInList() ) ;
}
#include "TFolder.h"
// --- AliRoot header files ---
+#include "AliLog.h"
#include "AliConfig.h"
#include "AliPHOSDigit.h"
#include "AliPHOSClusterizer.h"
Float_t yy = lpos.X();
Float_t e = GetEnergy();
- Info("InitTwoGam", "(x,z,e)[old] = (%f, %f, %f)", yy, xx, e) ;
+ AliInfo(Form("(x,z,e)[old] = (%f, %f, %f)", yy, xx, e)) ;
// xx = XY(xx/e);
// yy = XY(yy/e);
Float_t dx1 = x1c - ix;
Float_t dy1 = y1c - iy;
-// Info("TwoGam", "Mult %d dx1 %f dy1 %f", nDigits, dx1, dy1) ;
-// AG(e1c,dx1,dy1,a1,gx1,gy1);
+
GetReconstructionManager()->AG(e1c,dx1,dy1,a1,gx1,gy1);
Float_t dx2 = x2c - ix;
Float_t dy2 = y2c - iy;
-// Info("TwoGam", " dx2 %f dy2 %f", dx2, dy2) ;
-// AG(e2c,dx2,dy2,a2,gx2,gy2);
+
GetReconstructionManager()->AG(e2c,dx2,dy2,a2,gx2,gy2);
Float_t a = a1+a2;
loop20: ;
Float_t step = st*gr;
- Info("TwoGam", "Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpmin %d",
- iter, dof, ch/dof, chstop/dof, step, stpmin) ;
+ AliInfo(Form("Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpmin %d",
+ iter, dof, ch/dof, chstop/dof, step, stpmin)) ;
if(step<stpmin)
TString message ;
message = " (x,z,e)[1 fit] = (%f, %f, %f)\n" ;
message = " (x,z,e)[2 fit] = (%f, %f, %f)\n" ;
- Info("TwoGam", message.Data(),
+ AliInfo(Form(message.Data(),
x1New, z1New, e1New,
- x2New, z2New, e2New) ;
+ x2New, z2New, e2New)) ;
fChi2Dof = chisq;
eDigit = eDigit*ratio;
newRP->AddDigit(*digit,eDigit);
}
- Info("UnfoldTwoMergedPoints", "======= Split: daughter rec point %d =================", iMax) ;
+ AliInfo(Form("======= Split: daughter rec point %d =================",
+ iMax)) ;
newRP->Print();
}
Float_t a;
GetReconstructionManager()->AG(e,dx,dy,a,gx,gy);
Float_t dd;
- Info("EvaluatePosition", " (ix iy xc yc dx dy) %f %f %f %f %f %f", ix, iy, xc, yc, dx, dy) ;
+ AliInfo(Form(" (ix iy xc yc dx dy) %f %f %f %f %f %f",
+ ix, iy, xc, yc, dx, dy)) ;
Float_t chi2dg = GetReconstructionManager()->OneGamChi2(a,eDigit,e,dd);
// Exclude digit with too large chisquare.
Float_t grc = TMath::Sqrt(grxc*grxc + gryc*gryc);
if(grc<1.e-10) grc=1.e-10;
Float_t sc = 1. + chisqc/chisq;
- Info("EvaluatePosition", " chisq: %f", chisq) ;
+ AliInfo(Form(" chisq: %f", chisq)) ;
st = st/sc;
if(chisqc>chisq)
goto loop20;
loop20: ;
Float_t step = st*gr;
- Info("EvaluatePosition", " Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpMin %d",
- iter, dof, chisq/dof, chisq/dof, chstop/dof, step, stpMin) ;
+ AliInfo(Form(" Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpMin %d",
+ iter, dof, chisq/dof, chisq/dof, chstop/dof, step, stpMin)) ;
if(step<stpMin)
Float_t thr0 = GetReconstructionManager()->KillGamMinEnergy();
if(GetEnergy()<thr0) {
- Info("KillWeakPoint", "+++++++ Killing this rec point ++++++++++") ;
+ AliInfo(Form("+++++++ Killing this rec point ++++++++++")) ;
RemoveFromWorkingPool(this);
return kTRUE;
}
{
if(TooClose(rp))
{
- Info("MergeClosePoint", "+++++++ Merging point 1: ++++++") ;
+ AliInfo(Form("+++++++ Merging point 1: ++++++")) ;
this->Print();
- Info("MergeClosePoint", "+++++++ and point 2: ++++++++++") ;
+ AliInfo(Form("+++++++ and point 2: ++++++++++")) ;
((AliPHOSEvalRecPoint*)rp)->Print();
//merge two rec. points
RemoveFromWorkingPool(rp);
delete rp;
- Info("MergeClosePoint", "++++++ Resulting point: ++++++++") ;
+ AliInfo(Form("++++++ Resulting point: ++++++++")) ;
this->Print();
break;
AliPHOSClusterizer* clusterizer = GetClusterizer();
if(!clusterizer) {
- Fatal("UnfoldLocalMaxima", "Cannot get clusterizer") ;
+ AliFatal(Form("Cannot get clusterizer")) ;
}
if(this->IsEmc()) {
GetReconstructionManager()->AG(eMax,dz,dx,singleShowerGain,gxMax,gyMax);
Float_t totalGain = eFit[iDigit];
Float_t ratio = singleShowerGain/totalGain;
- Info("UnfoldLocalMaxima", " ratio -> %f", ratio) ;
+ AliInfo(Form(" ratio -> %f", ratio)) ;
eDigit = eDigit*ratio;
newRP->AddDigit(*digit,eDigit);
}
}
newRP->EvalLocalPosition(logWeight,digits);
- Info("UnfoldLocalMaxima", "======= Unfold: daughter rec point %d =================", iMax) ;
+ AliInfo(Form("======= Unfold: daughter rec point %d =================",
+ iMax)) ;
newRP->Print();
}
TString message ;
message = " Chi2/dof = %f" ;
message += " Local (x,z) = (%f, %f) in module %d" ;
- Info("Print", message.Data(), Chi2Dof(), lpos.X(), lpos.Z(), GetPHOSMod()) ;
+ AliInfo(Form(message.Data(), Chi2Dof(), lpos.X(), lpos.Z(), GetPHOSMod())) ;
}
TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
AliPHOSRecManager* recMng = (AliPHOSRecManager*)wPoolF->FindObject("AliPHOSRecManager");
if(!recMng) {
- Fatal("GetReconstructionManager", "Couldn't find Reconstruction Manager") ;
+ AliFatal(Form("Couldn't find Reconstruction Manager")) ;
}
return recMng;
TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
TObject* wPool = wPoolF->FindObject("SmartPoints");
if(!wPool) {
- Fatal("GetWorkingPool", "Couldn't find Working Pool") ;
+ AliFatal(Form("Couldn't find Working Pool")) ;
}
return wPool;
// --- Standard library ---
// --- AliRoot header files ---
-
+#include "AliLog.h"
#include "AliPHOSFastRecParticle.h"
#include "TPad.h"
#include "TPaveText.h"
if (purity == "low" ) pi0Like = TestPIDBit(9);
else if (purity == "medium") pi0Like = TestPIDBit(10);
else if (purity == "high" ) pi0Like = TestPIDBit(11);
- else Error("IsPi0","Wrong purity type: %s",purity.Data());
+ else
+ AliError(Form("Wrong purity type: %s",purity.Data()));
if (pi0Like && // pi0 by PCA
(TestPIDBit(5)||TestPIDBit(4)||TestPIDBit(3))&& // fast by TOF
(TestPIDBit(2)||TestPIDBit(1)||TestPIDBit(0))&& // neutral by CPV
if (purity == "low" ) photonLike = TestPIDBit(6);
else if (purity == "medium") photonLike = TestPIDBit(7);
else if (purity == "high" ) photonLike = TestPIDBit(8);
- else Error("IsElectron","Wrong purity type: %s",purity.Data());
+ else
+ AliError(Form("Wrong purity type: %s",purity.Data()));
if (photonLike && // photon by PCA
(TestPIDBit(5)|| TestPIDBit(4)|| TestPIDBit(3))&& // fast by TOF
if (purity == "low" ) photonLike = TestPIDBit(6);
else if (purity == "medium") photonLike = TestPIDBit(7);
else if (purity == "high" ) photonLike = TestPIDBit(8);
- else Error("IsElectron","Wrong purity type: %s",purity.Data());
+ else
+ AliError(Form("Wrong purity type: %s",purity.Data()));
if (photonLike && // photon by PCA
(TestPIDBit(5)|| TestPIDBit(4)|| TestPIDBit(3))&& // fast by TOF
{
// Print the type, energy and momentum of the reconstructed particle
- Info("Print", "-----------------------------") ;
+ AliInfo(Form("Print", "-----------------------------")) ;
printf("PID bits are %d%d%d %d%d%d %d%d%d %d%d%d",
TestPIDBit(0),TestPIDBit(1),
TestPIDBit(2),TestPIDBit(3),
// --- Standard library ---
// --- AliRoot header files ---
-
+#include "AliLog.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSEMCAGeometry.h"
#include "AliPHOSRecPoint.h"
TString test(GetName()) ;
if (test != "IHEP" ) {
- Fatal("Init", "%s is not a known geometry (choose among IHEP)", test.Data() ) ;
+ AliFatal(Form("%s is not a known geometry (choose among IHEP)",
+ test.Data() )) ;
}
fgInit = kTRUE ;
}
else {
if ( strcmp(fgGeom->GetName(), name) != 0 )
- ::Error("GetInstance", "Current geometry is %s. You cannot call %s", fgGeom->GetName(), name) ;
+ ::Error("GetInstance", "Current geometry is %s. You cannot call %s",
+ fgGeom->GetName(), name) ;
else
rv = (AliPHOSGeometry *) fgGeom ;
}
Float_t pphi = 2 * TMath::ATan( GetOuterBoxSize(0) / ( 2.0 * GetIPtoUpperCPVsurface() ) ) ;
pphi *= kRADDEG ;
if (pphi > fAngle){
- Error("SetPHOSAngles", "PHOS modules overlap!\n pphi = %f fAngle = %f", pphi, fAngle);
+ AliError(Form("PHOS modules overlap!\n pphi = %f fAngle = %f",
+ pphi, fAngle));
}
pphi = fAngle;
else if ( opt == Degre() )
conv = 180. / TMath::Pi() ;
else {
- Warning("EmcModuleCoverage", "%s unknown option; result in radian", opt) ;
+ AliWarning(Form("%s unknown option; result in radian", opt)) ;
conv = 1. ;
}
else if ( opt == Degre() )
conv = 180. / TMath::Pi() ;
else {
- Warning("EmcXtalCoverage", "%s unknown option; result in radian", opt) ;
+ AliWarning(Form("%s unknown option; result in radian", opt)) ;
conv = 1. ;
}
Float_t rDet = 0.;
if (strcmp(det,"CPV") == 0) rDet = GetIPtoCPVDistance ();
else if (strcmp(det,"EMC") == 0) rDet = GetIPtoCrystalSurface();
- else Fatal("GetModuleCenter","Wrong detector name %s",det);
+ else
+ AliFatal(Form("Wrong detector name %s",det));
Float_t angle = GetPHOSAngle(module); // (40,20,0,-20,-40) degrees
angle *= TMath::Pi()/180;
#include <TROOT.h>
#include <TSystem.h>
#include <TParticle.h>
-#include <TH1D.h>
#include <TF1.h>
#include <TGraph.h>
//#include <TCanvas.h>
-#include <TFrame.h>
+//#include <TFrame.h>
// --- Standard library ---
// --- Standard library ---
// --- AliRoot header files ---
-
+#include "AliLog.h"
#include "AliPHOSGridFile.h"
ClassImp(AliPHOSGridFile) ;
TString fileName(Pwd()) ;
fileName += "galice.root" ;
if ( !fGrid->GetAccessPath(fileName) ) {
- Warning("GetLFN", "file %s does not exist", fileName.Data()) ;
+ AliWarning(Form("file %s does not exist", fileName.Data())) ;
fileName = "" ;
}
else
{
// Prints information on available lfn's
- Info("Info", " ") ;
+ AliInfo(Form("")) ;
}
char path[80] ;
sprintf(path, "%s/%s-%s/%s/%s/%s", fRoot.Data(), fYear.Data(), fProd.Data(), fVers.Data(), fType.Data(), fRun.Data()) ;
- Info("ListEvents", "Searching %s", path) ;
+ AliInfo(Form("Searching %s", path)) ;
Grid_ResultHandle_t gr = fGrid->Find(path, "galice.root") ;
TGridResult ar(gr) ;
ar.Print() ;
char path[80] ;
sprintf(path, "%s/%s-%s/%s/%s", fRoot.Data(), fYear.Data(), fProd.Data(), fVers.Data(), fType.Data()) ;
- Info("ListEvents", "Searching %s", path) ;
+ AliInfo(Form("Searching %s", path)) ;
Grid_ResultHandle_t gr = fGrid->OpenDir(path) ;
TGridResult ar(gr) ;
ar.Print() ;
Bool_t rv = kFALSE ;
char tempo[80] ;
sprintf(tempo, "/%s-%s", year.Data(), prod.Data()) ;
-
+
TString path(fRoot) ;
path += tempo ;
- if ( !fGrid->OpenDir(path) )
- Error("ctor", "Cannot find directory %s ", path.Data() ) ;
- else {
+ if ( !fGrid->OpenDir(path) ) {
+ AliError(Form("Cannot find directory %s", path.Data() )) ;
+ } else {
rv = kTRUE ;
fYear = year ;
fProd = prod ;
TString path(fRoot) ;
path += tempo ;
- if ( !fGrid->OpenDir(path) )
- Error("ctor", "Cannot find directory %s ", path.Data() ) ;
- else {
+ if ( !fGrid->OpenDir(path) ) {
+ AliError(Form("Cannot find directory %s ", path.Data() )) ;
+ } else {
rv = kTRUE ;
fVers = vers ;
fPath = path ;
TString path(fRoot) ;
path += tempo ;
- if ( !fGrid->OpenDir(path) )
- Error("ctor", "Cannot find directory %s ", path.Data() ) ;
- else {
+ if ( !fGrid->OpenDir(path) ) {
+ AliError(Form("Cannot find directory %s ", path.Data() )) ;
+ } else {
rv = kTRUE ;
fType = type ;
fPath = path ;
TString path(fRoot) ;
path += tempo ;
- if ( !fGrid->OpenDir(path) )
- Error("ctor", "Cannot find directory %s ", path.Data() ) ;
- else {
+ if ( !fGrid->OpenDir(path) ) {
+ AliError(Form("Cannot find directory %s ", path.Data() )) ;
+ } else {
rv = kTRUE ;
fPath = path ;
fYear += year ;
TString path(fRoot) ;
path += tempo ;
- if ( !fGrid->OpenDir(path) )
- Error("ctor", "Cannot find directory %s ", path.Data() ) ;
- else {
+ if ( !fGrid->OpenDir(path) ) {
+ AliError(Form("Cannot find directory %s ", path.Data() )) ;
+ } else {
rv = kTRUE ;
fRun = srun ;
fPath = path ;
sprintf(tempo, "/%s-%s/%s/%s/%s/%s/", fYear.Data(), fProd.Data(), fVers.Data(), fType.Data(), fRun.Data(), sevt.Data()) ;
TString path(fRoot) ;
path += tempo ;
- if ( !fGrid->OpenDir(path) )
- Error("ctor", "Cannot find directory %s ", path.Data() ) ;
- else {
+ if ( !fGrid->OpenDir(path) ) {
+ AliError(Form("Cannot find directory %s ", path.Data() )) ;
+ } else {
rv = kTRUE ;
fEvt = sevt ;
fPath = path ;
// // Print out Id and energy
// //out << "AliPHOSHit = " << hit.GetId() << " " << hit.GetEnergy() << " " << hit.GetTime() << endl ;
-// Warning("operator <<", "Implement differently") ;
+// AliWarning("operator <<", "Implement differently") ;
// return out ;
// }
#include "AliHeader.h"
// --- PHOS header files ---
+#include "AliLog.h"
#include "AliPHOSIhepAnalyze.h"
#include "AliPHOSDigit.h"
#include "AliPHOSRecParticle.h"
fRunLoader = AliRunLoader::Open(fFileName);
if (fRunLoader == 0x0)
{
- Fatal("AliPHOSIhepAnalyze","Can not load event from file %s",name);
+ AliFatal(Form("Can not load event from file %s",name));
}
}
AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( please == 0 )
{
- Error("AnalyzeCPV1","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
const AliPHOSGeometry * fGeom = please->PHOSGeometry();
- Info("AnalyzeCPV1", "Start CPV Analysis-1. Resolutions, cluster multiplicity and lengths") ;
+ AliInfo(Form("Start CPV Analysis-1. Resolutions, cluster multiplicity and lengths")) ;
for ( Int_t ievent=0; ievent<Nevents; ievent++) {
Int_t nTotalGen = 0;
Int_t nChargedGen = 0;
Int_t ntracks = gAlice->GetEvent(ievent);
- Info("AnalyzeCPV1", ">>>>>>>Event %d .<<<<<<<", ievent) ;
+ AliInfo(Form(">>>>>>>Event %d .<<<<<<<", ievent)) ;
/******************************************************************/
TTree* treeH = please->TreeH();
if (treeH == 0x0)
{
- Error("AnalyzeCPV1","Can not get TreeH");
+ AliError(Form("Can not get TreeH"));
return;
}
/******************************************************************/
// Get branch of CPV impacts
if (! (branchCPVimpacts =treeH->GetBranch("PHOSCpvImpacts")) ) {
- Info("AnalyzeCPV1", "Couldn't find branch PHOSCpvImpacts. Exit.") ;
+ AliWarning(Form("Couldn't find branch PHOSCpvImpacts. Exit.")) ;
return;
}
gImpY = ygen;
}
}
- Info("AnalyzeCPV1", "Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY);
- Info("AnalyzeCPV1", "Impact local (X,Z) = %f %f", locImpX, locImpZ);
- Info("AnalyzeCPV1", "Reconstructed (X,Z) = %f %f", xrec, zrec);
- Info("AnalyzeCPV1", "dxmin %f dzmin %f", dxmin, dzmin);
+ AliInfo(Form("Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY));
+ AliInfo(Form("Impact local (X,Z) = %f %f", locImpX, locImpZ));
+ AliInfo(Form("Reconstructed (X,Z) = %f %f", xrec, zrec));
+ AliInfo(Form("dxmin %f dzmin %f", dxmin, dzmin));
hDx ->Fill(dxmin);
hDz ->Fill(dzmin);
// hDr ->Fill(TMath::Sqrt(r2min));
}
delete [] hitsPerModule;
- Info("AnalyzeCPV1", "++++ Event %d : total %d impacts, %d charged impacts and %d rec. points.",
- ievent, nTotalGen, nChargedGen, please->CpvRecPoints()->GetEntries()) ;
+ AliInfo(Form("++++ Event %d : total %d impacts, %d charged impacts and %d rec. points.",
+ ievent, nTotalGen, nChargedGen, please->CpvRecPoints()->GetEntries())) ;
}
// Save histograms
AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( please == 0 )
{
- Error("AnalyzeEMC1","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
const AliPHOSGeometry * fGeom = please->PHOSGeometry();
- Info("AnalyzeCPV1", "Start EMC Analysis-1. Resolutions, cluster multiplicity and lengths");
+ AliInfo(Form("Start EMC Analysis-1. Resolutions, cluster multiplicity and lengths"));
for ( Int_t ievent=0; ievent<Nevents; ievent++) {
Int_t nTotalGen = 0;
Int_t ntracks = gAlice->GetEvent(ievent);
- Info("AnalyzeCPV1", " >>>>>>>Event %d .<<<<<<<", ievent) ;
+ AliInfo(Form(" >>>>>>>Event %d .<<<<<<<", ievent)) ;
TTree* treeH = please->TreeH();
if (treeH == 0x0)
{
- Error("AnalyzeEMC1","Can not get TreeH");
+ AliError(Form("Can not get TreeH"));
return;
}
// Get branch of EMC impacts
if (! (branchEMCimpacts =treeH->GetBranch("PHOSEmcImpacts")) ) {
- Info("AnalyzeCPV1", " Couldn't find branch PHOSEmcImpacts. Exit.");
+ AliWarning(Form(" Couldn't find branch PHOSEmcImpacts. Exit."));
return;
}
gImpY = ygen;
}
}
- Info("AnalyzeCPV1", " Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY);
- Info("AnalyzeCPV1", " Impact local (X,Z) = %f %f", locImpX, locImpZ);
- Info("AnalyzeCPV1", " Reconstructed (X,Z) = %f %f", xrec, zrec);
- Info("AnalyzeCPV1", " dxmin %f dzmin %f", dxmin, dzmin) ;
+ AliInfo(Form(" Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY));
+ AliInfo(Form(" Impact local (X,Z) = %f %f", locImpX, locImpZ));
+ AliInfo(Form(" Reconstructed (X,Z) = %f %f", xrec, zrec));
+ AliInfo(Form(" dxmin %f dzmin %f", dxmin, dzmin)) ;
hDx ->Fill(dxmin);
hDz ->Fill(dzmin);
// hDr ->Fill(TMath::Sqrt(r2min));
}
delete [] hitsPerModule;
- Info("AnalyzeCPV1", "++++ Event %d : total %d impacts, %d Emc rec. points.",
- ievent, nTotalGen, please->EmcRecPoints()->GetEntriesFast()) ;
+ AliInfo(Form("++++ Event %d : total %d impacts, %d Emc rec. points.",
+ ievent, nTotalGen, please->EmcRecPoints()->GetEntriesFast())) ;
}
// Save histograms
AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( please == 0 )
{
- Error("AnalyzeCPV2","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
const AliPHOSGeometry * fGeom = please->PHOSGeometry();
TTree* treeH = please->TreeH();
if (treeH == 0x0)
{
- Error("AnalyzeCPV2","Can not get TreeH");
+ AliError(Form("Can not get TreeH"));
return;
}
for (Int_t itrack=0; itrack<ntracks; itrack++) {
branchCPVimpacts ->SetAddress(&fCpvImpacts);
- Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
+ AliInfo(Form(" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."));
branchCPVimpacts ->GetEntry(itrack,0);
for (Int_t iModule=0; iModule < nOfModules; iModule++) {
Float_t dz = genHit1->Z() - genHit2->Z();
Float_t dr = TMath::Sqrt(dx*dx + dz*dz);
hDrijCPVg->Fill(dr);
-// Info("AnalyzeCPV1", "(dx dz dr): %f %f", dx, dz);
+// AliInfo(Form("(dx dz dr): %f %f", dx, dz));
}
}
}
}
}
- Info("AnalyzeCPV1", " Event %d . Total of %d hits, %d rec.points.",
- nev, nGenCPV, nRecCPV) ;
+ AliInfo(Form(" Event %d . Total of %d hits, %d rec.points.",
+ nev, nGenCPV, nRecCPV)) ;
delete [] hitsPerModule;
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("CpvSingle","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
hNrpX->Fill(rpMultX);
hNrpZ->Fill(rpMultZ);
hChi2->Fill(((AliPHOSEvalRecPoint*)pt)->Chi2Dof());
- Info("AnalyzeCPV1", "+++++ Event %d . (Mult,MultX,MultZ) = %d %d %d +++++",
- ievent, rpMult, rpMultX, rpMultZ) ;
+ AliInfo(Form("+++++ Event %d . (Mult,MultX,MultZ) = %d %d %d +++++",
+ ievent, rpMult, rpMultX, rpMultZ)) ;
}
AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
if ( please == 0 )
{
- Error("HitsCPV","Could not obtain the Loader object !");
+ AliError(Form("Could not obtain the Loader object !"));
return ;
}
const AliPHOSGeometry * fGeom = please->PHOSGeometry();
TTree* treeH = please->TreeH();
if (treeH == 0x0)
{
- Error("CPVSingle","Can not get TreeH");
+ AliError(Form("Can not get TreeH"));
return;
}
for (Int_t itrack=0; itrack<ntracks; itrack++) {
branchCPVimpacts ->SetAddress(&fCpvImpacts);
- Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
+ AliInfo(Form(" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."));
branchCPVimpacts ->GetEntry(itrack,0);
for (Int_t iModule=0; iModule < nOfModules; iModule++) {
// Int_t ntracks = gAlice->GetEvent(ievent);
// Int_t nOfModules = fGeom->GetNModules();
-// Info("AnalyzeCPV1", " Tracks: "<<ntracks<<" Modules: "<<nOfModules);
+// AliInfo(Form(" Tracks: "<<ntracks<<" Modules: "<<nOfModules));
// if (! (branchCPVimpacts =gAlice->TreeH()->GetBranch("PHOSCpvImpacts")) ) return;
// branchCPVimpacts ->SetAddress(&fCpvImpacts);
// Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
// branchCPVimpacts ->GetEntry(itrack,0);
-// Info("AnalyzeCPV1", " branchCPVimpacts ->GetEntry(itrack,0) OK.");
+// Info(Form(" branchCPVimpacts ->GetEntry(itrack,0) OK."));
// for (Int_t iModule=0; iModule < nOfModules; iModule++) {
// impacts = (TClonesArray *)fCpvImpacts->At(iModule);
-// Info("AnalyzeCPV1", " fCpvImpacts->At(iModule) OK.");
+// Info(Form(" fCpvImpacts->At(iModule) OK."));
// // Do loop over impacts in the module
// for (Int_t iImpact=0; iImpact<impacts->GetEntries(); iImpact++) {
// impact=(AliPHOSImpact*)impacts->At(iImpact);
// impact->Print();
// if(IsCharged(impact->GetPid()))
// {
-// Info("AnalyzeCPV1", " Add charged hit..";
+// Info(Form(" Add charged hit.."));
// new(hits[hits.GetEntriesFast()]) AliPHOSImpact(*impact);
-// Info("AnalyzeCPV1", "done.");
+// Info(Form("done."));
// }
// }
// }
// fCpvImpacts->Clear();
// }
-// Info("AnalyzeCPV1", " PHOS event "<<ievent<<": "<<hits.GetEntries()<<" charged CPV hits.");
+// Info(Form(" PHOS event "<<ievent<<": "<<hits.GetEntries()<<" charged CPV hits."));
}
// }
// }
-// Info("AnalyzeCPV1", " PHOS module "<<iModule<<": "<<hits->GetEntries()<<" charged CPV hits.");
+// Info(Form(" PHOS module "<<iModule<<": "<<hits->GetEntries()<<" charged CPV hits."));
// }
Bool_t AliPHOSIhepAnalyze::IsCharged(Int_t pdgCode)
{
// For HIJING
- Info("AnalyzeCPV1", "pdgCode %d", pdgCode);
+ AliInfo(Form("pdgCode %d", pdgCode));
if(pdgCode==211 || pdgCode==-211 || pdgCode==321 || pdgCode==-321 || pdgCode==11 || pdgCode==-11 || pdgCode==2212 || pdgCode==-2212) return kTRUE;
else
return kFALSE;
//____________________________________________________________________________
AliPHOSJet::AliPHOSJet():TObject() {
- //Inicilize members
+ //Initialize members
fNpart = 0 ;
fList = 0 ;
// fMode = 0 ;
// case 1:
// return AcceptConeDeviation(dEta,dPhi,p->Energy() );
// default:
-// Error("IsInCone","Unknown mode of cone calculation %d \n",mode );
+// AliError(Form("Unknown mode of cone calculation %d \n",mode ));
// }
// return kFALSE ;
//}
// --- Standard library ---
// --- AliRoot header files ---
+#include "AliLog.h"
#include "AliPHOSJet.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSDigit.h"
void AliPHOSJetFinder::FindJetsFromDigits(const TClonesArray * digits, TObjArray * jets){
//Find jets in the case witht detector at the level of digits.
if(digits->GetEntries()==0){
- Error("JetsFromDigits","No entries in digits list \n") ;
+ AliError(Form("No entries in digits list \n")) ;
return ;
}
Double_t AliPHOSJetFinder::Calibrate(const AliPHOSDigit * digit){
// if(fPedestals || fGains ){ //use calibration data
// if(!fPedestals || !fGains ){
-// Error("Calibrate","Either Pedestals of Gains not set!") ;
+// AliError(Form("Either Pedestals of Gains not set!")) ;
// return 0 ;
// }
// Float_t en=(digit->GetAmp() - fPedestals->Data(digit->GetId)()))*fGains->Data(digit->GetId()) ;
if(fSimGain==0){ //read simulation parameters
AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
if(!gime){
- Error("Calibrate","Can not read Calibration parameters") ;
+ AliError(Form("Can not read Calibration parameters")) ;
return 0 ;
}
const TTask * task = gime->Digitizer() ;
// --- Standard library ---
// --- AliRoot header files ---
-
+#include "AliLog.h"
#include "AliPHOSLoader.h"
#include "AliPHOS.h"
#include "AliPHOSHit.h"
Int_t retval = AliLoader::SetEvent();
if (retval)
{
- Error("SetEvent","AliLoader::SetEvent returned error");
+ AliError("returned error");
return retval;
}
retval = AliLoader::GetEvent();
if (retval)
{
- Error("GetEvent","AliLoader::GetEvent returned error");
+ AliError("returned error");
return retval;
}
if (res)
{//oops, error
- Error("LoadHits","AliLoader::LoadHits returned error");
+ AliError("returned error");
return res;
}
res = AliLoader::LoadSDigits(opt);
if (res)
{//oops, error
- Error("PostSDigits","AliLoader::LoadSDigits returned error");
+ AliError("returned error");
return res;
}
return ReadSDigits();
res = AliLoader::LoadDigits(opt);
if (res)
{//oops, error
- Error("LoadDigits","AliLoader::LoadDigits returned error");
+ AliError("returned error");
return res;
}
return ReadDigits();
res = AliLoader::LoadRecPoints(opt);
if (res)
{//oops, error
- Error("LoadRecPoints","AliLoader::LoadRecPoints returned error");
+ AliError("returned error");
return res;
}
TFolder * phosFolder = GetDetectorDataFolder();
if ( phosFolder == 0x0 )
{
- Error("PostDigits","Can not get detector data folder");
+ AliError("Can not get detector data folder");
return 1;
}
return ReadRecPoints();
Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
{
//Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
- if (GetDebug()) Info("LoadTracks","opt = %s",opt);
+ AliDebug(1, Form("opt = %s",opt));
Int_t res;
res = AliLoader::LoadTracks(opt);
if (res)
{//oops, error
- Error("LoadTracks","AliLoader::LoadTracks returned error");
+ AliError("returned error");
return res;
}
return ReadTracks();
res = AliLoader::LoadRecParticles(opt);
if (res)
{//oops, error
- Error("LoadRecParticles","AliLoader::LoadRecParticles returned error");
+ AliError("returned error");
return res;
}
return ReadRecParticles();
Int_t reval = AliLoader::PostHits();
if (reval)
{
- Error("PostHits","AliLoader:: returned error");
+ AliError("returned error");
return reval;
}
return ReadHits();
Int_t reval = AliLoader::PostSDigits();
if (reval)
{
- Error("PostSDigits","AliLoader::PostSDigits returned error");
+ AliError("returned error");
return reval;
}
return ReadSDigits();
Int_t reval = AliLoader::PostDigits();
if (reval)
{
- Error("PostDigits","AliLoader::PostDigits returned error");
+ AliError("returned error");
return reval;
}
return ReadDigits();
Int_t reval = AliLoader::PostRecPoints();
if (reval)
{
- Error("PostRecPoints","AliLoader::PostRecPoints returned error");
+ AliError("returned error");
return reval;
}
return ReadRecPoints();
Int_t reval = AliLoader::PostRecParticles();
if (reval)
{
- Error("PostRecParticles","AliLoader::PostRecParticles returned error");
+ AliError("returned error");
return reval;
}
return ReadRecParticles();
Int_t reval = AliLoader::PostTracks();
if (reval)
{
- Error("PostTracks","AliLoader::PostTracks returned error");
+ AliError("returned error");
return reval;
}
return ReadTracks();
if(treeh == 0)
{
- Error("ReadHits"," Cannot read TreeH from folder");
+ AliError("Cannot read TreeH from folder");
return 1;
}
TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
if (hitsbranch == 0)
{
- Error("ReadHits"," Cannot find branch PHOS");
+ AliError("Cannot find branch PHOS");
return 1;
}
-
- if (GetDebug()) Info("ReadHits","Reading Hits");
+
+ AliDebug(1, "Reading Hits");
if (hitsbranch->GetEntries() > 1)
{
if(treeS==0)
{
//May happen if file is truncated or new in LoadSDigits
- //Error("ReadSDigits","There is no SDigit Tree");
+ //AliError("There is no SDigit Tree");
return 0;
}
TBranch * branch = treeS->GetBranch(fDetectorName);
if (branch == 0)
{//easy, maybe just a new tree
- //Error("ReadSDigits"," Cannot find branch PHOS");
+ //AliError("Cannot find branch PHOS");
return 0;
}
if(treeD==0)
{
//May happen if file is truncated or new in LoadSDigits
- //Error("ReadDigits","There is no Digit Tree");
+ //AliError("There is no Digit Tree");
return 0;
}
TBranch * branch = treeD->GetBranch(fDetectorName);
if (branch == 0)
{//easy, maybe just a new tree
- //Error("ReadDigits"," Cannot find branch ",fDetectorName.Data());
+ //AliError("Cannot find branch ",fDetectorName.Data());
return 0;
}
{
if (LoadHits())
{
- Error("Track","Can not load hits.");
+ AliError("Can not load hits.");
return;
}
}
if (emcbranch == 0x0)
{
- Error("ReadRecPoints","Can not get branch with EMC Rec. Points named %s",fgkEmcRecPointsBranchName.Data());
+ AliError(Form("Can not get branch with EMC Rec. Points named %s",
+ fgkEmcRecPointsBranchName.Data()));
retval = 1;
}
else
TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
if (cpvbranch == 0x0)
{
- Error("ReadRecPoints","Can not get branch with CPV Rec. Points named %s",fgkCpvRecPointsBranchName.Data());
+ AliError(Form("Can not get branch with CPV Rec. Points named %s",
+ fgkCpvRecPointsBranchName.Data()));
retval = 2;
}
else
{
//May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
//but tracking was not performed yet for a current event
- //Error("ReadTracks","There is no Tree with Tracks");
+ //AliError("There is no Tree with Tracks");
return 0;
}
TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
if (branch == 0)
{//easy, maybe just a new tree
- Error("ReadTracks"," Cannot find branch named %s",fgkTrackSegmentsBranchName.Data());
+ AliError(Form("Cannot find branch named %s",
+ fgkTrackSegmentsBranchName.Data()));
return 0;
}
//May happen if file is truncated or new in LoadSDigits,
//or the file is in update mode,
//but tracking was not performed yet for a current event
- // Error("ReadRecParticles","There is no Tree with Tracks and Reconstructed Particles");
+ // AliError("There is no Tree with Tracks and Reconstructed Particles");
return 0;
}
TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
if (branch == 0)
{//easy, maybe just a new tree
- Error("ReadRecParticles"," Cannot find branch %s",fgkRecParticlesBranchName.Data());
+ AliError(Form("Cannot find branch %s",
+ fgkRecParticlesBranchName.Data()));
return 0;
}
{
// Return PHOS loader
AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
- if (rn == 0x0)
- {
- cerr<<"Error: <AliPHOSLoader::GetPHOSLoader>: "
- << "Can not find Run Loader in folder "<<eventfoldername<<endl;
- return 0x0;
- }
+ if (rn == 0x0) {
+ printf("Can not find Run Loader in folder %s", eventfoldername);
+ return 0x0 ;
+ }
return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
}
/***************************************************************************************/
TString branchName(branch->GetName() ) ;
TString branchTitle(branch->GetTitle() ) ;
if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
- Warning("BranchExists","branch %s with title %s ",dataname.Data(),fBranchTitle.Data());
+ AliWarning(Form("branch %s with title %s ",
+ dataname.Data(),fBranchTitle.Data()));
return kTRUE ;
}
if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
- Warning("BranchExists","branch AliPHOS... with title %s ",branch->GetTitle());
+ AliWarning(Form("branch AliPHOS... with title %s ",
+ branch->GetTitle()));
return kTRUE ;
}
}
if(!file)
file = TFile::Open(filename);
if(!file){
- Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
+ AliError(Form("Cannot open file %s", filename)) ;
return ;
}
if(fcdb)
fcdb->Delete() ;
fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
if(!fcdb)
- Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
+ AliError(Form("No database %s in file %s", database, filename)) ;
}
//____________________________________________________________________________
// Add RecPoints array to the data folder
if ( EmcRecPoints() == 0x0)
{
- if (GetDebug()>9) Info("MakeRecPointsArray","Making array for EMC");
+ AliDebug(9, "Making array for EMC");
TObjArray* emc = new TObjArray(100) ;
emc->SetName(fgkEmcRecPointsName) ;
GetDetectorDataFolder()->Add(emc);
}
if ( CpvRecPoints() == 0x0)
- {
- if (GetDebug()>9) Info("MakeRecPointsArray","Making array for CPV");
- TObjArray* cpv = new TObjArray(100) ;
- cpv->SetName(fgkCpvRecPointsName);
- GetDetectorDataFolder()->Add(cpv);
+ {
+ AliDebug(9, "Making array for CPV");
+ TObjArray* cpv = new TObjArray(100) ;
+ cpv->SetName(fgkCpvRecPointsName);
+ GetDetectorDataFolder()->Add(cpv);
}
}
// --- Standard library ---
// --- AliRoot header files ---
-
+#include "AliLog.h"
#include "AliRun.h"
#include "AliGenerator.h"
#include "AliPHOSPIDv0.h"
AliRunLoader* runget = AliRunLoader::GetRunLoader(GetTitle());
if(runget == 0x0)
{
- Error("Exec","Can not find run getter in event folder \"%s\"",GetTitle());
+ AliError(Form("Can not find run getter in event folder \"%s\"",
+ GetTitle()));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(runget->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("Exec","Could not obtain the Loader object !");
+ AliError("Could not obtain the Loader object !");
return ;
}
for(ievent = 0; ievent < nevents; ievent++){
runget->GetEvent(ievent);
- Info("Exec", "event %d %d %d", ievent, gime->EmcRecPoints(), gime->TrackSegments()) ;
+ AliInfo(Form("event %d %d %d",
+ ievent, gime->EmcRecPoints(),
+ gime->TrackSegments())) ;
MakeRecParticles() ;
WriteRecParticles();
if(strstr(option,"tim")){
gBenchmark->Stop("PHOSPID");
- Info("Exec", "took %f seconds for PID %f seconds per event",
- gBenchmark->GetCpuTime("PHOSPID"), gBenchmark->GetCpuTime("PHOSPID")/nevents) ;
+ AliInfo(Form("took %f seconds for PID %f seconds per event",
+ gBenchmark->GetCpuTime("PHOSPID"),
+ gBenchmark->GetCpuTime("PHOSPID")/nevents)) ;
}
}
AliRunLoader* runget = AliRunLoader::GetRunLoader(GetTitle());
if(runget == 0x0)
{
- Error("Exec","Can not find run getter in event folder \"%s\"",GetTitle());
+ AliError(Form("Can not find run getter in event folder \"%s\"",
+ GetTitle()));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(runget->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("Exec","Could not obtain the Loader object !");
+ AliError("Could not obtain the Loader object !");
return ;
}
AliRunLoader* runget = AliRunLoader::GetRunLoader(GetTitle());
if(runget == 0x0)
{
- Error("Exec","Can not find run getter in event folder \"%s\"",GetTitle());
+ AliError(Form("Can not find run getter in event folder \"%s\"",
+ GetTitle()));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(runget->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("Exec","Could not obtain the Loader object !");
+ AliError("Could not obtain the Loader object !");
return ;
}
message += " RecParticles Branch title %s\n" ;
message += "with parameters:\n" ;
message += " Maximal EMC - CPV distance (cm) %f\n" ;
- Info("Print", message.Data(),
+ AliInfo(Form( message.Data(),
GetTitle(),
fRecPointsTitle.Data(),
fTrackSegmentsTitle.Data(),
fRecParticlesTitle.Data(),
- fCpvEmcDistance );
+ fCpvEmcDistance ));
if(fIDOptions.Contains("dis",TString::kIgnoreCase ))
- Info("Print", " dispersion cut %f", fDispersion ) ;
+ AliInfo(Form(" dispersion cut %f", fDispersion )) ;
if(fIDOptions.Contains("ell",TString::kIgnoreCase ))
- Info("Print", " Eliptic cuts function: %s", fFormula->GetTitle() ) ;
+ AliInfo(Form(" Eliptic cuts function: %s",
+ fFormula->GetTitle() )) ;
if(fIDOptions.Contains("tim",TString::kIgnoreCase ))
- Info("Print", " Time Gate used: %f", fTimeGate) ;
+ AliInfo(Form(" Time Gate used: %f", fTimeGate)) ;
}
//____________________________________________________________________________
AliRunLoader* runget = AliRunLoader::GetRunLoader(GetTitle());
if(runget == 0x0)
{
- Error("Exec","Can not find run getter in event folder \"%s\"",GetTitle());
+ AliError(Form("Can not find run getter in event folder \"%s\"",
+ GetTitle()));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(runget->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("Exec","Could not obtain the Loader object !");
+ AliError("Could not obtain the Loader object !");
return ;
}
AliRunLoader* runget = AliRunLoader::GetRunLoader(GetTitle());
if(runget == 0x0)
{
- Error("WriteRecParticles","Can not find run getter in event folder \"%s\"",GetTitle());
+ AliError(Form("Can not find run getter in event folder \"%s\"",
+ GetTitle()));
return;
}
AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(runget->GetLoader("PHOSLoader"));
if ( gime == 0 )
{
- Error("WriteRecParticles","Could not obtain the Loader object !");
+ AliError("Could not obtain the Loader object !");
return ;
}
TString message ;
message = "event %d\n" ;
message += " found %d RecParticles\n" ;
- Info("PrintRecParticles", message.Data(), gAlice->GetEvNumber(), recParticles->GetEntriesFast() ) ;
+ AliInfo(Form(message.Data(),
+ gAlice->GetEvNumber(), recParticles->GetEntriesFast() )) ;
if(strstr(option,"all")) { // printing found TS
- Info("PrintRecParticles"," PARTICLE Index \n" ) ;
+ AliInfo(" PARTICLE Index" ) ;
Int_t index ;
for (index = 0 ; index < recParticles->GetEntries() ; index++) {
// Int_t nprimaries;
// primaries = rp->GetPrimaries(nprimaries);
- Info("PrintRecParticles", " %s %d\n", particle, rp->GetIndexInList()) ;
+ AliInfo(Form(" %s %d",
+ particle, rp->GetIndexInList())) ;
}
}
}
// --- AliRoot header files ---
-
+#include "AliLog.h"
#include "AliGenerator.h"
#include "AliPHOS.h"
#include "AliPHOSPIDv1.h"
PrintRecParticles(option);
if(strstr(option,"tim")){
gBenchmark->Stop("PHOSPID");
- Info("Exec", "took %f seconds for PID %f seconds per event",
+ AliInfo(Form("took %f seconds for PID %f seconds per event",
gBenchmark->GetCpuTime("PHOSPID"),
- gBenchmark->GetCpuTime("PHOSPID")/nEvents) ;
+ gBenchmark->GetCpuTime("PHOSPID")/nEvents)) ;
}
if(fWrite)
Unload();
//Get file name that contains the PCA for a particle ("photon or pi0")
particle.ToLower();
TString name;
- if (particle=="photon") name = fFileNamePrincipalPhoton ;
- else if (particle=="pi0" ) name = fFileNamePrincipalPi0 ;
- else Error("GetFileNamePrincipal","Wrong particle name: %s (choose from pi0/photon)\n",particle.Data());
+ if (particle=="photon")
+ name = fFileNamePrincipalPhoton ;
+ else if (particle=="pi0" )
+ name = fFileNamePrincipalPi0 ;
+ else
+ AliError(Form("Wrong particle name: %s (choose from pi0/photon)\n",
+ particle.Data()));
return name;
}
{
// Get the i-th parameter "Calibration"
Float_t param = 0.;
- if (i>2 || i<0)
- Error("GetParameterCalibration","Invalid parameter number: %d",i);
- else
+ if (i>2 || i<0) {
+ AliError(Form("Invalid parameter number: %d",i));
+ } else
param = (*fParameters)(0,i);
return param;
}
{
// Get the i-th parameter "CPV-EMC distance" for the specified axis
Float_t param = 0.;
- if(i>2 || i<0)
- Error("GetParameterCpv2Emc","Invalid parameter number: %d",i);
- else {
+ if(i>2 || i<0) {
+ AliError(Form("Invalid parameter number: %d",i));
+ } else {
axis.ToLower();
- if (axis == "x") param = (*fParameters)(1,i);
- else if (axis == "z") param = (*fParameters)(2,i);
- else Error("GetParameterCpv2Emc","Invalid axis name: %s",axis.Data());
+ if (axis == "x")
+ param = (*fParameters)(1,i);
+ else if (axis == "z")
+ param = (*fParameters)(2,i);
+ else {
+ AliError(Form("Invalid axis name: %s",axis.Data()));
+ }
}
return param;
}
// Get the parameter "i" to calculate the boundary on the moment M2x
// for photons at high p_T
Float_t param = 0;
- if (i>3 || i<0)
- Error("GetParameterPhotonBoundary","Wrong parameter number: %d\n",i);
- else
+ if (i>3 || i<0) {
+ AliError(Form("Wrong parameter number: %d\n",i));
+ } else
param = (*fParameters)(14,i) ;
return param;
}
// Get the parameter "i" to calculate the boundary on the moment M2x
// for pi0 at high p_T
Float_t param = 0;
- if (i>2 || i<0)
- Error("GetParameterPi0Boundary","Wrong parameter number: %d\n",i);
- else
+ if (i>2 || i<0) {
+ AliError(Form("Wrong parameter number: %d\n",i));
+ } else
param = (*fParameters)(15,i) ;
return param;
}
// Get TimeGate parameter depending on Purity-Efficiency i:
// i=0 - Low purity, i=1 - Medium purity, i=2 - High purity
Float_t param = 0.;
- if(i>2 || i<0)
- Error("GetParameterTimeGate","Invalid Efficiency-Purity choice %d",i);
- else
+ if(i>2 || i<0) {
+ AliError(Form("Invalid Efficiency-Purity choice %d",i));
+ } else
param = (*fParameters)(3,i) ;
return param;
}
particle.ToLower();
param. ToLower();
Int_t offset = -1;
- if (particle == "photon") offset=0;
- else if (particle == "pi0") offset=5;
+ if (particle == "photon")
+ offset=0;
+ else if (particle == "pi0")
+ offset=5;
else
- Error("GetParameterToCalculateEllipse","Wrong particle name: %s (choose from pi0/photon)\n",particle.Data());
+ AliError(Form("Wrong particle name: %s (choose from pi0/photon)\n",
+ particle.Data()));
Int_t p= -1;
Float_t par = 0;
else if(param.Contains("x0"))p=7+offset;
else if(param.Contains("y0"))p=8+offset;
- if (i>4 || i<0)
- Error("GetParameterToCalculateEllipse", "No parameter with index", i) ;
- else if (p==-1)
- Error("GetParameterToCalculateEllipse", "No parameter with name %s", param.Data() ) ;
- else
+ if (i>4 || i<0) {
+ AliError(Form("No parameter with index %d", i)) ;
+ } else if (p==-1) {
+ AliError(Form("No parameter with name %s", param.Data() )) ;
+ } else
par = (*fParameters)(p,i) ;
return par;
Int_t AliPHOSPIDv1::GetCPVBit(AliPHOSEmcRecPoint * emc,AliPHOSCpvRecPoint * cpv, Int_t effPur, Float_t e) const
{
if(effPur>2 || effPur<0)
- Error("GetCPVBit","Invalid Efficiency-Purity choice %d",effPur);
+ AliError(Form("Invalid Efficiency-Purity choice %d",effPur));
Float_t sigX = GetCpv2EmcDistanceCut("X",e);
Float_t sigZ = GetCpv2EmcDistanceCut("Z",e);
if((effPur==0) && (r<9./2.)) prinbit= 1;
if(r<0)
- Error("GetPrincipalBit", "Negative square?") ;
+ AliError("Negative square?") ;
return prinbit;
TMath::Exp(-TMath::Power(e-GetParameterPhotonBoundary(1),2)/2.0/
TMath::Power(GetParameterPhotonBoundary(2),2)) +
GetParameterPhotonBoundary(3);
- //Info("GetHardPhotonBit","E=%f, m2x=%f, boundary=%f",e,m2x,m2xBoundary);
+ AliDebug(1, Form("GetHardPhotonBit","E=%f, m2x=%f, boundary=%f",
+ e,m2x,m2xBoundary));
if (m2x < m2xBoundary)
return 1;// A hard photon
else
Float_t m2x = emc->GetM2x();
Float_t m2xBoundary = GetParameterPi0Boundary(0) +
e * GetParameterPi0Boundary(1);
- //Info("GetHardPi0Bit","E=%f, m2x=%f, boundary=%f",e,m2x,m2xBoundary);
+ AliDebug(1,Form("E=%f, m2x=%f, boundary=%f",e,m2x,m2xBoundary));
if (m2x > m2xBoundary)
return 1;// A hard pi0
else
// const Int_t kMAXPARTICLES = 2000 ;
// if (nparticles >= kMAXPARTICLES)
-// Error("MakePID", "Change size of MAXPARTICLES") ;
+// AliError("Change size of MAXPARTICLES") ;
// Double_t stof[kSPECIES][kMAXPARTICLES] ;
TObjArray * cpvRecPoints = gime->CpvRecPoints() ;
TClonesArray * trackSegments = gime->TrackSegments() ;
if ( !emcRecPoints || !cpvRecPoints || !trackSegments ) {
- Fatal("MakeRecParticles", "RecPoints or TrackSegments not found !") ;
+ AliFatal("RecPoints or TrackSegments not found !") ;
}
TClonesArray * recParticles = gime->RecParticles() ;
recParticles->Clear();
// Choose the cluster energy range
if (!emc) {
- Fatal("MakeRecParticles", "-> emc(%d) = %d", ts->GetEmcIndex(), emc ) ;
+ AliFatal(Form("-> emc(%d) = %d", ts->GetEmcIndex(), emc )) ;
}
Float_t e = emc->GetEnergy() ;
{
// Print the parameters used for the particle type identification
- Info("Print", "=============== AliPHOSPIDv1 ================") ;
+ AliInfo("=============== AliPHOSPIDv1 ================") ;
printf("Making PID\n") ;
printf(" Pricipal analysis file from 0.5 to 100 %s\n", fFileNamePrincipalPhoton.Data() ) ;
printf(" Name of parameters file %s\n", fFileNameParameters.Data() ) ;
message += rp->GetType() ;
}
}
- Info("Print", message.Data() ) ;
+ AliInfo(message.Data() ) ;
}
//____________________________________________________________________________
// Open a text file with PID parameters
FILE *fd = fopen(fFileNameParameters.Data(),"r");
if (!fd)
- Fatal("SetParameter","File %s with a PID parameters cannot be opened\n",
- fFileNameParameters.Data());
+ AliFatal(Form("File %s with a PID parameters cannot be opened\n",
+ fFileNameParameters.Data()));
Int_t i=0;
// Read parameter file line-by-line and skip empty line and comments
&(*fParameters)(i,0), &(*fParameters)(i,1),
&(*fParameters)(i,2), &(*fParameters)(i,3));
i++;
- //Info("SetParameters", "line %d: %s",i,string);
+ AliDebug(1, Form("SetParameters", "line %d: %s",i,string));
}
fclose(fd);
}
void AliPHOSPIDv1::SetParameterCalibration(Int_t i,Float_t param)
{
// Set parameter "Calibration" i to a value param
- if(i>2 || i<0)
- Error("SetParameterCalibration","Invalid parameter number: %d",i);
- else
+ if(i>2 || i<0) {
+ AliError(Form("Invalid parameter number: %d",i));
+ } else
(*fParameters)(0,i) = param ;
}
// Set the parameters to calculate Cpv-to-Emc Distance Cut depending on
// Purity-Efficiency point i
- if(i>2 || i<0)
- Error("SetParameterCpv2Emc","Invalid parameter number: %d",i);
- else {
+ if(i>2 || i<0) {
+ AliError(Form("Invalid parameter number: %d",i));
+ } else {
axis.ToLower();
if (axis == "x") (*fParameters)(1,i) = cut;
else if (axis == "z") (*fParameters)(2,i) = cut;
- else Error("SetParameterCpv2Emc","Invalid axis name: %s",axis.Data());
+ else {
+ AliError(Form("Invalid axis name: %s",axis.Data()));
+ }
}
}
void AliPHOSPIDv1::SetParameterPhotonBoundary(Int_t i,Float_t param)
{
// Set parameter "Hard photon boundary" i to a value param
- if(i>4 || i<0)
- Error("SetParameterPhotonBoundary","Invalid parameter number: %d",i);
- else
+ if(i>4 || i<0) {
+ AliError(Form("Invalid parameter number: %d",i));
+ } else
(*fParameters)(14,i) = param ;
}
void AliPHOSPIDv1::SetParameterPi0Boundary(Int_t i,Float_t param)
{
// Set parameter "Hard pi0 boundary" i to a value param
- if(i>1 || i<0)
- Error("SetParameterPi0Boundary","Invalid parameter number: %d",i);
- else
+ if(i>1 || i<0) {
+ AliError(Form("Invalid parameter number: %d",i));
+ } else
(*fParameters)(15,i) = param ;
}
void AliPHOSPIDv1::SetParameterTimeGate(Int_t i, Float_t gate)
{
// Set the parameter TimeGate depending on Purity-Efficiency point i
- if (i>2 || i<0)
- Error("SetParameterTimeGate","Invalid Efficiency-Purity choice %d",i);
- else
+ if (i>2 || i<0) {
+ AliError(Form("Invalid Efficiency-Purity choice %d",i));
+ } else
(*fParameters)(3,i)= gate ;
}
if (particle == "photon") offset=0;
else if (particle == "pi0") offset=5;
else
- Error("SetParameterToCalculateEllipse","Wrong particle name: %s (choose from pi0/photon)\n",particle.Data());
+ AliError(Form("Wrong particle name: %s (choose from pi0/photon)\n",
+ particle.Data()));
if (param.Contains("a")) p=4+offset;
else if(param.Contains("b")) p=5+offset;
else if(param.Contains("c")) p=6+offset;
else if(param.Contains("x0"))p=7+offset;
else if(param.Contains("y0"))p=8+offset;
- if((i>4)||(i<0))
- Error("SetEllipseParameter", "No parameter with index %d", i) ;
- else if(p==-1)
- Error("SetEllipseParameter", "No parameter with name %s", param.Data() ) ;
- else
+ if((i>4)||(i<0)) {
+ AliError(Form("No parameter with index %d", i)) ;
+ } else if(p==-1) {
+ AliError(Form("No parameter with name %s", param.Data() )) ;
+ } else
(*fParameters)(p,i) = par ;
}