// Simulation: applied in the AliTPC::MakeSector - adding offset
// Reconstruction: AliTPCTransform::Transform() - remove offset
// AliTPCTransform::Transform() - to be called
-// in AliTPCtracker::Transform()
+// in AliTPCtrackerMI::Transform()
//
//
// 2.) Space points transformation:
{
//
// Singleton implementation
- // Returns an instance of this class, it is created if neccessary
+ // Returns an instance of this class, it is created if necessary
//
if (fgTerminated != kFALSE)
fTransform(0),
fExB(0),
fPadGainFactor(0),
+ fActiveChannelMap(0),
fDedxGainFactor(0),
fPadTime0(0),
fDistortionMap(0),
fCalibRaw(0),
fDataQA(0),
fALTROConfigData(0),
+ fIonTailArray(0),
fPulserData(0),
fCEData(0),
fTemperature(0),
fParam(0),
fClusterParam(0),
fTimeGainSplines(0),
- fTimeGainSplinesArray(100000),
- fGRPArray(100000), //! array of GRPs - per run - JUST for calibration studies
- fGRPMaps(100000), //! array of GRPs - per run - JUST for calibration studies
- fGoofieArray(100000), //! array of GOOFIE values -per run - Just for calibration studies
- fVoltageArray(100000),
- fTemperatureArray(100000), //! array of temperature sensors - per run - Just for calibration studies
- fVdriftArray(100000), //! array of v drift interfaces
- fDriftCorrectionArray(100000), //! array of drift correction
- fRunList(100000), //! run list - indicates try to get the run param
+ fTimeGainSplinesArray(1),
+ fGRPArray(1), //! array of GRPs - per run - JUST for calibration studies
+ fGRPMaps(1), //! array of GRPs - per run - JUST for calibration studies
+ fGoofieArray(1), //! array of GOOFIE values -per run - Just for calibration studies
+ fVoltageArray(1),
+ fTemperatureArray(1), //! array of temperature sensors - per run - Just for calibration studies
+ fVdriftArray(1), //! array of v drift interfaces
+ fDriftCorrectionArray(1), //! array of drift correction
+ fRunList(1), //! run list - indicates try to get the run param
fBHasAlignmentOCDB(kFALSE), // Flag - has the alignment on the composed correction ?
fDButil(0),
- fCTPTimeParams(0)
+ fCTPTimeParams(0),
+ fMode(-1)
{
//
// constructor
//
fgInstance=this;
Update(); // temporary
+ fTimeGainSplinesArray.SetOwner(); //own the keys
+ fGRPArray.SetOwner(); //own the keys
+ fGRPMaps.SetOwner(); //own the keys
+ fGoofieArray.SetOwner(); //own the keys
+ fVoltageArray.SetOwner(); //own the keys
+ fTemperatureArray.SetOwner(); //own the keys
+ fVdriftArray.SetOwner(); //own the keys
+ fDriftCorrectionArray.SetOwner(); //own the keys
}
AliTPCcalibDB::AliTPCcalibDB(const AliTPCcalibDB& ):
fTransform(0),
fExB(0),
fPadGainFactor(0),
+ fActiveChannelMap(0),
fDedxGainFactor(0),
fPadTime0(0),
fDistortionMap(0),
fCalibRaw(0),
fDataQA(0),
fALTROConfigData(0),
+ fIonTailArray(0),
fPulserData(0),
fCEData(0),
fTemperature(0),
fParam(0),
fClusterParam(0),
fTimeGainSplines(0),
- fTimeGainSplinesArray(100000),
+ fTimeGainSplinesArray(1),
fGRPArray(0), //! array of GRPs - per run - JUST for calibration studies
fGRPMaps(0), //! array of GRPs - per run - JUST for calibration studies
fGoofieArray(0), //! array of GOOFIE values -per run - Just for calibration studies
fRunList(0), //! run list - indicates try to get the run param
fBHasAlignmentOCDB(kFALSE), // Flag - has the alignment on the composed correction ?
fDButil(0),
- fCTPTimeParams(0)
+ fCTPTimeParams(0),
+ fMode(-1)
{
//
// Copy constructor invalid -- singleton implementation
//
Error("copy constructor","invalid -- singleton implementation");
+ fTimeGainSplinesArray.SetOwner(); //own the keys
+ fGRPArray.SetOwner(); //own the keys
+ fGRPMaps.SetOwner(); //own the keys
+ fGoofieArray.SetOwner(); //own the keys
+ fVoltageArray.SetOwner(); //own the keys
+ fTemperatureArray.SetOwner(); //own the keys
+ fVdriftArray.SetOwner(); //own the keys
+ fDriftCorrectionArray.SetOwner(); //own the keys
}
AliTPCcalibDB& AliTPCcalibDB::operator= (const AliTPCcalibDB& )
// destructor
//
+ delete fActiveChannelMap;
}
AliTPCCalPad* AliTPCcalibDB::GetDistortionMap(Int_t i) const {
//
AliCDBEntry* entry = AliCDBManager::Instance()->Get(cdbPath, fRun);
if (!entry)
{
- sprintf(chinfo,"AliTPCcalibDB: Failed to get entry:\t%s ", cdbPath);
+ snprintf(chinfo,1000,"AliTPCcalibDB: Failed to get entry:\t%s ", cdbPath);
AliError(chinfo);
return 0;
}
entry->SetOwner(kTRUE);
fPadGainFactor = (AliTPCCalPad*)entry->GetObject();
}else{
- AliFatal("TPC - Missing calibration entry TPC/Calib/PadGainFactor")
+ AliFatal("TPC - Missing calibration entry TPC/Calib/PadGainFactor");
}
//
entry = GetCDBEntry("TPC/Calib/TimeGain");
entry->SetOwner(kTRUE);
fTimeGainSplines = (TObjArray*)entry->GetObject();
}else{
- AliFatal("TPC - Missing calibration entry TPC/Calib/Timegain")
+ AliFatal("TPC - Missing calibration entry TPC/Calib/Timegain");
}
//
entry = GetCDBEntry("TPC/Calib/GainFactorDedx");
entry->SetOwner(kTRUE);
fDedxGainFactor = (AliTPCCalPad*)entry->GetObject();
}else{
- AliFatal("TPC - Missing calibration entry TPC/Calib/gainFactordEdx")
+ AliFatal("TPC - Missing calibration entry TPC/Calib/gainFactordEdx");
}
//
entry = GetCDBEntry("TPC/Calib/PadTime0");
entry->SetOwner(kTRUE);
fPadTime0 = (AliTPCCalPad*)entry->GetObject();
}else{
- AliFatal("TPC - Missing calibration entry")
+ AliFatal("TPC - Missing calibration entry");
}
entry = GetCDBEntry("TPC/Calib/Distortion");
entry->SetOwner(kTRUE);
fPadNoise = (AliTPCCalPad*)entry->GetObject();
}else{
- AliFatal("TPC - Missing calibration entry")
+ AliFatal("TPC - Missing calibration entry");
}
entry = GetCDBEntry("TPC/Calib/Pedestals");
if (entry){
//if (fPadNoise) delete fPadNoise;
entry->SetOwner(kTRUE);
- fParam = (AliTPCParam*)(entry->GetObject()->Clone());
+ fParam = (AliTPCParam*)(entry->GetObject());
}else{
- AliFatal("TPC - Missing calibration entry TPC/Calib/Parameters")
+ AliFatal("TPC - Missing calibration entry TPC/Calib/Parameters");
}
entry = GetCDBEntry("TPC/Calib/ClusterParam");
if (entry){
entry->SetOwner(kTRUE);
- fClusterParam = (AliTPCClusterParam*)(entry->GetObject()->Clone());
+ fClusterParam = (AliTPCClusterParam*)(entry->GetObject());
}else{
- AliFatal("TPC - Missing calibration entry")
+ AliFatal("TPC - Missing calibration entry");
}
//ALTRO configuration data
entry->SetOwner(kTRUE);
fALTROConfigData=(TObjArray*)(entry->GetObject());
}else{
- AliFatal("TPC - Missing calibration entry")
+ AliFatal("TPC - Missing calibration entry");
}
//Calibration Pulser data
fPulserData=(TObjArray*)(entry->GetObject());
}
+ //Calibration ION tail data
+ // entry = GetCDBEntry("TPC/Calib/IonTail");
+// if (entry){
+// entry->SetOwner(kTRUE);
+// fIonTailArray=(TObjArray*)(entry->GetObject());
+// }
+
+
//CE data
entry = GetCDBEntry("TPC/Calib/CE");
if (entry){
}
//RAW calibration data
// entry = GetCDBEntry("TPC/Calib/Raw");
-
+
entry = GetCDBEntry("TPC/Calib/Mapping");
if (entry){
//if (fPadNoise) delete fPadNoise;
//entry->SetOwner(kTRUE);
fCTPTimeParams=dynamic_cast<AliCTPTimeParams*>(entry->GetObject());
}else{
- AliError("TPC - Missing calibration entry")
+ AliError("TPC - Missing calibration entry");
}
//TPC space point correction data
entry = GetCDBEntry("TPC/Calib/Correction");
}
}
}else{
- AliError("TPC - Missing calibration entry- TPC/Calib/Correction")
- }
+ AliError("TPC - Missing calibration entry- TPC/Calib/Correction");
+ }
+ //RCU trigger config mode
+ fMode=GetRCUTriggerConfig();
//
if (!fTransform) {
fTransform=new AliTPCTransform();
fTransform->SetCurrentRun(AliCDBManager::Instance()->GetRun());
}
+ // Create Dead Channel Map
+ InitDeadMap();
+
//
AliCDBManager::Instance()->SetCacheFlag(cdbCache); // reset original CDB cache
}
fDataQA=dynamic_cast<AliTPCdataQA*>(entry->GetObject());
}
// High voltage
- if (fRun>=0){
+ if (fRun>=0 && !fVoltageArray.GetValue(Form("%i",fRun))){
entry = AliCDBManager::Instance()->Get("TPC/Calib/HighVoltage",fRun);
if (entry) {
- fVoltageArray.AddAt(entry->GetObject(),fRun);
+ fVoltageArray.Add(new TObjString(Form("%i",fRun)),entry->GetObject());
}
}
}
}
+Int_t AliTPCcalibDB::InitDeadMap() {
+ // Initialize DeadChannel Map
+ // Source of information:
+ // - HV < HVnominal -delta
+ // - Altro disabled channels. Noisy channels.
+ // - DDL list
+
+ // check necessary information
+ Int_t run=AliCDBManager::Instance()->GetRun();
+ if (run<0){
+ AliError("run not set in CDB manager. Cannot create active channel map");
+ return 0;
+ }
+ AliDCSSensorArray* voltageArray = AliTPCcalibDB::Instance()->GetVoltageSensors(run);
+ AliTPCCalPad* altroMap = GetALTROMasked();
+ TMap* mapddl = GetDDLMap();
+
+ if (!voltageArray && !altroMap && !mapddl) {
+ AliError("All necessary information to create the activate channel are map missing.");
+ return 0;
+ }
+
+ if (!fActiveChannelMap) fActiveChannelMap=new AliTPCCalPad("ActiveChannelMap","ActiveChannelMap");
+
+ //=============================================================
+ //get map of bad ROCs from VOLTAGE deviations
+ //
+ Bool_t badVoltage[AliTPCCalPad::kNsec]={kFALSE};
+ Double_t maxVdiff=100.;
+
+ if (voltageArray){
+ //1. get median of median of all chambers
+ Double_t chamberMedian[AliTPCCalPad::kNsec]={0.};
+ for (Int_t iROC=0;iROC<AliTPCCalPad::kNsec;++iROC){
+ TString sensorName="";
+ Char_t sideName='A';
+ if ((iROC/18)%2==1) sideName='C';
+ if (iROC<36) sensorName=Form("TPC_ANODE_I_%c%02d_VMEAS",sideName,iROC%18);
+ else sensorName=Form("TPC_ANODE_O_%c%02d_0_VMEAS",sideName,iROC%18);
+
+ AliDCSSensor *sensor = voltageArray->GetSensor(sensorName);
+ if (!sensor) continue;
+
+ chamberMedian[iROC]=0;
+ TGraph *gr=sensor->GetGraph();
+ AliSplineFit *fit=sensor->GetFit();
+ if ( gr && gr->GetN()>0 ){
+ chamberMedian[iROC]=TMath::Median(gr->GetN(),gr->GetY());
+ } else if (fit && fit->GetKnots()>0) {
+ chamberMedian[iROC]=TMath::Median(fit->GetKnots(), fit->GetY0());
+ }
+ }
+ Double_t medianIROC=TMath::Median( 36, chamberMedian );
+ Double_t medianOROC=TMath::Median( 36, chamberMedian+36 );
+
+ //2. check if 90% of the knots (points) are out of a given threshold
+ for (Int_t iROC=0;iROC<AliTPCCalPad::kNsec;++iROC){
+ badVoltage[iROC]=kFALSE;
+ TString sensorName="";
+ Char_t sideName='A';
+ Double_t median=medianIROC;
+ if ((iROC/18)%2==1) sideName='C';
+ if (iROC<36) sensorName=Form("TPC_ANODE_I_%c%02d_VMEAS",sideName,iROC%18);
+ else {sensorName=Form("TPC_ANODE_O_%c%02d_0_VMEAS",sideName,iROC%18); median=medianOROC; }
+
+ AliDCSSensor *sensor = voltageArray->GetSensor(sensorName);
+ if (!sensor) continue;
+
+ chamberMedian[iROC]=0;
+ TGraph *gr=sensor->GetGraph();
+ AliSplineFit *fit=sensor->GetFit();
+ Int_t nmax=1;
+ Int_t nout=0;
+ if ( gr && gr->GetN()>0 ){
+ nmax=gr->GetN();
+ for (Int_t i=0; i<gr->GetN(); ++i)
+ if ( TMath::Abs( gr->GetY()[i]-median ) > maxVdiff ) ++nout;
+ } else if (fit && fit->GetKnots()>0) {
+ nmax=fit->GetKnots();
+ for (Int_t i=0; i<fit->GetKnots(); ++i)
+ if ( TMath::Abs( fit->GetY0()[i]-median ) > maxVdiff ) ++nout;
+ }
+ if ( (Double_t)nout/(Double_t)nmax > 0.9 ) badVoltage[iROC]=kTRUE;
+ // printf("%d, %d, %d, %f\n",iROC, nout, nmax, median);
+ }
+
+ } else {
+ AliError("Voltage Array missing. ActiveChannelMap can only be created with parts of the information.");
+ }
+ // Voltage map is done
+ //=============================================================
+
+ //=============================================================
+ // Setup DDL map
+
+ Bool_t ddlMap[216]={0};
+ for (Int_t iddl=0; iddl<216; ++iddl) ddlMap[iddl]=1;
+ if (mapddl){
+ TObjString *s = (TObjString*)mapddl->GetValue("DDLArray");
+ if (s){
+ for (Int_t iddl=0; iddl<216; ++iddl) ddlMap[iddl]=TString(s->GetString()(iddl))!="0";
+ }
+ } else {
+ AliError("DDL map missing. ActiveChannelMap can only be created with parts of the information.");
+ }
+ // Setup DDL map done
+ // ============================================================
+
+ //=============================================================
+ // Setup active chnnel map
+ //
+ AliTPCmapper map(gSystem->ExpandPathName("$ALICE_ROOT/TPC/mapping/"));
+
+ if (!altroMap) AliError("ALTRO dead channel map missing. ActiveChannelMap can only be created with parts of the information.");
+
+ for (Int_t iROC=0;iROC<AliTPCCalPad::kNsec;++iROC){
+ AliTPCCalROC *roc=fActiveChannelMap->GetCalROC(iROC);
+ if (!roc){
+ AliError(Form("No ROC %d in active channel map",iROC));
+ continue;
+ }
+
+ // check for bad voltage
+ if (badVoltage[iROC]){
+ roc->Multiply(0.);
+ continue;
+ }
+
+ AliTPCCalROC *masked=0x0;
+ if (altroMap) masked=altroMap->GetCalROC(iROC);
+
+ for (UInt_t irow=0; irow<roc->GetNrows(); ++irow){
+ for (UInt_t ipad=0; ipad<roc->GetNPads(irow); ++ipad){
+ //per default the channel is on
+ roc->SetValue(irow,ipad,1);
+ // apply altro dead channel mask (inverse logik, it is not active, but inactive channles)
+ if (masked && masked->GetValue(irow, ipad)) roc->SetValue(irow, ipad ,0);
+ // mask channels if a DDL is inactive
+ Int_t ddlId=map.GetEquipmentID(iROC, irow, ipad)-768;
+ if (ddlId>=0 && !ddlMap[ddlId]) roc->SetValue(irow, ipad ,0);
+ }
+ }
+ }
+
+ return 1;
+}
void AliTPCcalibDB::MakeTree(const char * fileName, TObjArray * array, const char * mapFileName, AliTPCCalPad* outlierPad, Float_t ltmFraction) {
//
//
// return if the FEE readout was triggered on L0
//
- Int_t mode=GetRCUTriggerConfig();
- if (mode<0) return kFALSE;
- return (mode==1);
+ if (fMode<0) return kFALSE;
+ return (fMode==1);
}
Bool_t AliTPCcalibDB::IsTrgL1()
//
// return if the FEE readout was triggered on L1
//
- Int_t mode=GetRCUTriggerConfig();
- if (mode<0) return kFALSE;
- return (mode==0);
+ if (fMode<0) return kFALSE;
+ return (fMode==0);
}
void AliTPCcalibDB::RegisterExB(Int_t index, Float_t bz, Bool_t bdelete){
-
-
void AliTPCcalibDB::UpdateRunInformations( Int_t run, Bool_t force){
//
// - > Don't use it for reconstruction - Only for Calibration studies
//
if (run<=0) return;
+ TObjString runstr(Form("%i",run));
fRun=run;
AliCDBEntry * entry = 0;
if (run>= fRunList.fN){
fRunList.Set(run*2+1);
- fGRPArray.Expand(run*2+1);
- fGRPMaps.Expand(run*2+1);
- fGoofieArray.Expand(run*2+1);
- fVoltageArray.Expand(run*2+1);
- fTemperatureArray.Expand(run*2+1);
- fVdriftArray.Expand(run*2+1);
- fDriftCorrectionArray.Expand(run*2+1);
- fTimeGainSplinesArray.Expand(run*2+1);
//
//
fALTROConfigData->Expand(run*2+1); // ALTRO configuration data
//grpRun->ReadValuesFromMap(map);
grpRun = MakeGRPObjectFromMap(map);
- fGRPMaps.AddAt(map,run);
+ fGRPMaps.Add(new TObjString(runstr),map);
}
}
- fGRPArray.AddAt(grpRun,run);
+ fGRPArray.Add(new TObjString(runstr),grpRun);
}
entry = AliCDBManager::Instance()->Get("TPC/Calib/Goofie",run);
if (entry){
- fGoofieArray.AddAt(entry->GetObject(),run);
+ fGoofieArray.Add(new TObjString(runstr),entry->GetObject());
}
//
//
entry = AliCDBManager::Instance()->Get("TPC/Calib/TimeGain",run);
if (entry) {
- fTimeGainSplinesArray.AddAt(entry->GetObject(),run);
+ fTimeGainSplinesArray.Add(new TObjString(runstr),entry->GetObject());
}else{
- AliFatal("TPC - Missing calibration entry TimeGain")
+ AliFatal("TPC - Missing calibration entry TimeGain");
}
//
entry = AliCDBManager::Instance()->Get("TPC/Calib/TimeDrift",run);
if (entry) {
TObjArray * timeArray = (TObjArray*)entry->GetObject();
- fDriftCorrectionArray.AddAt(entry->GetObject(),run);
+ fDriftCorrectionArray.Add(new TObjString(runstr),entry->GetObject());
AliTPCCorrection * correctionTime = (AliTPCCorrection *)timeArray->FindObject("FitCorrectionTime");
if (correctionTime && fComposedCorrectionArray){
correctionTime->Init();
+ if (fComposedCorrectionArray->GetEntriesFast()<4) fComposedCorrectionArray->Expand(40);
fComposedCorrectionArray->AddAt(correctionTime,4); //add time dependent correction to the list of available corrections
}
}else{
- AliFatal("TPC - Missing calibration entry TimeDrift")
+ AliFatal("TPC - Missing calibration entry TimeDrift");
}
//
entry = AliCDBManager::Instance()->Get("TPC/Calib/Temperature",run);
if (entry) {
- fTemperatureArray.AddAt(entry->GetObject(),run);
+ fTemperatureArray.Add(new TObjString(runstr),entry->GetObject());
+ }
+
+ // High voltage
+ entry = AliCDBManager::Instance()->Get("TPC/Calib/HighVoltage",run);
+ if (!fVoltageArray.GetValue(runstr.GetName()) && entry) {
+ fVoltageArray.Add(new TObjString(runstr),entry->GetObject());
}
+
//apply fDButil filters
fDButil->UpdateFromCalibDB();
if (press && temp &&accept){
AliTPCCalibVdrift * vdrift = new AliTPCCalibVdrift(temp, press,0);
- fVdriftArray.AddAt(vdrift,run);
+ fVdriftArray.Add(new TObjString(runstr),vdrift);
}
fDButil->FilterCE(120., 3., 4.,0);
//
// Get GRP object for given run
//
- if (run>= ((Instance()->fGRPArray)).GetEntriesFast()){
- Instance()->UpdateRunInformations(run);
- }
- AliGRPObject * grpRun = dynamic_cast<AliGRPObject *>((Instance()->fGRPArray).At(run));
+ AliGRPObject * grpRun = dynamic_cast<AliGRPObject *>((Instance()->fGRPArray).GetValue(Form("%i",run)));
if (!grpRun) {
Instance()->UpdateRunInformations(run);
- grpRun = dynamic_cast<AliGRPObject *>(Instance()->fGRPArray.At(run));
+ grpRun = dynamic_cast<AliGRPObject *>(Instance()->fGRPArray.GetValue(Form("%i",run)));
if (!grpRun) return 0;
}
return grpRun;
//
// Get GRP map for given run
//
- TMap * grpRun = dynamic_cast<TMap *>((Instance()->fGRPMaps).At(run));
+ TMap * grpRun = dynamic_cast<TMap *>((Instance()->fGRPMaps).GetValue(Form("%i",run)));
if (!grpRun) {
Instance()->UpdateRunInformations(run);
- grpRun = dynamic_cast<TMap *>(Instance()->fGRPMaps.At(run));
+ grpRun = dynamic_cast<TMap *>(Instance()->fGRPMaps.GetValue(Form("%i",run)));
if (!grpRun) return 0;
}
return grpRun;
//
// If not map try to get it from the GRPObject
//
- AliGRPObject * grpRun = dynamic_cast<AliGRPObject *>(fGRPArray.At(run));
+ AliGRPObject * grpRun = dynamic_cast<AliGRPObject *>(fGRPArray.GetValue(Form("%i",run)));
if (!grpRun) {
UpdateRunInformations(run);
- grpRun = dynamic_cast<AliGRPObject *>(fGRPArray.At(run));
+ grpRun = dynamic_cast<AliGRPObject *>(fGRPArray.GetValue(Form("%i",run)));
if (!grpRun) return 0;
}
AliDCSSensor * sensor = grpRun->GetCavernAtmosPressure();
//
// Get temperature sensor array
//
- AliTPCSensorTempArray * tempArray = (AliTPCSensorTempArray *)fTemperatureArray.At(run);
+ AliTPCSensorTempArray * tempArray = (AliTPCSensorTempArray *)fTemperatureArray.GetValue(Form("%i",run));
if (!tempArray) {
UpdateRunInformations(run);
- tempArray = (AliTPCSensorTempArray *)fTemperatureArray.At(run);
+ tempArray = (AliTPCSensorTempArray *)fTemperatureArray.GetValue(Form("%i",run));
}
return tempArray;
}
//
// Get temperature sensor array
//
- TObjArray * gainSplines = (TObjArray *)fTimeGainSplinesArray.At(run);
+ TObjArray * gainSplines = (TObjArray *)fTimeGainSplinesArray.GetValue(Form("%i",run));
if (!gainSplines) {
UpdateRunInformations(run);
- gainSplines = (TObjArray *)fTimeGainSplinesArray.At(run);
+ gainSplines = (TObjArray *)fTimeGainSplinesArray.GetValue(Form("%i",run));
}
return gainSplines;
}
//
// Get drift spline array
//
- TObjArray * driftSplines = (TObjArray *)fDriftCorrectionArray.At(run);
+ TObjArray * driftSplines = (TObjArray *)fDriftCorrectionArray.GetValue(Form("%i",run));
if (!driftSplines) {
UpdateRunInformations(run);
- driftSplines = (TObjArray *)fDriftCorrectionArray.At(run);
+ driftSplines = (TObjArray *)fDriftCorrectionArray.GetValue(Form("%i",run));
}
return driftSplines;
}
//
// Get temperature sensor array
//
- AliDCSSensorArray * voltageArray = (AliDCSSensorArray *)fVoltageArray.At(run);
+ AliDCSSensorArray * voltageArray = (AliDCSSensorArray *)fVoltageArray.GetValue(Form("%i",run));
if (!voltageArray) {
UpdateRunInformations(run);
- voltageArray = (AliDCSSensorArray *)fVoltageArray.At(run);
+ voltageArray = (AliDCSSensorArray *)fVoltageArray.GetValue(Form("%i",run));
}
return voltageArray;
}
//
// Get temperature sensor array
//
- AliDCSSensorArray * goofieArray = (AliDCSSensorArray *)fGoofieArray.At(run);
+ AliDCSSensorArray * goofieArray = (AliDCSSensorArray *)fGoofieArray.GetValue(Form("%i",run));
if (!goofieArray) {
UpdateRunInformations(run);
- goofieArray = (AliDCSSensorArray *)fGoofieArray.At(run);
+ goofieArray = (AliDCSSensorArray *)fGoofieArray.GetValue(Form("%i",run));
}
return goofieArray;
}
//
// Get the interface to the the vdrift
//
- if (run>=fVdriftArray.GetEntriesFast()) UpdateRunInformations(run);
- AliTPCCalibVdrift * vdrift = (AliTPCCalibVdrift*)fVdriftArray.At(run);
+ AliTPCCalibVdrift * vdrift = (AliTPCCalibVdrift*)fVdriftArray.GetValue(Form("%i",run));
if (!vdrift) {
UpdateRunInformations(run);
- vdrift= (AliTPCCalibVdrift*)fVdriftArray.At(run);
+ vdrift= (AliTPCCalibVdrift*)fVdriftArray.GetValue(Form("%i",run));
}
return vdrift;
}
if (sector<36){
//IROC
sensorName=Form("TPC_ANODE_I_%c%02d_IMEAS",sideName,sector%18);
- }else{
+ }else{
//OROC
sensorName=Form("TPC_ANODE_O_%c%02d_0_IMEAS",sideName,sector%18);
}
-
+
}
if (timeStamp==-1){
val=AliTPCcalibDB::GetDCSSensorMeanValue(voltageArray, sensorName.Data(),sigDigits);
//
TString file(filename);
- if (file.IsNull()) file=Form("guiTreeRun_%lld.root",fRun);
+ if (file.IsNull()) file=Form("guiTreeRun_%i.root",fRun);
prep.DumpToFile(file.Data());
return kTRUE;
}
// use TPC-ITS if present
TGraphErrors *gr= (TGraphErrors*)array->FindObject("ALIGN_ITSB_TPC_VDGY");
+ if (!gr) gr = (TGraphErrors*)array->FindObject("ALIGN_TOFB_TPC_VDGY");
if(gr) {
result = AliTPCcalibDButil::EvalGraphConst(gr,timeStamp);
TFile *fileMapping = new TFile(nameMappingFile, "read");
AliTPCmapper *mapping = (AliTPCmapper*) fileMapping->Get("tpcMapping");
if (!mapping) {
- sprintf(chinfo,"Failed to get mapping object from %s. ...\n", nameMappingFile);
+ snprintf(chinfo,1000,"Failed to get mapping object from %s. ...\n", nameMappingFile);
AliError (chinfo);
return 0;
}
Double_t active;
for (Int_t i=0; i<mapping->GetNumDdl(); i++) {
idDDL= i+offset;
+ if (idDDL<0) continue;
Int_t patch = mapping->GetPatchFromEquipmentID(idDDL);
+ if (patch<0) continue;
Int_t roc=mapping->GetRocFromEquipmentID(idDDL);
+ if (roc<0) continue;
AliTPCCalROC *calRoc=deadMap->GetCalROC(roc);
if (calRoc) {
for ( Int_t branch = 0; branch < 2; branch++ ) {
// Delta is time dependent - taken form the CalibTime OCDB entry
//
if (!fComposedCorrectionArray) return 0;
+ if (fRun<0) return 0;
+ if (fDriftCorrectionArray.GetValue(Form("%i",fRun))==0) return 0;
+ if (fComposedCorrectionArray->GetEntriesFast()<=4) {
+ fComposedCorrectionArray->Expand(5);
+ TObjArray * timeArray =(TObjArray*)(fDriftCorrectionArray.GetValue(Form("%i",fRun)));
+ AliTPCCorrection * correctionTime = (AliTPCCorrection *)timeArray->FindObject("FitCorrectionTime");
+ if (correctionTime){
+ correctionTime->Init();
+ fComposedCorrectionArray->AddAt(correctionTime,4); //add time dependent c
+ }
+ }
return (AliTPCCorrection *)fComposedCorrectionArray->At(4); //
}