// //
// Request an instance with AliTPCcalibDB::Instance() //
// If a new event is processed set the event number with SetRun //
-// Then request the calibration data //
-// //
+// Then request the calibration data ////
+
+//
+//
+// Calibration data:
+// 1.) pad by pad calibration - AliTPCCalPad
+//
+// a.) fPadGainFactor
+// Simulation: AliTPCDigitizer::ExecFast - Multiply by gain
+// Reconstruction : AliTPCclustererMI::Digits2Clusters - Divide by gain
+//
+// b.) fPadNoise -
+// Simulation: AliTPCDigitizer::ExecFast
+// Reconstruction: AliTPCclustererMI::FindClusters(AliTPCCalROC * noiseROC)
+// Noise depending cut on clusters (n sigma)
+// c.) fPedestal:
+// Simulation: Not used yet - To be impleneted - Rounding to the nearest integer
+// Reconstruction: Used in AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader)
+// if data taken without zero suppression
+// Currently switch in fRecoParam->GetCalcPedestal();
+//
+// d.) fPadTime0
+// Simulation: applied in the AliTPC::MakeSector - adding offset
+// Reconstruction: AliTPCTransform::Transform() - remove offset
+// AliTPCTransform::Transform() - to be called
+// in AliTPCtracker::Transform()
///////////////////////////////////////////////////////////////////////////////
+#include <iostream>
+#include <fstream>
+
#include <AliCDBManager.h>
-#include <AliCDBStorage.h>
#include <AliCDBEntry.h>
#include <AliLog.h>
#include "AliTPCcalibDB.h"
+#include "AliTPCExB.h"
#include "AliTPCCalROC.h"
#include "AliTPCCalPad.h"
-#include "AliTPCCalDet.h"
#include "AliTPCSensorTempArray.h"
+#include "AliTPCTransform.h"
+class AliCDBStorage;
+class AliTPCCalDet;
//
//
-#include <iostream>
-#include <fstream>
#include "TFile.h"
#include "TKey.h"
//_____________________________________________________________________________
AliTPCcalibDB::AliTPCcalibDB():
fRun(-1),
+ fTransform(0),
fExB(0),
fPadGainFactor(0),
fPadTime0(0),
- fPadPRFWidth(0),
fPadNoise(0),
fPedestals(0),
fTemperature(0),
- fPressure(0),
- fParam(0),
- fTrafo(0)
+ fParam(0)
{
//
// constructor
// don't delete anything, CDB cache is active!
//if (fPadGainFactor) delete fPadGainFactor;
//if (fPadTime0) delete fPadTime0;
- //if (fPadPRFWidth) delete fPadPRFWidth;
//if (fPadNoise) delete fPadNoise;
}
fPadTime0 = (AliTPCCalPad*)entry->GetObject();
}
//
- entry = GetCDBEntry("TPC/Calib/PadPRF");
- if (entry){
- //if (fPadPRFWidth) delete fPadPRFWidth;
- entry->SetOwner(kTRUE);
- fPadPRFWidth = (AliTPCCalPad*)entry->GetObject();
- }
//
entry = GetCDBEntry("TPC/Calib/PadNoise");
if (entry){
fTemperature = (AliTPCSensorTempArray*)entry->GetObject();
}
- entry = GetCDBEntry("TPC/Calib/Pressure");
- if (entry){
- //if (fPressure) delete fPressure;
- entry->SetOwner(kTRUE);
- fPressure = (AliDCSSensorArray*)entry->GetObject();
- }
-
entry = GetCDBEntry("TPC/Calib/Parameters");
if (entry){
//if (fPadNoise) delete fPadNoise;
fExB=dynamic_cast<AliTPCExB*>(entry->GetObject()->Clone());
}
- delete fTrafo;
- fTrafo=new AliTPCTransform();
+ if (!fTransform) {
+ fTransform=new AliTPCTransform();
+ }
//
AliCDBManager::Instance()->SetCacheFlag(cdbCache); // reset original CDB cache
void AliTPCcalibDB::CreateObjectList(const Char_t *filename, TObjArray *calibObjects)
{
+//
+// Create calibration objects and read contents from OCDB
+//
if ( calibObjects == 0x0 ) return;
ifstream in;
in.open(filename);
void AliTPCcalibDB::MakeTree(const char * fileName, TObjArray * array, const char * mapFileName, AliTPCCalPad* outlierPad, Float_t ltmFraction) {
//
// Write a tree with all available information
- // im mapFileName is speciefied, the Map information are also written to the tree
+ // if mapFileName is specified, the Map information are also written to the tree
// pads specified in outlierPad are not used for calculating statistics
// - the same function as AliTPCCalPad::MakeTree -
//
mapNames = new TString[mapEntries];
for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
- TString ROCname(((TKey*)(listOfROCs->At(ivalue*2)))->GetName());
- ROCname.Remove(ROCname.Length()-4, 4);
- mapIROCs->AddAt((AliTPCCalROC*)mapFile.Get((ROCname + "IROC").Data()), ivalue);
- mapOROCs->AddAt((AliTPCCalROC*)mapFile.Get((ROCname + "OROC").Data()), ivalue);
- mapNames[ivalue].Append(ROCname);
+ TString nameROC(((TKey*)(listOfROCs->At(ivalue*2)))->GetName());
+ nameROC.Remove(nameROC.Length()-4, 4);
+ mapIROCs->AddAt((AliTPCCalROC*)mapFile.Get((nameROC + "IROC").Data()), ivalue);
+ mapOROCs->AddAt((AliTPCCalROC*)mapFile.Get((nameROC + "OROC").Data()), ivalue);
+ mapNames[ivalue].Append(nameROC);
}
for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {