#include <TTree.h>
#include <TVirtualMC.h>
+#include "AliLog.h"
#include "AliConfig.h"
#include "AliHeader.h"
#include "AliConst.h"
fDigits = 0 ;
fReconParticles = 0x0;
fName="TOF";
- fMerger = 0x0;
fTZero = kFALSE;
fTOFGeometry = 0;
}
fDTask = 0x0;
fReTask = 0x0;
fReconParticles= 0x0;
- fMerger = 0x0;
fTOFGeometry = 0;
if (strstr(option,"tzero")){
fHits = new TClonesArray("AliTOFhitT0", 1000);
fTZero = kTRUE;
- cout << "tzero option requires AliTOFv4T0 as TOF version (check Your Config.C)" << endl;
+ AliWarning("tzero option requires AliTOFv4T0 as TOF version (check Your Config.C)");
}else{
fHits = new TClonesArray("AliTOFhit", 1000);
fTZero = kFALSE;
}
if (gAlice==0) {
- Fatal("AliTOF","gAlice==0 !");
+ AliFatal("gAlice==0 !");
}
if (gAlice->GetMCApp()->GetHitLists())
gAlice->GetMCApp()->AddHitList(fHits);
- else Error("AliTOF","gAlice->GetHitLists()==0");
+ else AliError("gAlice->GetHitLists()==0");
fIshunt = 0;
fSDigits = new TClonesArray("AliTOFSDigit", 1000);
fDTask = 0x0;
fReTask = 0x0;
fReconParticles = 0x0;
- fMerger = 0x0;
//
// Digitization parameters
// Draw a shaded view of the common part of the TOF geometry
//
- cout << " Drawing of AliTOF"<< endl;
+ AliInfo(" Drawing of AliTOF");
// Set everything unseen
gMC->Gsatt("*", "seen", -1);
//
// Set id of TOF sensitive volume
if (IsVersion() !=0) fIdSens=gMC->VolId("FPAD");
//
+ // Save the geometry
+ TDirectory* saveDir = gDirectory;
+ gAlice->GetRunLoader()->CdGAFile();
+ fTOFGeometry->Write("TOFGeometry");
+ saveDir->cd();
}
//____________________________________________________________________________
if (hits && (IsVersion()!=0))
fIdSens = gMC->VolId("FPAD");
else
- cout << "Option for writing the TOF-hits branch on TreeH: disabled" << endl;
+ AliInfo("Option for writing the TOF-hits branch on TreeH: disabled");
}
//____________________________________________________________________________
// do nothing
}
-//___________________________________________
-void AliTOF::SDigits2Digits()
-{
-//
-// Generate digits performing merging
-//
- /*
- int nparticles = gAlice->GetNtrack();
- cout << "Particles :" <<nparticles<<endl;
- if (nparticles > 0 ) {
-
- AliTOF::Hits2Digits();
-
- }
- */
- cout<<"AliTOF::SDigits2Digits"<<endl;
- if (fMerger) {
- fMerger->Init();
- cout<<"AliTOF::SDigits2Digits Init"<<endl;
- fMerger->Digitise();
- cout<<"AliTOF::SDigits2Digits Digitise() "<<endl;
- }
-}
-
-//---------------------------------------------------------------------
-void AliTOF::SetMerger(AliTOFMerger* merger)
-{
-// Set pointer to merger
- fMerger = merger;
-}
-
-//---------------------------------------------------------------------
-AliTOFMerger* AliTOF::Merger()
-{
-// Return pointer to merger
- return fMerger;
-}
-
//---------------------------------------------------------------------
void AliTOF::Hits2SDigits()
{
AliRunLoader * rl = fLoader->GetRunLoader();
AliTOFSDigitizer sd((rl->GetFileName()).Data());
- if (GetDebug()) sd.Print("");
+ ToAliDebug(1, sd.Print(""));
sd.Exec("") ;
//
if ((evNumber2-evNumber1)==1)
- cout << "<AliTOF::Hits2SDigits>: I am making sdigits for the " << evNumber1 << "th event \n";
+ AliDebug(1, Form("I am making sdigits for the %dth event", evNumber1))
else if ((evNumber2-evNumber1)>1)
- cout << "<AliTOF::Hits2SDigits>: I am making sdigits for the events from the "
- << evNumber1 << "th to the " << evNumber2-1 << "th \n";
+ AliDebug(1, Form("I am making sdigits for the events from the "
+ "%dth to the %dth", evNumber1, evNumber2-1));
AliRunLoader * rl = fLoader->GetRunLoader();
AliTOFSDigitizer sd((rl->GetFileName()).Data(),evNumber1,evNumber2) ;
- if (GetDebug()) sd.Print("");
+ ToAliDebug(1, sd.Print(""));
sd.Exec("") ;
TTree* digits = fLoader->TreeD();
if (!digits) {
- Error("Digits2Raw", "no digits tree");
+ AliError("no digits tree");
return;
}
AliTOFDDLRawData rawWriter;
rawWriter.SetVerbose(0);
- Info("Digits2Raw", "Formatting raw data for TOF");
+ AliInfo("Formatting raw data for TOF");
digits->GetEvent(0);
rawWriter.RawDataTOF(digits->GetBranch("TOF"));
class TString ;
class TTask ;
class TFolder ;
-class AliTOFMerger;
#include "TObject.h"
#include "TTree.h"
#include "AliDetector.h"
#include <Riostream.h>
-#include "AliTOFMerger.h"
#include "AliTOFSDigitizer.h"
#include "AliTOFGeometry.h"
//virtual void DrawDetectorStripsinFrame()=0;
void CreateTOFFolders();
Bool_t CheckOverlap(Int_t* vol, Float_t* digit, Int_t Track);
- virtual void SDigits2Digits();
- virtual void SetMerger(AliTOFMerger* merger);
- virtual AliTOFMerger* Merger();
//virtual void Hits2Digits();
virtual void Hits2SDigits();
virtual void Hits2SDigits(Int_t evNumber1, Int_t evNumber2);
TClonesArray* fSDigits; //! List of summable digits
Int_t fNSDigits; //! Number of sdigits
TClonesArray* fReconParticles; // List of reconstructed particles
- AliTOFMerger *fMerger; // ! pointer to merger
//Float_t fGapA; // Gap beetween tilted strip in A-type plate
//Float_t fGapB; // Gap beetween tilted strip in B-type plate
#include <TClonesArray.h>
#include <TTree.h>
#include <TMath.h>
+#include "AliLog.h"
#include "AliTOF.h"
#include "AliTOFGeometry.h"
#include "AliTOFdigit.h"
ofstream ftxt;
if(!ndigits)
{
- Error("GetDigits", "No found TOF digits\n");
+ AliError("No found TOF digits");
return;
}
#include "AliDigitizer.h"
#include "AliRunDigitizer.h"
+#include "AliLog.h"
#include "AliRun.h"
#include "AliRunLoader.h"
#include "AliLoader.h"
//---------------------------------------------------------------------
-void AliTOFDigitizer::Exec(Option_t* option)
+void AliTOFDigitizer::Exec(Option_t* /*option*/)
{
//
// Perform digitization and merging.
// - the sdigits container is used to create the array of AliTOFdigit.
//
- if(strstr(option,"deb")) cout<<"AliTOFDigitizer::Exec\n";
+ AliDebug(1, "");
// get the ptr to TOF detector
AliRunLoader* outrl = AliRunLoader::GetRunLoader(fManager->GetOutputFolderName());
if (outrl == 0x0)
{
- Error("Exec","Can not find Run Loader in output folder.");
+ AliError("Can not find Run Loader in output folder.");
return;
}
AliLoader* outgime = outrl->GetLoader("TOFLoader");
if (outgime == 0x0)
{
- Error("Exec","Can not get TOF Loader from Output Run Loader.");
+ AliError("Can not get TOF Loader from Output Run Loader.");
return;
}
Bool_t isSDigitBad = (sector<0 || sector>17 || plate<0 || plate >4 || padz<0 || padz>1 || padx<0 || padx>47);
if (isSDigitBad) {
- cout << "<AliTOFSDigits2Digits> strange sdigit found" << endl;
- abort();
+ AliFatal("strange sdigit found");
}
//-------------------------------------------------------
AliRunLoader* rl = AliRunLoader::GetRunLoader(fManager->GetInputFolderName(inputFile));
if (rl == 0x0)
{
- Error("ReadSDigit","Can not find Run Loader in input %d folder.",inputFile);
+ AliError(Form("Can not find Run Loader in input %d folder.",inputFile));
return;
}
AliLoader* gime = rl->GetLoader("TOFLoader");
if (gime == 0x0)
{
- Error("ReadSDigit","Can not get TOF Loader from Input %d Run Loader.",inputFile);
+ AliError(Form("Can not get TOF Loader from Input %d Run Loader.",inputFile));
return;
}
Int_t retval = gime->LoadSDigits();
if (retval)
{
- Error("ReadSDigit","Error occured while loading S. Digits for Input %d",inputFile);
+ AliError(Form("Error occured while loading S. Digits for Input %d",inputFile));
return;
}
currentTreeS=gime->TreeS();
if (currentTreeS == 0x0)
{
- Error("ReadSDigit","Can not get S. Digits Tree for Input %d",inputFile);
+ AliError(Form("Can not get S. Digits Tree for Input %d",inputFile));
return;
}
}
TBranch* tofBranch=currentTreeS->GetBranch("TOF");
if(!tofBranch){
- Fatal("ReadSDigit","TOF branch not found for input %d",inputFile);
+ AliFatal(Form("TOF branch not found for input %d",inputFile));
}
tofBranch->SetAddress(&sdigitsDummyContainer);
/*
$Log$
+Revision 1.6 2004/06/15 15:27:59 decaro
+TOF raw data: preliminary implementation and style changes
+
Revision 1.5 2004/04/20 14:37:22 hristov
Using TMath::Abs instead of fabs, arrays of variable size created/deleted correctly (HP,Sun)
// //
///////////////////////////////////////////////////////////////////////////////
+#include "AliLog.h"
#include "AliConst.h"
#include "AliTOFGeometry.h"
Int_t isector = GetSector(pos);
if(isector == -1){
- cout << "Detector Index could not be determined" << endl;
+ AliError("Detector Index could not be determined");
return iPadX;}
Int_t iplate = GetPlate(pos);
if(iplate == -1){
- cout << "Detector Index could not be determined" << endl;
+ AliError("Detector Index could not be determined");
return iPadX;}
Int_t istrip = GetStrip(pos);
if(istrip == -1){
- cout << "Detector Index could not be determined" << endl;
+ AliError("Detector Index could not be determined");
return iPadX;}
Int_t isector = GetSector(pos);
if(isector == -1){
- cout << "Detector Index could not be determined" << endl;
+ AliError("Detector Index could not be determined");
return iPlate;}
Float_t x = pos[0];
Int_t isector = GetSector(pos);
if(isector == -1){
- cout << "Detector Index could not be determined" << endl;
+ AliError("Detector Index could not be determined");
return iStrip;}
Int_t iplate = GetPlate(pos);
if(iplate == -1){
- cout << "Detector Index could not be determined" << endl;
+ AliError("Detector Index could not be determined");
return iStrip;}
Int_t isector = GetSector(pos);
if(isector == -1){
- cout << "Detector Index could not be determined" << endl;
+ AliError("Detector Index could not be determined");
return iPadZ;}
Int_t iplate = GetPlate(pos);
if(iplate == -1){
- cout << "Detector Index could not be determined" << endl;
+ AliError("Detector Index could not be determined");
return iPadZ;}
Int_t istrip = GetStrip(pos);
if(istrip == -1){
- cout << "Detector Index could not be determined" << endl;
+ AliError("Detector Index could not be determined");
return iPadZ;}
///////////////////////////////////////////////////////////////////////////////
+#include "TObject.h"
-class AliTOFGeometry{
+class AliTOFGeometry: public TObject{
public:
AliTOFGeometry();
#include <Riostream.h>
#include <TMath.h>
+#include "AliLog.h"
#include "AliTOFHitMap.h"
#include "AliTOFSDigit.h"
#include "AliTOFGeometry.h"
(vol[4]/*-1*/); // padz
if (index >= fMaxIndex) {
- Error("AliTOFHitMap","CheckedIndex - input outside bounds");
+ AliError("CheckedIndex - input outside bounds");
return -1;
} else {
return index;
+++ /dev/null
-/**************************************************************************
- * Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Author: The ALICE Off-line Project. *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-//Piotr.Skowronski@cern.ch :
-//Corrections applied in order to compile (only) with new I/O and folder structure
-//To be implemented correctly by responsible
-
-#include "AliRunLoader.h"
-#include "AliLoader.h"
-
-#include <TTree.h>
-#include <TVector.h>
-#include <TObjArray.h>
-#include <TFile.h>
-#include <TDirectory.h>
-
-
-#include "AliTOFMerger.h"
-#include "AliTOF.h"
-#include "AliTOFSDigitizer.h"
-#include "AliTOFhit.h"
-#include "AliTOFdigit.h"
-
-#include "AliRun.h"
-#include "AliPDG.h"
-
-#include <stdlib.h>
-#include <Riostream.h>
-#include <Riostream.h>
-
-ClassImp(AliTOFMerger)
-
-//___________________________________________
- AliTOFMerger::AliTOFMerger()
-{
-// Default ctor
- fNDigits = 0;
- fEvNrSig = 0;
- fEvNrBgr = 0;
- fMerge =kDigitize;
- fDigits = 0;
- fSDigits =0;
- fFnBgr = 0;
- fFnSig = 0;
- fBgrFile = 0;
- fRunLoader = 0 ;
-}
-
-//------------------------------------------------------------------------
-AliTOFMerger::~AliTOFMerger()
-{
-// Dtor
- if(fSDigits) {
- fSDigits->Delete();
- delete fSDigits ;
- fSDigits = 0;
- }
- delete fBgrFile;
- fBgrFile = 0;
- if(fFnBgr) {
- delete[] fFnBgr;
- fFnBgr = 0;
- }
- if(fFnSig) {
- delete[] fFnSig;
- fFnSig = 0;
- }
- delete fRunLoader;
-}
-
-
-//------------------------------------------------------------------------
-void AliTOFMerger::Init()
-{
-// Initialisation
- if (fMerge) fBgrFile = InitBgr();
-
-}
-
-
-
-//------------------------------------------------------------------------
-TFile* AliTOFMerger::InitBgr()
-{
-// Initialise background event
- fRunLoader = AliRunLoader::Open(fFnBgr);//open session and mount on default event folder
-
- TFile *file = new TFile(fFnBgr);
-// add error checking later
- printf("\n AliTOFMerger has opened %s file with background event \n", fFnBgr);
- return file;
-}
-
-//------------------------------------------------------------------------
-void AliTOFMerger::Digitise()
-{
-// as in FMD
-// keep galice.root for signal and name differently the file for
-// background when add! otherwise the track info for signal will be lost !
-
-#ifdef DEBUG
- cout<<"ALiTOFMerger::>SDigits2Digits start...\n";
-#endif
- Int_t retval;
-
- if (fRunLoader == 0x0)
- {
- Error("Exec","Event is not loaded. Exiting");
- return;
- }
-
- if (fRunLoader->GetAliRun() == 0x0) {
- retval = fRunLoader->LoadgAlice();
- if (retval)
- {
- Error("Exec","Error occured while loading gAlice. Exiting");
- return;
- }
- }
-
- if (fRunLoader->TreeE() == 0x0) {
- retval = fRunLoader->LoadHeader();
- if (retval)
- {
- Error("Exec","Error occured while loading header. Exiting");
- return;
- }
- }
-
- if (fRunLoader->TreeK() == 0x0) {
- retval = fRunLoader->LoadKinematics("READ");
- if (retval)
- {
- Error("Exec","Error occured while loading kinematics. Exiting");
- return;
- }
- }
-
- AliLoader* gime = fRunLoader->GetLoader("TOFLoader");
- if (gime == 0x0)
- {
- Error("Exec","Can not find TOF loader in event. Exiting.");
- return;
- }
- gAlice = fRunLoader->GetAliRun();
-
- AliTOF* TOF = (AliTOF *) gAlice->GetDetector("TOF") ;
-
-
- TFile *f1 =0;
- TTree *TK = fRunLoader->TreeK();
- if (TK) f1 = TK->GetCurrentFile();
-
- fRunLoader->GetEvent(fEvNrSig);
-
- if(gime->TreeD() == 0)
- gime->MakeTree("D") ;
-
- gime->TreeD()->Reset();
-
- // read and write digits for signal
- ReadWriteDigit(fEvNrSig);
-
- if(fMerge)
- {
- // bgr file
- fBgrFile->cd();
- // gAlice->TreeS()->Reset();
- gAlice = (AliRun*)fBgrFile->Get("gAlice");
- ReadWriteDigit(fEvNrBgr);
- } //if merge
-
-
- f1->cd();
-
- //Make branch for digits
- TOF->MakeBranch("D");
-
- gime->TreeD()->Reset();
- gime->TreeD()->Fill();
-
- fDigits = TOF->Digits();
-
- gime->WriteDigits("OVERWRITE");
-
- gAlice->ResetDigits();
-
-}
-
-//---------------------------------------------------------------------
-
-void AliTOFMerger::ReadWriteDigit(Int_t iEvNum)
-{
-//
-// Read Sdigits from the current file and write them in the TreeD
-//
- AliTOFdigit* tofsdigit;
-
- AliTOF * tofinfile = (AliTOF *) gAlice->GetDetector("TOF") ;
-
- Int_t retval = fRunLoader->GetEvent(iEvNum);
- if (retval)
- {
- Error("ReadWriteDigit","Error while getting event %d",iEvNum);
- return;
- }
-
- AliLoader* gime = fRunLoader->GetLoader("TOFLoader");
- if (gime == 0x0)
- {
- Error("Exec","Can not find TOF loader in event. Exiting.");
- return;
- }
-
-
-
- if(gime->TreeS()==0)
- {
- cout<<" TreeS==0 -> return"<<gime->TreeS()<<endl;
- return ;
- }
-
- Int_t ndig, k;
- Int_t tracks[3]; // track info
- Int_t vol[5]; // location for a digit
- Float_t digit[2]; // TOF digit variables
-
- gAlice->ResetDigits();
- gime->TreeS()->GetEvent(iEvNum);
- TClonesArray * TOFdigits = tofinfile->SDigits();
-
- ndig=TOFdigits->GetEntries();
-
- for (k=0; k<ndig; k++) {
- tofsdigit= (AliTOFdigit*) TOFdigits->UncheckedAt(k);
-
- tracks[0] = tofsdigit->GetTrack(0);
- tracks[1] = tofsdigit->GetTrack(1);
- tracks[2] = tofsdigit->GetTrack(2);
-
- vol[0] = tofsdigit->GetSector();
- vol[1] = tofsdigit->GetPlate();
- vol[2] = tofsdigit->GetStrip();
- vol[3] = tofsdigit->GetPadx();
- vol[4] = tofsdigit->GetPadz();
-
- digit[0] = tofsdigit->GetTdc();
- digit[1] = tofsdigit->GetAdc();
-
- new ((*fDigits)[fNDigits++]) AliTOFdigit(tracks, vol, digit);
- } // end loop on sdigits in the current file
-}
-
-
-
+++ /dev/null
-#ifndef ALITOFMERGER_H
-#define ALITOFMERGER_H
-/* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
-
-// #include "AliMerger.h"
-// #include "AliMergable.h"
-#include "TRandom.h"
-#include "AliDetector.h"
-#include "AliTOF.h"
-//Piotr.Skowronski@cern.ch :
-//Corrections applied in order to compile (only) with new I/O and folder structure
-//To be implemented correctly by responsible
-class AliRunLoader;
-
-typedef enum {kDigitize=0, kMerge = 1} MergeMode_t;
-
-class AliTOFMerger {
- public:
-
- AliTOFMerger();
- virtual ~AliTOFMerger();
-
-
- // Initialize merging and digitisation
- virtual void Init();
-
- // Do the main work
- void Digitise() ;
- TClonesArray *SDigits() const {return fSDigits;}
-
- void ReadWriteDigit(Int_t);
-
- // Setters -> Later Communication with gAlice
- void SetSignalEventNumber(Int_t i) {fEvNrSig = i;}
- void SetBackgroundEventNumber(Int_t i) {fEvNrBgr = i;}
- void SetBackgroundFileName(char* file) {fFnBgr = file;}
- void SetSignalFileName(char* file) {fFnSig = file;}
- void SetMode(MergeMode_t mode) {fMerge = mode;}
-
- enum {kBgTag = -1};
-
- private:
- // Open the bgr file
- TFile *InitBgr();
-
-
- private:
- TClonesArray *fDigits; // ! array with digits
- TClonesArray *fSDigits ; // List of summable digits
- Int_t fNDigits; // number of digits
- Int_t fEvNrSig; // signal event number
- Int_t fEvNrBgr; // background event number
- MergeMode_t fMerge; // merging type kDigitize, kMerge
- char *fFnBgr; // background file name
- char *fFnSig; // signal file name
- TFile *fBgrFile; // Pointer to background file
-
- AliRunLoader * fRunLoader; //! Run Loader
- ClassDef(AliTOFMerger,0)
-};
-#endif
-
#include "AliTOFReconstructor.h"
#include "AliRunLoader.h"
#include "AliRun.h"
-#include "AliTOF.h"
#include "AliTOFtracker.h"
+#include "AliLog.h"
+#include <TFile.h>
ClassImp(AliTOFReconstructor)
{
// get the TOF parameters
- if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
- if (!runLoader->GetAliRun()) {
- Error("GetTOFGeometry", "couldn't get AliRun object");
+ runLoader->CdGAFile();
+ AliTOFGeometry* tofGeom = (AliTOFGeometry*) gFile->Get("TOFGeometry");
+ if (!tofGeom) {
+ AliError("no TOF geometry available");
return NULL;
}
- AliTOF* tof = (AliTOF*) runLoader->GetAliRun()->GetDetector("TOF");
- if (!tof) {
- Error("GetTOFGeometry", "couldn't get TOF detector");
- return NULL;
- }
- if (!tof->GetGeometry()) {
- Error("GetTOFGeometry", "no TOF geometry available");
- return NULL;
- }
- return tof->GetGeometry();
+ return tofGeom;
}
#include "TArrayF.h"
#include "TArrayI.h"
+#include "AliLog.h"
#include "AliRun.h"
#include "AliTOF.h"
#include "AliTOFGeometry.h"
}
// write warning about many tracks going to this pad
if (iTrack == kMAXDIGITS) {
- cerr<<"WARNING: AliTOFSDigit::Update Many hits in the padhit"<<endl;
- cerr<<" ";
- // PrintPad();
+ AliWarning("Many hits in the padhit");
+ // ToAliWarning(PrintPad());
}
}
} else {
}
// write warning about many tracks going to this pad
if (iTrack == kMAXDIGITS) {
- cerr<<"WARNING: AliTOFSDigit::Update Many hits in the padhit"<<endl;
- cerr<<" ";
- // PrintPad();
+ AliWarning("Many hits in the padhit");
+ // ToAliWarning(PrintPad());
}
}
} else {
#include <TTask.h>
#include <TTree.h>
+#include "AliLog.h"
#include "AliDetector.h"
#include "AliLoader.h"
#include "AliRun.h"
fRunLoader = AliRunLoader::Open(HeaderFile);//open session and mount on default event folder
if (fRunLoader == 0x0)
{
- Fatal("AliTOFSDigitizer","Event is not loaded. Exiting");
+ AliFatal("Event is not loaded. Exiting");
return;
}
else fEvent2 = 1;
if (!(fEvent2>fEvent1)) {
- cout << " ERROR: fEvent2 = " << fEvent2 << " <= fEvent1 = " << fEvent1 << endl;
+ AliError(Form("fEvent2 = %d <= fEvent1 = %d", fEvent2, fEvent1));
fEvent1 = 0;
fEvent2 = 1;
- cout << " Correction: fEvent2 = " << fEvent2 << " <= fEvent1 = " << fEvent1 << endl;
+ AliError(Form("Correction: fEvent2 = %d <= fEvent1 = %d", fEvent2, fEvent1));
}
// init parameters for sdigitization
fTOFLoader = fRunLoader->GetLoader("TOFLoader");
if (fTOFLoader == 0x0)
{
- Fatal("AliTOFSDigitizer","Can not find TOF loader in event. Exiting.");
+ AliFatal("Can not find TOF loader in event. Exiting.");
return;
}
fTOFLoader->PostSDigitizer(this);
AliTOF *tof = (AliTOF *) gAlice->GetDetector("TOF");
if (!tof) {
- Error("AliTOFSDigitizer","TOF not found");
+ AliError("TOF not found");
return;
}
if (tof->SDigits()) tof->ResetSDigits();
if (strstr(verboseOption,"all")) {
- cout << "---------------------------------------- \n";
- cout << " <AliTOFSDigitizer> \n";
- cout << "After sdigitizing " << nselectedHitsinEv << " hits" << " in event " << iEvent << endl;
+ AliInfo("----------------------------------------");
+ AliInfo(" <AliTOFSDigitizer> ");
+ AliInfo(Form("After sdigitizing %d hits in event %d", nselectedHitsinEv, iEvent));
//" (" << nHitsFromPrim << " from primaries and " << nHitsFromSec << " from secondaries) TOF hits, "
- cout << ntotalsdigitsinEv << " digits have been created \n";
- cout << "(" << nsignalsdigitsinEv << " due to signals and " << nnoisesdigitsinEv << " due to border effect) \n";
- cout << ntotalupdatesinEv << " total updates of the hit map have been performed in current event \n";
- cout << "---------------------------------------- \n";
+ AliInfo(Form("%d digits have been created", ntotalsdigitsinEv));
+ AliInfo(Form("(%d due to signals and %d due to border effect)", nsignalsdigitsinEv, nnoisesdigitsinEv));
+ AliInfo(Form("%d total updates of the hit map have been performed in current event", ntotalupdatesinEv));
+ AliInfo("----------------------------------------");
}
} //event loop on events
nHitsFromSec=nselectedHits-nHitsFromPrim;
if(strstr(verboseOption,"all")){
- cout << "---------------------------------------- \n";
- cout << "---------------------------------------- \n";
- cout << "-----------SDigitization Summary-------- \n";
- cout << " <AliTOFSDigitizer> \n";
- cout << "After sdigitizing " << nselectedHits << " hits \n";
- cout << "in " << (fEvent2-fEvent1) << " events \n";
+ AliInfo("----------------------------------------");
+ AliInfo("----------------------------------------");
+ AliInfo("-----------SDigitization Summary--------");
+ AliInfo(" <AliTOFSDigitizer> ");
+ AliInfo(Form("After sdigitizing %d hits", nselectedHits));
+ AliInfo(Form("in %d events", fEvent2-fEvent1));
//" (" << nHitsFromPrim << " from primaries and " << nHitsFromSec << " from secondaries) TOF hits, "
- cout << ntotalsdigits << " sdigits have been created \n";
- cout << "(" << nsignalsdigits << " due to signals and "
- << nnoisesdigits << " due to border effect) \n";
- cout << ntotalupdates << " total updates of the hit map have been performed \n";
- cout << "in " << nlargeTofDiff << " cases the time of flight difference is greater than 200 ps \n";
+ AliInfo(Form("%d sdigits have been created", ntotalsdigits));
+ AliInfo(Form("(%d due to signals and "
+ "%d due to border effect)", nsignalsdigits, nnoisesdigits));
+ AliInfo(Form("%d total updates of the hit map have been performed", ntotalupdates));
+ AliInfo(Form("in %d cases the time of flight difference is greater than 200 ps", nlargeTofDiff));
}
if(strstr(verboseOption,"tim") || strstr(verboseOption,"all")){
gBenchmark->Stop("TOFSDigitizer");
- cout << "AliTOFSDigitizer: \n";
- cout << " took " << gBenchmark->GetCpuTime("TOFSDigitizer") << " seconds in order to make sdigits "
- << gBenchmark->GetCpuTime("TOFSDigitizer")/(fEvent2-fEvent1) << " seconds per event \n";
- cout << " +++++++++++++++++++++++++++++++++++++++++++++++++++ \n";
+ AliInfo("AliTOFSDigitizer:");
+ AliInfo(Form(" took %f seconds in order to make sdigits "
+ "%f seconds per event", gBenchmark->GetCpuTime("TOFSDigitizer"), gBenchmark->GetCpuTime("TOFSDigitizer")/(fEvent2-fEvent1)));
+ AliInfo(" +++++++++++++++++++++++++++++++++++++++++++++++++++ ");
}
}
{
Bool_t isaWrongSelection=(sector < 0) || (sector >= AliTOFGeometry::NSectors()) || (plate < 0) || (plate >= AliTOFGeometry::NPlates());
if(isaWrongSelection){
- cout << "You have selected an invalid value for sector or plate " << endl;
- cout << "The correct range for sector is [0,"<< AliTOFGeometry::NSectors()-1 <<"]\n";
- cout << "The correct range for plate is [0,"<< AliTOFGeometry::NPlates()-1 <<"]\n";
- cout << "By default we continue sdigitizing all hits in all plates of all sectors \n";
+ AliError("You have selected an invalid value for sector or plate ");
+ AliError(Form("The correct range for sector is [0,%d]", AliTOFGeometry::NSectors()-1));
+ AliError(Form("The correct range for plate is [0,%d]", AliTOFGeometry::NPlates()-1));
+ AliError("By default we continue sdigitizing all hits in all plates of all sectors");
} else {
fSelectedSector=sector;
fSelectedPlate =plate;
- cout << "SDigitizing only hits in plate " << fSelectedPlate << " of the sector "
- << fSelectedSector << endl;
+ AliInfo(Form("SDigitizing only hits in plate %d of the sector %d", fSelectedPlate, fSelectedSector));
}
}
#include <Riostream.h>
#include "AliRun.h"
-#include "AliTOF.h"
#include "AliTOFGeometry.h"
#include "AliTOFdigit.h"
#include <Riostream.h>
#include <TObject.h>
+#include "AliLog.h"
#include "AliTOFtrack.h"
#include "AliESDtrack.h"
Double_t r2=fC*fX - fE;
if (TMath::Abs(r2) >= 0.90000) {
- cerr<<" AliTOFtrack warning: Rotation failed !\n";
+ AliWarning("Rotation failed !");
return 0;
}
if((r2*r2) > 1) return 0;
Double_t y0=fY + sqrt(1.- r2*r2)/fC;
if ((fY-y0)*fC >= 0.) {
- cerr<<" AliTOFtrack warning: Rotation failed !!!\n";
+ AliWarning("Rotation failed !!!");
return 0;
}
#include "AliTOFtracker.h"
#include "AliTOFtrack.h"
#include "TClonesArray.h"
-#include "TError.h"
+#include "AliLog.h"
#include "AliTOFdigit.h"
#include "AliTOFGeometry.h"
-#include "AliTOF.h"
#include "AliRun.h"
#include "AliModule.h"
AliModule* frame=gAlice->GetModule("FRAME");
if(!frame) {
- Error("Init","Could Not load FRAME! Assume Frame with Holes \n");
+ AliError("Could Not load FRAME! Assume Frame with Holes");
fHoles=true;
} else{
if(frame->IsVersion()==1) {fHoles=false;}
//Second Step with Looser Matching Criterion
MatchTracks(kTRUE);
- Info("PropagateBack","Number of matched tracks: %d",fnmatch);
- Info("PropagateBack","Number of good matched tracks: %d",fngoodmatch);
- Info("PropagateBack","Number of bad matched tracks: %d",fnbadmatch);
+ AliInfo(Form("Number of matched tracks: %d",fnmatch));
+ AliInfo(Form("Number of good matched tracks: %d",fngoodmatch));
+ AliInfo(Form("Number of bad matched tracks: %d",fnbadmatch));
//Update the matched ESD tracks
TBranch *branch=dTree->GetBranch("TOF");
if (!branch) {
- Error("LoadClusters"," can't get the branch with the TOF digits !\n");
+ AliError("can't get the branch with the TOF digits !");
return 1;
}
dTree->GetEvent(0);
Int_t nd=digits->GetEntriesFast();
- Info("LoadClusters","number of digits: %d",nd);
+ AliInfo(Form("number of digits: %d",nd));
for (Int_t i=0; i<nd; i++) {
AliTOFdigit *d=(AliTOFdigit*)digits->UncheckedAt(i);
//This function adds a cluster to the array of clusters sorted in Z
//--------------------------------------------------------------------
if (fN==kMaxCluster) {
- Error("InsertCluster","Too many clusters !\n");
+ AliError("Too many clusters !");
return 1;
}
#include <TObject.h>
#include <TVirtualMC.h>
+#include "AliLog.h"
#include "AliConst.h"
#include "AliRun.h"
#include "AliTOFv4T0.h"
AliModule* frame=gAlice->GetModule("FRAME");
if(!frame) {
- Error("Ctor","TOF needs FRAME to be present\n");
- exit(1);
+ AliFatal("TOF needs FRAME to be present");
} else{
if (fTOFGeometry) delete fTOFGeometry;
fTOFGeometry = new AliTOFGeometry();
if(frame->IsVersion()==1) {
- cout << " Frame version " << frame->IsVersion() << endl;
- cout << " Full Coverage for TOF" << endl;
+ AliInfo(Form("Frame version %d", frame->IsVersion()));
+ AliInfo("Full Coverage for TOF");
fTOFHoles=false;}
else {
- cout << " Frame version " << frame->IsVersion() << endl;
- cout << " TOF with Holes for PHOS " << endl;
+ AliInfo(Form("Frame version %d", frame->IsVersion()));
+ AliInfo("TOF with Holes for PHOS");
fTOFHoles=true;}
}
fTOFGeometry->SetHoles(fTOFHoles);
par[0] = xFLT*0.5;
par[1] = yFLT*0.5;
- if (fDebug) cout << ClassName() <<
- ": ************************* TOF geometry **************************"<<endl;
+ AliDebug(1, "************************* TOF geometry **************************");
par[2] = (zFLTA *0.5);
gMC->Gsvolu("FLTA", "BOX ", idtmed[512], par, 3); // Insensitive Freon
Float_t zpos = tan(ang)*radius;
Float_t ypos= fTOFGeometry->GetHeights(2,istrip);
gMC->Gspos("FSTR",AliTOFGeometry::NStripA()-istrip,"FLTA",0.,ypos, zpos,idrotm[0], "ONLY");
- if(fDebug>=1) {
- printf("y = %f, z = %f, , z coord = %f, Rot ang = %f, St. %2i \n",ypos,zpos,tan(ang)*radius ,ang*kRaddeg,istrip);
- }
+ AliDebug(1, Form("y = %f, z = %f, , z coord = %f, Rot ang = %f, St. %2i",ypos,zpos,tan(ang)*radius ,ang*kRaddeg,istrip));
}
Float_t zpos = tan(ang)*radius+(zFLTA*0.5+zFLTB*0.5+db);
Float_t ypos= fTOFGeometry->GetHeights(3,istrip);
gMC->Gspos("FSTR",istrip+1,"FLTB",0.,ypos, zpos,idrotm[nrot], "ONLY");
- if(fDebug>=1) {
- printf("y = %f, z = %f, , z coord = %f, Rot ang = %f, St. %2i \n",ypos,zpos,tan(ang)*radius,ang*kRaddeg,istrip);
- }
+ AliDebug(1, Form("y = %f, z = %f, , z coord = %f, Rot ang = %f, St. %2i",ypos,zpos,tan(ang)*radius,ang*kRaddeg,istrip));
}
Float_t zpos = tan(ang)*radius+(zFLTC*0.5+zFLTB+zFLTA*0.5+db*2);
Float_t ypos= fTOFGeometry->GetHeights(4,istrip);
gMC->Gspos("FSTR",istrip+1,"FLTC",0.,ypos, zpos,idrotm[nrot], "ONLY");
- if(fDebug>=1) {
- printf("y = %f, z = %f, z coord = %f, Rot ang = %f, St. %2i \n",ypos,zpos,tan(ang)*radius,ang*kRaddeg,istrip);
- }
+ AliDebug(1, Form("y = %f, z = %f, z coord = %f, Rot ang = %f, St. %2i",ypos,zpos,tan(ang)*radius,ang*kRaddeg,istrip));
}
////////// Layers after strips /////////////////
//
// Initialise the detector after the geometry has been defined
//
- if(fDebug) {
- printf("%s: **************************************"
+ AliDebug(1, "**************************************"
" TOF "
- "**************************************\n",ClassName());
- printf("\n%s: Version 4 of TOF initialing, "
- "symmetric TOF - Full Coverage version\n",ClassName());
- }
+ "**************************************");
+ AliDebug(1, " Version 4 of TOF initialing, "
+ "symmetric TOF - Full Coverage version");
AliTOF::Init();
fIdFLTB = gMC->VolId("FLTB");
fIdFLTC = gMC->VolId("FLTC");
- if(fDebug) {
- printf("%s: **************************************"
+ AliDebug(1, "**************************************"
" TOF "
- "**************************************\n",ClassName());
- }
+ "**************************************");
}
//_____________________________________________________________________________
if (TMath::Abs(ppad[1])>1) {
- Warning("StepManager","Abs(ppad) > 1");
+ AliWarning("Abs(ppad) > 1");
ppad[1]=TMath::Sign((Float_t)1,ppad[1]);
}
incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
#pragma link C++ class AliTOFSDigit+;
#pragma link C++ class AliTOFSDigitizer+;
-#pragma link C++ class AliTOFMerger+;
#pragma link C++ class AliTOFDigitMap+;
#pragma link C++ class AliTOFdigit+;
--- /dev/null
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class AliTOFGeometry+;
+
+#pragma link C++ class AliTOFdigit+;
+
+#endif
--- /dev/null
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class AliTOFtrack+;
+#pragma link C++ class AliTOFtracker+;
+#pragma link C++ class AliTOFpidESD+;
+#pragma link C++ class AliTOFReconstructor+;
+
+#pragma link C++ class AliTOFPID+;
+#pragma link C++ class AliTOFProb+;
+
+#endif
--- /dev/null
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class AliTOF+;
+#pragma link C++ class AliTOFv4T0+;
+#pragma link C++ class AliTOFhit+;
+#pragma link C++ class AliTOFhitT0+;
+
+#pragma link C++ class AliTOFHitMap+;
+#pragma link C++ class AliTOFSDigit+;
+#pragma link C++ class AliTOFSDigitizer+;
+#pragma link C++ class AliTOFDigitizer+;
+
+#pragma link C++ class AliTOFDigitMap+;
+#pragma link C++ class AliTOFDDLRawData+;
+
+#pragma link C++ class AliTOFT0+;
+
+#endif
AliTOFT0.cxx \
AliTOFHitMap.cxx \
AliTOFSDigit.cxx AliTOFSDigitizer.cxx \
- AliTOFMerger.cxx AliTOFDigitMap.cxx \
+ AliTOFDigitMap.cxx \
AliTOFdigit.cxx AliTOFDigitizer.cxx \
AliTOFDDLRawData.cxx \
AliTOFtrack.cxx AliTOFtracker.cxx AliTOFReconstructor.cxx \
--- /dev/null
+#-*- Mode: Makefile -*-
+# $Id$
+
+SRCS = AliTOFGeometry.cxx \
+ AliTOFdigit.cxx
+
+
+HDRS:= $(SRCS:.cxx=.h)
+
+DHDR=TOFbaseLinkDef.h
--- /dev/null
+#-*- Mode: Makefile -*-
+# $Id$
+
+SRCS = AliTOF.cxx AliTOFv4T0.cxx \
+ AliTOFhit.cxx AliTOFhitT0.cxx \
+ AliTOFHitMap.cxx \
+ AliTOFSDigit.cxx AliTOFSDigitizer.cxx \
+ AliTOFdigit.cxx AliTOFDigitizer.cxx \
+ AliTOFDigitMap.cxx \
+ AliTOFDDLRawData.cxx \
+ AliTOFT0.cxx
+
+HDRS:= $(SRCS:.cxx=.h)
+
+DHDR=TOFsimLinkDef.h