move instance of AliRawStream outside loop on DDL
Revision 1.27 2007/05/02 16:31:49 arcelli
-Add methods to handle single event reconstruction. retrieval of Calib info moved to AliTOFReconstructor ctor, and passed via a pointer to AliTOFcalib
+Add methods to handle single event reconstruction. retrieval of Calib
+info moved to AliTOFReconstructor ctor, and passed via a pointer to
+AliTOFcalib
Revision 1.26 2007/04/30 19:02:24 arcelli
hopefully the last refinements for correct type conversion in calibration
updates for the new decoder
Revision 1.23 2007/04/23 16:51:39 decaro
-Digits-to-raw_data conversion: correction for a more real description (A.De Caro, R.Preghenella)
+Digits-to-raw_data conversion: correction for a more real description
+(A.De Caro, R.Preghenella)
Revision 1.22 2007/04/19 17:26:32 arcelli
Fix a bug (add some debug printout
Add Uncorrected TOF Time signal
Revision 1.17 2007/02/28 18:09:11 arcelli
-Add protection against failed retrieval of the CDB cal object, now Reconstruction exits with AliFatal
+Add protection against failed retrieval of the CDB cal object,
+now Reconstruction exits with AliFatal
Revision 1.16 2007/02/20 15:57:00 decaro
Raw data update: to read the TOF raw data defined in UNPACKED mode
#include <AliGeomManager.h>
#include "AliTOFcalib.h"
-#include "AliTOFChannelOnline.h"
-#include "AliTOFChannelOnlineStatus.h"
+#include "AliTOFChannelOnlineArray.h"
+#include "AliTOFChannelOnlineStatusArray.h"
#include "AliTOFChannelOffline.h"
#include "AliTOFClusterFinder.h"
#include "AliTOFcluster.h"
TStopwatch stopwatch;
stopwatch.Start();
+ Int_t inholes = 0;
+
fRunLoader->GetEvent(iEvent);
fTreeD = fTOFLoader->TreeD();
return;
}
- TClonesArray *digits = new TClonesArray("AliTOFdigit",10000);
+ TClonesArray staticdigits("AliTOFdigit",10000);
+ staticdigits.Clear();
+ TClonesArray *digits =&staticdigits;
branch->SetAddress(&digits);
ResetRecpoint();
dig[3]=d->GetPadz();
dig[4]=d->GetPadx();
+ // Do not reconstruct anything in the holes
+ if (dig[0]==13 || dig[0]==14 || dig[0]==15 ) { // sectors with holes
+ if (dig[1]==2) { // plate with holes
+ inholes++;
+ continue;
+ }
+ }
+
// AliDebug(2,Form(" %2i %1i %2i %1i %2i ",dig[0],dig[1],dig[2],dig[3],dig[4]));
parTOF[0] = d->GetTdc(); //the TDC signal
AliInfo(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));
- digits->Delete();
- delete digits;
}
//______________________________________________________________________________
TStopwatch stopwatch;
stopwatch.Start();
+ Int_t inholes = 0;
+
/// fRunLoader->GetEvent(iEvent);
if (digitsTree == 0x0)
return;
}
- TClonesArray *digits = new TClonesArray("AliTOFdigit",10000);
+ TClonesArray staticdigits("AliTOFdigit",10000);
+ staticdigits.Clear();
+ TClonesArray *digits = & staticdigits;
branch->SetAddress(&digits);
ResetRecpoint();
dig[3]=d->GetPadz();
dig[4]=d->GetPadx();
+ // Do not reconstruct anything in the holes
+ if (dig[0]==13 || dig[0]==14 || dig[0]==15 ) { // sectors with holes
+ if (dig[1]==2) { // plate with holes
+ inholes++;
+ continue;
+ }
+ }
+
// AliDebug(2,Form(" %2i %1i %2i %1i %2i ",dig[0],dig[1],dig[2],dig[3],dig[4]));
parTOF[0] = d->GetTdc(); //the TDC signal
AliInfo(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));
- digits->Delete();
- delete digits;
}
//______________________________________________________________________________
TStopwatch stopwatch;
stopwatch.Start();
+ Int_t inholes = 0;
+
//const Int_t kDDL = fTOFGeometry->NDDL()*fTOFGeometry->NSectors();
const Int_t kDDL = AliDAQ::NumberOfDdls("TOF");
AliTOFrawData *tofRawDatum = (AliTOFrawData*)clonesRawData->UncheckedAt(iRawData);
- if (tofRawDatum->GetTOT()==-1 || tofRawDatum->GetTOF()==-1) continue;
+ //if (tofRawDatum->GetTOT()==-1 || tofRawDatum->GetTOF()==-1) continue;
+ if (tofRawDatum->GetTOF()==-1) continue;
if (fVerbose==2) {
if (indexDDL<10) ftxt << " " << indexDDL;
else ftxt << " " << detectorIndex[4];
}
+ // 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
+ inholes++;
+ continue;
+ }
+ }
+
parTOF[0] = tofRawDatum->GetTOF(); //TDC
parTOF[1] = tofRawDatum->GetTOT(); // TOT
parTOF[2] = tofRawDatum->GetTOT(); //ADC==TOF
AliDebug(1, Form("Execution time to read TOF raw data and to write TOF clusters : R:%.4fs C:%.4fs",
stopwatch.RealTime(),stopwatch.CpuTime()));
+ if (inholes) AliWarning(Form("Clusters in the TOF holes: %d",inholes));
}
//______________________________________________________________________________
TStopwatch stopwatch;
stopwatch.Start();
+ Int_t inholes = 0;
+
//const Int_t kDDL = fTOFGeometry->NDDL()*fTOFGeometry->NSectors();
const Int_t kDDL = AliDAQ::NumberOfDdls("TOF");
AliTOFrawData *tofRawDatum = (AliTOFrawData*)clonesRawData->UncheckedAt(iRawData);
- if (tofRawDatum->GetTOT()==-1 || tofRawDatum->GetTOF()==-1) continue;
+ //if (tofRawDatum->GetTOT()==-1 || tofRawDatum->GetTOF()==-1) continue;
+ if (tofRawDatum->GetTOF()==-1) continue;
if (fVerbose==2) {
if (indexDDL<10) ftxt << " " << indexDDL;
else ftxt << " " << detectorIndex[4];
}
+ // 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
+ inholes++;
+ continue;
+ }
+ }
+
parTOF[0] = tofRawDatum->GetTOF(); // TDC
parTOF[1] = tofRawDatum->GetTOT(); // TOT
parTOF[2] = tofRawDatum->GetTOT(); // raw data have ADC=TOT
AliDebug(1, Form("Execution time to read TOF raw data and to write TOF clusters : R:%.4fs C:%.4fs",
stopwatch.RealTime(),stopwatch.CpuTime()));
+ if (inholes) AliWarning(Form("Clusters in the TOF holes: %d",inholes));
}
//______________________________________________________________________________
AliTOFrawData *tofRawDatum = (AliTOFrawData*)clonesRawData->UncheckedAt(iRawData);
- if (!tofRawDatum->GetTOT() || !tofRawDatum->GetTOF()) continue;
+ //if (!tofRawDatum->GetTOT() || !tofRawDatum->GetTOF()) continue;
+ if (tofRawDatum->GetTOF()==-1) continue;
tofInput.EquipmentId2VolumeId(indexDDL, tofRawDatum->GetTRM(), tofRawDatum->GetTRMchain(),
tofRawDatum->GetTDC(), tofRawDatum->GetTDCchannel(), detectorIndex);
AliTOFrawData *tofRawDatum = (AliTOFrawData*)clonesRawData->UncheckedAt(iRawData);
- if (!tofRawDatum->GetTOT() || !tofRawDatum->GetTOF()) continue;
+ //if (!tofRawDatum->GetTOT() || !tofRawDatum->GetTOF()) continue;
+ if (tofRawDatum->GetTOF()==-1) continue;
tofInput.EquipmentId2VolumeId(indexDDL, tofRawDatum->GetTRM(), tofRawDatum->GetTRMchain(),
tofRawDatum->GetTDC(), tofRawDatum->GetTDCchannel(), detectorIndex);
GetClusterPars(detectorIndex,posClus,covClus);
new(lRecPoints[ii]) AliTOFcluster(volIdClus,posClus[0],posClus[1],posClus[2],covClus[0],covClus[1],covClus[2],covClus[3],covClus[4],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",
+ 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(),
+ 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));
+
} // loop on clusters
}
Int_t tdcCorr;
AliInfo(" Calibrating TOF Clusters: ")
- TObjArray *calTOFArrayOnline = fTOFcalib->GetTOFCalArrayOnline();
- TObjArray *calTOFArrayOnlinePulser = fTOFcalib->GetTOFCalArrayOnlinePulser();
- TObjArray *calTOFArrayOnlineNoise = fTOFcalib->GetTOFCalArrayOnlineNoise();
- TObjArray *calTOFArrayOnlineHW = fTOFcalib->GetTOFCalArrayOnlineHW();
+ AliTOFChannelOnlineArray *calDelay = fTOFcalib->GetTOFOnlineDelay();
+ AliTOFChannelOnlineStatusArray *calStatus = fTOFcalib->GetTOFOnlineStatus();
TObjArray *calTOFArrayOffline = fTOFcalib->GetTOFCalArrayOffline();
TString validity = (TString)fTOFcalib->GetOfflineValidity();
AliInfo(Form(" validity = %s",validity.Data()));
Int_t index = AliTOFGeometry::GetIndex(detectorIndex);
- AliTOFChannelOnlineStatus * calChannelOnlineStPulser = (AliTOFChannelOnlineStatus* )calTOFArrayOnlinePulser->At(index);
- AliTOFChannelOnlineStatus * calChannelOnlineStNoise = (AliTOFChannelOnlineStatus* )calTOFArrayOnlineNoise->At(index);
- AliTOFChannelOnlineStatus * calChannelOnlineStHW = (AliTOFChannelOnlineStatus* )calTOFArrayOnlineHW->At(index);
-
- // Get channel status
- UChar_t statusPulser=calChannelOnlineStPulser->GetStatus();
- UChar_t statusNoise=calChannelOnlineStNoise->GetStatus();
- UChar_t statusHW=calChannelOnlineStHW->GetStatus();
-
- //check the status, also unknow is fine!!!!!!!
-
- UChar_t status = 0x0;
- status |= statusPulser;
- status |= statusNoise;
- status |= statusHW;
- // set status of the cluster to false if at least one of the three status (Pulser/Noise/HW) is bad
- if((statusPulser & AliTOFChannelOnlineStatus::kTOFPulserBad)==(AliTOFChannelOnlineStatus::kTOFPulserBad)||(statusNoise & AliTOFChannelOnlineStatus::kTOFNoiseBad)==(AliTOFChannelOnlineStatus::kTOFNoiseBad)||(statusHW & AliTOFChannelOnlineStatus::kTOFHWBad)==(AliTOFChannelOnlineStatus::kTOFHWBad)){
+ UChar_t statusPulser=calStatus->GetPulserStatus(index);
+ UChar_t statusNoise=calStatus->GetNoiseStatus(index);
+ UChar_t statusHW=calStatus->GetHWStatus(index);
+ UChar_t status=calStatus->GetStatus(index);
+
+ //check the status, also unknown is fine!!!!!!!
+
+ AliDebug(2, Form(" Status for channel %i = %i",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));
fTofClusters[ii]->SetStatus(kFALSE); //odd convention, to avoid conflict with calibration objects currently in the db (temporary solution).
}
else {
AliDebug(2, Form(" Good Status for channel %i",index));
}
- // if((status & AliTOFChannelOnlineStatus::kTOFOnlineOk)!=(AliTOFChannelOnline::kTOFOnlineOk))fTofClusters[ii]->SetStatus(kFALSE); //odd convention, to avoid conflict with calibration objects currently in the db (temporary solution).
// Get Rough channel online equalization
- AliTOFChannelOnline * calChannelOnline = (AliTOFChannelOnline* )calTOFArrayOnline->At(index);
- Double_t roughDelay=(Double_t)calChannelOnline->GetDelay(); // in ns
+ Double_t roughDelay=(Double_t)calDelay->GetDelay(index); // in ns
AliDebug(2,Form(" channel delay (ns) = %f", roughDelay));
// Get Refined channel offline calibration parameters
if (calibration ==1){