//
TTreeSRedirector * cstream = fDebugStreamer;
if (!cstream) return;
+ if (!fESD) return;
Int_t ntracks0 =fESD->GetNumberOfTracks();
Int_t ntracks = (fTracksAcorde) ? fTracksAcorde->GetEntries():0;
Float_t mag = fESD->GetMagneticField();
fResHistoTPCvertex[i]=0;
}
- if (fTPCVertex) {
+ if (fTPCVertex[0]) {
for (Int_t i=0;i<12;i++) delete fTPCVertex[i];
}
- if (fTPCVertexCorrelation) {
+ if (fTPCVertexCorrelation[0]) {
for (Int_t i=0;i<5;i++) delete fTPCVertexCorrelation[i];
}
THnSparse* newHist=new THnSparseF(newName,"HistVdrift;time;p/T ratio;Vdrift;run",4,fBinsVdrift,fXminVdrift,fXmaxVdrift);
THnSparse* addHist=NULL;
while((addHist=(THnSparseF*)iterator->Next())){
- if(!addHist) continue;
+ // if(!addHist) continue;
TString histName=addHist->GetName();
if(!histName.Contains(newName)) continue;
addHist->Print();
}
}
- if (fTPCVertex && cal->fTPCVertex)
+ if (fTPCVertex[0] && cal->fTPCVertex[0])
for (Int_t imeas=0; imeas<12; imeas++){
if (fTPCVertex[imeas] && cal->fTPCVertex[imeas]) fTPCVertex[imeas]->Add(cal->fTPCVertex[imeas]);
}
iterator->Reset();
THnSparse* addHist=NULL;
if ((fMemoryMode>1)) while((addHist=(THnSparseF*)iterator->Next())){
- if(!addHist) continue;
+ // if(!addHist) continue;
addHist->Print();
THnSparse* localHist=(THnSparseF*)fArrayDz->FindObject(addHist->GetName());
if(!localHist){
//
fTotalTracks = 0;
fAcceptedTracks = 0;
- // this will be gone for the a new ROOT version > v5-17-05
- for (UInt_t i = 0; i < 36; i++) {
- fNShortClusters[i] = 0;
- fNMediumClusters[i] = 0;
- fNLongClusters[i] = 0;
- }
}
AliTPCcalibTracksGain::~AliTPCcalibTracksGain() {
if (cal->fDFitter1T->GetNpoints()>0) fDFitter1T->Add(cal->fDFitter1T);
if (cal->fDFitter2T->GetNpoints()>0) fDFitter2T->Add(cal->fDFitter2T);
//
- // this will be gone for the a new ROOT version > v5-17-05
- for (UInt_t iSegment = 0; iSegment < 36; iSegment++) {
- fNShortClusters[iSegment] += cal->fNShortClusters[iSegment];
- fNMediumClusters[iSegment] += cal->fNMediumClusters[iSegment];
- fNLongClusters[iSegment] += cal->fNLongClusters[iSegment];
- }
// just for debugging, remove me
fTotalTracks += cal->fTotalTracks;
fitter=fSingleSectorFitter->GetFitter(0, padType);
fitter->AddPoint(xx, q);
- // this will be gone for the a new ROOT version > v5-17-05
- if (padType == kShortPads)
- fNShortClusters[segment]++;
- if (padType == kMediumPads)
- fNMediumClusters[segment]++;
- if (padType == kLongPads)
- fNLongClusters[segment]++;
}
void AliTPCcalibTracksGain::Evaluate(Bool_t robust, Double_t frac) {
//
GetFitter(segment, padType, fitType)->GetErrors(fitError);
- fitError *= TMath::Sqrt(GetRedChi2(segment, padType, fitType));
+ //fitError *= TMath::Sqrt(GetRedChi2(segment, padType, fitType));
}
-Double_t AliTPCcalibTracksGain::GetRedChi2(UInt_t segment, UInt_t padType, UInt_t fitType) {
- //
- // Returns the reduced chi^2 value for the specified segment, padType and fitType.
- // padType is one of kShortPads, kMediumPads, kLongPads. fitType is one of kSimpleFitter, kSqrtFitter, kLogFitter.
- // Note: The fitter has to be evaluated first!
- //
-
- // this will be gone for the a new ROOT version > v5-17-05
- Int_t lNClusters = 0;
- switch (padType) {
- case kShortPads:
- lNClusters = fNShortClusters[segment];
- break;
- case kMediumPads:
- lNClusters = fNMediumClusters[segment];
- break;
- case kLongPads:
- lNClusters = fNLongClusters[segment];
- break;
- }
- return GetFitter(segment, padType, fitType)->GetChisquare()/(lNClusters - 8);
-}
void AliTPCcalibTracksGain::GetCovarianceMatrix(UInt_t segment, UInt_t padType, UInt_t fitType, TMatrixD& covMatrix) {
//
void Evaluate(Bool_t robust = kFALSE, Double_t frac = -1.);
Bool_t GetParameters(UInt_t segment, UInt_t padType, UInt_t fitType, TVectorD &fitParam);
void GetErrors(UInt_t segment, UInt_t padType, UInt_t fitType, TVectorD &fitError);
- Double_t GetRedChi2(UInt_t segment, UInt_t padType, UInt_t fitType);
void GetCovarianceMatrix(UInt_t segment, UInt_t padType, UInt_t fitType, TMatrixD& covMatrix);
//
//
//
UInt_t fTotalTracks; // just for debugging
UInt_t fAcceptedTracks; // just for debugging
- UInt_t fNShortClusters[36]; // number of clusters registered on short pads
- UInt_t fNMediumClusters[36]; // number of clusters registered on medium pads
- UInt_t fNLongClusters[36]; // number of clusters registered on long pads
//
//
//
// Krypton cluster finder for the TPC raw data\r
// this method is unsing AliAltroRawStreamV3\r
// fParam must be defined before\r
- \r
- if(rawReader)fRawData=kTRUE; //set flag to data\r
+ if (!rawReader) return 1;\r
+ //\r
+ fRawData=kTRUE; //set flag to data\r
\r
if (!fOutput) {\r
Error("Digits2Clusters", "output tree not initialised");\r
TCut cutSector=Form("(sector%%36)==%d",isec);
strFitLX = TStatToolkit::FitPlane(chain,"deltaT-CEG.fElements-CELX.fElements", fstringL.Data(),cutSector+cutAll+"abs(deltaT-CEG.fElements-CELX.fElements)<0.4", chi2,npoints,vecL[isec],covar,-1,0, 10000000, kFALSE);
printf("sec=%d\tchi2=%f\n",isec,TMath::Sqrt(chi2/npoints));
+ delete strFitLX;
//
TString fitL=Form("((sector%%36)==%d)++((sector%%36)==%d)*(sector<36)++((sector%%36)==%d)*(lx-133)/100.++((sector%%36)==%d)*(sector<36)*(lx-133)/100.++((sector%%36)==%d)*(ly)/100.++((sector%%36)==%d)*(sector<36)*(ly)/100.",isec,isec,isec,isec,isec,isec);
if (isec<18) padFitTmpCE=AliTPCCalPad::CreateCalPadFit(fitL.Data(),vecL[isec],dummy);
fClusters2(0),
fN2(0),
fN(0),
- fX(0.)
+ fClusters(),
+ fIndex(),
+ fX(0.)
{
//
// default constructor
//
// Set cluster info for fast navigation
//
- if (i>510|| i<0){
+ if (i>=510|| i<0){
}else{
fFastCluster[i]=cl;
}
for (Int_t i=0; i<array->GetEntries(); i+=2){
char fname[1000];
if (!isZip){
- sprintf(fname, "%s/%s",dirname,array->At(i)->GetName());
+ snprintf(fname,1000, "%s/%s",dirname,array->At(i)->GetName());
if (((TObjString*)array->At(i))->String().Contains("*")){
- sprintf(fname, "%s", currentFile.Data());
+ snprintf(fname,1000, "%s", currentFile.Data());
}
}
if (isZip) {
const char * fileName = gSystem->BaseName(currentFile.Data());
TString fstring=fileName;
fstring[fstring.First("#")]=0;
- sprintf(fname, "%s/%s#%s",dirname,fstring.Data(),array->At(i)->GetName());
+ snprintf(fname,1000, "%s/%s#%s",dirname,fstring.Data(),array->At(i)->GetName());
printf(fname, "To check %s%s#%s\n",dirname,fstring.Data(),array->At(i)->GetName());
}
for (Int_t i=0; i<array->GetEntries(); i+=2){
char fname[1000];
//if (isZip) sprintf(fname,
- sprintf(fname, "%s/%s#%s",dirname,fstring.Data(),array->At(i)->GetName());
+ snprintf(fname,1000, "%s/%s#%s",dirname,fstring.Data(),array->At(i)->GetName());
printf(fname, "To check %s%s#%s\n",dirname,fstring.Data(),array->At(i)->GetName());
//cout <<"\n arguments: "<< array->At(i+1)->GetName()<<" "<<checkLevel<<endl;
Int_t cstatus = CheckTreeInFile(fname, array->At(i+1)->GetName(), checkLevel,0);
char outfile[1000];
Bool_t succes=kTRUE;
for (Int_t ifile =0; ifile<nfiles; ifile++){
- sprintf(infile,"%s/%s", idir, array->At(ifile)->GetName());
- sprintf(outfile,"%s/%s", odir, array->At(ifile)->GetName());
+ snprintf(infile,1000,"%s/%s", idir, array->At(ifile)->GetName());
+ snprintf(outfile,1000,"%s/%s", odir, array->At(ifile)->GetName());
printf("%s - %s\n",infile, outfile);
Bool_t result = TFile::Cp(infile,outfile);
succes &= result;