fSubVersionExBUsed(0),
fNoExBUsedInReco(kFALSE),
fSwitchOnValidation(kTRUE),
+ fSwitchOnChamberStatus(kTRUE),
fVdriftValidated(kFALSE),
fExBValidated(kFALSE),
fT0Validated(kFALSE),
fOutliersFitChargeLow(0.03),
fOutliersFitChargeHigh(0.7),
fBeginFitCharge(3.5),
+ fT0Shift0(0.124797),
+ fT0Shift1(0.267451),
fPHQon(kTRUE),
fDebugPHQon(kFALSE)
{
CalibVdriftT0(file,startRunNumber,endRunNumber,ocdbStorage);
CalibGain(file,startRunNumber,endRunNumber,ocdbStorage);
- CalibChamberStatus(file,startRunNumber,endRunNumber,ocdbStorage);
+ if(fSwitchOnChamberStatus) CalibChamberStatus(file,startRunNumber,endRunNumber,ocdbStorage);
CalibExbAlt(file,startRunNumber,endRunNumber,ocdbStorage);
}
//
// 4. validate OCDB entries
//
- if(fSwitchOnValidation==kTRUE && ValidateChamberStatus()==kFALSE) {
- //AliError("TRD Chamber status OCDB parameters not ok!");
- return;
+ //printf("Enough stats for vdrift? %d\n",(Int_t)fNotEnoughStatisticsForTheVdriftLinear);
+ //printf("Enough stats for gain? %d\n",(Int_t)fNotEnoughStatisticsForTheGain);
+ if((!fNotEnoughStatisticsForTheVdriftLinear) && (!fNotEnoughStatisticsForTheGain)) {
+ if(fSwitchOnValidation==kTRUE && ValidateChamberStatus()==kFALSE) {
+ //AliError("TRD Chamber status OCDB parameters not ok!");
+ return;
+ }
+ //
+ // 5. update of OCDB
+ //
+ //
+ UpdateOCDBChamberStatus(startRunNumber,endRunNumber,ocdbStorage);
}
- //
- // 5. update of OCDB
- //
- //
- if((!fNotEnoughStatisticsForTheVdriftLinear) && (!fNotEnoughStatisticsForTheGain)) UpdateOCDBChamberStatus(startRunNumber,endRunNumber,ocdbStorage);
- //UpdateOCDBChamberStatus(startRunNumber,endRunNumber,ocdbStorage);
}
//______________________________________________________________________________________________________
//
if(fSparse) return kTRUE;
TFile fcalib(fileName);
- TObjArray * array = (TObjArray*)fcalib.Get(fNameList);
+ TList * array = (TList*)fcalib.Get(fNameList);
if (array){
fSparse = (THnSparseI *) array->FindObject("NumberOfEntries");
if(!fSparse) return kFALSE;
//
if(fCH2d) return kTRUE;
TFile fcalib(fileName);
- TObjArray * array = (TObjArray*)fcalib.Get(fNameList);
+ TList * array = (TList*)fcalib.Get(fNameList);
if (array){
TH2I *ch2d = (TH2I *) array->FindObject("CH2d");
- if(!ch2d) return kFALSE;
+ if(!ch2d) {
+ delete array;
+ return kFALSE;
+ }
fCH2d = (TH2I*)ch2d->Clone();
+ delete array;
//fNEvents = (TH1I *) array->FindObject("NEvents");
//fAbsoluteGain = (TH2F *) array->FindObject("AbsoluteGain");
}else{
//
if(fPH2d) return kTRUE;
TFile fcalib(fileName);
- TObjArray * array = (TObjArray*)fcalib.Get(fNameList);
+ TList * array = (TList*)fcalib.Get(fNameList);
if (array){
TProfile2D *ph2d = (TProfile2D *) array->FindObject("PH2d");
- if(!ph2d) return kFALSE;
+ if(!ph2d) {
+ delete array;
+ return kFALSE;
+ }
fPH2d = (TProfile2D*)ph2d->Clone();
//fNEvents = (TH1I *) array->FindObject("NEvents");
+ delete array;
}else{
TProfile2D *ph2d = (TProfile2D *) fcalib.Get("PH2d");
if(!ph2d) return kFALSE;
//
if(fAliTRDCalibraVdriftLinearFit) return kTRUE;
TFile fcalib(fileName);
- TObjArray * array = (TObjArray*)fcalib.Get(fNameList);
+ TList * array = (TList*)fcalib.Get(fNameList);
if (array){
- fAliTRDCalibraVdriftLinearFit = (AliTRDCalibraVdriftLinearFit *) array->FindObject("AliTRDCalibraVdriftLinearFit");
+ AliTRDCalibraVdriftLinearFit * dummy = (AliTRDCalibraVdriftLinearFit *) array->FindObject("AliTRDCalibraVdriftLinearFit");
+ fAliTRDCalibraVdriftLinearFit = dummy ? (AliTRDCalibraVdriftLinearFit *) dummy->Clone() : 0x0;
//fNEvents = (TH1I *) array->FindObject("NEvents");
+ delete array;
}else{
fAliTRDCalibraVdriftLinearFit = (AliTRDCalibraVdriftLinearFit *) fcalib.Get("AliTRDCalibraVdriftLinearFit");
//fNEvents = (TH1I *) fcalib.Get("NEvents");
//
if(fAliTRDCalibraExbAltFit) return kTRUE;
TFile fcalib(fileName);
- TObjArray * array = (TObjArray*)fcalib.Get(fNameList);
+ TList * array = (TList*)fcalib.Get(fNameList);
if (array){
- fAliTRDCalibraExbAltFit = (AliTRDCalibraExbAltFit *) array->FindObject("AliTRDCalibraExbAltFit");
+ AliTRDCalibraExbAltFit * dummy = (AliTRDCalibraExbAltFit *) array->FindObject("AliTRDCalibraExbAltFit");
+ fAliTRDCalibraExbAltFit = dummy ? (AliTRDCalibraExbAltFit *)dummy->Clone() : 0x0;
//fNEvents = (TH1I *) array->FindObject("NEvents");
+ delete array;
}else{
fAliTRDCalibraExbAltFit = (AliTRDCalibraExbAltFit *) fcalib.Get("AliTRDCalibraExbAltFit");
//fNEvents = (TH1I *) fcalib.Get("NEvents");
//
if(fPRF2d) return kTRUE;
TFile fcalib(fileName);
- TObjArray * array = (TObjArray*)fcalib.Get(fNameList);
+ TList * array = (TList*)fcalib.Get(fNameList);
if (array){
TProfile2D *prf2d = (TProfile2D *) array->FindObject("PRF2d");
- if(!prf2d) return kFALSE;
+ if(!prf2d) {
+ delete array;
+ return kFALSE;
+ }
fPRF2d = (TProfile2D*)prf2d->Clone();
+ delete array;
//fNEvents = (TH1I *) array->FindObject("NEvents");
}else{
TProfile2D *prf2d = (TProfile2D *) fcalib.Get("PRF2d");
//
AliTRDCalibraFit *calibra = AliTRDCalibraFit::Instance();
+ calibra->SetT0Shift0(fT0Shift0);
+ calibra->SetT0Shift1(fT0Shift1);
calibra->SetMinEntries(fMinStatsVdriftT0PH); // If there is less than 1000 entries in the histo: no fit
- calibra->AnalysePH(fPH2d);
+ calibra->AnalysePH(fPH2d);
+ //calibra->SetDebugLevel(2);
Int_t nbtg = 6*4*18*((Int_t) ((AliTRDCalibraMode *)calibra->GetCalibraMode())->GetDetChamb0(1))
+ 6* 18*((Int_t) ((AliTRDCalibraMode *)calibra->GetCalibraMode())->GetDetChamb2(1));
Bool_t ok = kFALSE;
if ((nbtg > 0) &&
(nbfit >= 0.5*nbE) && (nbE > 30) && (nbfitSuccess > 30)) {
+ //printf("nbtg %d, nbfit %d, nbE %d, nbfitSucess %d\n",nbtg,nbfit,nbE,nbfitSuccess);
//printf("Pass the cut for VdriftT0\n");
// create the cal objects
calibra->RemoveOutliers(1,kFALSE);
AliTRDCalibraFit *calibra = AliTRDCalibraFit::Instance();
calibra->SetCalDetVdriftExB(fCalDetVdriftUsed,fCalDetExBUsed);
calibra->SetMinEntries(fMinStatsVdriftLinear); // If there is less than 1000 entries in the histo: no fit
- printf("The mean stat is by %d for VdriftLinear\n",fMinStatsVdriftLinear);
+ //printf("The mean stat is by %d for VdriftLinear\n",fMinStatsVdriftLinear);
//fAliTRDCalibraVdriftLinearFit->SetSeeDetector(0);
//fAliTRDCalibraVdriftLinearFit->SetDebugLevel(1);
//printf("Fill PE Array\n");
Double_t rmsdet = calDet->GetRMSRobust();
Double_t meanpad = calPad->GetMean();
//Double_t rmspad = calPad->GetRMS();
- //printf("T0::minimum %f, rmsdet %f,meanpad %f, rmspad %f\n",meandet,rmsdet,meanpad,rmspad);
+ printf("T0::meandet %f, rmsdet %f,meanpad %f\n",meandet,rmsdet,meanpad);
if((meandet > fMinTimeOffsetValidate) && (meandet < 5.0) && (rmsdet < 4.0) && (meanpad < 5.0) && (meanpad > -0.5)) return kTRUE;
else {
fStatusPos = fStatusPos | kTimeOffsetErrorRange;