#include "AliV0vertexer.h"
#include "AliVertexer.h"
#include "AliVertexerTracks.h"
-#include "AliTriggerRunScalers.h"
-#include "AliCTPTimeParams.h"
ClassImp(AliReconstruction)
fRunInfo(NULL),
fEventInfo(),
fRunScalers(NULL),
- fCTPTimeParams(NULL),
fRunLoader(NULL),
fRawReader(NULL),
fRunInfo(NULL),
fEventInfo(),
fRunScalers(NULL),
- fCTPTimeParams(NULL),
fRunLoader(NULL),
fRawReader(NULL),
delete fRunScalers; fRunScalers = NULL;
if (rec.fRunScalers) fRunScalers = new AliTriggerRunScalers(*rec.fRunScalers);
- delete fCTPTimeParams; fCTPTimeParams = NULL;
- if (rec.fCTPTimeParams) fCTPTimeParams = new AliCTPTimeParams(*rec.fCTPTimeParams);
-
+
fRunLoader = NULL;
fRawReader = NULL;
fParentRawReader = NULL;
}
delete fGRPData;
delete fRunScalers;
- delete fCTPTimeParams;
fOptions.Delete();
if (fAlignObjArray) {
fAlignObjArray->Delete();
void AliReconstruction::InitQA()
{
//Initialize the QA and start of cycle
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
if (fInitQACalled) return;
fInitQACalled = kTRUE;
qam->SetCycleLength(AliQAv1::DETECTORINDEX_t(det), fQACycles[det]) ;
qam->SetWriteExpert(AliQAv1::DETECTORINDEX_t(det)) ;
}
- if (!fRawReader && !fInput && fQATasks.Contains(AliQAv1::kRAWS))
+ if (!fRawReader && !fInput && IsInTasks(AliQAv1::kRAWS))
fQATasks.ReplaceAll(Form("%d",AliQAv1::kRAWS), "") ;
qam->SetTasks(fQATasks) ;
qam->InitQADataMaker(AliCDBManager::Instance()->GetRun()) ;
Bool_t sameCycle = kFALSE ;
AliQADataMaker *qadm = qam->GetQADataMaker(AliQAv1::kGLOBAL);
AliInfo(Form("Initializing the global QA data maker"));
- if (fQATasks.Contains(Form("%d", AliQAv1::kRECPOINTS))) {
+ if (IsInTasks(AliQAv1::kRECPOINTS)) {
qadm->StartOfCycle(AliQAv1::kRECPOINTS, AliCDBManager::Instance()->GetRun(), sameCycle) ;
TObjArray **arr=qadm->Init(AliQAv1::kRECPOINTS);
AliTracker::SetResidualsArray(arr);
sameCycle = kTRUE ;
}
- if (fQATasks.Contains(Form("%d", AliQAv1::kESDS))) {
+ if (IsInTasks(AliQAv1::kESDS)) {
qadm->StartOfCycle(AliQAv1::kESDS, AliCDBManager::Instance()->GetRun(), sameCycle) ;
qadm->Init(AliQAv1::kESDS);
}
void AliReconstruction::MergeQA(const char *fileName)
{
//Initialize the QA and start of cycle
- AliCodeTimerAuto("",0) ;
+ AliCodeTimerAuto("") ;
AliQAManager::QAManager()->Merge(AliCDBManager::Instance()->GetRun(),fileName) ;
AliSysInfo::AddStamp("MergeQA") ;
}
// activate a default CDB storage
// First check if we have any CDB storage set, because it is used
// to retrieve the calibration and alignment constants
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
if (fInitCDBCalled) return;
fInitCDBCalled = kTRUE;
AliDebug(2,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
AliDebug(2, Form("Default CDB storage is set to: %s", fCDBUri.Data()));
AliDebug(2, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
- man->SetDefaultStorage(fCDBUri);
- }
- else if (!man->GetRaw()){
- fCDBUri="local://$ALICE_ROOT/OCDB";
+ } else {
+ fCDBUri="local://$ALICE_ROOT/OCDB";
AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
AliWarning("Default CDB storage not yet set !!!!");
AliWarning(Form("Setting it now to: %s", fCDBUri.Data()));
AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
- man->SetDefaultStorage(fCDBUri);
- }
- else {
- AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
- AliWarning("Default storage will be set after setting the Run Number!!!");
- AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+
}
+ man->SetDefaultStorage(fCDBUri);
}
// Now activate the detector specific CDB storage locations
//_____________________________________________________________________________
Bool_t AliReconstruction::LoadCDB()
{
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
AliCDBManager::Instance()->Get("GRP/CTP/Config");
//_____________________________________________________________________________
Bool_t AliReconstruction::LoadTriggerScalersCDB()
{
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/CTP/Scalers");
return kTRUE;
}
//_____________________________________________________________________________
-Bool_t AliReconstruction::LoadCTPTimeParamsCDB()
-{
- AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/CTP/CTPtiming");
-
- if (entry) {
-
- AliInfo("Found an AliCTPTimeParams in GRP/CTP/CTPtiming, reading it");
- fCTPTimeParams = dynamic_cast<AliCTPTimeParams*> (entry->GetObject());
- entry->SetOwner(0);
- return kTRUE;
- }
-
- return kFALSE;
-}
-//_____________________________________________________________________________
Bool_t AliReconstruction::Run(const char* input)
{
// Run Run Run
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
InitRun(input);
if (GetAbort() != TSelector::kContinue) return kFALSE;
Long64_t nEntries = (fLastEvent < 0) ? (TChain::kBigNumber) : (fLastEvent - fFirstEvent + 1);
// Proof mode
if (gProof) {
- // Temporary fix for long raw-data runs (until socket timeout handling in PROOF is revised)
- gProof->Exec("gEnv->SetValue(\"Proof.SocketActivityTimeout\",-1)", kTRUE);
if (gGrid)
gProof->Exec("TGrid::Connect(\"alien://\")",kTRUE);
//_____________________________________________________________________________
void AliReconstruction::InitRawReader(const char* input)
{
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
// Init raw-reader and
// set the input in case of raw data
{
// Initialization of raw-reader,
// run number, CDB etc.
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
AliSysInfo::AddStamp("Start");
// Initialize raw-reader if any
// going into the event loop
// Should follow the TSelector convention
// i.e. initialize only the object on the client side
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
AliReconstruction *reco = NULL;
if (fInput) {
}
AliSysInfo::AddStamp("LoadTriggerScalersCDB");
- if (!LoadCTPTimeParamsCDB()) {
- Abort("LoadCTPTimeParamsCDB", TSelector::kAbortProcess);
- return;
- }
- AliSysInfo::AddStamp("LoadCTPTimeParamsCDB");
// Read the reconstruction parameters from OCDB
if (!InitRecoParams()) {
// Initialization related to run-loader,
// vertexer, trackers, recontructors
// In proof mode it is executed on the slave
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
TProofOutputFile *outProofFile = NULL;
if (fInput) {
{
// run the reconstruction over a single entry
// from the chain with raw data
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
TTree *currTree = fChain->GetTree();
AliRawVEvent *event = NULL;
// run the reconstruction over a single event
// The event loop is steered in Run method
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
if (iEvent >= fRunLoader->GetNumberOfEvents()) {
fRunLoader->SetEventNumber(iEvent);
if (reconstructor && fRecoParam.GetDetRecoParamArray(iDet)) {
const AliDetectorRecoParam *par = fRecoParam.GetDetRecoParam(iDet);
reconstructor->SetRecoParam(par);
- reconstructor->SetEventInfo(&fEventInfo);
+ reconstructor->SetEventInfo(&fEventInfo);
if (fRunQA) {
AliQAManager::QAManager()->SetRecoParam(iDet, par) ;
AliQAManager::QAManager()->SetEventSpecie(AliRecoParam::Convert(par->GetEventSpecie())) ;
}
// QA on single raw
- if (fRunQA) {
+ if (fRunQA && IsInTasks(AliQAv1::kRAWS)) {
AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
AliQAManager::QAManager()->RunOneEvent(fRawReader) ;
}
// Propagate track to the beam pipe (if not already done by ITS)
//
const Int_t ntracks = fesd->GetNumberOfTracks();
+ const Double_t kBz = fesd->GetMagneticField();
const Double_t kRadius = 2.8; //something less than the beam pipe radius
TObjArray trkArray;
ok = kFALSE;
if (tpcTrack)
ok = AliTracker::
- PropagateTrackToBxByBz(tpcTrack,kRadius,track->GetMass(),kMaxStep,kFALSE);
+ PropagateTrackTo(tpcTrack,kRadius,track->GetMass(),kMaxStep,kFALSE);
if (ok) {
Int_t n=trkArray.GetEntriesFast();
if (track->IsOn(AliESDtrack::kITSrefit)) continue;
AliTracker::
- PropagateTrackToBxByBz(track,kRadius,track->GetMass(),kMaxStep,kFALSE);
- Double_t x[3]; track->GetXYZ(x);
- Double_t b[3]; AliTracker::GetBxByBz(x,b);
- track->RelateToVertexBxByBz(fesd->GetPrimaryVertexSPD(), b, kVeryBig);
+ PropagateTrackTo(track,kRadius,track->GetMass(),kMaxStep,kFALSE);
+ track->RelateToVertex(fesd->GetPrimaryVertexSPD(), kBz, kVeryBig);
}
fesd->SetPrimaryVertexTracks(pvtx);
for (Int_t i=0; i<ntracks; i++) {
AliESDtrack *t = fesd->GetTrack(i);
- Double_t x[3]; t->GetXYZ(x);
- Double_t b[3]; AliTracker::GetBxByBz(x,b);
- t->RelateToVertexBxByBz(pvtx, b, kVeryBig);
+ t->RelateToVertex(pvtx, kBz, kVeryBig);
}
}
}
fesd->SetPrimaryVertexTPC(pvtx);
for (Int_t i=0; i<ntracks; i++) {
AliESDtrack *t = fesd->GetTrack(i);
- Double_t x[3]; t->GetXYZ(x);
- Double_t b[3]; AliTracker::GetBxByBz(x,b);
- t->RelateToVertexTPCBxByBz(pvtx, b, kVeryBig);
+ t->RelateToVertexTPC(pvtx, kBz, kVeryBig);
}
}
}
// write ESD
if (fCleanESD) CleanESD(fesd);
- if (fRunQA) {
+ if (fRunQA && IsInTasks(AliQAv1::kESDS)) {
AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
AliQAManager::QAManager()->RunOneEvent(fesd) ;
}
if (fRunGlobalQA) {
AliQADataMaker *qadm = AliQAManager::QAManager()->GetQADataMaker(AliQAv1::kGLOBAL);
qadm->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
- if (qadm && fQATasks.Contains(Form("%d", AliQAv1::kESDS)))
+ if (qadm && IsInTasks(AliQAv1::kESDS))
qadm->Exec(AliQAv1::kESDS, fesd);
}
// Finalize the run on the slave side
// Called after the exit
// from the event loop
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
if (fIsNewRunLoader) { // galice.root didn't exist
fRunLoader->WriteHeader("OVERWRITE");
if (fRunGlobalQA) {
AliQADataMaker *qadm = AliQAManager::QAManager()->GetQADataMaker(AliQAv1::kGLOBAL);
if (qadm) {
- if (fQATasks.Contains(Form("%d", AliQAv1::kRECPOINTS)))
+ if (IsInTasks(AliQAv1::kRECPOINTS))
qadm->EndOfCycle(AliQAv1::kRECPOINTS);
- if (fQATasks.Contains(Form("%d", AliQAv1::kESDS)))
+ if (IsInTasks(AliQAv1::kESDS))
qadm->EndOfCycle(AliQAv1::kESDS);
qadm->Finish();
}
{
// Create tags for the events in the ESD tree (the ESD tree is always present)
// In case of empty events the tags will contain dummy values
- AliCodeTimerAuto("",0);
+ AliCodeTimerAuto("");
// Do not call the ESD tag creator in case of PROOF-based reconstruction
if (!fInput) {
// run the local reconstruction
static Int_t eventNr=0;
- AliCodeTimerAuto("",0)
+ AliCodeTimerAuto("")
TString detStr = detectors;
for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
AliInfo(Form("converting raw data digits into root objects for %s",
fgkDetectorName[iDet]));
// AliCodeTimerAuto(Form("converting raw data digits into root objects for %s",
-// fgkDetectorName[iDet]),0);
+// fgkDetectorName[iDet]));
loader->LoadDigits("update");
loader->CleanDigits();
loader->MakeDigitsContainer();
}
// local reconstruction
AliInfo(Form("running reconstruction for %s", fgkDetectorName[iDet]));
- //AliCodeTimerAuto(Form("running reconstruction for %s", fgkDetectorName[iDet]),0);
+ //AliCodeTimerAuto(Form("running reconstruction for %s", fgkDetectorName[iDet]));
loader->LoadRecPoints("update");
loader->CleanRecPoints();
loader->MakeRecPointsContainer();
if (fStopOnError) return kFALSE;
} else {
reconstructor->Reconstruct(digitsTree, clustersTree);
- if (fRunQA) {
+ if (fRunQA && IsInTasks(AliQAv1::kDIGITSR)) {
AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
AliQAManager::QAManager()->RunOneEventInOneDetector(iDet, digitsTree) ;
}
}
loader->UnloadDigits();
}
- if (fRunQA) {
+ if (fRunQA && IsInTasks(AliQAv1::kRECPOINTS)) {
AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
AliQAManager::QAManager()->RunOneEventInOneDetector(iDet, clustersTree) ;
}
{
// run the SPD trackleting (for SPD efficiency purpouses)
- AliCodeTimerAuto("",0)
+ AliCodeTimerAuto("")
Double_t vtxPos[3] = {0, 0, 0};
Double_t vtxErr[3] = {0.0, 0.0, 0.0};
{
// run the barrel tracking
- AliCodeTimerAuto("",0)
+ AliCodeTimerAuto("")
AliVertexer *vertexer = CreateVertexer();
if (!vertexer) return kFALSE;
{
// run the HLT barrel tracking
- AliCodeTimerAuto("",0)
+ AliCodeTimerAuto("")
if (!fRunLoader) {
AliError("Missing runLoader!");
{
// run the muon spectrometer tracking
- AliCodeTimerAuto("",0)
+ AliCodeTimerAuto("")
if (!fRunLoader) {
AliError("Missing runLoader!");
{
// run the barrel tracking
static Int_t eventNr=0;
- AliCodeTimerAuto("",0)
+ AliCodeTimerAuto("")
AliInfo("running tracking");
{
// fill the event summary data
- AliCodeTimerAuto("",0)
+ AliCodeTimerAuto("")
static Int_t eventNr=0;
TString detStr = detectors;
// stored in Trigger.root file and fills
// the corresponding esd entries
- AliCodeTimerAuto("",0)
+ AliCodeTimerAuto("")
AliInfo("Filling trigger information into the ESD");
if (gAlice) delete gAlice;
gAlice = NULL;
- TFile *gafile = TFile::Open(fGAliceFileName.Data());
- // if (!gSystem->AccessPathName(fGAliceFileName.Data())) { // galice.root exists
- if (gafile) { // galice.root exists
- gafile->Close();
- delete gafile;
-
+ if (!gSystem->AccessPathName(fGAliceFileName.Data())) { // galice.root exists
// load all base libraries to get the loader classes
TString libs = gSystem->GetLibraries();
for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
{
// Fill the event info object
// ...
- AliCodeTimerAuto("",0)
+ AliCodeTimerAuto("")
AliCentralTrigger *aCTP = NULL;
if (fRawReader) {