// //
// 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:
+// 0.) Altro mapping
+// Simulation - not yet
+// Reconstruction - AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader)
+//
+// 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 charge (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()
+//
+//
+// 2.) Space points transformation:
+//
+// a.) General coordinate tranformation - AliTPCtransform (see $ALICE_ROOT/TPC/AliTPCtransform.cxx)
+// Created on fly - use the other calibration components
+// Unisochronity - (substract time0 - pad by pad)
+// Drift velocity - Currently common drift velocity - functionality of AliTPCParam
+// ExB effect
+// Simulation - Not used directly (the effects are applied one by one (see AliTPC::MakeSector)
+// Reconstruction -
+// AliTPCclustererMI::AddCluster
+// AliTPCtrackerMI::Transform
+// b.) ExB effect calibration -
+// classes (base class AliTPCExB, implementation- AliTPCExBExact.h AliTPCExBFirst.h)
+// a.a) Simulation: applied in the AliTPC::MakeSector -
+// calib->GetExB()->CorrectInverse(dxyz0,dxyz1);
+// a.b) Reconstruction -
+//
+// in AliTPCtransform::Correct() - called calib->GetExB()->Correct(dxyz0,dxyz1)
+//
+// 3.) cluster error, shape and Q parameterization
+//
+//
+//
///////////////////////////////////////////////////////////////////////////////
+#include <iostream>
+#include <fstream>
+
#include <AliCDBManager.h>
-#include <AliCDBStorage.h>
#include <AliCDBEntry.h>
#include <AliLog.h>
#include "AliTPCcalibDB.h"
+#include "AliTPCAltroMapping.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():
+ TObject(),
fRun(-1),
+ fTransform(0),
+ fExB(0),
fPadGainFactor(0),
fPadTime0(0),
- fPadPRFWidth(0),
fPadNoise(0),
fPedestals(0),
fTemperature(0),
- fPressure(0),
- fParam(0)
-
+ fMapping(0),
+ fParam(0),
+ fClusterParam(0)
{
//
// constructor
Update(); // temporary
}
+AliTPCcalibDB::AliTPCcalibDB(const AliTPCcalibDB& ):
+ TObject(),
+ fRun(-1),
+ fTransform(0),
+ fExB(0),
+ fPadGainFactor(0),
+ fPadTime0(0),
+ fPadNoise(0),
+ fPedestals(0),
+ fTemperature(0),
+ fMapping(0),
+ fParam(0),
+ fClusterParam(0)
+
+{
+ //
+ // Copy constructor invalid -- singleton implementation
+ //
+ Error("copy constructor","invalid -- singleton implementation");
+}
+
+AliTPCcalibDB& AliTPCcalibDB::operator= (const AliTPCcalibDB& )
+{
+//
+// Singleton implementation - no assignment operator
+//
+ Error("operator =", "assignment operator not implemented");
+ return *this;
+}
+
+
+
//_____________________________________________________________________________
AliTPCcalibDB::~AliTPCcalibDB()
{
// 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");
+ entry = GetCDBEntry("TPC/Calib/Parameters");
if (entry){
- //if (fPressure) delete fPressure;
+ //if (fPadNoise) delete fPadNoise;
entry->SetOwner(kTRUE);
- fPressure = (AliDCSSensorArray*)entry->GetObject();
+ fParam = (AliTPCParam*)(entry->GetObject()->Clone());
}
+ entry = GetCDBEntry("TPC/Calib/ClusterParam");
+ if (entry){
+ //if (fPadNoise) delete fPadNoise;
+ entry->SetOwner(kTRUE);
+ fClusterParam = (AliTPCClusterParam*)(entry->GetObject()->Clone());
+ }
- entry = GetCDBEntry("TPC/Calib/Parameters");
+ entry = GetCDBEntry("TPC/Calib/Mapping");
if (entry){
//if (fPadNoise) delete fPadNoise;
entry->SetOwner(kTRUE);
- fParam = (AliTPCParam*)(entry->GetObject()->Clone());
+ TObjArray * array = dynamic_cast<TObjArray*>(entry->GetObject());
+ if (array && array->GetEntriesFast()==6){
+ fMapping = new AliTPCAltroMapping*[6];
+ for (Int_t i=0; i<6; i++){
+ fMapping[i] = dynamic_cast<AliTPCAltroMapping*>(array->At(i));
+ }
+ }
}
+
+ entry = GetCDBEntry("TPC/Calib/ExB");
+ if (entry) {
+ entry->SetOwner(kTRUE);
+ fExB=dynamic_cast<AliTPCExB*>(entry->GetObject()->Clone());
+ }
+
+ if (!fTransform) {
+ fTransform=new AliTPCTransform();
+ }
+
//
AliCDBManager::Instance()->SetCacheFlag(cdbCache); // reset original CDB cache
}
-AliTPCcalibDB::AliTPCcalibDB(const AliTPCcalibDB& org)
-{
- //
- // Copy constructor invalid -- singleton implementation
- //
- Error("copy constructor","invalid -- singleton implementation");
-}
-
-AliTPCcalibDB& AliTPCcalibDB::operator= (const AliTPCcalibDB& rhs)
-{
-//
-// Singleton implementation - no assignment operator
-//
- Error("operator =", "assignment operator not implemented");
- return *this;
-}
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);
TIter nextLine(arrFileLine);
TObjString *sObjLine=0x0;
- while ( sObjLine = (TObjString*)nextLine() ){
+ while ( (sObjLine = (TObjString*)nextLine()) ){
TString sLine(sObjLine->GetString());
TObjArray *arrNextCol = sLine.Tokenize("\t");
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++) {
delete[] mapNames;
}
}
-