sprintf(branchname,"%s",GetName());
AliDebug(2,Form("fBufferSize = %d",fBufferSize));
const char *cH = strstr(option,"H");
- if (fHits && TreeH() && cH) {
- TreeH()->Branch(branchname,&fHits, fBufferSize);
+ if (fHits && fLoader->TreeH() && cH) {
+ fLoader->TreeH()->Branch(branchname,&fHits, fBufferSize);
AliDebug(2,Form("Making Branch %s for hits",branchname));
}
const char *cD = strstr(option,"D");
// const char *cR = strstr(option,"R");
// const char *cS = strstr(option,"S");
- if(cH && TreeH() && (fHits == 0x0)){
+ if(cH && fLoader->TreeH() && (fHits == 0x0)){
fHits = new TClonesArray("AliBCMHit");
fNhits = 0;
- MakeBranchInTree(TreeH(), "BCM" ,&fHits ,kBufSize, 0);
+ MakeBranchInTree(fLoader->TreeH(), "BCM" ,&fHits ,kBufSize, 0);
}
AliDetector::MakeBranch(option);
}
{
// Set branch address
- if (TreeH() && fHits==0x0)
+ if (fLoader->TreeH() && fHits==0x0)
fHits = new TClonesArray("AliBCMHit", 4000);
AliDetector::SetTreeAddress();
}
else
{ //Here we are in the first call of the method
fCurrentEvent=0;
- Int_t numberOfEvents = gAlice->GetEventsPerRun();
+ Int_t numberOfEvents = AliRunLoader::GetRunLoader()->GetNumberOfEvents();
//Create stacks
fInternalStacks = new TObjArray(numberOfEvents + fNBgEvents); //Create array of internal stacks
fCollisionGeometries = new AliCollisionGeometry*[numberOfEvents + fNBgEvents]; //Create array of collision geometries
AliGenerator* GetCurrentGenerator() const;
virtual void SetActiveEventNumber(Int_t actev);
Int_t GetActiveEventNumber() const {return fActiveEvent;}
- virtual Int_t GetNumberOfEvents() const {return gAlice->GetEventsPerRun() + fNBgEvents;}
+ virtual Int_t GetNumberOfEvents() const {return AliRunLoader::GetRunLoader()->GetNumberOfEvents() + fNBgEvents;}
void SetNBgEvents(Int_t nbg=0){fNBgEvents = nbg;}
static TMCProcess IntToMCProcess(Int_t no);
const char *cR = strstr(option,"R");
const char *cS = strstr(option,"S");
- if(cH&& TreeH()){HitCreate(); MakeBranchInTree( TreeH(), "HMPID" ,&fHits ,kBufSize,0);}
+ if(cH&&fLoader->TreeH()){HitCreate(); MakeBranchInTree(fLoader->TreeH(), "HMPID" ,&fHits ,kBufSize,0);}
if(cS&&fLoader->TreeS()){SdiCreate(); MakeBranchInTree(fLoader->TreeS(), "HMPID" ,&fSdi ,kBufSize,0);}
if(cD&&fLoader->TreeD()){DigCreate();for(Int_t i=0;i<7;i++) MakeBranchInTree(fLoader->TreeD(),Form("HMPID%d",i),&((*fDig)[i]),kBufSize,0);}
if(cR&&fLoader->TreeR()){CluCreate();for(Int_t i=0;i<7;i++) MakeBranchInTree(fLoader->TreeR(),Form("HMPID%d",i),&((*fClu)[i]),kBufSize,0);}
fDet[0] = fDet[1] = fDet[2] = kTRUE;
fEnt0 = 0;
- fEnt = gAlice->GetEventsPerRun();
+ fEnt = AliRunLoader::GetRunLoader()->GetNumberOfEvents();
AliLoader* loader = fRunLoader->GetLoader("ITSLoader");
fRunLoader->LoadgAlice();
gAlice = fRunLoader->GetAliRun();
- fEventsPerRun = gAlice->GetEventsPerRun();
+ fEventsPerRun = AliRunLoader::GetRunLoader()->GetNumberOfEvents();
fLoader = fRunLoader->GetLoader("MUONLoader");
fRunLoader->GetEvent(fEvent);
// DEFINITION OF THE TRACKING MEDIA
// for PHOS: idtmed[699->798] equivalent to fIdtmed[0->100]
- Int_t isxfld = gAlice->Field()->Integ() ;
- Float_t sxmgmx = gAlice->Field()->Max() ;
+ Int_t isxfld = AliSimulation::Instance()->GetMCApp()->Field()->Integ() ;
+ Float_t sxmgmx = AliSimulation::Instance()->GetMCApp()->Field()->Max() ;
// The scintillator of the calorimeter made of PBW04 -> idtmed[699]
AliMedium(0, "PHOS Xtal $", 0, 1,
char branchname[20];
sprintf(branchname,"%s",GetName());
// Branch address for hit tree
- TTree *treeH = TreeH();
+ TTree *treeH = fLoader->TreeH();
if (treeH) {
branch = treeH->GetBranch(branchname);
if (branch)
}
return fgInstance;
}
-
-//____________________________________________________________________________
-AliConfig::AliConfig():
- fTopFolder(0x0),
- fTaskFolder(0x0),
- fConstFolder(0x0),
- fDetectorTask(0x0),
- fDetectorFolder(0x0)
-{
- //
- // Default constructor, mainly to keep coding conventions
- //
- fgInstance=0;//never mind, its going to exit in next step
- AliFatal("Constructor should not be called for a singleton");
-}
-//____________________________________________________________________________
-
-AliConfig::AliConfig(const AliConfig& conf):
- TNamed(conf),
- fTopFolder(0x0),
- fTaskFolder(0x0),
- fConstFolder(0x0),
- fDetectorTask(0x0),
- fDetectorFolder(0x0)
-{
- //
- // Copy constructor, mainly to keep coding conventions
- //
- fgInstance=0;
-
- AliFatal("Copy constructor should not be called for a singleton");
-}
-//____________________________________________________________________________
-
-AliConfig& AliConfig::operator=(const AliConfig& /*conf*/)
-{
- //
- // Assignment, mainly to keep coding conventions
- //
- fgInstance=0;
-
- AliFatal("Assignment operator should not be called for a singleton");
- return *this;
-}
//____________________________________________________________________________
AliConfig::AliConfig(const char *name, const char *title):
public:
- AliConfig();
-
virtual ~ AliConfig ();
void Add(TDatabasePDG *pdg);
const TString& GetDataFolderName() const;//returns name of data folder
private:
+ AliConfig(const AliConfig&); // Not implemented
+ AliConfig& operator=(const AliConfig&); // Not implemented
+ AliConfig(); // Not implemented
+ AliConfig(const char * name, const char * title );
+
static const TString fgkTopFolderName; //name of top AliRoot folder
static const TString fgkDefaultEventFolderName; //name of event folder
static const TString fgkGeneratorsFolderName; //name of generator folder
static const TString fgkVirtualMCFolderName; //name of virtual MC folder
- AliConfig(const char * name, const char * title );
- AliConfig(const AliConfig&);
- AliConfig& operator=(const AliConfig&);
-
void AddInFolder (const char * dir, TObject *obj);
Int_t AddSubTask(const char *taskname, const char* name, const char* title);
Int_t AddSubFolder(TFolder* topfolder, const char* infoler, //helper method
//
if(track>=0) {
gAlice->ResetHits(); //stupid = if N detector this method is called N times
- TreeH()->GetEvent(track); //skowron
+ fLoader->TreeH()->GetEvent(track); //skowron
}
//
fMaxIterHit=fHits->GetEntriesFast();
AliDebug(2,Form(" for %s",GetName()));
const char *cH = strstr(option,"H");
- if (fHits && TreeH() && cH)
+ if (fHits && fLoader->TreeH() && cH)
{
- MakeBranchInTree(TreeH(), GetName(), &fHits, fBufferSize, 0);
+ MakeBranchInTree(fLoader->TreeH(), GetName(), &fHits, fBufferSize, 0);
}
}
//
// Branch address for hit tree
- TTree *tree = TreeH();
+ TTree* tree = fLoader->TreeH();
if (tree && fHits) {
branch = tree->GetBranch(GetName());
if (branch)
return fLoader;
}
-//_______________________________________________________________________
-TTree* AliDetector::TreeH() const
-{
-//Get the hits container from the folder
- if (GetLoader() == 0x0)
- {
- //sunstitude this with make getter when we can obtain the event folder name
- AliError("Can not get the getter");
- return 0x0;
- }
-
- TTree* tree = (TTree*)GetLoader()->TreeH();
- return tree;
-}
virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
void SetLoader(AliLoader* loader){fLoader = loader;}
AliLoader* GetLoader() const {return fLoader;} //skowron
- TTree* TreeH() const; //shorcut method for accessing treeH from folder
// Data members
protected:
+++ /dev/null
-/**************************************************************************
- * Copyright(c) 1998-1999, 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. *
- **************************************************************************/
-
-/* $Id$ */
-
-///////////////////////////////////////////////////////////////////////////////
-// //
-// Quality Assurance class //
-// Provides standard histograms for every element of the detector //
-// //
-///////////////////////////////////////////////////////////////////////////////
-
-
-#include <strings.h>
-
-#include <TBrowser.h>
-#include <TCanvas.h>
-#include <TDatabasePDG.h>
-#include <TExec.h>
-#include <TH1.h>
-#include <TList.h>
-#include <TLorentzVector.h>
-#include <TMath.h>
-#include <TObjArray.h>
-#include <TPaveLabel.h>
-#include <TROOT.h>
-#include <TVirtualMC.h>
-
-#include "AliLog.h"
-#include "AliMC.h"
-#include "AliMCQA.h"
-#include "AliModule.h"
-#include "AliRun.h"
-
-ClassImp(AliMCQA)
-
-//_______________________________________________________________________
-AliMCQA::AliMCQA():
- fNdets(0),
- fNvolumes(0),
- fQAList(0),
- fOldId(0),
- fDetDone(0),
- fQAHist(0),
- fVolNames(0),
- fModNames(0),
- fMPaveLabel(0),
- fVPaveLabel(0)
-{
- //
- // Default constructor
- //
-}
-
-//_______________________________________________________________________
-AliMCQA::AliMCQA(const AliMCQA &qa):
- TObject(qa),
- fNdets(0),
- fNvolumes(0),
- fQAList(0),
- fOldId(0),
- fDetDone(0),
- fQAHist(0),
- fVolNames(0),
- fModNames(0),
- fMPaveLabel(0),
- fVPaveLabel(0)
-{
- //
- // Copy constructor
- //
- qa.Copy(*this);
-}
-
-//_______________________________________________________________________
-AliMCQA::AliMCQA(Int_t ndets):
- fNdets(ndets),
- fNvolumes(gMC->NofVolumes()),
- fQAList(new TObjArray(ndets)),
- fOldId(0),
- fDetDone(new Int_t[ndets]),
- fQAHist(new TObjArray(2)),
- fVolNames(new TObjArray(fNvolumes)),
- fModNames(new TObjArray(fNdets)),
- fMPaveLabel(0),
- fVPaveLabel(0)
-{
- //
- // Constructor, creates the list of lists of histograms
- //
- TList *list;
- TH1F* h;
- Int_t i;
-
- TObjArray &hist = *fQAList;
-
- char title[100];
- //
- TObjArray &mods = *(gAlice->Modules());
- TList *dir = gDirectory->GetList();
- for (i=0; i<ndets; i++) {
- hist[i] = list = new TList();
- AliModule *mod = dynamic_cast<AliModule*>(mods[i]);
-
- // Energy Spectrum
- sprintf(title,"Spectrum entering: %s ",mod->GetName());
- list->Add(new TH1F("hEnIn",strcat(title,mod->GetTitle()),100,-4,2));
- dir->Remove(dir->FindObject("hEnIn"));
-
- sprintf(title,"Spectrum exiting: %s ",mod->GetName());
- list->Add(new TH1F("hEnOut",strcat(title,mod->GetTitle()),100,-4,2));
- dir->Remove(dir->FindObject("hEnOut"));
-
- // Z position
- sprintf(title,"Z coordinate entering: %s ",mod->GetName());
- list->Add(new TH1F("hZIn",strcat(title,mod->GetTitle()),100,
- mod->ZMin(),mod->ZMax()));
- dir->Remove(dir->FindObject("hZIn"));
-
- sprintf(title,"Z coordinate exiting: %s ",mod->GetName());
- list->Add(new TH1F("hZOut",strcat(title,mod->GetTitle()),100,
- mod->ZMin(),mod->ZMax()));
- dir->Remove(dir->FindObject("hZOut"));
- }
- //
- gROOT->GetListOfBrowsables()->Add(this,"AliMCQA");
-
- //
- // Global QA histograms
- //
-
- fQAHist->Add(new TH1F("hMCVcalls","Monte Carlo calls per volume",
- fNvolumes, 0.5, fNvolumes+0.5));
- h = dynamic_cast<TH1F*>(dir->FindObject("hMCVcalls"));
- h->GetListOfFunctions()->Add(new TExec("ex","gAlice->GetMCQA()->AddVolumeName()"));
- dir->Remove(dir->FindObject("hMCVcalls"));
- //
- // Build list of volume names
- //
- AliMC * mc = gAlice->GetMCApp();
- for(i=0;i<fNvolumes;++i) {
- Int_t mat = gMC->VolId2Mate(i+1);
- if (mat > 0) {
- AliModule *mod = dynamic_cast<AliModule*>
- ((*gAlice->Modules())[mc->DetFromMate(gMC->VolId2Mate(i+1))]);
- (*fVolNames)[i] = new TNamed(gMC->VolName(i+1),mod->GetName());
- } else {
- (*fVolNames)[i] = new TNamed(gMC->VolName(i+1), "Assembly");
- }
- }
-
- fQAHist->Add(new TH1F("hMCMcalls","Monte Carlo calls per module",
- fNdets, -0.5, fNdets-0.5));
- h = dynamic_cast<TH1F*>(dir->FindObject("hMCMcalls"));
- h->GetListOfFunctions()->Add(new TExec("ex","gAlice->GetMCQA()->AddModuleName()"));
-
- dir->Remove(dir->FindObject("hMCMcalls"));
- //
- // Build list of module names
- //
- for(i=0;i<fNdets;++i)
- (*fModNames)[i]=
- new TNamed((dynamic_cast<AliModule*>((*gAlice->Modules())[i]))->GetName(),"");
-}
-
-//_______________________________________________________________________
-void AliMCQA::Copy(TObject &) const
-{
- AliFatal("Not implemented!");
-}
-
-//_______________________________________________________________________
-AliMCQA::~AliMCQA()
- {
- //
- // Destructor
- //
- gROOT->GetListOfBrowsables()->Remove(this);
- //if program crashes here - it probobly means that
- //one of added browsables was deleted and not removed previously from that list
- //skowron
-
- if (fQAList) {
- fQAList->Delete();
- delete fQAList;
- fQAList = 0;
- }
- if (fQAHist) {
- fQAHist->Delete();
- delete fQAHist;
- fQAHist = 0;
- }
- if (fVolNames) {
- fVolNames->Delete();
- delete fVolNames;
- fVolNames = 0;
- }
- if (fModNames) {
- fModNames->Delete();
- delete fModNames;
- fModNames = 0;
- }
- delete [] fDetDone;
- delete fMPaveLabel;
- delete fVPaveLabel;
-}
-
-//_______________________________________________________________________
-void AliMCQA::Browse(TBrowser *b)
-{
- //
- // Called when the item "Run" is clicked on the left pane
- // of the Root browser.
- // It displays the Root Trees and all detectors.
- //
- TH1 *hist;
- //
- // Global histos first
- //
- TIter global(fQAHist);
- while((hist = dynamic_cast<TH1*>(global())))
- b->Add(hist,hist->GetTitle());
- //
- // Module histograms now
- //
- TIter next(fQAList);
- TList *histos;
- while((histos = dynamic_cast<TList*>(next()))) {
- TIter next1(histos);
- while((hist = dynamic_cast<TH1*>(next1())))
- b->Add(hist,hist->GetTitle());
- }
-}
-
-//_______________________________________________________________________
-void AliMCQA::PreTrack()
-{
- //
- // Called before each track
- //
- fOldId=-1;
- for(Int_t i=0; i<fNdets; i++) fDetDone[i]=0;
-}
-
-//_______________________________________________________________________
-void AliMCQA::StepManager(Int_t id)
-{
- //
- // Called at each step
- //
- TH1F *hist;
- Int_t copy;
- //
- // Fill Global histograms first
- //
-
-
- static TH1F* mcvcalls = dynamic_cast<TH1F*>(fQAHist->FindObject("hMCVcalls"));
- mcvcalls->Fill(gMC->CurrentVolID(copy));
- static TH1F* mcmcalls = dynamic_cast<TH1F*>(fQAHist->FindObject("hMCMcalls"));
- mcmcalls->Fill(id);
-
- //
- // Now the step manager histograms
- //
- if(fOldId != id) {
- static Double_t mpi0=0;
- static Double_t mpip=0;
- static Double_t mpim=0;
- static Double_t mep=0;
- static Double_t mem=0;
- Double_t mass = 0;
- Int_t num = gMC->TrackPid();
-
- switch (num) {
- case 111:
- if (mpi0==0) mpi0=gAlice->PDGDB()->GetParticle(num)->Mass();
- mass=mpi0;
- break;
- case 211:
- if (mpip==0) mpip=gAlice->PDGDB()->GetParticle(num)->Mass();
- mass=mpip;
- break;
- case -211:
- if (mpim==0) mpim=gAlice->PDGDB()->GetParticle(num)->Mass();
- mass=mpim;
- break;
- case 11:
- if (mep==0) mep=gAlice->PDGDB()->GetParticle(num)->Mass();
- mass=mep;
- break;
- case -11:
- if (mem==0) mem=gAlice->PDGDB()->GetParticle(num)->Mass();
- mass=mem;
- break;
- default:
- if (gAlice->PDGDB()->GetParticle(num))
- mass = gAlice->PDGDB()->GetParticle(num)->Mass();
- break;
- }
-
- static TLorentzVector p, x;
- gMC->TrackMomentum(p);
- gMC->TrackPosition(x);
- Double_t energy = TMath::Max(p[3]-mass,1.e-12);
- if(fOldId > -1) {
- if(!fDetDone[fOldId] && !gMC->IsNewTrack()) {
- TList *histold = dynamic_cast<TList*>((*fQAList)[fOldId]);
- hist = dynamic_cast<TH1F*>(histold->FindObject("hEnOut"));
- hist->Fill(TMath::Log10(energy));
- hist = dynamic_cast<TH1F*>(histold->FindObject("hZOut"));
- hist->Fill(x[2]);
- fDetDone[fOldId]=1;
- }
- }
- if(!fDetDone[id] && !gMC->IsNewTrack()) {
- TList *histnew = dynamic_cast<TList*>((*fQAList)[id]);
- hist = dynamic_cast<TH1F*>(histnew->FindObject("hEnIn"));
- hist->Fill(TMath::Log10(energy));
- hist = dynamic_cast<TH1F*>(histnew->FindObject("hZIn"));
- hist->Fill(x[2]);
- }
- fOldId=id;
- }
-}
-
-//_______________________________________________________________________
-void AliMCQA::AddModuleName()
-{
- //
- // Add function DrawModuleName to the module frequency histogram pad
- //
- static TVirtualPad* oldpad=0;
- if(oldpad!=gPad) {
- gPad->GetCanvas()->FeedbackMode(kTRUE);
- if(gPad) gPad->AddExec("ex","gAlice->GetMCQA()->DrawModuleName()");
- DrawPaveLabel(fMPaveLabel);
- oldpad=gPad;
- }
-}
-
-//_______________________________________________________________________
-void AliMCQA::AddVolumeName()
-{
- //
- // Add function DrawVolumeName to the volume frequency histogram pad
- //
- static TVirtualPad* oldpad=0;
- if(oldpad!=gPad) {
- gPad->GetCanvas()->FeedbackMode(kTRUE);
- if(gPad) gPad->AddExec("ex","gAlice->GetMCQA()->DrawVolumeName()");
- DrawPaveLabel(fVPaveLabel);
- oldpad=gPad;
- }
-}
-
-//_______________________________________________________________________
-void AliMCQA::DrawPaveLabel(TPaveLabel *&pv)
-{
- //
- // Draws the PaveLabel with the meaning of the bin
- //
- float uxmin = gPad->GetUxmin();
- float uxmax = gPad->GetUxmax();
- float uymin = gPad->GetUymin();
- float uymax = gPad->GetUymax();
- float lx = uxmax-uxmin;
- float ly = uymax-uymin;
-
- if(pv) delete pv;
- pv
- = new TPaveLabel(uxmin+0.05*lx,uymax-(0.05+0.1)*ly,
- uxmin+(0.05+0.2)*lx,uymax-0.05*ly,
- "");
- pv->Draw();
-}
-
-//_______________________________________________________________________
-Int_t AliMCQA::GetHBin(const char* hname)
-{
- //
- // Get the bin where the cursor is
- //
- TList *dir = gDirectory->GetList();
- TH1 *h=dynamic_cast<TH1*>(dir->FindObject(hname));
-
-
- int px = gPad->GetEventX();
- Float_t upx = gPad->AbsPixeltoX(px);
- Float_t x = gPad->PadtoX(upx);
-
- return h->GetXaxis()->FindBin(x);
-}
-
-//_______________________________________________________________________
-void AliMCQA::DrawModuleName()
-{
- //
- // Writes the name of the module of the bin where the cursor is
- //
- TObject *select = gPad->GetSelected();
- if(!select) return;
-
- Int_t binx = GetHBin("hMCMcalls");
- if(0<binx && binx<=fNdets) {
- char lab[15];
- strcpy(lab,dynamic_cast<TNamed*>((*fModNames)[binx-1])->GetName());
- fMPaveLabel->SetLabel(lab);
-
- gPad->Modified();
- gPad->Update();
- }
-}
-
-//_______________________________________________________________________
-void AliMCQA::DrawVolumeName()
-{
- //
- // Writes the name of the volume:module of the bin where the cursor is
- //
- TObject *select = gPad->GetSelected();
- if(!select) return;
-
- Int_t binx = GetHBin("hMCVcalls");
- if(0<binx && binx<=fNvolumes) {
- char lab[20];
- sprintf(lab,"%s: %s",dynamic_cast<TNamed*>((*fVolNames)[binx-1])->GetName(),
- dynamic_cast<TNamed*>((*fVolNames)[binx-1])->GetTitle());
- fVPaveLabel->SetLabel(lab);
-
- gPad->Modified();
- gPad->Update();
- }
-}
-
-
+++ /dev/null
-#ifndef ALIMCQA_H
-#define ALIMCQA_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
-
-/* $Id$ */
-
-///////////////////////////////////////////////////////////////////////////////
-// //
-// Quality assurance services for MC //
-// //
-///////////////////////////////////////////////////////////////////////////////
-
-#include "TObject.h"
-class TObjArray;
-class TBrowser;
-class TPaveLabel;
-
-class AliMCQA : public TObject
-{
-public:
- AliMCQA();
- AliMCQA(Int_t ndets);
- AliMCQA(const AliMCQA &qa);
- virtual ~AliMCQA();
- Bool_t IsFolder() const {return kTRUE;}
- virtual void Browse(TBrowser *b);
- virtual void PreTrack();
- virtual TObjArray *GetQAList() const {return fQAList;}
- void DrawModuleName();
- void AddModuleName();
- void DrawVolumeName();
- void AddVolumeName();
- AliMCQA & operator=(const AliMCQA &qa)
- {qa.Copy(*this); return (*this);}
-
- // QA step manager
- virtual void StepManager(Int_t id);
-
-protected:
- Int_t fNdets; // Number of detectors
- Int_t fNvolumes; // Number of volumes
- TObjArray *fQAList; // QA lists of histograms
- Int_t fOldId; //! ID of the current module
- Int_t *fDetDone; //! Detector done flag
- TObjArray *fQAHist; // Global QA histograms
- TObjArray *fVolNames; // Volume names
- TObjArray *fModNames; // Module names
- TPaveLabel *fMPaveLabel; //! PaveLabel for the Modules
- TPaveLabel *fVPaveLabel; //! PaveLabel for the Volumes
-
-private:
- void DrawPaveLabel(TPaveLabel *&pv);
- Int_t GetHBin(const char* hname);
- void Copy(TObject& qa) const;
-
- ClassDef(AliMCQA,1) //Quality Assurance class for the MC
-};
-
-#endif
}
}
-Double_t AliTracker::GetBz(Float_t *r) {
+Double_t AliTracker::GetBz(const Float_t *r) {
//------------------------------------------------------------------
// Returns Bz (kG) at the point "r" .
//------------------------------------------------------------------
}
Double_t
-AliTracker::MeanMaterialBudget(Double_t *start,Double_t *end,Double_t *mparam)
+AliTracker::MeanMaterialBudget(const Double_t *start, const Double_t *end, const Double_t *mparam)
{
//
// Calculate mean material budget and material properties between
Double_t GetSigmaZ() const {return fSigmaZ;}
static
- Double_t MeanMaterialBudget(Double_t *start,Double_t *end,Double_t *mparam);
+ Double_t MeanMaterialBudget(const Double_t *start, const Double_t *end, const Double_t *mparam);
static
Bool_t PropagateTrackTo(AliExternalTrackParam *track, Double_t x, Double_t m,
Double_t maxStep, Bool_t rotateTo=kTRUE, Double_t maxSnp=0.8);
static void SetFieldMap(const AliMagF* map, Bool_t uni);
static const AliMagF *GetFieldMap() {return fgkFieldMap;}
- static Double_t GetBz(Float_t *r);
- static Double_t GetBz(Double_t *r) {
+ static Double_t GetBz(const Float_t *r);
+ static Double_t GetBz(const Double_t *r) {
Float_t rr[]={r[0],r[1],r[2]};
return GetBz(rr);
}
AliInfo( Form( "initializing gAlice with config file %s",
configfile.Data() ) );
StdoutToAliInfo( StderrToAliError(
- gAlice->Init( configfile.Data() );
+ gAlice->InitMC( configfile.Data() );
););
AliRunLoader* runLoader = AliRunLoader::GetRunLoader();
AliMagFDM.cxx AliLegoGenerator.cxx AliLegoGeneratorXYZ.cxx
AliLegoGeneratorPhiZ.cxx AliLegoGeneratorEta.cxx AliLegoGeneratorEtaR.cxx
AliRndm.cxx
-AliMCQA.cxx AliDebugVolume.cxx
+AliDebugVolume.cxx
AliConfig.cxx
AliRunDigitizer.cxx AliDigitizer.cxx AliStream.cxx
AliMergeCombi.cxx AliMagFMaps.cxx AliFieldMap.cxx
#pragma link C++ class AliRecPoint+;
#pragma link C++ class AliHitMap+;
#pragma link C++ class AliRndm+;
-#pragma link C++ class AliMCQA+;
#pragma link C++ class AliDebugVolume+;
#pragma link C++ class AliConfig+;
#pragma link C++ class AliDigitizer+;
AliMagFDM.cxx AliLegoGenerator.cxx AliLegoGeneratorXYZ.cxx\
AliLegoGeneratorPhiZ.cxx AliLegoGeneratorEta.cxx AliLegoGeneratorEtaR.cxx \
AliRndm.cxx \
-AliMCQA.cxx AliDebugVolume.cxx \
+AliDebugVolume.cxx \
AliConfig.cxx \
AliRunDigitizer.cxx AliDigitizer.cxx AliStream.cxx \
AliMergeCombi.cxx AliMagFMaps.cxx AliFieldMap.cxx \
void AliT0::SetTreeAddress()
{
- TTree *treeH;
- treeH = TreeH();
+ TTree *treeH = fLoader->TreeH();
if (treeH)
{
for (Int_t ievent = 0; ievent < fNevents; ievent++) {
gAlice->GetEvent(ievent);
- TTree *hitTree = detTOF->TreeH ();
+ TTree *hitTree = detTOF->GetLoader()->TreeH ();
if (!hitTree)
return;
TParticle* particle;
}
for (Int_t i=0;i<fTPCParam->GetNSector();i++) fActiveSectors[i]=kFALSE;
TBranch * branch=0;
- if (TreeH() == 0x0)
+ if (fLoader->TreeH() == 0x0)
{
AliFatal("Can not find TreeH in folder");
return;
}
- if (fHitType>1) branch = TreeH()->GetBranch("TPC2");
- else branch = TreeH()->GetBranch("TPC");
- Stat_t ntracks = TreeH()->GetEntries();
+ if (fHitType>1) branch = fLoader->TreeH()->GetBranch("TPC2");
+ else branch = fLoader->TreeH()->GetBranch("TPC");
+ Stat_t ntracks = fLoader->TreeH()->GetEntries();
// loop over all hits
AliDebug(1,Form("Got %d tracks",ntracks));
ResetHits();
//
if (fTrackHits && fHitType&4) {
- TBranch * br1 = TreeH()->GetBranch("fVolumes");
- TBranch * br2 = TreeH()->GetBranch("fNVolumes");
+ TBranch * br1 = fLoader->TreeH()->GetBranch("fVolumes");
+ TBranch * br2 = fLoader->TreeH()->GetBranch("fNVolumes");
br1->GetEvent(track);
br2->GetEvent(track);
Int_t *volumes = fTrackHits->GetVolumes();
//
// if (fTrackHitsOld && fHitType&2) {
-// TBranch * br = TreeH()->GetBranch("fTrackHitsInfo");
+// TBranch * br = fLoader->TreeH()->GetBranch("fTrackHitsInfo");
// br->GetEvent(track);
// AliObjectArray * ar = fTrackHitsOld->fTrackHitsInfo;
// for (UInt_t j=0;j<ar->GetSize();j++){
if(fDefaults == 0) SetDefaults();
- TTree *tH = TreeH(); // pointer to the hits tree
+ TTree *tH = fLoader->TreeH(); // pointer to the hits tree
if (tH == 0x0) {
AliFatal("Can not find TreeH in folder");
return;
// Get the pointer to the header
const char *cH = strstr(option,"H");
//
- if (fTrackHits && TreeH() && cH && fHitType&4) {
+ if (fTrackHits && fLoader->TreeH() && cH && fHitType&4) {
AliDebug(1,"Making branch for Type 4 Hits");
- TreeH()->Branch(branchname,"AliTPCTrackHitsV2",&fTrackHits,fBufferSize,99);
+ fLoader->TreeH()->Branch(branchname,"AliTPCTrackHitsV2",&fTrackHits,fBufferSize,99);
}
-// if (fTrackHitsOld && TreeH() && cH && fHitType&2) {
+// if (fTrackHitsOld && fLoader->TreeH() && cH && fHitType&2) {
// AliDebug(1,"Making branch for Type 2 Hits");
// AliObjectBranch * branch = new AliObjectBranch(branchname,"AliTPCTrackHits",&fTrackHitsOld,
-// TreeH(),fBufferSize,99);
-// TreeH()->GetListOfBranches()->Add(branch);
+// fLoader->TreeH(),fBufferSize,99);
+// fLoader->TreeH()->GetListOfBranches()->Add(branch);
// }
}
sprintf(branchname,"%s2",GetName());
//
// Branch address for hit tree
- TTree *treeH = TreeH();
+ TTree *treeH = fLoader->TreeH();
if ((treeH)&&(fHitType&4)) {
branch = treeH->GetBranch(branchname);
if (branch) {
//
if(track>=0) {
gAlice->ResetHits();
- TreeH()->GetEvent(track);
+ fLoader->TreeH()->GetEvent(track);
}
//
if (fTrackHits && fHitType&4) {
//
// return kTRUE;
// if (fTrackHitsOld && fHitType&2) {
-// TBranch * br = TreeH()->GetBranch("fTrackHitsInfo");
+// TBranch * br = fLoader->TreeH()->GetBranch("fTrackHitsInfo");
// br->GetEvent(track);
// AliObjectArray * ar = fTrackHitsOld->fTrackHitsInfo;
// for (UInt_t j=0;j<ar->GetSize();j++){
// }
if (fTrackHits && fHitType&4) {
- TBranch * br1 = TreeH()->GetBranch("fVolumes");
- TBranch * br2 = TreeH()->GetBranch("fNVolumes");
+ TBranch * br1 = fLoader->TreeH()->GetBranch("fVolumes");
+ TBranch * br2 = fLoader->TreeH()->GetBranch("fNVolumes");
br2->GetEvent(track);
br1->GetEvent(track);
Int_t *volumes = fTrackHits->GetVolumes();
}
if (fHitType&1) {
- TBranch * br = TreeH()->GetBranch("fSector");
+ TBranch * br = fLoader->TreeH()->GetBranch("fSector");
br->GetEvent(track);
for (Int_t j=0;j<fHits->GetEntriesFast();j++){
if ( ((AliTPChit*)fHits->At(j))->fSector==id) return kTRUE;
LoadRecPointsFile();
TObjArray *module = new TObjArray();
- int nEvents = gAlice->GetEventsPerRun();
+ int nEvents = AliRunLoader::GetRunLoader()->GetNumberOfEvents();
for(int ev=startEvent; ev<nEvents && ev < stopEvent; ev++) {
const char *cH = strstr(option,"H");
- if (fHits && TreeH() && cH) {
- TreeH()->Branch(branchname,&fHits, fBufferSize);
+ if (fHits && fLoader->TreeH() && cH) {
+ fLoader->TreeH()->Branch(branchname,&fHits, fBufferSize);
AliDebug(2,Form("Making Branch %s for hits",branchname));
}
const char *cH = strstr(option,"H");
- if (fHits && TreeH() && cH) {
- TreeH()->Branch(branchname,&fHits, fBufferSize);
+ if (fHits && fLoader->TreeH() && cH) {
+ fLoader->TreeH()->Branch(branchname,&fHits, fBufferSize);
AliDebug(2,Form("Making Branch %s for hits",branchname));
}
const char *cH = strstr(option,"H");
- if (fHits && TreeH() && cH) {
- TreeH()->Branch(branchname,&fHits, fBufferSize);
+ if (fHits && fLoader->TreeH() && cH) {
+ fLoader->TreeH()->Branch(branchname,&fHits, fBufferSize);
AliDebug(2,Form("Making Branch %s for hits",branchname));
}
const char *cH = strstr(option,"H");
- if (fHits && TreeH() && cH) {
- TreeH()->Branch(branchname,&fHits, fBufferSize);
+ if (fHits && fLoader->TreeH() && cH) {
+ fLoader->TreeH()->Branch(branchname,&fHits, fBufferSize);
AliDebug(2,Form("Making Branch %s for hits",branchname));
}
const char *cH = strstr(option,"H");
- if (fHits && TreeH() && cH) {
- TreeH()->Branch(branchname,&fHits, fBufferSize);
+ if (fHits && fLoader->TreeH() && cH) {
+ fLoader->TreeH()->Branch(branchname,&fHits, fBufferSize);
AliDebug(2,Form("Making Branch %s for hits",branchname));
}
sprintf(branchname,"%s",GetName());
AliDebug(2,Form("fBufferSize = %d",fBufferSize));
const char *cH = strstr(option,"H");
- if (fHits && TreeH() && cH) {
- TreeH()->Branch(branchname,&fHits, fBufferSize);
+ if (fHits && fLoader->TreeH() && cH) {
+ fLoader->TreeH()->Branch(branchname,&fHits, fBufferSize);
AliDebug(2,Form("Making Branch %s for hits",branchname));
}
const char *cD = strstr(option,"D");