/*
$Log: AliTOFClusterFinderV1.cxx,v $
+Revision 2009/04/20 A. De Caro
+ - added two new global variables, called fTOFGeometry and fTOFdigits;
+ - added a new method, called FindClustersWithoutTOT,
+ to transform TOF digits with fTOT=0 in one pad clusters;
+ - update of the covariance matrix elements for the TOF clusters
+
Revision 0.01 2008/05/10 A. De Caro
*/
#include "AliTOFClusterFinderV1.h"
#include "AliTOFcluster.h"
#include "AliTOFdigit.h"
-//#include "AliTOFselectedDigit.h"
#include "AliTOFDigitMap.h"
-#include "AliTOFGeometry.h"
#include "AliTOFrawData.h"
-#include "AliTOFRawStream.h"
+#include "AliTOFReconstructor.h"
+#include "AliTOFRecoParam.h"
ClassImp(AliTOFClusterFinderV1)
+//_____________________________________________________________________________
AliTOFClusterFinderV1::AliTOFClusterFinderV1(AliTOFcalib *calib):
fRunLoader(0),
fDigits(new TClonesArray("AliTOFdigit", 4000)),
fRecPoints(new TClonesArray("AliTOFcluster", 4000)),
fNumberOfTofClusters(0),
fNumberOfTofDigits(0),
- fMaxDeltaTime(10),
+ fMaxDeltaTime(0),
fVerbose(0),
fDecoderVersion(0),
fTOFcalib(calib),
- fTOFdigitMap(new AliTOFDigitMap())
-
+ fTOFdigitMap(new AliTOFDigitMap()),
+ fTOFGeometry(new AliTOFGeometry()),
+ fTOFdigits(0),
+ fTOFRawStream(AliTOFRawStream())
{
//
// Constructor
//
-
+ const AliTOFRecoParam *recoParam = AliTOFReconstructor::GetRecoParam(); // instantiate reco param from STEER...
+ fMaxDeltaTime = recoParam->GetMaxDeltaTime();
}
-//_____________________________________________________________________________
+//_____________________________________________________________________________
AliTOFClusterFinderV1::AliTOFClusterFinderV1(AliRunLoader* runLoader, AliTOFcalib *calib):
fRunLoader(runLoader),
fDigits(new TClonesArray("AliTOFdigit", 4000)),
fRecPoints(new TClonesArray("AliTOFcluster", 4000)),
fNumberOfTofClusters(0),
fNumberOfTofDigits(0),
- fMaxDeltaTime(10),
+ fMaxDeltaTime(0),
fVerbose(0),
fDecoderVersion(0),
fTOFcalib(calib),
- fTOFdigitMap(new AliTOFDigitMap())
-
+ fTOFdigitMap(new AliTOFDigitMap()),
+ fTOFGeometry(new AliTOFGeometry()),
+ fTOFdigits(0),
+ fTOFRawStream(AliTOFRawStream())
{
//
// Constructor
//
+ const AliTOFRecoParam *recoParam = AliTOFReconstructor::GetRecoParam(); // instantiate reco param from STEER...
+ fMaxDeltaTime = recoParam->GetMaxDeltaTime();
}
//_____________________________________________________________________________
AliTOFClusterFinderV1::AliTOFClusterFinderV1(const AliTOFClusterFinderV1 &source)
- :TObject(),
- fRunLoader(0),
- fDigits(new TClonesArray("AliTOFdigit", 4000)),
- fRecPoints(new TClonesArray("AliTOFcluster", 4000)),
- fNumberOfTofClusters(0),
- fNumberOfTofDigits(0),
- fMaxDeltaTime(10),
- fVerbose(0),
- fDecoderVersion(0),
- fTOFcalib(0),
- fTOFdigitMap(new AliTOFDigitMap())
+ :TObject(source),
+ fRunLoader(0),
+ fDigits(source.fDigits),
+ fRecPoints(source.fRecPoints),
+ fNumberOfTofClusters(0),
+ fNumberOfTofDigits(0),
+ fMaxDeltaTime(2),
+ fVerbose(0),
+ fDecoderVersion(source.fDecoderVersion),
+ fTOFcalib(source.fTOFcalib),
+ fTOFdigitMap(new AliTOFDigitMap()),
+ fTOFGeometry(new AliTOFGeometry()),
+ fTOFdigits(source.fTOFdigits),
+ fTOFRawStream(source.fTOFRawStream)
{
// copy constructor
- this->fDigits=source.fDigits;
- this->fRecPoints=source.fRecPoints;
- this->fDecoderVersion=source.fDecoderVersion;
- this->fTOFcalib=source.fTOFcalib;
-
}
//_____________________________________________________________________________
AliTOFClusterFinderV1& AliTOFClusterFinderV1::operator=(const AliTOFClusterFinderV1 &source)
{
// ass. op.
- this->fDigits=source.fDigits;
- this->fRecPoints=source.fRecPoints;
- this->fVerbose=source.fVerbose;
- this->fDecoderVersion=source.fDecoderVersion;
- this->fTOFcalib=source.fTOFcalib;
- this->fTOFdigitMap=source.fTOFdigitMap;
+
+ if (this == &source)
+ return *this;
+
+ TObject::operator=(source);
+ fDigits=source.fDigits;
+ fRecPoints=source.fRecPoints;
+ fVerbose=source.fVerbose;
+ fDecoderVersion=source.fDecoderVersion;
+ fTOFcalib=source.fTOFcalib;
+ fTOFdigitMap=source.fTOFdigitMap;
+ fTOFGeometry=source.fTOFGeometry;
+ fTOFdigits=source.fTOFdigits;
+ fTOFRawStream=source.fTOFRawStream;
return *this;
}
delete fTOFdigitMap;
+ delete fTOFGeometry;
+
+ delete fTOFdigits;
+
}
//_____________________________________________________________________________
Bool_t status = kTRUE;
- AliInfo(" Calibrating TOF Digits: ");
+ AliDebug(1," Calibrating TOF Digits");
TString validity = (TString)fTOFcalib->GetOfflineValidity();
- AliInfo(Form(" validity = %s", validity.Data()));
if (validity.CompareTo("valid")==0) {
- AliInfo(" ...using offline calibration parameters");
- }
- else {
- AliInfo(" ...using online calibration parameters");
- }
+ AliInfo(Form(" validity = %s - Using offline calibration parameters", validity.Data()));
+ } else
+ AliInfo(Form(" validity = %s - Using online calibration parameters", validity.Data()));
Int_t ii = 0;
for (ii=0; ii<digits->GetEntriesFast(); ii++) {
info[0] = tdcCorr;//tofDigit->GetTdc();
info[1] = tofDigit->GetAdc();
info[2] = tofDigit->GetToT();
- info[3] = tofDigit->GetTdc();//tofDigit->GetTdcND();
+ info[3] = tofDigit->GetTdcND();//tofDigit->GetTdc();//
tracks = tofDigit->GetTracks();
dummy = detectorIndex[3];
new (aDigits[last]) AliTOFdigit(tracks, detectorIndex, info);
if (status) fTOFdigitMap->AddDigit(detectorIndex, last);
- AliDebug(2, Form(" Digits reading %2i -> %2i %1i %2i %1i %2i (%d, %d, %d)",
+ AliDebug(2, Form(" Digits reading %2d -> %2d %1d %2d %1d %2d (%d, %d, %d)",
last,
detectorIndex[0], detectorIndex[1], detectorIndex[2], detectorIndex[3], detectorIndex[4],
info[0], info[1], info[3]));
FillRecPoint();
clusterTree->Fill();
- AliInfo(Form("Number of found TOF clusters: %d", fNumberOfTofClusters));
+ AliInfo(Form("Number of found clusters: %d", fNumberOfTofClusters));
ResetRecpoint();
ResetDigits();
- AliInfo(Form("Execution time to read TOF digits and to write TOF clusters : R:%.4fs C:%.4fs",
- stopwatch.RealTime(),stopwatch.CpuTime()));
+ AliDebug(1,Form("Execution time to read TOF digits and to write TOF clusters : R:%.4fs C:%.4fs",
+ stopwatch.RealTime(),stopwatch.CpuTime()));
if (inholes) AliWarning(Form("Clusters in the TOF holes: %d",inholes));
AliDebug(2, "TreeD re-creation");
- TTree *digitsTree = new TTree();
+ //TTree *digitsTree = new TTree();
+ //Raw2Digits(rawReader, digitsTree);
- Raw2Digits(rawReader, digitsTree);
+ Raw2Digits(rawReader, fTOFdigits);
AliDebug(2,Form("Number of TOF digits: %d", fNumberOfTofDigits));
ResetRecpoint();
clustersTree->Fill();
- AliInfo(Form("Number of found clusters: %i", fNumberOfTofClusters));
+ AliInfo(Form("Number of found clusters: %d", fNumberOfTofClusters));
ResetRecpoint();
ResetDigits();
- AliInfo(Form("Execution time to read TOF raw data and to write TOF clusters : R:%.4fs C:%.4fs",
- stopwatch.RealTime(),stopwatch.CpuTime()));
+ AliDebug(1,Form("Execution time to read TOF raw data and to write TOF clusters : R:%.4fs C:%.4fs",
+ stopwatch.RealTime(),stopwatch.CpuTime()));
}
digitsTree->Branch("TOF", &fDigits);
TClonesArray &aDigits = *fDigits;
- AliTOFRawStream tofInput(rawReader);
+ fTOFRawStream.Clear();
+ fTOFRawStream.SetRawReader(rawReader);
ofstream ftxt;
if (fVerbose==2) ftxt.open("TOFdigitsRead.txt",ios::app);
Bool_t status = kTRUE;
- AliInfo(" Calibrating TOF Digits: ");
TString validity = (TString)fTOFcalib->GetOfflineValidity();
- AliInfo(Form(" validity = %s", validity.Data()));
if (validity.CompareTo("valid")==0) {
- AliInfo(" ...using offline calibration parameters");
- }
- else {
- AliInfo(" ...using online calibration parameters");
- }
+ AliInfo(Form(" validity = %s - Using offline calibration parameters", validity.Data()));
+ } else
+ AliInfo(Form(" validity = %s - Using online calibration parameters", validity.Data()));
+
+ if (fDecoderVersion)
+ AliInfo("Using New Decoder");
Int_t indexDDL = 0;
Int_t iRawData = 0;
for (indexDDL=0; indexDDL<kDDL; indexDDL++) {
rawReader->Reset();
- if (fDecoderVersion) {
- AliInfo("Using New Decoder \n");
- tofInput.LoadRawDataBuffers(indexDDL,fVerbose);
- }
- else tofInput.LoadRawData(indexDDL);
+ if (fDecoderVersion)
+ fTOFRawStream.LoadRawDataBuffers(indexDDL,fVerbose);
+ else fTOFRawStream.LoadRawData(indexDDL);
- clonesRawData = (TClonesArray*)tofInput.GetRawData();
- if (clonesRawData->GetEntriesFast()!=0) AliInfo(Form(" TOF raw data number = %3i", clonesRawData->GetEntriesFast()));
+ clonesRawData = (TClonesArray*)fTOFRawStream.GetRawData();
+ if (clonesRawData->GetEntriesFast()!=0) AliInfo(Form(" TOF raw data number = %3d", clonesRawData->GetEntriesFast()));
for (iRawData = 0; iRawData<clonesRawData->GetEntriesFast(); iRawData++) {
AliTOFrawData *tofRawDatum = (AliTOFrawData*)clonesRawData->UncheckedAt(iRawData);
//if (tofRawDatum->GetTOT()==-1 || tofRawDatum->GetTOF()==-1) continue;
if (tofRawDatum->GetTOF()==-1) continue;
- tofInput.EquipmentId2VolumeId(indexDDL, tofRawDatum->GetTRM(), tofRawDatum->GetTRMchain(),
- tofRawDatum->GetTDC(), tofRawDatum->GetTDCchannel(), detectorIndex);
+ fTOFRawStream.EquipmentId2VolumeId(indexDDL, tofRawDatum->GetTRM(), tofRawDatum->GetTRMchain(),
+ tofRawDatum->GetTDC(), tofRawDatum->GetTDCchannel(), detectorIndex);
tdcCorr = 0;
dummy = detectorIndex[3];
digit[0] = tdcCorr;
digit[1] = tofRawDatum->GetTOT();
digit[2] = tofRawDatum->GetTOT();
- digit[3] = tofRawDatum->GetTOF();
+ digit[3] = -1;//tofRawDatum->GetTOF(); //tofND
dummy = detectorIndex[3];
detectorIndex[3] = detectorIndex[4];//padx
detectorIndex[4] = dummy;//padz
+ /* check valid index */
+ if (detectorIndex[0]==-1||detectorIndex[1]==-1||detectorIndex[2]==-1||detectorIndex[3]==-1||detectorIndex[4]==-1) continue;
+
// Do not reconstruct anything in the holes
if (detectorIndex[0]==13 || detectorIndex[0]==14 || detectorIndex[0]==15 ) { // sectors with holes
if (detectorIndex[1]==2) { // plate with holes
else ftxt << " " << digit[3] << endl;
}
- AliDebug(2, Form(" Raw data reading %2i -> %2i %1i %2i %1i %2i (%d, %d, %d)",
+ AliDebug(2, Form(" Raw data reading %2d -> %2d %1d %2d %1d %2d (%d, %d, %d)",
last,
detectorIndex[0], detectorIndex[1], detectorIndex[2], detectorIndex[4], detectorIndex[3],
digit[0], digit[1], digit[3]));
// i.e. fRecPoints
//
- //Int_t dummy4_1 = -1;
- //Int_t dummy3_1 = -1;
- //Int_t dummy2_1 = -1;
+ Int_t dummy4 = -1;
+ Int_t dummy3 = -1;
+ Int_t dummy2 = -1;
Int_t dummy = -1;
- for(Int_t iPlate=0; iPlate<AliTOFGeometry::NPlates(); iPlate++) {
- for(Int_t iStrip=0; iStrip<AliTOFGeometry::NStrip(iPlate); iStrip++) {
+ for(Int_t iPlate=AliTOFGeometry::NPlates()-1; iPlate>=0; iPlate--) {
+ for(Int_t iStrip=AliTOFGeometry::NStrip(iPlate)-1; iStrip>=0; iStrip--) {
+ //for (Int_t iSector=AliTOFGeometry::NSectors()-1; iSector>=0; iSector--) {
for (Int_t iSector=0; iSector<AliTOFGeometry::NSectors(); iSector++) {
- /*
+
+ if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
+ FindClustersWithoutTOT(iSector, iPlate, iStrip); // clusters coming from digits without TOT measurement
+
+
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
FindClustersPerStrip(iSector, iPlate, iStrip, 4); // 4 pads clusters
- dummy4_1 = fNumberOfTofClusters;
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
+
+ dummy4 = fNumberOfTofClusters;
FindClustersPerStrip(iSector, iPlate, iStrip, 4); // 4 pads clusters
- if (fNumberOfTofClusters!=dummy4_1)
- AliDebug(2, Form(" (4): n1= %5i, n2 = %5", dummy4_1, fNumberOfTofClusters));
- */
- /*
+ if (fNumberOfTofClusters!=dummy4)
+ AliDebug(2, Form(" (4): n1= %5d, n2 = %5", dummy4, fNumberOfTofClusters));
+
+
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
FindClustersPerStrip(iSector, iPlate, iStrip, 3); // 3 pads clusters
- dummy3_1 = fNumberOfTofClusters;
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
+
+ dummy3 = fNumberOfTofClusters;
FindClustersPerStrip(iSector, iPlate, iStrip, 3); // 3 pads clusters
- if (fNumberOfTofClusters!=dummy3_1)
- AliDebug(2, Form(" (3): n1= %5i, n2 = %5", dummy3_1, fNumberOfTofClusters));
- */
- /*
+ if (fNumberOfTofClusters!=dummy3)
+ AliDebug(2, Form(" (3): n1= %5d, n2 = %5", dummy3, fNumberOfTofClusters));
+
+
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
FindClustersPerStrip(iSector, iPlate, iStrip, 2); // 2 pads clusters
- dummy2_1 = fNumberOfTofClusters;
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
+
+ dummy2 = fNumberOfTofClusters;
FindClustersPerStrip(iSector, iPlate, iStrip, 2); // 2 pads clusters
- if (fNumberOfTofClusters!=dummy2_1)
- AliDebug(2, Form(" (2): n1= %5i, n2 =%5", dummy2_1, fNumberOfTofClusters));
- */
- /*
+ if (fNumberOfTofClusters!=dummy2)
+ AliDebug(2, Form(" (2): n1= %5d, n2 =%5", dummy2, fNumberOfTofClusters));
+
+
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
dummy = fNumberOfTofClusters;
FindClusters34(iSector, iPlate, iStrip); // 3 pads clusters between 4 hit pads
if (fNumberOfTofClusters!=dummy)
- AliDebug(2, Form(" (3 between 4): n1 = %5i, n2 = %5i", fNumberOfTofClusters, dummy));
- */
- /*
+ AliDebug(2, Form(" (3 between 4): n1 = %5d, n2 = %5d", fNumberOfTofClusters, dummy));
+
+
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
dummy = fNumberOfTofClusters;
FindClusters23(iSector, iPlate, iStrip); // 2 pads clusters between 3 hit pads
if (fNumberOfTofClusters!=dummy)
- AliDebug(2, Form(" (2 between 3): n1 = %5i, n2 = %5i", fNumberOfTofClusters, dummy));
+ AliDebug(2, Form(" (2 between 3): n1 = %5d, n2 = %5d", fNumberOfTofClusters, dummy));
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
dummy = fNumberOfTofClusters;
FindClusters24(iSector, iPlate, iStrip); // 2 pads clusters between 4 hit pads
if (fNumberOfTofClusters!=dummy)
- AliDebug(2, Form(" (2 between 4): n1 = %5i, n2 = %5i", fNumberOfTofClusters, dummy));
- */
+ AliDebug(2, Form(" (2 between 4): n1 = %5d, n2 = %5d", fNumberOfTofClusters, dummy));
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
dummy = fNumberOfTofClusters;
FindOnePadClusterPerStrip(iSector, iPlate, iStrip); // 1 pad clusters
if (fNumberOfTofClusters!=dummy)
- AliDebug(2,Form(" (1): n1 = %5i, n2 = %5i", fNumberOfTofClusters, dummy));
+ AliDebug(2,Form(" (1): n1 = %5d, n2 = %5d", fNumberOfTofClusters, dummy));
if (fTOFdigitMap->DigitInStrip(iSector,iPlate,iStrip)>0)
- AliDebug(2, Form(" (1): numero di clusters = %5i (remaining digit %2i), -%2i %1i %2i-",
- fNumberOfTofClusters, fTOFdigitMap->DigitInStrip(iSector,iPlate,iStrip),
- iSector, iPlate, iStrip));
+ AliDebug(2, Form(" (1): number of clusters = %5d (remaining digit %2d), -%2d %1d %2d-",
+ fNumberOfTofClusters, fTOFdigitMap->DigitInStrip(iSector,iPlate,iStrip),
+ iSector, iPlate, iStrip));
}
}
Int_t ii, jj;
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 trackLabels[3];
+ for (jj=0; jj<3; jj++) trackLabels[jj] = -1;
Int_t digitIndex = -1;
Bool_t status = kTRUE;
Float_t posClus[3];
digitIndex = fTofClusters[ii]->GetIndex();
for(jj=0; jj<5; jj++) detectorIndex[jj] = fTofClusters[ii]->GetDetInd(jj);
- volIdClus = GetClusterVolIndex(detectorIndex);
+ 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
//(Double_t)covClus[3], (Double_t)covClus[4], (Double_t)covClus[5],
trackLabels, detectorIndex, parTOF, status, digitIndex);
- AliDebug(2, Form(" %4i %4i %f %f %f %f %f %f %f %f %f %3i %3i %3i %2i %1i %2i %1i %2i %4i %3i %3i %4i %4i %1i %4i",
+ 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(),
for(Int_t iPlate=0; iPlate<AliTOFGeometry::NPlates(); iPlate++) {
for(Int_t iStrip=0; iStrip<AliTOFGeometry::NStrip(iPlate); iStrip++) {
if (!(fTOFdigitMap->StripDigitCheck(iSector,iPlate,iStrip))) continue;
- AliDebug(2, Form(" END %2i %1i %2i %5i",
+ AliDebug(2, Form(" END %2d %1d %2d %5d",
iSector, iPlate, iStrip, fTOFdigitMap->DigitInStrip(iSector,iPlate,iStrip)));
}
}
//
const Int_t kMaxNumberOfTracksPerDigit = 3;
- const Int_t kMaxNumberOfDigitsPerVolume = 3;
+ const Int_t kMaxNumberOfDigitsPerVolume = 10;
Int_t jj = 0;
- AliTOFGeometry *tofGeometry = new AliTOFGeometry();
-
Int_t det[5] = {nSector,nPlate,nStrip,-1,-1};//sector,plate,strip,padZ,padX
Int_t vol[5] = {nSector,nPlate,nStrip,-1,-1};//sector,plate,strip,padX,padZ
UShort_t volIdClus = 0;
for (jj=0; jj<3; jj++) tracks[jj] = -1;
Int_t dummyCounter=-1;
- //Int_t dummyPad=-1;
AliTOFdigit *digitInteresting;
for (iPadZ=0; iPadZ<AliTOFGeometry::NpadZ(); iPadZ++) {
vol[4] = iPadZ , vol[3] = iPadX;
- AliDebug(3, Form(" %1i %2i\n", iPadZ, iPadX));
+ AliDebug(3, Form(" %1d %2d\n", iPadZ, iPadX));
+
+ if (fTOFdigitMap->GetNumberOfDigits(vol)==0) continue;
+
+ for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
+ if (fTOFdigitMap->GetDigitIndex(vol,digIndex)<0) continue;
+ digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(fTOFdigitMap->GetDigitIndex(vol,digIndex));
+
+ AliDebug(2, Form(" %3d %5d %2d %1d %2d %1d %2d %d %d %d %5d %5d %5d %5d",
+ fTOFdigitMap->GetNumberOfDigits(vol), digIndex,
+ vol[0], vol[1], vol[2] ,vol[4], vol[3],
+ digitInteresting->GetTdc(), digitInteresting->GetAdc(),
+ digitInteresting->GetToT(),
+ fTOFdigitMap->GetDigitIndex(vol,digIndex),
+ digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
+
+ det[3] = vol[4]; // padz
+ det[4] = vol[3]; // padx
+ fTOFGeometry->GetPosPar(det,pos);
+ AliDebug(1,Form(" %f %f %f", pos[0], pos[1], pos[2]));
+
+ //insert cluster
+ for (jj=0; jj<3; jj++) posClus[jj] = pos[jj];
+
+ parTOF[0] = Int_t(digitInteresting->GetTdc());
+ parTOF[1] = Int_t(digitInteresting->GetToT());
+ parTOF[2] = Int_t(digitInteresting->GetAdc());
+ parTOF[3] = Int_t(digitInteresting->GetTdcND());
+ parTOF[4] = Int_t(digitInteresting->GetTdc());
+
+ volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
+ //volIdClus = GetClusterVolIndex(det);
+
+ for (jj=0; jj<6; jj++) covClus[jj] = 0.;
+ GetClusterPars(det, posClus, covClus);
+
+ // To fill the track index array
+ dummyCounter=-1;
+ for (jj=0; jj<kMaxNumberOfTracksPerDigit; jj++) tracks[jj] = -1;
+ for (jj=0; jj<kMaxNumberOfTracksPerDigit; jj++) { // three is the max number of tracks associated to one digit
+ if (digitInteresting->GetTrack(jj)==-1) continue;
+ else {
+ dummyCounter++;
+ tracks[dummyCounter] = digitInteresting->GetTrack(jj);
+ }
+ }
+
+ AliTOFcluster *tofCluster =
+ new AliTOFcluster(volIdClus, posClus[0], posClus[1], posClus[2],
+ covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
+ tracks, det, parTOF, status, fTOFdigitMap->GetDigitIndex(vol,digIndex));
+ InsertCluster(tofCluster);
+
+ AliDebug(2, Form(" %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",
+ volIdClus, posClus[0], posClus[1], posClus[2],
+ covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
+ tracks[0], tracks[1], tracks[2],
+ det[0], det[1], det[2], det[3], det[4],
+ parTOF[0], parTOF[1], parTOF[2], parTOF[3], parTOF[4],
+ status, fTOFdigitMap->GetDigitIndex(vol,digIndex)));
+
+ AliDebug(2, Form(" %f %f %f", pos[0], pos[1], pos[2]));
+ AliDebug(2, Form(" %d %d", parTOF[0], parTOF[2]));
+
+ fTOFdigitMap->ResetDigit(vol, digIndex);
+
+ }
+
+ }
+ }
+
+}
+//_____________________________________________________________________________
+
+void AliTOFClusterFinderV1::FindClustersWithoutTOT(Int_t nSector,
+ Int_t nPlate,
+ Int_t nStrip)
+{
+ //
+ // This function searches the isolated digits without TOT
+ // measurement (stored in the fDigits object), to perform clusters
+ // (stored in the fTofClusters array). This research has been made
+ // by checking the fTOFdigitMap object, filled at digits/raw-data
+ // reading time.
+ //
+
+ const Int_t kMaxNumberOfTracksPerDigit = 3;
+ const Int_t kMaxNumberOfDigitsPerVolume = 10;
+
+ Int_t jj = 0;
+
+ Int_t det[5] = {nSector,nPlate,nStrip,-1,-1};//sector,plate,strip,padZ,padX
+ Int_t vol[5] = {nSector,nPlate,nStrip,-1,-1};//sector,plate,strip,padX,padZ
+ UShort_t volIdClus = 0;
+
+ Float_t pos[3];
+ for (jj=0; jj<3; jj++) pos[jj] = 0.;
+ Double_t posClus[3];
+ for (jj=0; jj<3; jj++) posClus[jj] = 0.;
+
+ 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;
+
+ Bool_t status = kTRUE; //assume all sim channels ok in the beginning...
+ Int_t tracks[kMaxNumberOfTracksPerDigit];
+ for (jj=0; jj<3; jj++) tracks[jj] = -1;
+
+ Int_t dummyCounter=-1;
+
+ AliTOFdigit *digitInteresting;
+
+ Int_t iPadX = -1;
+ Int_t iPadZ = -1;
+ for (iPadX=0; iPadX<AliTOFGeometry::NpadX(); iPadX++) {
+ for (iPadZ=0; iPadZ<AliTOFGeometry::NpadZ(); iPadZ++) {
+ vol[4] = iPadZ , vol[3] = iPadX;
+
+ AliDebug(3, Form(" %1d %2d\n", iPadZ, iPadX));
if (fTOFdigitMap->GetNumberOfDigits(vol)==0) continue;
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (fTOFdigitMap->GetDigitIndex(vol,digIndex)<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(fTOFdigitMap->GetDigitIndex(vol,digIndex));
+ if (digitInteresting->GetToT()>0) continue; // AdC
- AliDebug(2, Form(" %2i %1i %2i %1i %2i %f %f %f %5i %5i %5i %5i",
+ AliDebug(2, Form(" %3d %5d %2d %1d %2d %1d %2d %d %d %d %5d %5d %5d %5d",
+ fTOFdigitMap->GetNumberOfDigits(vol), digIndex,
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(),
fTOFdigitMap->GetDigitIndex(vol,digIndex),
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
- //dummyPad = vol[3];
- //vol[3] = vol[4];
- //vol[4] = dummyPad;
- det[3] = vol[4];
- det[4] = vol[3];
- tofGeometry->GetPosPar(det,pos);
+ det[3] = vol[4]; // padz
+ det[4] = vol[3]; // padx
+ fTOFGeometry->GetPosPar(det,pos);
AliDebug(1,Form(" %f %f %f", pos[0], pos[1], pos[2]));
//insert cluster
for (jj=0; jj<3; jj++) posClus[jj] = pos[jj];
parTOF[0] = Int_t(digitInteresting->GetTdc());
- parTOF[1] = Int_t(digitInteresting->GetAdc());
- parTOF[2] = Int_t(digitInteresting->GetToT());
- parTOF[3] = Int_t(digitInteresting->GetTdc());
+ parTOF[1] = Int_t(digitInteresting->GetToT());
+ parTOF[2] = Int_t(digitInteresting->GetAdc());
+ parTOF[3] = Int_t(digitInteresting->GetTdcND());
parTOF[4] = Int_t(digitInteresting->GetTdc());
- volIdClus = GetClusterVolIndex(det);
+ volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
+ //volIdClus = GetClusterVolIndex(det);
for (jj=0; jj<6; jj++) covClus[jj] = 0.;
GetClusterPars(det, posClus, covClus);
tracks, det, parTOF, status, fTOFdigitMap->GetDigitIndex(vol,digIndex));
InsertCluster(tofCluster);
- AliDebug(2, Form(" %4i %f %f %f %f %f %f %f %f %f %3i %3i %3i %2i %1i %2i %1i %2i %4i %3i %3i %4i %4i %1i %4i",
+ AliDebug(2, Form(" %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",
volIdClus, posClus[0], posClus[1], posClus[2],
covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
tracks[0], tracks[1], tracks[2],
status, fTOFdigitMap->GetDigitIndex(vol,digIndex)));
AliDebug(2, Form(" %f %f %f", pos[0], pos[1], pos[2]));
- AliDebug(2, Form(" %f %f", parTOF[0], parTOF[2]));
+ AliDebug(2, Form(" %d %d", parTOF[0], parTOF[2]));
- //dummyPad = vol[3];
- //vol[3] = vol[4];
- //vol[4] = dummyPad;
fTOFdigitMap->ResetDigit(vol, digIndex);
}
const Int_t kMaxNumberOfInterestingPads = 4;
const Int_t kMaxNumberOfTracksPerDigit = 3;
- const Int_t kMaxNumberOfDigitsPerVolume = 3;
+ const Int_t kMaxNumberOfDigitsPerVolume = 10;
Int_t ii = 0;
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
- AliTOFGeometry *tofGeometry = new AliTOFGeometry();
Int_t vol[5] = {nSector,nPlate,nStrip,-1,-1};
Float_t pos[3] = {0.,0.,0.};
for (jj=3; jj<11; jj++) padsCluster[jj] = -1;
Int_t interestingCounter=-1;
+ Int_t digitIndexLocal=-1; // AdC
Int_t iPad = -1;
Int_t iPadX = -1;
Int_t iPadZ = -1;
iPadZ = iPad%AliTOFGeometry::NpadZ(); //iPad%2;
iPadX = iPad/AliTOFGeometry::NpadZ(); //iPad/2;
- AliDebug(3, Form("%2i %1i %2i\n", iPad, iPadZ, iPadX));
+ AliDebug(3, Form("%2d %1d %2d\n", iPad, iPadZ, iPadX));
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1;
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
- AliDebug(1,Form(" e adesso %1i", interestingCounter+1));
+ AliDebug(1,Form(" e adesso %1d", interestingCounter+1));
for (Int_t adesso1=0; adesso1<interestingCounter+1; adesso1++) {
for (Int_t firstIndex=0; firstIndex<kMaxNumberOfDigitsPerVolume; firstIndex++) {
interestingADC[0] = selectedDigit[adesso1][firstIndex]->GetADC();
interestingWeight[0] = selectedDigit[adesso1][firstIndex]->GetWeight();
Int_t vol1[5]; for(jj=0; jj<5; jj++) vol1[jj] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
Int_t volDum = vol1[3];
vol1[3] = vol1[4];
vol1[4] = volDum;
- tofGeometry->GetPosPar(vol1,pos);
+ fTOFGeometry->GetPosPar(vol1,pos);
interestingX[0] = pos[0];
interestingY[0] = pos[1];
interestingZ[0] = pos[2];
interestingADC[1] = selectedDigit[adesso2][secondIndex]->GetADC();
interestingWeight[1] = selectedDigit[adesso2][secondIndex]->GetWeight();
Int_t vol2[5]; for(jj=0; jj<5; jj++) vol2[jj] = selectedDigit[adesso2][secondIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
volDum = vol2[3];
vol2[3] = vol2[4];
vol2[4] = volDum;
- tofGeometry->GetPosPar(vol2,pos);
+ fTOFGeometry->GetPosPar(vol2,pos);
interestingX[1] = pos[0];
interestingY[1] = pos[1];
interestingZ[1] = pos[2];
interestingADC[2] = selectedDigit[adesso3][thirdIndex]->GetADC();
interestingWeight[2] = selectedDigit[adesso3][thirdIndex]->GetWeight();
Int_t vol3[5]; for(jj=0; jj<5; jj++) vol3[jj] = selectedDigit[adesso3][thirdIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol3[0], vol3[1], vol3[2], vol3[4], vol3[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol3[0], vol3[1], vol3[2], vol3[4], vol3[3]));
volDum = vol3[3];
vol3[3] = vol3[4];
vol3[4] = volDum;
- tofGeometry->GetPosPar(vol3,pos);
+ fTOFGeometry->GetPosPar(vol3,pos);
interestingX[2] = pos[0];
interestingY[2] = pos[1];
interestingZ[2] = pos[2];
for (jj=0; jj<5; jj++) det[jj] = -1;
for (jj=0; jj<3; jj++) posF[jj] = posClus[jj];
- tofGeometry->GetDetID(posF, det);
+ fTOFGeometry->GetDetID(posF, det);
- volIdClus = GetClusterVolIndex(det);
+ volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
+ //volIdClus = GetClusterVolIndex(det);
for (jj=3; jj<11; jj++) padsCluster[jj] = -1;
padsCluster[3] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(4);
for (jj=0; jj<3; jj++) indDet[jj][2] = nStrip;
for (jj=0; jj<3; jj++) indDet[jj][3] = padsCluster[2*jj+3];
for (jj=0; jj<3; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
- GetClusterPars(check, 3, indDet, interestingWeight, posClus, covClus);
+ GetClusterPars(/*check,*/ 3, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<3; jj++) delete [] indDet[jj];
// To fill the track index array
tracks, det, parTOF, status, selectedDigit[adesso1][firstIndex]->GetIndex()); // to be updated
InsertCluster(tofCluster);
- AliDebug(2, Form(" %4i %f %f %f %f %f %f %f %f %f %3i %3i %3i %2i %1i %2i %1i %2i %4i %3i %3i %4i %4i %1i %4i",
+ AliDebug(2, Form(" %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",
volIdClus, posClus[0], posClus[1], posClus[2],
covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
tracks[0], tracks[1], tracks[2],
const Int_t kMaxNumberOfInterestingPads = 4;
const Int_t kMaxNumberOfTracksPerDigit = 3;
- const Int_t kMaxNumberOfDigitsPerVolume = 3;
+ const Int_t kMaxNumberOfDigitsPerVolume = 10;
Int_t ii = 0;
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
- AliTOFGeometry *tofGeometry = new AliTOFGeometry();
Int_t vol[5] = {nSector,nPlate,nStrip,-1,-1};
Float_t pos[3] = {0.,0.,0.};
for (jj=3; jj<11; jj++) padsCluster[jj] = -1;
Int_t interestingCounter=-1;
+ Int_t digitIndexLocal = -1;
Int_t iPad = -1;
Int_t iPadX = -1;
Int_t iPadZ = -1;
iPadZ = iPad%AliTOFGeometry::NpadZ(); //iPad%2;
iPadX = iPad/AliTOFGeometry::NpadZ(); //iPad/2;
- AliDebug(3, Form("%2i %1i %2i\n", iPad, iPadZ, iPadX));
+ AliDebug(3, Form("%2d %1d %2d\n", iPad, iPadZ, iPadX));
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1;
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
- AliDebug(1,Form(" e adesso %1i", interestingCounter+1));
+ AliDebug(1,Form(" e adesso %1d", interestingCounter+1));
for (Int_t adesso1=0; adesso1<interestingCounter+1; adesso1++) {
for (Int_t firstIndex=0; firstIndex<kMaxNumberOfDigitsPerVolume; firstIndex++) {
interestingADC[0] = selectedDigit[adesso1][firstIndex]->GetADC();
interestingWeight[0] = selectedDigit[adesso1][firstIndex]->GetWeight();
Int_t vol1[5]; for(jj=0; jj<5; jj++) vol1[jj] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
Int_t volDum = vol1[3];
vol1[3] = vol1[4];
vol1[4] = volDum;
- tofGeometry->GetPosPar(vol1,pos);
+ fTOFGeometry->GetPosPar(vol1,pos);
interestingX[0] = pos[0];
interestingY[0] = pos[1];
interestingZ[0] = pos[2];
interestingADC[1] = selectedDigit[adesso2][secondIndex]->GetADC();
interestingWeight[1] = selectedDigit[adesso2][secondIndex]->GetWeight();
Int_t vol2[5]; for(jj=0; jj<5; jj++) vol2[jj] = selectedDigit[adesso2][secondIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
volDum = vol2[3];
vol2[3] = vol2[4];
vol2[4] = volDum;
- tofGeometry->GetPosPar(vol2,pos);
+ fTOFGeometry->GetPosPar(vol2,pos);
interestingX[1] = pos[0];
interestingY[1] = pos[1];
interestingZ[1] = pos[2];
for (jj=0; jj<5; jj++) det[jj] = -1;
for (jj=0; jj<3; jj++) posF[jj] = posClus[jj];
- tofGeometry->GetDetID(posF, det);
+ fTOFGeometry->GetDetID(posF, det);
- volIdClus = GetClusterVolIndex(det);
+ volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
+ //volIdClus = GetClusterVolIndex(det);
for (jj=3; jj<11; jj++) padsCluster[jj] = -1;
padsCluster[3] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(4);
for (jj=0; jj<2; jj++) indDet[jj][2] = nStrip;
for (jj=0; jj<2; jj++) indDet[jj][3] = padsCluster[2*jj+3];
for (jj=0; jj<2; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
- GetClusterPars(check, 2, indDet, interestingWeight, posClus, covClus);
+ GetClusterPars(/*check,*/ 2, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<2; jj++) delete [] indDet[jj];
// To fill the track index array
tracks, det, parTOF, status, selectedDigit[adesso1][firstIndex]->GetIndex()); // to be updated
InsertCluster(tofCluster);
- AliDebug(2, Form(" %4i %f %f %f %f %f %f %f %f %f %3i %3i %3i %2i %1i %2i %1i %2i %4i %3i %3i %4i %4i %1i %4i",
+ AliDebug(2, Form(" %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",
volIdClus, posClus[0], posClus[1], posClus[2],
covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
tracks[0], tracks[1], tracks[2],
const Int_t kMaxNumberOfInterestingPads = 4;
const Int_t kMaxNumberOfTracksPerDigit = 3;
- const Int_t kMaxNumberOfDigitsPerVolume = 3;
+ const Int_t kMaxNumberOfDigitsPerVolume = 10;
Int_t ii = 0;
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
- AliTOFGeometry *tofGeometry = new AliTOFGeometry();
Int_t vol[5] = {nSector,nPlate,nStrip,-1,-1};
Float_t pos[3] = {0.,0.,0.};
for (jj=3; jj<11; jj++) padsCluster[jj] = -1;
Int_t interestingCounter=-1;
+ Int_t digitIndexLocal = -1;
Int_t iPad = -1;
Int_t iPadX = -1;
Int_t iPadZ = -1;
iPadZ = iPad%AliTOFGeometry::NpadZ(); //iPad%2;
iPadX = iPad/AliTOFGeometry::NpadZ(); //iPad/2;
- AliDebug(3, Form("%2i %1i %2i\n", iPad, iPadZ, iPadX));
+ AliDebug(3, Form("%2d %1d %2d\n", iPad, iPadZ, iPadX));
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d %f %f %f %f %5d %5d %5d %5d",
vol[0], vol[1], vol[2] ,vol[4], vol[3],
digitInteresting->GetTdc(), digitInteresting->GetAdc(),
digitInteresting->GetToT(), digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
- AliDebug(1,Form(" e adesso %1i", interestingCounter+1));
+ AliDebug(1,Form(" e adesso %1d", interestingCounter+1));
for (Int_t adesso1=0; adesso1<interestingCounter+1; adesso1++) {
for (Int_t firstIndex=0; firstIndex<kMaxNumberOfDigitsPerVolume; firstIndex++) {
interestingADC[0] = selectedDigit[adesso1][firstIndex]->GetADC();
interestingWeight[0] = selectedDigit[adesso1][firstIndex]->GetWeight();
Int_t vol1[5]; for(jj=0; jj<5; jj++) vol1[jj] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
Int_t volDum = vol1[3];
vol1[3] = vol1[4];
vol1[4] = volDum;
- tofGeometry->GetPosPar(vol1,pos);
+ fTOFGeometry->GetPosPar(vol1,pos);
interestingX[0] = pos[0];
interestingY[0] = pos[1];
interestingZ[0] = pos[2];
interestingADC[1] = selectedDigit[adesso2][secondIndex]->GetADC();
interestingWeight[1] = selectedDigit[adesso2][secondIndex]->GetWeight();
Int_t vol2[5]; for(jj=0; jj<5; jj++) vol2[jj] = selectedDigit[adesso2][secondIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
volDum = vol2[3];
vol2[3] = vol2[4];
vol2[4] = volDum;
- tofGeometry->GetPosPar(vol2,pos);
+ fTOFGeometry->GetPosPar(vol2,pos);
interestingX[1] = pos[0];
interestingY[1] = pos[1];
interestingZ[1] = pos[2];
for (jj=0; jj<5; jj++) det[jj] = -1;
for (jj=0; jj<3; jj++) posF[jj] = posClus[jj];
- tofGeometry->GetDetID(posF, det);
+ fTOFGeometry->GetDetID(posF, det);
- volIdClus = GetClusterVolIndex(det);
+ volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
+ //volIdClus = GetClusterVolIndex(det);
for (jj=3; jj<11; jj++) padsCluster[jj] = -1;
padsCluster[3] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(4);
for (jj=0; jj<2; jj++) indDet[jj][2] = nStrip;
for (jj=0; jj<2; jj++) indDet[jj][3] = padsCluster[2*jj+3];
for (jj=0; jj<2; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
- GetClusterPars(check, 2, indDet, interestingWeight, posClus, covClus);
+ GetClusterPars(/*check,*/ 2, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<2; jj++) delete [] indDet[jj];
// To fill the track index array
tracks, det, parTOF, status, selectedDigit[adesso1][firstIndex]->GetIndex()); // to be updated
InsertCluster(tofCluster);
- AliDebug(2, Form(" %4i %f %f %f %f %f %f %f %f %f %3i %3i %3i %2i %1i %2i %1i %2i %4i %3i %3i %4i %4i %1i %4i",
+ AliDebug(2, Form(" %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",
volIdClus, posClus[0], posClus[1], posClus[2],
covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
tracks[0], tracks[1], tracks[2],
const Int_t kMaxNumberOfInterestingPads = 4;
const Int_t kMaxNumberOfTracksPerDigit = 3;
- const Int_t kMaxNumberOfDigitsPerVolume = 3;
+ const Int_t kMaxNumberOfDigitsPerVolume = 10;
Int_t ii = 0;
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
- AliTOFGeometry *tofGeometry = new AliTOFGeometry();
-
Int_t vol[5] = {nSector,nPlate,nStrip,-1,-1};
Float_t pos[3] = {0.,0.,0.};
for (jj=3; jj<11; jj++) padsCluster[jj] = -1;
Int_t interestingCounter=-1;
+ Int_t digitIndexLocal = -1;
Int_t iPad = -1;
Int_t iPadX = -1;
Int_t iPadZ = -1;
iPadZ = iPad%AliTOFGeometry::NpadZ(); //iPad%2;
iPadX = iPad/AliTOFGeometry::NpadZ(); //iPad/2;
- AliDebug(3, Form("%2i %1i %2i\n", iPad, iPadZ, iPadX));
+ AliDebug(3, Form("%2d %1d %2d\n", iPad, iPadZ, iPadX));
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ 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(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
+ AliDebug(1,Form(" to try %d %d ",digIndex, interestingCounter));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ 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(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
+ AliDebug(1,Form(" to try %d %d ",digIndex, interestingCounter));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ 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(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
+ AliDebug(1,Form(" to try %d %d ",digIndex, interestingCounter));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
for (ii=0; ii<kMaxNumberOfDigitsPerVolume; ii++)
digitsInVolumeIndices[ii] = -1;
fTOFdigitMap->GetDigitIndex(vol, digitsInVolumeIndices);
+ digitIndexLocal=-1; // AdC
for(Int_t digIndex=0; digIndex<kMaxNumberOfDigitsPerVolume; digIndex++) {
if (digitsInVolumeIndices[digIndex]<0) continue;
digitInteresting = (AliTOFdigit*)fDigits->UncheckedAt(digitsInVolumeIndices[digIndex]);
+ if (digitInteresting->GetToT()<=0) continue; // AdC
+ digitIndexLocal++; // AdC
- AliDebug(1,Form(" %2i %1i %2i %1i %2i %f %f %f %f %5i %5i %5i %5i",
+ 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(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTrack(0), digitInteresting->GetTrack(1), digitInteresting->GetTrack(2)));
+ AliDebug(1,Form(" to try %d %d ",digIndex, interestingCounter));
-
- selectedDigit[interestingCounter][digIndex] = new
+ selectedDigit[interestingCounter][digitIndexLocal] = new // AdC
AliTOFselectedDigit(vol, digitInteresting->GetTdc(),
digitInteresting->GetAdc(), digitInteresting->GetToT(),
digitInteresting->GetToT()*digitInteresting->GetToT(),
digitsInVolumeIndices[digIndex],
digitInteresting->GetTracks());
}
+ if (digitIndexLocal==-1) interestingCounter--; // AdC
}
- AliDebug(1,Form(" e adesso %1i", interestingCounter+1));
+ AliDebug(1,Form(" e adesso %1d", interestingCounter+1));
switch(interestingCounter+1) {
if (TMath::Abs(selectedDigit[adesso1][firstIndex]->GetTDC()-selectedDigit[adesso2][secondIndex]->GetTDC())>fMaxDeltaTime) continue;
- AliDebug(1, Form(" %1i %1i (0x%x) %1i %1i (0x%x)", adesso1, firstIndex,selectedDigit[adesso1][firstIndex],
+ AliDebug(1, Form(" %1d %1d (0x%x) %1d %1d (0x%x)", adesso1, firstIndex,selectedDigit[adesso1][firstIndex],
adesso2, secondIndex,selectedDigit[adesso2][secondIndex]));
interestingTOF[0] = selectedDigit[adesso1][firstIndex]->GetTDC();
interestingADC[0] = selectedDigit[adesso1][firstIndex]->GetADC();
interestingWeight[0] = selectedDigit[adesso1][firstIndex]->GetWeight();
Int_t vol1[5]; for(jj=0; jj<5; jj++) vol1[jj] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
Int_t volDum = vol1[3];
vol1[3] = vol1[4];
vol1[4] = volDum;
- tofGeometry->GetPosPar(vol1,pos);
+ fTOFGeometry->GetPosPar(vol1,pos);
AliDebug(1,Form(" %f %f %f", pos[0], pos[1], pos[2]));
interestingX[0] = pos[0];
interestingY[0] = pos[1];
interestingADC[1] = selectedDigit[adesso2][secondIndex]->GetADC();
interestingWeight[1] = selectedDigit[adesso2][secondIndex]->GetWeight();
Int_t vol2[5]; for(jj=0; jj<5; jj++) vol2[jj] = selectedDigit[adesso2][secondIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
volDum = vol2[3];
vol2[3] = vol2[4];
vol2[4] = volDum;
- tofGeometry->GetPosPar(vol2,pos);
+ fTOFGeometry->GetPosPar(vol2,pos);
AliDebug(1,Form(" %f %f %f", pos[0], pos[1], pos[2]));
interestingX[1] = pos[0];
interestingY[1] = pos[1];
for (jj=0; jj<3; jj++) posF[jj] = posClus[jj];
AliDebug(1,Form(" %f %f %f", posF[0], posF[1], posF[2]));
- tofGeometry->GetDetID(posF, det);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", det[0], det[1], det[2], det[3], det[4]));
+ fTOFGeometry->GetDetID(posF, det);
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", det[0], det[1], det[2], det[3], det[4]));
- volIdClus = GetClusterVolIndex(det);
+ volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
+ //volIdClus = GetClusterVolIndex(det);
for (jj=3; jj<11; jj++) padsCluster[jj] = -1;
padsCluster[3] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(4);
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][2] = nStrip;
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][3] = padsCluster[2*jj+3];
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
- GetClusterPars(check, interestingCounter+1, indDet, interestingWeight, posClus, covClus);
+ GetClusterPars(/*check,*/ interestingCounter+1, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<interestingCounter+1; jj++) delete [] indDet[jj];
// To fill the track index array
tracks, det, parTOF, status, selectedDigit[adesso1][firstIndex]->GetIndex()); //to updated
InsertCluster(tofCluster);
- AliDebug(2, Form(" %4i %f %f %f %f %f %f %f %f %f %3i %3i %3i %2i %1i %2i %1i %2i %4i %3i %3i %4i %4i %1i %4i",
+ AliDebug(2, Form(" %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",
volIdClus, posClus[0], posClus[1], posClus[2],
covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
tracks[0], tracks[1], tracks[2],
interestingADC[0] = selectedDigit[adesso1][firstIndex]->GetADC();
interestingWeight[0] = selectedDigit[adesso1][firstIndex]->GetWeight();
Int_t vol1[5]; for(jj=0; jj<5; jj++) vol1[jj] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
Int_t volDum = vol1[3];
vol1[3] = vol1[4];
vol1[4] = volDum;
- tofGeometry->GetPosPar(vol1,pos);
+ fTOFGeometry->GetPosPar(vol1,pos);
interestingX[0] = pos[0];
interestingY[0] = pos[1];
interestingZ[0] = pos[2];
interestingADC[1] = selectedDigit[adesso2][secondIndex]->GetADC();
interestingWeight[1] = selectedDigit[adesso2][secondIndex]->GetWeight();
Int_t vol2[5]; for(jj=0; jj<5; jj++) vol2[jj] = selectedDigit[adesso2][secondIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
volDum = vol2[3];
vol2[3] = vol2[4];
vol2[4] = volDum;
- tofGeometry->GetPosPar(vol2,pos);
+ fTOFGeometry->GetPosPar(vol2,pos);
interestingX[1] = pos[0];
interestingY[1] = pos[1];
interestingZ[1] = pos[2];
interestingADC[2] = selectedDigit[adesso3][thirdIndex]->GetADC();
interestingWeight[2] = selectedDigit[adesso3][thirdIndex]->GetWeight();
Int_t vol3[5]; for(jj=0; jj<5; jj++) vol3[jj] = selectedDigit[adesso3][thirdIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol3[0], vol3[1], vol3[2], vol3[4], vol3[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol3[0], vol3[1], vol3[2], vol3[4], vol3[3]));
volDum = vol3[3];
vol3[3] = vol3[4];
vol3[4] = volDum;
- tofGeometry->GetPosPar(vol3,pos);
+ fTOFGeometry->GetPosPar(vol3,pos);
interestingX[2] = pos[0];
interestingY[2] = pos[1];
interestingZ[2] = pos[2];
for (jj=0; jj<5; jj++) det[jj] = -1;
for (jj=0; jj<3; jj++) posF[jj] = posClus[jj];
- tofGeometry->GetDetID(posF, det);
+ fTOFGeometry->GetDetID(posF, det);
- volIdClus = GetClusterVolIndex(det);
+ volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
+ //volIdClus = GetClusterVolIndex(det);
for (jj=3; jj<11; jj++) padsCluster[jj] = -1;
padsCluster[3] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(4);
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][2] = nStrip;
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][3] = padsCluster[2*jj+3];
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
- GetClusterPars(check, interestingCounter+1, indDet, interestingWeight, posClus, covClus);
+ GetClusterPars(/*check,*/ interestingCounter+1, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<interestingCounter+1; jj++) delete [] indDet[jj];
// To fill the track index array
tracks, det, parTOF, status, selectedDigit[adesso1][firstIndex]->GetIndex()); // to be updated
InsertCluster(tofCluster);
- AliDebug(2, Form(" %4i %f %f %f %f %f %f %f %f %f %3i %3i %3i %2i %1i %2i %1i %2i %4i %3i %3i %4i %4i %1i %4i",
+ AliDebug(2, Form(" %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",
volIdClus, posClus[0], posClus[1], posClus[2],
covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
tracks[0], tracks[1], tracks[2],
interestingADC[0] = selectedDigit[adesso1][firstIndex]->GetADC();
interestingWeight[0] = selectedDigit[adesso1][firstIndex]->GetWeight();
Int_t vol1[5]; for(jj=0; jj<5; jj++) vol1[jj] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol1[0], vol1[1], vol1[2], vol1[4], vol1[3]));
Int_t volDum = vol1[3];
vol1[3] = vol1[4];
vol1[4] = volDum;
- tofGeometry->GetPosPar(vol1,pos);
+ fTOFGeometry->GetPosPar(vol1,pos);
interestingX[0] = pos[0];
interestingY[0] = pos[1];
interestingZ[0] = pos[2];
interestingADC[1] = selectedDigit[adesso2][secondIndex]->GetADC();
interestingWeight[1] = selectedDigit[adesso2][secondIndex]->GetWeight();
Int_t vol2[5]; for(jj=0; jj<5; jj++) vol2[jj] = selectedDigit[adesso2][secondIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol2[0], vol2[1], vol2[2], vol2[4], vol2[3]));
volDum = vol2[3];
vol2[3] = vol2[4];
vol2[4] = volDum;
- tofGeometry->GetPosPar(vol2,pos);
+ fTOFGeometry->GetPosPar(vol2,pos);
interestingX[1] = pos[0];
interestingY[1] = pos[1];
interestingZ[1] = pos[2];
interestingADC[2] = selectedDigit[adesso3][thirdIndex]->GetADC();
interestingWeight[2] = selectedDigit[adesso3][thirdIndex]->GetWeight();
Int_t vol3[5]; for(jj=0; jj<5; jj++) vol3[jj] = selectedDigit[adesso3][thirdIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol3[0], vol3[1], vol3[2], vol3[4], vol3[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol3[0], vol3[1], vol3[2], vol3[4], vol3[3]));
volDum = vol3[3];
vol3[3] = vol3[4];
vol3[4] = volDum;
- tofGeometry->GetPosPar(vol3,pos);
+ fTOFGeometry->GetPosPar(vol3,pos);
interestingX[2] = pos[0];
interestingY[2] = pos[1];
interestingZ[2] = pos[2];
interestingADC[3] = selectedDigit[adesso4][fourthIndex]->GetADC();
interestingWeight[3] = selectedDigit[adesso4][fourthIndex]->GetWeight();
Int_t vol4[5]; for(jj=0; jj<5; jj++) vol4[jj] = selectedDigit[adesso4][fourthIndex]->GetDetectorIndex(jj);
- AliDebug(1,Form(" %2i %1i %2i %1i %2i", vol4[0], vol4[1], vol4[2], vol4[4], vol4[3]));
+ AliDebug(1,Form(" %2d %1d %2d %1d %2d", vol4[0], vol4[1], vol4[2], vol4[4], vol4[3]));
volDum = vol4[3];
vol4[3] = vol4[4];
vol4[4] = volDum;
- tofGeometry->GetPosPar(vol4,pos);
+ fTOFGeometry->GetPosPar(vol4,pos);
interestingX[3] = pos[0];
interestingY[3] = pos[1];
interestingZ[3] = pos[2];
for (jj=0; jj<5; jj++) det[jj] = -1;
for (jj=0; jj<3; jj++) posF[jj] = posClus[jj];
- tofGeometry->GetDetID(posF, det);
+ fTOFGeometry->GetDetID(posF, det);
- volIdClus = GetClusterVolIndex(det);
+ volIdClus = fTOFGeometry->GetAliSensVolIndex(det[0],det[1],det[2]);
+ //volIdClus = GetClusterVolIndex(det);
for (jj=3; jj<11; jj++) padsCluster[jj] = -1;
padsCluster[3] = selectedDigit[adesso1][firstIndex]->GetDetectorIndex(4);
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][2] = nStrip;
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][3] = padsCluster[2*jj+3];
for (jj=0; jj<interestingCounter+1; jj++) indDet[jj][4] = padsCluster[2*jj+1+3];
- GetClusterPars(check, interestingCounter+1, indDet, interestingWeight, posClus, covClus);
+ GetClusterPars(/*check,*/ interestingCounter+1, indDet, interestingWeight, posClus, covClus);
for (jj=0; jj<interestingCounter+1; jj++) delete [] indDet[jj];
// To fill the track index array
tracks, det, parTOF, status, selectedDigit[adesso1][firstIndex]->GetIndex()); // to be updated
InsertCluster(tofCluster);
- AliDebug(2, Form(" %4i %f %f %f %f %f %f %f %f %f %3i %3i %3i %2i %1i %2i %1i %2i %4i %3i %3i %4i %4i %1i %4i",
+ AliDebug(2, Form(" %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",
volIdClus, posClus[0], posClus[1], posClus[2],
covClus[0], covClus[1], covClus[2], covClus[3], covClus[4], covClus[5],
tracks[0], tracks[1], tracks[2],
}
//_____________________________________________________________________________
-
-UShort_t AliTOFClusterFinderV1::GetClusterVolIndex(Int_t *ind) const
-{
+//UShort_t AliTOFClusterFinderV1::GetClusterVolIndex(Int_t *ind) const
+//{
//
// Get the volume ID to retrieve the l2t transformation
//
// Detector numbering scheme
+/*
Int_t nSector = AliTOFGeometry::NSectors();
Int_t nPlate = AliTOFGeometry::NPlates();
Int_t nStripA = AliTOFGeometry::NStripA();
return volIndex;
}
+*/
//_____________________________________________________________________________
void AliTOFClusterFinderV1::GetClusterPars(Int_t *ind, Double_t* pos, Double_t* cov) const
AliDebug(1, Form(" %f %f %f", lpos[0], lpos[1], lpos[2]));
// Volume ID
- UShort_t volIndex = GetClusterVolIndex(ind);
+ UShort_t volIndex = fTOFGeometry->GetAliSensVolIndex(ind[0],ind[1],ind[2]);
+ //UShort_t volIndex = GetClusterVolIndex(ind);
const TGeoHMatrix *l2t = AliGeomManager::GetTracking2LocalMatrix(volIndex);
// Get the position in the track ref system
// + 0.5*0.160 (internl PCB)
// + 1*0.055 (external red glass))
*/
+
lcov[0] = 0.499678;//AliTOFGeometry::XPad()*AliTOFGeometry::XPad()/12.;
lcov[8] = 0.992429;//AliTOFGeometry::ZPad()*AliTOFGeometry::ZPad()/12.;
}
//_____________________________________________________________________________
-void AliTOFClusterFinderV1::GetClusterPars(Bool_t check, Int_t counter,
+void AliTOFClusterFinderV1::GetClusterPars(/*Bool_t check,*/ Int_t counter,
Int_t **ind, Double_t *weight,
Double_t *pos, Double_t *cov) const
{
// x <-----------------------------------------------------
for (Int_t ii=0; ii<counter; ii++)
- AliDebug(1, Form(" %2i %2i %1i %2i %1i %2i ",
+ AliDebug(1, Form(" %2d %2d %1d %2d %1d %2d ",
ii, ind[ii][0], ind[ii][1], ind[ii][2], ind[ii][3], ind[ii][4]));
Float_t posF[3]; for (Int_t ii=0; ii<3; ii++) posF[ii] = (Float_t)pos[ii];
AliDebug(1, Form(" %f %f %f", pos[0], pos[1], pos[2]));
- AliTOFGeometry tofGeom;
+
Int_t detClus[5] = {-1, -1, -1, -1, -1};
- tofGeom.GetDetID(posF, detClus);
+ fTOFGeometry->GetDetID(posF, detClus);
// Volume ID
- UShort_t volIndex = GetClusterVolIndex(detClus);
- AliDebug(1, Form(" %2i %1i %2i %1i %2i %7i",
+ UShort_t volIndex = fTOFGeometry->GetAliSensVolIndex(detClus[0],detClus[1],detClus[2]);
+ //UShort_t volIndex = GetClusterVolIndex(detClus);
+ AliDebug(1, Form(" %2d %1d %2d %1d %2d %7i",
detClus[0], detClus[1], detClus[2], detClus[3], detClus[4], volIndex));
// Get the position in the TOF strip ref system
// 0 0 sz2
// Evaluation of the ovariance matrix elements
- TOFclusterError(check, counter, ind, weight, ppos, lcov);
+ TOFclusterError(/*check,*/ counter, ind, weight, ppos, lcov);
AliDebug(1, Form("lcov[0] = %f, lcov[8] = %f", lcov[0], lcov[8]));
}
//_____________________________________________________________________________
-void AliTOFClusterFinderV1::TOFclusterError(Bool_t check, Int_t counter,
+void AliTOFClusterFinderV1::TOFclusterError(/*Bool_t check,*/ Int_t counter,
Int_t **ind, Double_t *weight,
Double_t ppos[], Double_t lcov[]) const
{
//
//
- //lcov[4] = 0.42*0.42/3.;
+ //lcov[4] = 0.42*0.42/3.; // cm2
// = ( 5*0.025 (gas gaps thikness)
// + 4*0.040 (internal glasses thickness)
// + 0.5*0.160 (internl PCB)
((ind[ii][3]- 0.5)*AliTOFGeometry::ZPad() - ppos[2])*((ind[ii][3]- 0.5)*AliTOFGeometry::ZPad() - ppos[2]);
for (Int_t ii=0; ii<counter; ii++)
- AliDebug(1, Form("x[%i] = %f, z[%i] = %f, weight[%i] = %f",
+ AliDebug(1, Form("x[%d] = %f, z[%d] = %f, weight[%d] = %f",
ii, (ind[ii][4]-23.5)*AliTOFGeometry::XPad(),
ii, (ind[ii][3]- 0.5)*AliTOFGeometry::ZPad(),
ii, weight[ii]
if (ind[0][3]==ind[1][3] && TMath::Abs(ind[0][4]-ind[1][4])==1) { //
- lcov[8] = 1.02039;
-
+ lcov[8] = 1.02039; // cm2
+ lcov[0] = 0.0379409; // cm2
+ /*
if (check)
- lcov[0] = 0.5*0.5;
+ lcov[0] = 0.5*0.5; // cm2
else {
if (weight[0]==weight[1])
- lcov[0] = 0.0379409;
+ lcov[0] = 0.0379409; // cm2
else
- lcov[0] = TMath::Mean(counter, delta2X, weight);
+ lcov[0] = TMath::Mean(counter, delta2X, weight); // cm2
}
+ */
}
else if (ind[0][4]==ind[1][4] && TMath::Abs(ind[0][3]-ind[1][3])==1) {//
- lcov[0] = 0.505499;
-
+ lcov[0] = 0.505499; // cm2
+ lcov[8] = 0.0422046; // cm2
+ /*
if (check)
- lcov[8] = 0.5*0.5;
+ lcov[8] = 0.5*0.5; // cm2
else {
if (weight[0]==weight[1])
- lcov[8] = 0.0422046;
+ lcov[8] = 0.0422046; // cm2
else
- lcov[8] = TMath::Mean(counter, delta2Z, weight);
+ lcov[8] = TMath::Mean(counter, delta2Z, weight); // cm2
}
+ */
}
break;
case 3:
-
+ lcov[0] = 0.0290677; // cm2
+ lcov[8] = 0.0569726; // cm2
+ /*
if (check) {
- lcov[0] = 0.5*0.5;
- lcov[8] = 0.5*0.5;
+ lcov[0] = 0.5*0.5; // cm2
+ lcov[8] = 0.5*0.5; // cm2
}
else {
- if (weight[0]==weight[1] && weight[0]==weight[2]) {
- lcov[0] = 0.0290677;
- lcov[8] = 0.0569726;
- }
+ if (weight[0]==weight[1] && weight[0]==weight[2]) {
+ lcov[0] = 0.0290677; // cm2
+ lcov[8] = 0.0569726; // cm2
+ }
else {
- lcov[0] = TMath::Mean(counter, delta2X, weight);
- lcov[8] = TMath::Mean(counter, delta2Z, weight);
- }
+ lcov[0] = TMath::Mean(counter, delta2X, weight); // cm2
+ lcov[8] = TMath::Mean(counter, delta2Z, weight); // cm2
+ }
- }
+ }
+ */
break;
case 4:
-
+ lcov[0] = 0.0223807; // cm2
+ lcov[8] = 0.0438662; // cm2
+ /*
if (check) {
- lcov[0] = 0.5*0.5;
- lcov[8] = 0.5*0.5;
+ lcov[0] = 0.5*0.5; // cm2
+ lcov[8] = 0.5*0.5; // cm2
}
else {
- if (weight[0]==weight[1] && weight[0]==weight[2] && weight[0]==weight[3]) {
- lcov[0] = 0.0223807;
- lcov[8] = 0.0438662;
- }
+ if (weight[0]==weight[1] && weight[0]==weight[2] && weight[0]==weight[3]) {
+ lcov[0] = 0.0223807; // cm2
+ lcov[8] = 0.0438662; // cm2
+ }
else {
- lcov[0] = TMath::Mean(counter, delta2X, weight);
- lcov[8] = TMath::Mean(counter, delta2Z, weight);
- }
+ lcov[0] = TMath::Mean(counter, delta2X, weight); // cm2
+ lcov[8] = TMath::Mean(counter, delta2Z, weight); // cm2
+ }
- }
+ }
+ */
break;
}
+ delete [] delta2Z;
+ delete [] delta2X;
+
}
//_____________________________________________________________________________
//AliInfo(" Calibrating TOF Digits: ");
- AliTOFChannelOnlineArray *calDelay = fTOFcalib->GetTOFOnlineDelay();
- AliTOFChannelOnlineStatusArray *calStatus = fTOFcalib->GetTOFOnlineStatus();
+ AliTOFChannelOnlineArray *calDelay = fTOFcalib->GetTOFOnlineDelay();
+ AliTOFChannelOnlineStatusArray *calStatus = fTOFcalib->GetTOFOnlineStatus();
TObjArray *calTOFArrayOffline = fTOFcalib->GetTOFCalArrayOffline();
//check the status, also unknown is fine!!!!!!!
- AliDebug(2, Form(" Status for channel %i = %i",index, (Int_t)status));
+ AliDebug(2, Form(" Status for channel %d = %d",index, (Int_t)status));
if((statusPulser & AliTOFChannelOnlineStatusArray::kTOFPulserBad)==(AliTOFChannelOnlineStatusArray::kTOFPulserBad)||(statusNoise & AliTOFChannelOnlineStatusArray::kTOFNoiseBad)==(AliTOFChannelOnlineStatusArray::kTOFNoiseBad)||(statusHW & AliTOFChannelOnlineStatusArray::kTOFHWBad)==(AliTOFChannelOnlineStatusArray::kTOFHWBad)){
- AliDebug(2, Form(" Bad Status for channel %i",index));
+ AliDebug(2, Form(" Bad Status for channel %d",index));
//fTofClusters[ii]->SetStatus(kFALSE); //odd convention, to avoid conflict with calibration objects currently in the db (temporary solution).
output = kFALSE;
}
else
- AliDebug(2, Form(" Good Status for channel %i",index));
+ AliDebug(2, Form(" Good Status for channel %d",index));
// Get Rough channel online equalization
Double_t roughDelay = (Double_t)calDelay->GetDelay(index); // in ns
par[jj] = (Double_t)calChannelOffline->GetSlewPar(jj);
AliDebug(2,Form(" Calib Pars = %f, %f, %f, %f, %f, %f ",par[0],par[1],par[2],par[3],par[4],par[5]));
- AliDebug(2,Form(" The ToT and Time, uncorr (counts) = %i , %i", tofDigitToT, tofDigitTdc));
+ AliDebug(2,Form(" The ToT and Time, uncorr (counts) = %d , %d", tofDigitToT, tofDigitTdc));
Double_t tToT = (Double_t)(tofDigitToT*AliTOFGeometry::ToTBinWidth());
tToT*=1.E-3; //ToT in ns
AliDebug(2,Form(" The ToT and Time, uncorr (ns)= %e, %e",tofDigitTdc*AliTOFGeometry::TdcBinWidth()*1.E-3,tToT));
//localTOFLoader = fRunLoader->GetLoader("TOFLoader");
localTOFLoader->WriteRecPoints("OVERWRITE");
- AliDebug(1, Form("Execution time to read TOF digits and to write TOF clusters for the event number %i: R:%.4fs C:%.4fs",
+ AliDebug(1, Form("Execution time to read TOF digits and to write TOF clusters for the event number %d: R:%.4fs C:%.4fs",
iEvent, stopwatch.RealTime(),stopwatch.CpuTime()));
}
fRunLoader->GetEvent(iEvent);
- AliDebug(2,Form(" Event number %2i ", iEvent));
+ AliDebug(2,Form(" Event number %2d ", iEvent));
AliLoader *localTOFLoader = (AliLoader*)fRunLoader->GetLoader("TOFLoader");
Digits2RecPoints(rawReader, localTreeR);
- AliDebug(1, Form("Execution time to read TOF raw data and to write TOF clusters for the event number %i: R:%.4fs C:%.4fs",
+ AliDebug(1, Form("Execution time to read TOF raw data and to write TOF clusters for the event number %d: R:%.4fs C:%.4fs",
iEvent, stopwatch.RealTime(),stopwatch.CpuTime()));
}
fRunLoader->GetEvent(iEvent);
- AliDebug(2,Form(" Event number %2i ", iEvent));
+ AliDebug(2,Form(" Event number %2d ", iEvent));
AliLoader *localTOFLoader = (AliLoader*)fRunLoader->GetLoader("TOFLoader");
Raw2Digits(rawReader, localTreeD);
- AliDebug(1, Form("Execution time to read TOF raw data and to write TOF clusters for the event number %i: R:%.4fs C:%.4fs",
+ AliDebug(1, Form("Execution time to read TOF raw data and to write TOF clusters for the event number %d: R:%.4fs C:%.4fs",
iEvent, stopwatch.RealTime(),stopwatch.CpuTime()));
}
Int_t *parTOF, Double_t *posClus, Bool_t &check)
{
//
- //
+ // Calculates the mean values for cluster position (x,y,z),
+ // TOF charge and time
//
- Double_t posX = 0.;
- Double_t posY = 0.;
- Double_t posZ = 0.;
-
Double_t tofAverage = 0.;
Double_t totAverage = 0.;
Double_t adcAverage = 0.;
check = kFALSE;
Int_t ii=-1;
- for (ii=number-1; ii>=0; ii--) check=check||(interestingWeight[ii]==0 ||interestingWeight[ii]==-1);
+ for (ii=number-1; ii>=0; ii--) check=check||(interestingWeight[ii]==0 || interestingWeight[ii]==-1);
if (check) {
}
parTOF[0] = Int_t(tofAverage);
- parTOF[1] = Int_t(adcAverage);
- parTOF[2] = Int_t(totAverage);
- parTOF[3] = Int_t(tofAverage);
- parTOF[4] = Int_t(tofAverage);
-
- //insert cluster
- posClus[0] = posX;
- posClus[1] = posY;
- posClus[2] = posZ;
+ parTOF[1] = Int_t(totAverage);
+ parTOF[2] = Int_t(adcAverage);
+ parTOF[3] = Int_t(tofAverage);//tofND
+ parTOF[4] = Int_t(tofAverage);//tofRAW
}