#include "AliDAQ.h"
#include "AliLog.h"
#include "AliRawReader.h"
+#include "AliLoader.h"
#include "AliRunLoader.h"
#include "AliGeomManager.h"
#include "AliTOFReconstructor.h"
#include "AliTOFRecoParam.h"
+using std::endl;
+using std::cout;
+using std::ofstream;
+using std::ios;
ClassImp(AliTOFClusterFinderV1)
//_____________________________________________________________________________
fRecPoints(new TClonesArray("AliTOFcluster", 4000)),
fNumberOfTofClusters(0),
fNumberOfTofDigits(0),
+ fNumberOfTofTrgPads(0),
fkRecoParam(0),//AliTOFReconstructor::GetRecoParam()),
fMaxDeltaTime(0),//fkRecoParam->GetMaxDeltaTime()),
fVerbose(0),
// Constructor
//
+ for (Int_t ii=0; ii<kTofMaxCluster; ii++) fTofClusters[ii]=0x0;
+
if (AliTOFReconstructor::GetRecoParam()) {
fkRecoParam = AliTOFReconstructor::GetRecoParam();
fMaxDeltaTime = fkRecoParam->GetMaxDeltaTime();
fRecPoints(new TClonesArray("AliTOFcluster", 4000)),
fNumberOfTofClusters(0),
fNumberOfTofDigits(0),
+ fNumberOfTofTrgPads(0),
fkRecoParam(0),//AliTOFReconstructor::GetRecoParam()),
fMaxDeltaTime(0),//fkRecoParam->GetMaxDeltaTime()),
fVerbose(0),
// Constructor
//
+ for (Int_t ii=0; ii<kTofMaxCluster; ii++) fTofClusters[ii]=0x0;
+
if (AliTOFReconstructor::GetRecoParam()) {
fkRecoParam = AliTOFReconstructor::GetRecoParam();
fMaxDeltaTime = fkRecoParam->GetMaxDeltaTime();
fRecPoints(source.fRecPoints),
fNumberOfTofClusters(0),
fNumberOfTofDigits(0),
+ fNumberOfTofTrgPads(0),
fkRecoParam(0),//AliTOFReconstructor::GetRecoParam()),
fMaxDeltaTime(0),//fkRecoParam->GetMaxDeltaTime()),
fVerbose(0),
{
// copy constructor
+ for (Int_t ii=0; ii<kTofMaxCluster; ii++) fTofClusters[ii]=source.fTofClusters[ii];
+
if (AliTOFReconstructor::GetRecoParam()) {
fkRecoParam = AliTOFReconstructor::GetRecoParam();
fMaxDeltaTime = fkRecoParam->GetMaxDeltaTime();
return *this;
TObject::operator=(source);
+ for (Int_t ii=0; ii<kTofMaxCluster; ii++) fTofClusters[ii]=source.fTofClusters[ii];
fDigits=source.fDigits;
fRecPoints=source.fRecPoints;
+ fNumberOfTofClusters=source.fNumberOfTofClusters;
+ fNumberOfTofTrgPads=source.fNumberOfTofTrgPads;
+ fNumberOfTofDigits=source.fNumberOfTofDigits;
fVerbose=source.fVerbose;
fDecoderVersion=source.fDecoderVersion;
fTOFcalib=source.fTOFcalib;
delete fTOFdigits;
- if (fTofClusters || fNumberOfTofClusters) {
+ //if (fTofClusters || fNumberOfTofClusters) {
+ if (fNumberOfTofClusters) {
for (Int_t ii=0; ii<fNumberOfTofClusters; ii++)
if (fTofClusters[ii]) fTofClusters[ii]->Delete();
fNumberOfTofClusters = 0;
Int_t inholes = 0;
+ ResetRecpoint();
+
fDigits->Clear();
TClonesArray &aDigits = *fDigits;
- if (digitsTree == 0x0)
+ if (digitsTree == 0x0) {
AliFatal("Can not get TreeD for TOF");
+ return;
+ }
TBranch *branch = digitsTree->GetBranch("TOF");
if (!branch) {
AliDebug(1,Form("Number of found clusters: %d", fNumberOfTofClusters));
- ResetRecpoint();
+// ResetRecpoint();
fTOFdigitMap->Clear();
TStopwatch stopwatch;
stopwatch.Start();
+ ResetRecpoint();
AliDebug(2, "TreeD re-creation");
//TTree *digitsTree = new TTree();
AliDebug(1,Form("Number of found clusters: %d", fNumberOfTofClusters));
- ResetRecpoint();
+// ResetRecpoint();
fTOFdigitMap->Clear();
digit[2] = tofRawDatum->GetTOT();
digit[3] = -1;//tofRawDatum->GetTOF(); //tofND
+ // noferini
+ Float_t pos[3];
+ AliTOFGeometry::GetPosPar(detectorIndex, pos);
+ Float_t length = 0.;
+ for (Int_t ic = 0; ic < 3; ic++) length += pos[ic] * pos[ic];
+ length = TMath::Sqrt(length);
+ Float_t timealligned = tdcCorr*24.4 - length * 0.0333564095198152043; // subtract the minimal time in
+
+ if(status && timealligned > -1000 && timealligned < 24000){
+ fNumberOfTofTrgPads++;
+ }
+
dummy = detectorIndex[3];
detectorIndex[3] = detectorIndex[4];//padx
detectorIndex[4] = dummy;//padz
last = fDigits->GetEntriesFast();
new (aDigits[last]) AliTOFdigit(tracks, detectorIndex, digit);
if (status) fTOFdigitMap->AddDigit(detectorIndex, last);
+
if (fVerbose==2) {
if (indexDDL<10) ftxt << " " << indexDDL;
dummy4 = fNumberOfTofClusters;
FindClustersPerStrip(iSector, iPlate, iStrip, 4); // 4 pads clusters
if (fNumberOfTofClusters!=dummy4)
- AliDebug(2, Form(" (4): n1= %5d, n2 = %5", dummy4, fNumberOfTofClusters));
+ AliDebug(2, Form(" (4): n1= %5d, n2 = %5d", dummy4, fNumberOfTofClusters));
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
dummy3 = fNumberOfTofClusters;
FindClustersPerStrip(iSector, iPlate, iStrip, 3); // 3 pads clusters
if (fNumberOfTofClusters!=dummy3)
- AliDebug(2, Form(" (3): n1= %5d, n2 = %5", dummy3, fNumberOfTofClusters));
+ AliDebug(2, Form(" (3): n1= %5d, n2 = %5d", dummy3, fNumberOfTofClusters));
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
dummy2 = fNumberOfTofClusters;
FindClustersPerStrip(iSector, iPlate, iStrip, 2); // 2 pads clusters
if (fNumberOfTofClusters!=dummy2)
- AliDebug(2, Form(" (2): n1= %5d, n2 =%5", dummy2, fNumberOfTofClusters));
+ AliDebug(2, Form(" (2): n1= %5d, n2 =%5d", dummy2, fNumberOfTofClusters));
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
Int_t detectorIndex[5];
for (jj=0; jj<5; jj++) detectorIndex[jj] = -1;
- Int_t parTOF[5];
- for (jj=0; jj<5; jj++) parTOF[jj] = -1;
+ Int_t parTOF[7];
+ for (jj=0; jj<7; jj++) parTOF[jj] = -1;
Int_t trackLabels[3];
for (jj=0; jj<3; jj++) trackLabels[jj] = -1;
Int_t digitIndex = -1;
UShort_t volIdClus;
for (ii=0; ii<fNumberOfTofClusters; ii++) {
-
- digitIndex = fTofClusters[ii]->GetIndex();
- for(jj=0; jj<5; jj++) detectorIndex[jj] = fTofClusters[ii]->GetDetInd(jj);
+ AliTOFcluster* clOr = fTofClusters[ii];
+ fTofClusters[ii] = 0;
+ digitIndex = clOr->GetIndex();
+ for(jj=0; jj<5; jj++) detectorIndex[jj] = clOr->GetDetInd(jj);
volIdClus = fTOFGeometry->GetAliSensVolIndex(detectorIndex[0],detectorIndex[1],detectorIndex[2]);
//volIdClus = GetClusterVolIndex(detectorIndex);
- for(jj=0; jj<3; jj++) trackLabels[jj] = fTofClusters[ii]->GetLabel(jj);
- parTOF[0] = fTofClusters[ii]->GetTDC(); // TDC
- parTOF[1] = fTofClusters[ii]->GetToT(); // TOT
- parTOF[2] = fTofClusters[ii]->GetADC(); // ADC=TOT
- parTOF[3] = fTofClusters[ii]->GetTDCND(); // TDCND
- parTOF[4] = fTofClusters[ii]->GetTDCRAW();//RAW
- status = fTofClusters[ii]->GetStatus();
-
- posClus[0] = fTofClusters[ii]->GetX();
- posClus[1] = fTofClusters[ii]->GetY();
- posClus[2] = fTofClusters[ii]->GetZ();
+ for(jj=0; jj<3; jj++) trackLabels[jj] = clOr->GetLabel(jj);
+ parTOF[0] = clOr->GetTDC(); // TDC
+ parTOF[1] = clOr->GetToT(); // TOT
+ parTOF[2] = clOr->GetADC(); // ADC=TOT
+ parTOF[3] = clOr->GetTDCND(); // TDCND
+ parTOF[4] = clOr->GetTDCRAW();//RAW
+ parTOF[5] = 0;
+ parTOF[6] = 0;
+ status = clOr->GetStatus();
+
+ posClus[0] = clOr->GetX();
+ posClus[1] = clOr->GetY();
+ posClus[2] = clOr->GetZ();
//for (jj=0; jj<6; jj++) covClus[jj] = 0.;
- //((AliCluster*)fTofClusters[ii])->GetGlobalCov(covClus);
+ //((AliCluster*)clOr)->GetGlobalCov(covClus);
new(lRecPoints[ii]) AliTOFcluster(volIdClus, (Double_t)posClus[0], (Double_t)posClus[1], (Double_t)posClus[2],
- (Double_t)(fTofClusters[ii]->GetSigmaX2()),
- (Double_t)(fTofClusters[ii]->GetSigmaXY()),
- (Double_t)(fTofClusters[ii]->GetSigmaXZ()),
- (Double_t)(fTofClusters[ii]->GetSigmaY2()),
- (Double_t)(fTofClusters[ii]->GetSigmaYZ()),
- (Double_t)(fTofClusters[ii]->GetSigmaZ2()),
+ (Double_t)(clOr->GetSigmaX2()),
+ (Double_t)(clOr->GetSigmaXY()),
+ (Double_t)(clOr->GetSigmaXZ()),
+ (Double_t)(clOr->GetSigmaY2()),
+ (Double_t)(clOr->GetSigmaYZ()),
+ (Double_t)(clOr->GetSigmaZ2()),
//(Double_t)covClus[0], (Double_t)covClus[1], (Double_t)covClus[2],
//(Double_t)covClus[3], (Double_t)covClus[4], (Double_t)covClus[5],
trackLabels, detectorIndex, parTOF, status, digitIndex);
AliDebug(2, Form(" %4d %4d %f %f %f %f %f %f %f %f %f %3d %3d %3d %2d %1d %2d %1d %2d %4d %3d %3d %4d %4d %1d %4d",
ii, volIdClus, posClus[0], posClus[1], posClus[2],
- fTofClusters[ii]->GetSigmaX2(),
- fTofClusters[ii]->GetSigmaXY(),
- fTofClusters[ii]->GetSigmaXZ(),
- fTofClusters[ii]->GetSigmaY2(),
- fTofClusters[ii]->GetSigmaYZ(),
- fTofClusters[ii]->GetSigmaZ2(),
+ clOr->GetSigmaX2(),
+ clOr->GetSigmaXY(),
+ clOr->GetSigmaXZ(),
+ clOr->GetSigmaY2(),
+ clOr->GetSigmaYZ(),
+ clOr->GetSigmaZ2(),
trackLabels[0], trackLabels[1], trackLabels[2],
detectorIndex[0], detectorIndex[1], detectorIndex[2], detectorIndex[3], detectorIndex[4],
parTOF[0], parTOF[1], parTOF[2], parTOF[3], parTOF[4],
status, digitIndex));
-
+ delete clOr;
}
for (Int_t iSector=0; iSector<AliTOFGeometry::NSectors(); iSector++)
Double_t covClus[6];
for (jj=0; jj<6; jj++) covClus[jj] = 0.;
- Int_t parTOF[5];
- for (jj=0; jj<5; jj++) parTOF[jj] = 0;
+ Int_t parTOF[7];
+ for (jj=0; jj<7; jj++) parTOF[jj] = 0;
Bool_t status = kTRUE; //assume all sim channels ok in the beginning...
parTOF[2] = Int_t(digitInteresting->GetAdc());
parTOF[3] = Int_t(digitInteresting->GetTdcND());
parTOF[4] = Int_t(digitInteresting->GetTdc());
+ parTOF[5] = 0;
+ parTOF[6] = 0;
volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
//volIdClus = GetClusterVolIndex(det);
Double_t covClus[6];
for (jj=0; jj<6; jj++) covClus[jj] = 0.;
- Int_t parTOF[5];
- for (jj=0; jj<5; jj++) parTOF[jj] = 0;
+ Int_t parTOF[7];
+ for (jj=0; jj<7; jj++) parTOF[jj] = 0;
Bool_t status = kTRUE; //assume all sim channels ok in the beginning...
Int_t tracks[kMaxNumberOfTracksPerDigit];
parTOF[2] = Int_t(digitInteresting->GetAdc());
parTOF[3] = Int_t(digitInteresting->GetTdcND());
parTOF[4] = Int_t(digitInteresting->GetTdc());
+ parTOF[5] = 0;
+ parTOF[6] = 0;
volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
//volIdClus = GetClusterVolIndex(det);
Int_t iPadX = -1;
Int_t iPadZ = -1;
- Int_t parTOF[5];
- for (jj=0; jj<5; jj++) parTOF[jj] = 0;
+ Int_t parTOF[7];
+ for (jj=0; jj<7; jj++) parTOF[jj] = 0;
Double_t posClus[3];
for (jj=0; jj<3; jj++) posClus[jj] = 0.;
Int_t det[5];
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
for (jj=0; jj<3; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
GetClusterPars(/*check,*/ 3, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<3; jj++) delete [] indDet[jj];
+ delete [] indDet;
// To fill the track index array
dummyCounter=-1;
delete [] selectedDigit[ii];
selectedDigit[ii] = 0x0;
}
- delete selectedDigit;
+ delete [] selectedDigit;
selectedDigit = 0x0;
}
Int_t iPadZ = -1;
Bool_t check = kFALSE;
- Int_t parTOF[5];
- for (jj=0; jj<5; jj++) parTOF[jj] = 0;
+ Int_t parTOF[7];
+ for (jj=0; jj<7; jj++) parTOF[jj] = 0;
Double_t posClus[3];
for (jj=0; jj<3; jj++) posClus[jj] = 0.;
Int_t det[5];
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
for (jj=0; jj<2; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
GetClusterPars(/*check,*/ 2, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<2; jj++) delete [] indDet[jj];
+ delete [] indDet;
// To fill the track index array
dummyCounter=-1;
delete [] selectedDigit[ii];
selectedDigit[ii] = 0x0;
}
- delete selectedDigit;
+ delete [] selectedDigit;
selectedDigit = 0x0;
}
Int_t iPadZ = -1;
Bool_t check = kFALSE;
- Int_t parTOF[5];
- for (jj=0; jj<5; jj++) parTOF[jj] = 0;
+ Int_t parTOF[7];
+ for (jj=0; jj<7; jj++) parTOF[jj] = 0;
Double_t posClus[3];
for (jj=0; jj<3; jj++) posClus[jj] = 0.;
Int_t det[5];
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
if (digitInteresting->GetToT()<=0) continue; // AdC
digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %d %d %d %d %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
for (jj=0; jj<2; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
GetClusterPars(/*check,*/ 2, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<2; jj++) delete [] indDet[jj];
+ delete [] indDet;
// To fill the track index array
dummyCounter=-1;
delete [] selectedDigit[ii];
selectedDigit[ii] = 0x0;
}
- delete selectedDigit;
+ delete [] selectedDigit;
selectedDigit = 0x0;
}
Int_t iPadZ = -1;
Bool_t check = kFALSE;
- Int_t parTOF[5];
- for (jj=0; jj<5; jj++) parTOF[jj] = 0;
+ Int_t parTOF[7];
+ for (jj=0; jj<7; jj++) parTOF[jj] = 0;
Double_t posClus[3];
for (jj=0; jj<3; jj++) posClus[jj] = 0.;
Int_t det[5];
continue;
}
- AliDebug(1, Form(" %1d %1d (0x%x) %1d %1d (0x%x)", adesso1, firstIndex,selectedDigit[adesso1][firstIndex],
+ AliDebug(1, Form(" %1d %1d (0x%p) %1d %1d (0x%p)", adesso1, firstIndex,selectedDigit[adesso1][firstIndex],
adesso2, secondIndex,selectedDigit[adesso2][secondIndex]));
interestingTOF[0] = selectedDigit[adesso1][firstIndex]->GetTDC();
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
GetClusterPars(/*check,*/ interestingCounter+1, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<interestingCounter+1; jj++) delete [] indDet[jj];
+ delete [] indDet;
// To fill the track index array
dummyCounter=-1;
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
GetClusterPars(/*check,*/ interestingCounter+1, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<interestingCounter+1; jj++) delete [] indDet[jj];
+ delete [] indDet;
+
// To fill the track index array
dummyCounter=-1;
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
GetClusterPars(/*check,*/ interestingCounter+1, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<interestingCounter+1; jj++) delete [] indDet[jj];
+ delete [] indDet;
// To fill the track index array
dummyCounter=-1;
delete [] selectedDigit[ii];
selectedDigit[ii] = 0x0;
}
- delete selectedDigit;
+ delete [] selectedDigit;
selectedDigit = 0x0;
}
//
fNumberOfTofClusters = 0;
+ fNumberOfTofTrgPads = 0;
if (fRecPoints) fRecPoints->Clear();
}
//
fNumberOfTofDigits = 0;
+ fNumberOfTofTrgPads = 0;
if (fDigits) fDigits->Clear();
}
timeCorr = (Double_t)(tofDigitTdc)*AliTOFGeometry::TdcBinWidth()*1.E-3-timeCorr;//redefine the time
timeCorr *= 1.E3;
AliDebug(2,Form(" The channel time, corr (ps)= %e",timeCorr ));
- tdcCorr = (Int_t)(timeCorr/AliTOFGeometry::TdcBinWidth()); //the corrected time (tdc counts)
+ //tdcCorr = (Int_t)(timeCorr/AliTOFGeometry::TdcBinWidth()); //the corrected time (tdc counts)
+ tdcCorr = TMath::Nint(timeCorr/AliTOFGeometry::TdcBinWidth()); //the corrected time (tdc counts)
} // AdC
AliLoader *localTOFLoader = (AliLoader*)fRunLoader->GetLoader("TOFLoader");
TTree * localTreeD = (TTree*)localTOFLoader->TreeD();
- if (localTreeD == 0x0)
+ if (localTreeD == 0x0) {
AliFatal("Can not get TreeD");
+ return;
+ }
TBranch *branch = localTreeD->GetBranch("TOF");
if (!branch) {
parTOF[2] = Int_t(adcAverage);
parTOF[3] = Int_t(tofAverage);//tofND
parTOF[4] = Int_t(tofAverage);//tofRAW
+ parTOF[5] = 0;
+ parTOF[6] = 0;
}