#include "TGraph.h"
#include "TGraphErrors.h"
#include "TF1.h"
+#include "TH1.h"
+#include "THnSparse.h"
#include "TH1D.h"
#include "TH2D.h"
-#include "THnSparse.h"
+#include "TAxis.h"
#include "AliLog.h"
fHasLaser(kFALSE), //flag the laser is overlayed with given event
fRejectLaser(kTRUE), //flag- reject laser
fTriggerClass(),
+ fCurrentEvent(0), //! current event
+ fCurrentTrack(0), //! current esd track
+ fCurrentFriendTrack(0), //! current esd track
+ fCurrentSeed(0), //! current seed
fDebugLevel(0)
{
//
fHasLaser(kFALSE), //flag the laser is overlayed with given event
fRejectLaser(kTRUE), //flag- reject laser
fTriggerClass(),
+ fCurrentEvent(0), //! current event
+ fCurrentTrack(0), //! current esd track
+ fCurrentFriendTrack(0), //! current esd track
+ fCurrentSeed(0), //! current seed
fDebugLevel(0)
{
//
fHasLaser(calib.fHasLaser), //flag the laser is overlayed with given event
fRejectLaser(calib.fRejectLaser), //flag- reject laser
fTriggerClass(calib.fTriggerClass),
+ fCurrentEvent(0), //! current event
+ fCurrentTrack(0), //! current esd track
+ fCurrentFriendTrack(0), //! current esd track
+ fCurrentSeed(0), //! current seed
fDebugLevel(calib.fDebugLevel)
{
//
AliTPCcalibBase &AliTPCcalibBase::operator=(const AliTPCcalibBase&calib){
//
- //
+ // operator=
//
((TNamed *)this)->operator=(calib);
fDebugStreamer=0;
delete hist;
return graphErrors;
}
+
+
+void AliTPCcalibBase::BinLogX(THnSparse *h, Int_t axisDim) {
+
+ // Method for the correct logarithmic binning of histograms
+
+ TAxis *axis = h->GetAxis(axisDim);
+ int bins = axis->GetNbins();
+
+ Double_t from = axis->GetXmin();
+ Double_t to = axis->GetXmax();
+ Double_t *new_bins = new Double_t[bins + 1];
+
+ new_bins[0] = from;
+ Double_t factor = pow(to/from, 1./bins);
+
+ for (int i = 1; i <= bins; i++) {
+ new_bins[i] = factor * new_bins[i-1];
+ }
+ axis->Set(bins, new_bins);
+ delete new_bins;
+
+}
+void AliTPCcalibBase::BinLogX(TH1 *h) {
+
+ // Method for the correct logarithmic binning of histograms
+
+ TAxis *axis = h->GetXaxis();
+ int bins = axis->GetNbins();
+
+ Double_t from = axis->GetXmin();
+ Double_t to = axis->GetXmax();
+ Double_t *new_bins = new Double_t[bins + 1];
+
+ new_bins[0] = from;
+ Double_t factor = pow(to/from, 1./bins);
+
+ for (int i = 1; i <= bins; i++) {
+ new_bins[i] = factor * new_bins[i-1];
+ }
+ axis->Set(bins, new_bins);
+ delete new_bins;
+
+}