]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCInverseCorrection.cxx
Addin new classes for gain equalization
[u/mrichter/AliRoot.git] / TPC / AliTPCInverseCorrection.cxx
index 4a07df20803e05b7e23aaf27dd86e5ca36c47a57..a73dcc0db8e56792ec2b4eb4657bc2615f30a1e4 100644 (file)
@@ -30,6 +30,8 @@
 
 #include <TString.h>
 #include "AliTPCInverseCorrection.h"
+#include <TTimeStamp.h>
+
 
 AliTPCInverseCorrection::AliTPCInverseCorrection()
   : fCorrection(0) {
@@ -59,6 +61,35 @@ AliTPCInverseCorrection::~AliTPCInverseCorrection() {
   //
   // virtual destructor
   //
+  if (fCorrection) delete fCorrection;
+}
+
+
+void AliTPCInverseCorrection::Init() {
+  //
+  // Initialization funtion (not used at the moment)
+  //
+  if (fCorrection) fCorrection->Init();
+
+}
+
+void AliTPCInverseCorrection::Update(const TTimeStamp &timeStamp) {
+  //
+  // Update function 
+  //
+  if (fCorrection) fCorrection->Update(timeStamp);
+
+}
+
+void AliTPCInverseCorrection::Print(Option_t* option) const {
+  //
+  // Print function to check which correction classes are used 
+  // option=="d" prints details regarding the setted magnitude 
+  // option=="a" prints the C0 and C1 coefficents for calibration purposes
+  //
+
+  printf("Inverse of ");
+  if (fCorrection) fCorrection->Print(option);
 }
 
 void AliTPCInverseCorrection::GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]) {
@@ -72,6 +103,15 @@ void AliTPCInverseCorrection::GetCorrection(const Float_t x[],const Short_t roc,
     for (Int_t j=0;j<3;++j) dx[j]=0.;
 }
 
+void AliTPCInverseCorrection:: SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
+  //
+  // Virtual funtion to pass the wt values (might become event dependent) to the inherited classes
+  // t1 and t2 represent the "effective omegaTau" corrections and were measured in a dedicated
+  // calibration run
+  //
+  if (fCorrection) fCorrection->SetOmegaTauT1T2(omegaTau, t1, t2);
+}
+
 void AliTPCInverseCorrection::GetDistortion(const Float_t x[],const Short_t roc,Float_t dx[]) {
   //
   // This is just calling the CalculateCorrection of the wrapped