// amplitude
sprintf(chname,"Amp_Sector%d",i);
- his1 = new TH1F(chname,chname,250,0,500); // valgrind
+ his1 = new TH1F(chname,chname,100,0,32); // valgrind
his1->SetXTitle("Max Amplitude (ADC)");
fArrayAmp->AddAt(his1,i);
sprintf(chname,"Amp_Sector%d",i+36);
- his1 = new TH1F(chname,chname,200,0,600); // valgrind 3 13,408,208 bytes in 229 blocks are still reachable
+ his1 = new TH1F(chname,chname,100,0,32); // valgrind 3 13,408,208 bytes in 229 blocks are still reachable
his1->SetXTitle("Max Amplitude (ADC)");
fArrayAmp->AddAt(his1,i+36);
// driftlength
sprintf(chname, "driftlengt vs. charge, ROC %i", i);
- prof1 = new TProfile(chname, chname, 500, 0, 250);
+ prof1 = new TProfile(chname, chname, 25, 0, 250);
prof1->SetYTitle("Charge");
prof1->SetXTitle("Driftlength");
fArrayChargeVsDriftlength->AddAt(prof1,i);
sprintf(chname, "driftlengt vs. charge, ROC %i", i+36);
- prof1 = new TProfile(chname, chname, 500, 0, 250);
+ prof1 = new TProfile(chname, chname, 25, 0, 250);
prof1->SetYTitle("Charge");
prof1->SetXTitle("Driftlength");
fArrayChargeVsDriftlength->AddAt(prof1,i+36);
for (Int_t ipad = 0; ipad < 3; ipad++){
Int_t bin = GetBin(iq, ipad);
Float_t qmean = GetQ(bin);
- char name[200];
- sprintf(name,"ResolY Pad%d Qmiddle%f",ipad, qmean);
- his3D = new TH3F(name, name, 20,10,250, 20, 0,1.5, 50, -1,1);
+ char hname[200];
+ sprintf(hname,"ResolY Pad%d Qmiddle%f",ipad, qmean);
+ his3D = new TH3F(hname, hname, 20,10,250, 20, 0,1.5, 100, -1,1);
fArrayQDY->AddAt(his3D, bin);
- sprintf(name,"ResolZ Pad%d Qmiddle%f",ipad, qmean);
- his3D = new TH3F(name, name, 20,10,250, 20, 0,1.5, 50, -1,1);
+ sprintf(hname,"ResolZ Pad%d Qmiddle%f",ipad, qmean);
+ his3D = new TH3F(hname, hname, 20,10,250, 20, 0,1.5, 100, -1,1);
fArrayQDZ->AddAt(his3D, bin);
- sprintf(name,"RMSY Pad%d Qmiddle%f",ipad, qmean);
- his3D = new TH3F(name, name, 20,10,250, 20, 0,1.5, 50, 0,1);
+ sprintf(hname,"RMSY Pad%d Qmiddle%f",ipad, qmean);
+ his3D = new TH3F(hname, hname, 20,10,250, 20, 0,1.5, 100, 0,0.6);
fArrayQRMSY->AddAt(his3D, bin);
- sprintf(name,"RMSZ Pad%d Qmiddle%f",ipad, qmean);
- his3D = new TH3F(name, name, 20,10,250, 20, 0,1.5, 50, 0,1);
+ sprintf(hname,"RMSZ Pad%d Qmiddle%f",ipad, qmean);
+ his3D = new TH3F(hname, hname, 20,10,250, 20, 0,1.5, 100, 0,0.6);
fArrayQRMSZ->AddAt(his3D, bin);
}
}
paramZ0 -= paramZ1;
matrixY0 += matrixY1;
matrixZ0 += matrixZ1;
- Double_t chi2 = 0;
+ Double_t cchi2 = 0;
TMatrixD difY(2, 1, paramY0.GetMatrixArray());
TMatrixD difYT(1, 2, paramY0.GetMatrixArray());
matrixY0.Invert();
TMatrixD mulY(matrixY0, TMatrixD::kMult, difY);
TMatrixD chi2Y(difYT, TMatrixD::kMult, mulY);
- chi2 += chi2Y(0, 0);
+ cchi2 += chi2Y(0, 0);
TMatrixD difZ(2, 1, paramZ0.GetMatrixArray());
TMatrixD difZT(1, 2, paramZ0.GetMatrixArray());
matrixZ0.Invert();
TMatrixD mulZ(matrixZ0, TMatrixD::kMult, difZ);
TMatrixD chi2Z(difZT, TMatrixD::kMult, mulZ);
- chi2 += chi2Z(0, 0);
+ cchi2 += chi2Z(0, 0);
// REMOVE KINK - TO be fixed - proper chi2 calculation for curved track to be implemented
//if (chi2 * 0.25 > kCutChi2) fRejectedTracksHisto->Fill(8);
// if this chi2 is bigger than a given threshold, assume that the current cluster is
// a kink an goto next padrow
- TTreeSRedirector *cstream = GetDebugStreamer();
if (cstream){
(*cstream)<<"Cut8"<<
- "chi2="<<chi2<<
+ "chi2="<<cchi2<<
"\n";
}
}
TProfile *profAmpRow = (TProfile*)fArrayAmpRow->At(sector);
if ( irow >= kFirstLargePad) max /= kLargePadSize;
- profAmpRow->Fill( (Double_t)cluster0->GetRow(), max );
+ Double_t smax = TMath::Sqrt(max);
+ profAmpRow->Fill( (Double_t)cluster0->GetRow(), smax );
TH1F *hisAmp = (TH1F*)fArrayAmp->At(sector);
- hisAmp->Fill(max);
+ hisAmp->Fill(smax);
// remove the following two lines one day:
TProfile *profDriftLength = (TProfile*)fArrayChargeVsDriftlength->At(sector);
- profDriftLength->Fill( 250.-(Double_t)TMath::Abs(cluster0->GetZ()), max );
+ profDriftLength->Fill( 250.-(Double_t)TMath::Abs(cluster0->GetZ()), smax );
TProfile *profDriftLengthTmp = (TProfile*)(fcalPadRegionChargeVsDriftlength->GetObject(isegment, padSize));
- profDriftLengthTmp->Fill( 250.-(Double_t)TMath::Abs(cluster0->GetZ()), max );
+ profDriftLengthTmp->Fill( 250.-(Double_t)TMath::Abs(cluster0->GetZ()), smax );
fHclusterPerPadrow->Fill(irow); // fill histogram showing clusters per padrow
Int_t ipad = TMath::Nint(cluster0->GetPad());
}
-void AliTPCcalibTracks::MakeReport(Int_t stat, char* pathName){
+void AliTPCcalibTracks::MakeReport(Int_t stat, const char* pathName){
//
// all functions are called, that produce pictures
// the histograms are written to the directory 'pathName'
}
-void AliTPCcalibTracks::MakeAmpPlots(Int_t stat, char* pathName){
+void AliTPCcalibTracks::MakeAmpPlots(Int_t stat, const char* pathName){
//
// creates several plots:
// fArrayAmp.ps, fArrayAmpRow.ps and DeltaYZ.ps
}
-void AliTPCcalibTracks::MakeDeltaPlots(char* pathName){
+void AliTPCcalibTracks::MakeDeltaPlots(const char* pathName){
//
// creates several plots:
// DeltaYZ.ps: DeltaY and DeltaZ histogram with gaus fit
}
-void AliTPCcalibTracks::MakeChargeVsDriftLengthPlotsOld(char* pathName){
+void AliTPCcalibTracks::MakeChargeVsDriftLengthPlotsOld(const char* pathName){
//
// creates charge vs. driftlength plots, one TProfile for each ROC
// is not correct like this, should be one TProfile for each sector and padsize
}
-void AliTPCcalibTracks::MakeChargeVsDriftLengthPlots(char* pathName){
+void AliTPCcalibTracks::MakeChargeVsDriftLengthPlots(const char* pathName){
//
// creates charge vs. driftlength plots, one TProfile for each ROC
// under development....
-void AliTPCcalibTracks::FitResolutionNew(char* pathName){
+void AliTPCcalibTracks::FitResolutionNew(const char* pathName){
//
// calculates different resulution fits in Y and Z direction
// the histograms are written to 'ResolutionYZ.ps'
}
-void AliTPCcalibTracks::FitRMSNew(char* pathName){
+void AliTPCcalibTracks::FitRMSNew(const char* pathName){
//
// calculates different resulution-rms fits in Y and Z direction
// the histograms are written to 'RMS_YZ.ps'
}
-void AliTPCcalibTracks::MakeResPlotsQTree(Int_t minEntries, char* pathName){
+void AliTPCcalibTracks::MakeResPlotsQTree(Int_t minEntries, const char* pathName){
//
// Make tree with resolution parameters
// the result is written to 'resol.root' in directory 'pathname'
AliTPCcalibTracks *calibTracks = 0;
if (GetDebugLevel() > 1) cout << "start to iterate, filling lists" << endl;
Int_t counter = 0;
- while ( (calibTracks = (AliTPCcalibTracks*)listIterator->Next()) ){
+ while ( (calibTracks = dynamic_cast<AliTPCcalibTracks*> (listIterator->Next())) ){
// loop over all entries in the collectionList and get dataMembers into lists
if (!calibTracks) continue;
clusterCutHistoList->Add(calibTracks->GetfClusterCutHisto());
hclusterPerPadrowList->Add(calibTracks->GetfHclusterPerPadrow());
hclusterPerPadrowRawList->Add(calibTracks->GetfHclusterPerPadrowRaw());
- fCalPadClusterPerPad->Add(calibTracks->GetfCalPadClusterPerPad());
- fCalPadClusterPerPadRaw->Add(calibTracks->GetfCalPadClusterPerPadRaw());
+ //
+ if (fCalPadClusterPerPad && calibTracks->GetfCalPadClusterPerPad())
+ fCalPadClusterPerPad->Add(calibTracks->GetfCalPadClusterPerPad());
+ // fCalPadClusterPerPadRaw->Add(calibTracks->GetfCalPadClusterPerPadRaw());
counter++;
if (GetDebugLevel() > 5) cout << "filling lists, object " << counter << " added." << endl;
}
if (GetDebugLevel() > 0) cout << "merging fArrayAmps..." << endl;
// merge fArrayAmps
for (Int_t i = 0; i < fArrayAmp->GetEntriesFast(); i++ ) { // loop over data member, i<72
- TIterator *objListIterator = arrayAmpList->MakeIterator();
+ TIterator *cobjListIterator = arrayAmpList->MakeIterator();
histList = new TList;
- while (( objarray = (TObjArray*)objListIterator->Next() )) {
+ while (( objarray = (TObjArray*)cobjListIterator->Next() )) {
// loop over arrayAmpList, get TObjArray, get object at position i, cast it into TH1F
if (!objarray) continue;
hist = (TH1F*)(objarray->At(i));
}
((TH1F*)(fArrayAmp->At(i)))->Merge(histList);
delete histList;
- delete objListIterator;
+ delete cobjListIterator;
}
if (GetDebugLevel() > 0) cout << "merging fArrayQDY..." << endl;
}
-void AliTPCcalibTracks::MakeQPosNormAll(TTree * chainres, AliTPCClusterParam * param, Int_t maxPoints, Int_t verbose){
+void AliTPCcalibTracks::MakeQPosNormAll(TTree * chainres, AliTPCClusterParam * param, Int_t maxPoints){
//
// Make position corrections
// for the moment Only using debug streamer
//1. Load Parameters to be modified:
//e.g:
- AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
+ AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
AliCDBManager::Instance()->SetRun(0)
AliTPCClusterParam * param = AliTPCcalibDB::Instance()->GetClusterParam();