]> 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 ad5b008a5fb7ceb780f8a589788b59ab0d7edaa6..a73dcc0db8e56792ec2b4eb4657bc2615f30a1e4 100644 (file)
@@ -61,6 +61,7 @@ AliTPCInverseCorrection::~AliTPCInverseCorrection() {
   //
   // virtual destructor
   //
+  if (fCorrection) delete fCorrection;
 }
 
 
@@ -80,6 +81,17 @@ void AliTPCInverseCorrection::Update(const TTimeStamp &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[]) {
   //
   // This is just calling the CalculateInverseCorrection of the wrapped
@@ -91,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