From b4caed64417d860f92624472611475c236fcb010 Mon Sep 17 00:00:00 2001 From: srossegg Date: Tue, 16 Nov 2010 17:03:12 +0000 Subject: [PATCH] - Inclusion of AliTPCSpaceCharge3D in TPCbase library - Updates of the documentation of the classes related to calibration of the field distortions Note: NO CHANGES IN THE FUNCTIONALITY Extended comments (documentation) is now written in root-html format (including simple example plots in the html version) --- TPC/AliTPCBoundaryVoltError.cxx | 83 +++++++++++++++++----------- TPC/AliTPCBoundaryVoltError.h | 1 - TPC/AliTPCCorrection.cxx | 95 ++++++++++++++++++++++++--------- TPC/AliTPCCorrection.h | 73 +++++++++++++++++-------- TPC/AliTPCExBBShape.cxx | 18 +------ TPC/AliTPCExBBShape.h | 40 ++++++++++---- TPC/AliTPCExBTwist.cxx | 16 +----- TPC/AliTPCExBTwist.h | 43 +++++++++++---- TPC/AliTPCFCVoltError3D.cxx | 72 +++++++++++++++++++------ TPC/AliTPCFCVoltError3D.h | 2 - TPC/AliTPCGGVoltError.cxx | 17 ------ TPC/AliTPCGGVoltError.h | 50 +++++++++++++---- TPC/AliTPCROCVoltError3D.cxx | 73 +++++++++++++++++++------ TPC/AliTPCROCVoltError3D.h | 4 +- TPC/AliTPCSpaceCharge.cxx | 55 +++++++++++++------ TPC/AliTPCSpaceCharge.h | 2 - TPC/AliTPCSpaceCharge3D.cxx | 69 +++++++++++++++++------- TPC/AliTPCSpaceCharge3D.h | 4 +- TPC/TPCbaseLinkDef.h | 1 + TPC/libTPCbase.pkg | 5 +- 20 files changed, 484 insertions(+), 239 deletions(-) diff --git a/TPC/AliTPCBoundaryVoltError.cxx b/TPC/AliTPCBoundaryVoltError.cxx index 7b8f6cdcd93..7e927c8d75c 100644 --- a/TPC/AliTPCBoundaryVoltError.cxx +++ b/TPC/AliTPCBoundaryVoltError.cxx @@ -13,36 +13,59 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -////////////////////////////////////////////////////////////////////////////// -// // -// AliTPCBoundaryVoltError class // -// The class calculates the space point distortions due to residual voltage // -// errors on the main boundaries of the TPC. For example, the inner vessel // -// of the TPC is shifted by a certain amount, whereas the ROCs on the A side// -// and the ROCs on the C side follow this mechanical shift (at the inner // -// vessel) in z direction (see example below). This example is commonly // -// named "conical deformation" of the TPC field cage. // -// // -// The class allows "effective Omega Tau" corrections. // -// // -// NOTE: This class is capable of calculating z distortions due to // -// drift velocity change in dependence of the electric field!!! // -// // -// date: 01/06/2010 // -// Authors: Jim Thomas, Stefan Rossegger // -// // -// Example usage (e.g +1mm shift of "conical deformation") // -// AliTPCBoundaryVoltError bve; // -// Float_t boundA[8] = {-40,-40,-40,0,0,0,0,-40}; // voltages A-side // -// Float_t boundC[6] = { 40, 40, 40,0,0,0}; // voltages C-side // -// bve.SetBoundariesA(boundA); // -// bve.SetBoundariesC(boundC); // -// bve.SetOmegaTauT1T2(0.32,1.,1.); // values ideally from OCDB // -// // initialization of the look up // -// bve.InitBoundaryVoltErrorDistortion(); // -// // plot dRPhi distortions ... // -// bve.CreateHistoDRPhiinZR(1.,100,100)->Draw("surf2"); // -////////////////////////////////////////////////////////////////////////////// +// _________________________________________________________________ +// +// Begin_Html +//

AliTPCBoundaryVoltError class

+// This class calculates the space point distortions due to residual voltage errors on +// the main boundaries of the TPC. For example, the inner vessel of the TPC is shifted +// by a certain amount, whereas the ROCs on the A side and the C side follow this mechanical +// shift (at the inner vessel) in z direction. This example can be named "conical deformation" +// of the TPC field cage (see example below). +//

+// The boundary conditions can be set via two arrays (A and C side) which contain the +// residual voltage setting modeling a possible shift or an inhomogeneity on the TPC field +// cage. In order to avoid that the user splits the Central Electrode (CE), the settings for +// the C side is taken from the array on the A side (points: A.6 and A.7). The region betweem +// the points is interpolated linearly onto the boundaries. +//

+// The class uses the PoissonRelaxation2D (see AliTPCCorrection) to calculate the resulting +// electrical field inhomogeneities in the (r,z)-plane. Then, the Langevin-integral formalism +// is used to calculate the space point distortions.
+// Note: This class assumes a homogeneous magnetic field. +//

+// One has two possibilities when calculating the $dz$ distortions. The resulting distortions +// are purely due to the change of the drift velocity (along with the change of the drift field) +// when the SetROCDisplacement is FALSE. This emulates for example a Gating-Grid Voltage offset +// without moving the ROCs. When the flag is set to TRUE, the ROCs are assumed to be misaligned +// and the corresponding offset in z is added. +// End_Html +// +// Begin_Macro(source) +// { +// gROOT->SetStyle("Plain"); gStyle->SetPalette(1); +// TCanvas *c2 = new TCanvas("c2","c2",500,300); +// AliTPCBoundaryVoltError bve; +// Float_t val = 40;// [Volt]; 40V corresponds to 1mm +// /* IFC shift, CE follows, ROC follows by factor half */ +// Float_t boundA[8] = { val, val, val,0,0,0,0,val}; // voltages A-side +// Float_t boundC[6] = {-val,-val,-val,0,0,0}; // voltages C-side +// bve.SetBoundariesA(boundA); +// bve.SetBoundariesC(boundC); +// bve.SetOmegaTauT1T2(-0.32,1,1); +// bve.SetROCDisplacement(kTRUE); // include the chamber offset in z when calculating the dz distortions +// bve.CreateHistoDRinZR(0)->Draw("surf2"); +// return c2; +// } +// End_Macro +// +// Begin_Html +//

+// Date: 01/06/2010
+// Authors: Jim Thomas, Stefan Rossegger +// End_Html +// _________________________________________________________________ + #include "AliMagF.h" #include "TGeoGlobalMagField.h" diff --git a/TPC/AliTPCBoundaryVoltError.h b/TPC/AliTPCBoundaryVoltError.h index fb6f0494c94..4d34a00dd1e 100644 --- a/TPC/AliTPCBoundaryVoltError.h +++ b/TPC/AliTPCBoundaryVoltError.h @@ -5,7 +5,6 @@ * See cxx source for full Copyright notice */ //////////////////////////////////////////////////////////////////////////// -// // // AliTPCBoundaryVoltError class // // date: 01/06/2010 // // Authors: Jim Thomas, Stefan Rossegger // diff --git a/TPC/AliTPCCorrection.cxx b/TPC/AliTPCCorrection.cxx index 797eac93d0b..0b809f791d7 100644 --- a/TPC/AliTPCCorrection.cxx +++ b/TPC/AliTPCCorrection.cxx @@ -13,31 +13,74 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -//////////////////////////////////////////////////////////////////////////////// -// // -// AliTPCCorrection class // -// // -// This class provides a general framework to deal with space point // -// distortions. An correction class which inherits from here is for example // -// AliTPCExBBShape or AliTPCExBTwist // -// // -// General functions are (for example): // -// CorrectPoint(x,roc) where x is the vector of inital positions in // -// cartesian coordinates and roc represents the Read Out chamber number // -// according to the offline naming convention. The vector x is overwritten // -// with the corrected coordinates. // -// // -// An alternative usage would be CorrectPoint(x,roc,dx), which leaves the // -// vector x untouched, put returns the distortions via the vector dx // -// // -// The class allows "effective Omega Tau" corrections to be shifted to the // -// single distortion classes. // -// // -// Note: This class is normally used via the class AliTPCComposedCorrection // -// // -// date: 27/04/2010 // -// Authors: Magnus Mager, Stefan Rossegger, Jim Thomas // -//////////////////////////////////////////////////////////////////////////////// +// _________________________________________________________________ +// +// Begin_Html +//

AliTPCCorrection class

+// +// The AliTPCCorrection class provides a general framework to deal with space point distortions. +// An correction class which inherits from here is for example AliTPCExBBShape or AliTPCExBTwist.
+// General virtual functions are (for example) CorrectPoint(x,roc) where x is the vector of initial +// positions in cartesian coordinates and roc represents the read-out chamber number according to +// the offline numbering convention. The vector x is overwritten with the corrected coordinates.
+// An alternative usage would be CorrectPoint(x,roc,dx), which leaves the vector x untouched, but +// returns the distortions via the vector dx.
+// This class is normally used via the general class AliTPCComposedCorrection. +//

+// Furthermore, the class contains basic geometrical descriptions like field cage radii +// (fgkIFCRadius, fgkOFCRadius) and length (fgkTPCZ0) plus the voltages. Also, the definitions +// of size and widths of the fulcrums building the grid of the final look-up table, which is +// then interpolated, is defined in kNX and fgkXList). +//

+// All physics-model classes below are derived from this class in order to not duplicate code +// and to allow a uniform treatment of all physics models. +//

+//

Poisson solver

+// A numerical solver of the Poisson equation (relaxation technique) is implemented for 2-dimensional +// geometries (r,z) as well as for 3-dimensional problems (r,$\phi$,z). The corresponding function +// names are PoissonRelaxation?D. The relevant function arguments are the arrays of the boundary and +// initial conditions (ArrayofArrayV, ArrayofChargeDensities) as well as the grid granularity which +// is used during the calculation. These inputs can be chosen according to the needs of the physical +// effect which is supposed to be simulated. In the 3D version, different symmetry conditions can be set +// in order to reduce the calculation time (used in AliTPCFCVoltError3D). +//

+//

Unified plotting functionality

+// Generic plot functions were implemented. They return a histogram pointer in the chosen plane of +// the TPC drift volume with a selectable grid granularity and the magnitude of the correction vector. +// For example, the function CreateHistoDZinXY(z,nx,ny) returns a 2-dimensional histogram which contains +// the longitudinal corrections $dz$ in the (x,y)-plane at the given z position with the granularity of +// nx and ny. The magnitude of the corrections is defined by the class from which this function is called. +// In the same manner, standard plots for the (r,$\phi$)-plane and for the other corrections like $dr$ and $rd\phi$ are available +//

+// Note: This class is normally used via the class AliTPCComposedCorrection +// End_Html +// +// Begin_Macro(source) +// { +// gROOT->SetStyle("Plain"); gStyle->SetPalette(1); +// TCanvas *c2 = new TCanvas("c2","c2",700,1050); c2->Divide(2,3); +// AliTPCROCVoltError3D roc; // EXAMPLE PLOTS - SEE BELOW +// roc.SetOmegaTauT1T2(0,1,1); // B=0 +// Float_t z0 = 1; // at +1 cm -> A side +// c2->cd(1); roc.CreateHistoDRinXY(1.,300,300)->Draw("cont4z"); +// c2->cd(3);roc.CreateHistoDRPhiinXY(1.,300,300)->Draw("cont4z"); +// c2->cd(5);roc.CreateHistoDZinXY(1.,300,300)->Draw("cont4z"); +// Float_t phi0=0.5; +// c2->cd(2);roc.CreateHistoDRinZR(phi0)->Draw("surf2"); +// c2->cd(4);roc.CreateHistoDRPhiinZR(phi0)->Draw("surf2"); +// c2->cd(6);roc.CreateHistoDZinZR(phi0)->Draw("surf2"); +// return c2; +// } +// End_Macro +// +// Begin_Html +//

+// Date: 27/04/2010
+// Authors: Magnus Mager, Stefan Rossegger, Jim Thomas +// End_Html +// _________________________________________________________________ + + #include "Riostream.h" #include @@ -1411,7 +1454,7 @@ AliExternalTrackParam * AliTPCCorrection::FitDistortedTrack(AliExternalTrackPara if (npoints2Rotate(track0->GetAlpha()); - AliTrackerBase::PropagateTrackToBxByBz(track1,refX,kMass,2.,kTRUE,kMaxSnp); + AliTrackerBase::PropagateTrackToBxByBz(track1,refX,kMass,2.,kFALSE,kMaxSnp); if (pcstream) (*pcstream)< +// Note: This class is normally used via the class AliTPCComposedCorrection +// End_Html +// +// Begin_Macro(source) +// { +// gROOT->SetStyle("Plain"); gStyle->SetPalette(1); +// TCanvas *c2 = new TCanvas("c2","c2",800,1200); c2->Divide(2,3); +// AliTPCROCVoltError3D roc; // EXAMPLE PLOTS - SEE BELOW +// roc.SetOmegaTauT1T2(0,1,1); // B=0 +// Float_t z0 = 1; // at +1 cm -> A side +// c2->cd(1); roc.CreateHistoDRinXY(1.,300,300)->Draw("cont4z"); +// c2->cd(3);roc.CreateHistoDRPhiinXY(1.,300,300)->Draw("cont4z"); +// c2->cd(5);roc.CreateHistoDZinXY(1.,300,300)->Draw("cont4z"); +// Float_t phi0=0.5; +// c2->cd(2);roc.CreateHistoDRinZR(phi0)->Draw("surf2"); +// c2->cd(4);roc.CreateHistoDRPhiinZR(phi0)->Draw("surf2"); +// c2->cd(6);roc.CreateHistoDZinZR(phi0)->Draw("surf2"); +// return c2; +// } +// End_Macro +// +// Begin_Html +//

+// Date: 27/04/2010
+// Authors: Magnus Mager, Stefan Rossegger, Jim Thomas +// End_Html +// _________________________________________________________________ + //////////////////////////////////////////////////////////////////////////////// -// // // AliTPCCorrection class // -// // -// This class provides a general framework to deal with space point // -// distortions. An correction class which inherits from here is for example // -// AliTPCExBBShape or AliTPCExBTwist // -// // -// General functions are (for example): // -// CorrectPoint(x,roc) where x is the vector of inital positions in // -// cartesian coordinates and roc represents the Read Out chamber number // -// according to the offline naming convention. The vector x is overwritten // -// with the corrected coordinates. // -// // -// An alternative usage would be CorrectPoint(x,roc,dx), which leaves the // -// vector x untouched, put returns the distortions via the vector dx // -// // -// The class allows "effective Omega Tau" corrections to be shifted to the // -// single distortion classes. // -// // -// Note: This class is normally used via the class AliTPCComposedCorrection // -// // -// date: 27/04/2010 // -// Authors: Magnus Mager, Stefan Rossegger, Jim Thomas // //////////////////////////////////////////////////////////////////////////////// diff --git a/TPC/AliTPCExBBShape.cxx b/TPC/AliTPCExBBShape.cxx index 2e3c6fe8114..51b78b742c4 100644 --- a/TPC/AliTPCExBBShape.cxx +++ b/TPC/AliTPCExBBShape.cxx @@ -14,23 +14,7 @@ **************************************************************************/ //////////////////////////////////////////////////////////////////////////// -// // -// AliExBBShape class // -// The class calculates the space point distortions due to the B field // -// shape imperfections using a second order technique based on integrals // -// over Bz (e.g. int By/Bz) obtained via the AliMagF class // -// The class allows "effective Omega Tau" corrections. // -// // -// date: 27/04/2010 // -// Authors: Magnus Mager, Jim Thomas, Stefan Rossegger // -// // -// Example usage: // -// AliMagF mag("mag","mag"); // -// AliTPCExBBShape exb; // -// exb.SetBField(&mag); // use Bfield from AliMagF // -// exb.SetOmegaTauT1T2(0.32,1.,1.); // values ideally from OCDB // -// // plot dRPhi distortions ... // -// exb.CreateHistoDRPhiinZR(0,100,100)->Draw("surf2"); // +// AliTPCExBBShape class // //////////////////////////////////////////////////////////////////////////// #include diff --git a/TPC/AliTPCExBBShape.h b/TPC/AliTPCExBBShape.h index 9c7b569b281..defcce7fbb8 100644 --- a/TPC/AliTPCExBBShape.h +++ b/TPC/AliTPCExBBShape.h @@ -4,17 +4,35 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -//////////////////////////////////////////////////////////////////////////// -// // -// AliExBBShape class // -// The class calculates the space point distortions due to the B field // -// shape imperfections using a second order technique based on integrals // -// over Bz (e.g. int By/Bz) obtained via the AliMagF class // -// The class allows "effective Omega Tau" corrections. // -// // -// date: 27/04/2010 // -// Authors: Magnus Mager, Jim Thomas, Stefan Rossegger // -//////////////////////////////////////////////////////////////////////////// +// _________________________________________________________________ +// +// Begin_Html +//

AliExBBShape class

+// The class calculates the space point distortions due to the B field +// shape imperfections using a second order technique based on integrals +// over Bz (e.g. int By/Bz) obtained via the AliMagF class. The essential +// input for this class is the magnetic field maps which can be set via the function SetBField. +//

+// The class allows "effective Omega Tau" corrections. +// End_Html +// Begin_Macro(source) +// { +// gROOT->SetStyle("Plain"); gStyle->SetPalette(1); +// TCanvas *c2 = new TCanvas("c2","c2",500,300); +// AliTPCExBBShape exb; +// AliMagF mag("mag","mag"); // 0.5 Tesla (solenoid) +// exb.SetBField(&mag); // use Bfield from AliMagF +// exb.SetOmegaTauT1T2(-0.32,1.,1.); // values ideally from OCDB +// exb.CreateHistoDRPhiinZR(0,100,100)->Draw("surf2"); +// return c2; +// } +// End_Macro +// Begin_Html +//

+// Date: 27/04/2010
+// Authors: Magnus Mager, Jim Thomas, Stefan Rossegger +// End_Html +// _________________________________________________________________ #include "AliTPCCorrection.h" diff --git a/TPC/AliTPCExBTwist.cxx b/TPC/AliTPCExBTwist.cxx index ba8104b6319..4c120f9f7e4 100644 --- a/TPC/AliTPCExBTwist.cxx +++ b/TPC/AliTPCExBTwist.cxx @@ -14,22 +14,10 @@ **************************************************************************/ //////////////////////////////////////////////////////////////////////////// -// // // AliTPCExBTwist class // -// The class calculates the space point distortions due to a mismatch // -// of the E and B field axis (original code from STAR) // -// The class allows "effective Omega Tau" corrections. // -// // -// date: 27/04/2010 // -// Authors: Jim Thomas, Magnus Mager, Stefan Rossegger // -// // -// Example usage: // -// AliTPCExBTwist twist; // -// twist.SetOmegaTauT1T2(0.32,1.,1.); // values ideally from OCDB // -// twist.SetXTwist(0.001); // set twist in X direction (in rad) // -// // plot dRPhi distortions ... // -// twist.CreateHistoDRPhiinZR(1.,100,100)->Draw("surf2"); // //////////////////////////////////////////////////////////////////////////// + + #include "AliMagF.h" #include "TGeoGlobalMagField.h" #include "AliTPCcalibDB.h" diff --git a/TPC/AliTPCExBTwist.h b/TPC/AliTPCExBTwist.h index afceedceba0..5a5799ba5bc 100644 --- a/TPC/AliTPCExBTwist.h +++ b/TPC/AliTPCExBTwist.h @@ -4,16 +4,39 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -//////////////////////////////////////////////////////////////////////////// -// // -// AliTPCExBTwist class // -// The class calculates the space point distortions due to a mismatch // -// of the E and B field axis (original code from STAR) // -// The class allows "effective Omega Tau" corrections. // -// // -// date: 27/04/2010 // -// Authors: Jim Thomas, Magnus Mager, Stefan Rossegger // -//////////////////////////////////////////////////////////////////////////// +// _________________________________________________________________ +// +// Begin_Html +//

AliTPCExBTwist class

+// The class calculates the space point distortions due to a mismatch +// of the E and B field axis (original code from STAR) +//

+// It assumes a homogeneous magnetic and electric field. The calculations performed +// within this class can be written in a compact form as well (compare notes of Jim Thomas) +//

+// The inputs to this class are the twist angles in the x and y plane ($\theta_x,\theta_y$) +// in cartesian coordinates. They can be set via the member functions SetXTwist and SetYTwist. +// End_Html +// +// Begin_Macro(source) +// { +// gROOT->SetStyle("Plain"); gStyle->SetPalette(1); +// TCanvas *c2 = new TCanvas("c2","c2",500,300); +// AliTPCExBTwist twist; +// twist.SetXTwist(0.001); // x angle in [rad] +// twist.SetXTwist(0.0005); // y angle in [rad] +// twist.SetOmegaTauT1T2(0.32,1,1); +// twist.CreateHistoDRPhiinXY(1.)->Draw("surf2"); // A side +// return c2; +// } +// End_Macro +// +// Begin_Html +//

+// Date: 27/04/2010
+// Authors: Jim Thomas, Magnus Mager, Stefan Rossegger +// End_Html +// _________________________________________________________________ #include "AliTPCCorrection.h" diff --git a/TPC/AliTPCFCVoltError3D.cxx b/TPC/AliTPCFCVoltError3D.cxx index 9abaf99d442..37c2aaa704a 100644 --- a/TPC/AliTPCFCVoltError3D.cxx +++ b/TPC/AliTPCFCVoltError3D.cxx @@ -13,23 +13,61 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -////////////////////////////////////////////////////////////////////////////// -// // -// AliTPCFCVoltError3D class // -// The class calculates the space point distortions due to residual voltage // -// errors on the Field Cage boundaries (rods) of the TPC in 3D. // -// // -// The class allows "effective Omega Tau" corrections. // -// // -// NOTE: This class is capable of calculating z distortions due to // -// drift velocity changes in dependence of the electric field!!! // -// // -// date: 08/08/2010 // -// Authors: Jim Thomas, Stefan Rossegger // -// // -// Example usage : // -// AliTPCFCVoltError3D fcerror; // -////////////////////////////////////////////////////////////////////////////// +// _________________________________________________________________ +// +// Begin_Html +//

AliTPCFCVoltError3D class

+// The class calculates the space point distortions due to residual voltage errors +// on the Field Cage (FC) boundaries (rods and strips) of the TPC in 3D. It uses +// the Poisson relaxation technique in three dimension as implemented in the parent class. +//

+// Although the calculation is performed in 3D, the calculation time was significantly +// reduced by using certain symmetry conditions within the calculation. +//

+// The input parameters can be set via the functions (e.g.) SetRodVoltShift(rod,dV) where +// rod is the number of the rod on which the voltage offset dV is set. The corresponding +// shift in z direction would be $dz=dV/40$ with an opposite sign for the C side. The +// rods are numbered in anti-clock-wise direction starting at $\phi=0$. Rods in the IFC +// are from 0 to 17, rods on the OFC go from 18 to 35.
+// This convention is following the offline numbering scheme of the ROCs. +//

+// Different misalignment scenarios can be modeled: +//

+// End_Html +// +// Begin_Macro(source) +// { +// gROOT->SetStyle("Plain"); gStyle->SetPalette(1); +// TCanvas *c2 = new TCanvas("c2","c2",500,450); +// AliTPCFCVoltError3D fc; +// fc.SetOmegaTauT1T2(0,1,1); +// fc.SetRotatedClipVoltA(0,40); +// fc.SetRodVoltShiftA(3,40); +// fc.SetCopperRodShiftA(7+18,40); +// fc.SetRodVoltShiftA(15+18,40); +// fc.CreateHistoDRPhiinXY(10)->Draw("cont4z"); +// return c2; +// } +// End_Macro +// +// Begin_Html +//

+// Date: 08/08/2010
+// Authors: Jim Thomas, Stefan Rossegger +// End_Html +// _________________________________________________________________ + #include "AliMagF.h" #include "TGeoGlobalMagField.h" diff --git a/TPC/AliTPCFCVoltError3D.h b/TPC/AliTPCFCVoltError3D.h index 70711f64766..03a21b49358 100644 --- a/TPC/AliTPCFCVoltError3D.h +++ b/TPC/AliTPCFCVoltError3D.h @@ -5,9 +5,7 @@ * See cxx source for full Copyright notice */ //////////////////////////////////////////////////////////////////////////// -// // // AliTPCFCVoltError3D class // -// date: 01/06/2010 // // Authors: Jim Thomas, Stefan Rossegger // //////////////////////////////////////////////////////////////////////////// diff --git a/TPC/AliTPCGGVoltError.cxx b/TPC/AliTPCGGVoltError.cxx index dee07bf848c..27b47a105a2 100644 --- a/TPC/AliTPCGGVoltError.cxx +++ b/TPC/AliTPCGGVoltError.cxx @@ -14,24 +14,7 @@ **************************************************************************/ //////////////////////////////////////////////////////////////////////////// -// // // AliTPCGGVoltError class // -// The class calculates the electric field and space point distortions // -// due a Gating Grid (GG) Error voltage. It uses the exact calculation // -// technique based on bessel functions. (original code from STAR) // -// The class allows "effective Omega Tau" corrections. // -// // -// date: 27/04/2010 // -// Authors: Jim Thomas, Stefan Rossegger, Magnus Mager // -// // -// Example usage: // -// AliTPCGGVoltError GGerror; // -// GGerror.SetOmegaTauT1T2(0.32,1.,1.); // values ideally from OCDB // -// GGerror.SetDeltaVGGA(50.); // voltage offset A-side // -// GGerror.SetDeltaVGGC(50.); // voltage offset C-side // -// GGerror.InitGGVoltErrorDistortion(); // initialization of the look up // -// // plot dRPhi distortions ... // -// GGerror.CreateHistoDRPhiinZR(1.,100,100)->Draw("surf2"); // //////////////////////////////////////////////////////////////////////////// diff --git a/TPC/AliTPCGGVoltError.h b/TPC/AliTPCGGVoltError.h index 5be161ea071..9e5f935aaf9 100644 --- a/TPC/AliTPCGGVoltError.h +++ b/TPC/AliTPCGGVoltError.h @@ -4,17 +4,45 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -//////////////////////////////////////////////////////////////////////////// -// // -// AliTPCGGVoltError class // -// The class calculates the electric field and space point distortions // -// due a Gating Grid (GG) Error voltage. It uses the exact calculation // -// technique based on bessel functions. (original code from STAR) // -// The class allows "effective Omega Tau" corrections. // -// // -// date: 27/04/2010 // -// Authors: Jim Thomas, Stefan Rossegger, Magnus Mager // -//////////////////////////////////////////////////////////////////////////// +// _________________________________________________________________ +// +// Begin_Html +//

AliTPCGGVoltError class

+// The class calculates the electric field and the resulting space point distortions +// due a Gating Grid (GG) voltage error. It uses the analytical solution for such a problem. +//

+// The input is the effective GG voltage residual in respect to the ideal setting. The effective +// residual voltage can be set via the functions SetDeltaVGGx. Note that this effective +// voltage-residuals are approx. a factor 0.9 lower than the actual difference in the setting +// of the GG due to the fact that the voltage on the GG is partially screened by the wire +// structure. The calculation has to be performed with the observable effective voltage difference. +//

+// Unfortunately, the class is not capable of calculation the $dz$ offset due to possible changes +// of the drift velocity in dependence of the electric field. The special case of the numerical +// approximation (AliTPCBoundaryVoltError), which is capable of calculating the same effect, should +// be used for this purpose. +// End_Html +// +// Begin_Macro(source) +// { +// gROOT->SetStyle("Plain"); gStyle->SetPalette(1); +// TCanvas *c2 = new TCanvas("c2","c2",500,300); +// AliTPCGGVoltError gg; +// gg.SetDeltaVGGA(-40); gg.SetDeltaVGGC(-40); // 40 Volt offset +// gg.InitGGVoltErrorDistortion(); +// gg.SetOmegaTauT1T2(0,1,1); // B=0 +// gg.CreateHistoDRinZR(0)->Draw("surf2"); +// return c2; +// } +// End_Macro +// +// Begin_Html +//

+// Date: 27/04/2010
+// Authors: Jim Thomas, Stefan Rossegger, Magnus Mager +// End_Html +// _________________________________________________________________ + #include "AliTPCCorrection.h" diff --git a/TPC/AliTPCROCVoltError3D.cxx b/TPC/AliTPCROCVoltError3D.cxx index eee16ade388..4a4f7e0a7f6 100644 --- a/TPC/AliTPCROCVoltError3D.cxx +++ b/TPC/AliTPCROCVoltError3D.cxx @@ -13,23 +13,62 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -////////////////////////////////////////////////////////////////////////////// -// // -// AliTPCROCVoltError3D class // -// The class calculates the space point distortions due to residual voltage // -// errors on Read Out Chambers of the TPC in 3D. // -// // -// The class allows "effective Omega Tau" corrections. // -// // -// NOTE: This class is capable of calculating z distortions due to // -// misalignment and the vd dependency on the residual drift field // -// // -// date: 08/08/2010 // -// Authors: Jim Thomas, Stefan Rossegger // -// // -// Example usage : // -// AliTPCROCVoltError3D ROCerror; // -////////////////////////////////////////////////////////////////////////////// +// _________________________________________________________________ +// +// Begin_Html +//

AliTPCROCVoltError3D class

+// The class calculates the space point distortions due to z offsets of the +// ROCs via the residual voltage technique (Poisson relaxation) in 3D. +// Since the GG (part of the ROCs) represents the closure of the FC in z direction, +// every misalignment in z produces not only dz distortions but also electrical +// field inhomogeneities throughout the volume, which produces additional dr and rd$\phi$ distortions. +//

+// Each ROC can be misaligned (in z direction) in three ways. A general z0 offset, +// an inclination along the x and an inclination along the y axis. The z-misalignment's +// can be set via the function SetROCData(TMatrixD *mat) for each single chamber (ROC). +// The array size has to be (72,3) representing the 72 chambers according to the +// offline numbering scheme (IROC: roc$<$36; OROC: roc$\geq$36) and the three misalignment's +// (see the source code for further details). +//

+// Internally, these z offsets (unit is cm) are recalculated into residual voltage +// equivalents in order to make use of the relaxation technique. +//

+// One has two possibilities when calculating the $dz$ distortions. The resulting +// distortions are purely due to the change of the drift velocity (along with the +// change of the drift field) when the SetROCDisplacement is FALSE.
+// For this class, this is a rather unphysical setting and should be avoided.
+// When the flag is set to TRUE, the corresponding offset in z is added to the dz +// calculation of the outer ROCs.
+// For the Alice TPC gas, both effects are of similar magnitude. This means, if the +// drift length is sufficiently large, a z-offset of a chamber appears to have (approx.) +// twice the magnitude when one looks at the actual dz distortions. +//

+// In addition, this class allows a correction regarding the different arrival times +// of the electrons due to the geometrical difference of the inner and outer chambers. +// The impact was simulated via Garfield. If the flag is set via the +// function SetElectronArrivalCorrection, the electron-arrival correction is added to the dz calculation. +// End_Html +// +// Begin_Macro(source) +// { +// gROOT->SetStyle("Plain"); gStyle->SetPalette(1); +// TCanvas *c2 = new TCanvas("c2","c2",500,400); +// AliTPCROCVoltError3D roc; +// roc.SetElectronArrivalCorrection(kFALSE); // Correction for electron arrival offset, IROC vs OROC +// roc.SetROCDisplacement(kTRUE); // include the chamber offset in z when calculating the dz +// roc.SetOmegaTauT1T2(0,1,1); // B=0 +// roc.CreateHistoDZinXY(1.,300,300)->Draw("colz"); +// return c2; +// } +// End_Macro +// +// Begin_Html +//

+// Date: 08/08/2010
+// Authors: Jim Thomas, Stefan Rossegger +// End_Html +// _________________________________________________________________ + #include "AliMagF.h" #include "TGeoGlobalMagField.h" diff --git a/TPC/AliTPCROCVoltError3D.h b/TPC/AliTPCROCVoltError3D.h index 8b595ffbd09..bf5a3caa9dc 100644 --- a/TPC/AliTPCROCVoltError3D.h +++ b/TPC/AliTPCROCVoltError3D.h @@ -5,9 +5,7 @@ * See cxx source for full Copyright notice */ //////////////////////////////////////////////////////////////////////////// -// // -// AliTPCROCVoltError3D class // -// date: 01/06/2010 // +// AliTPCROCVoltError3D class // // Authors: Jim Thomas, Stefan Rossegger // //////////////////////////////////////////////////////////////////////////// diff --git a/TPC/AliTPCSpaceCharge.cxx b/TPC/AliTPCSpaceCharge.cxx index 8742612a443..d0306bbabf2 100644 --- a/TPC/AliTPCSpaceCharge.cxx +++ b/TPC/AliTPCSpaceCharge.cxx @@ -13,21 +13,46 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -////////////////////////////////////////////////////////////////////////////// -// // -// AliTPCSpaceCharge class // -// The class calculates the space point distortions due to a space charge // -// effect .... // -// The class allows "effective Omega Tau" corrections. // -// // -// NOTE: This class is capable of calculating z distortions due to // -// drift velocity change in dependence of the electric field!!! // -// // -// date: 23/08/2010 // -// Authors: Jim Thomas, Stefan Rossegger // -// // -// Example usage: // -////////////////////////////////////////////////////////////////////////////// +// _________________________________________________________________ +// +// Begin_Html +//

AliTPCSpaceCharge class

+// The class calculates the space point distortions due to a rotational +// symmetric space charge distribution with the TPC drift volume. +//

+// The class uses the PoissonRelaxation2D to calculate the resulting +// electrical field inhomogeneities in the (r,z)-plane. Then, the +// Langevin-integral formalism is used to calculate the space point distortions. +//

+// The class assumes, that the distortions scales linearly with the magnitude +// of the space charge distribution $\rho(r,z)$. The in here assumed distribution is +// $$\rho(r,z) = \frac{(A-B\,z)}{r^2} $$ wherein the factors A and B scale with the +// event multiplicity and the interaction rate. +//

+// The scaling factor can be set via the function SetCorrectionFactor. An example of +// the shape of the distortions is given below. +// End_Html +// +// Begin_Macro(source) +// { +// gROOT->SetStyle("Plain"); gStyle->SetPalette(1); +// TCanvas *c2 = new TCanvas("c2","c2",500,300); +// AliTPCSpaceCharge sc; +// sc.SetOmegaTauT1T2(-0.32,1,1); // B=0.5 Tesla +// sc.SetCorrectionFactor(0.0015); +// sc.CreateHistoDRinZR(0.)->Draw("surf2"); +// return c2; +// } +// End_Macro +// +// Begin_Html +//

+// Date: 23/08/2010
+// Authors: Jim Thomas, Stefan Rossegger +// End_Html +// _________________________________________________________________ + + #include "AliMagF.h" #include "TGeoGlobalMagField.h" diff --git a/TPC/AliTPCSpaceCharge.h b/TPC/AliTPCSpaceCharge.h index 21c10422d2d..a263953d93f 100644 --- a/TPC/AliTPCSpaceCharge.h +++ b/TPC/AliTPCSpaceCharge.h @@ -5,9 +5,7 @@ * See cxx source for full Copyright notice */ //////////////////////////////////////////////////////////////////////////// -// // // AliTPCSpaceCharge class // -// date: 19/06/2010 // // Authors: Jim Thomas, Stefan Rossegger // //////////////////////////////////////////////////////////////////////////// diff --git a/TPC/AliTPCSpaceCharge3D.cxx b/TPC/AliTPCSpaceCharge3D.cxx index ff138324de1..b4b71836537 100644 --- a/TPC/AliTPCSpaceCharge3D.cxx +++ b/TPC/AliTPCSpaceCharge3D.cxx @@ -13,26 +13,55 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -////////////////////////////////////////////////////////////////////////////// -// // -// AliTPCSpaceCharge3D class // -// The class calculates the space point distortions due to a space charge // -// effect .... // -// Method of calculation: // -// The analytical solution for the poisson problem in 3D (cylindrical coord)// -// is used in form of look up tables. PieceOfCake (POC) voxel were pre- // -// calculated and can be sumed up (weighted) according to the what is needed// -// // -// The class allows "effective Omega Tau" corrections. // -// // -// NOTE: This class is not capable of calculation z distortions due to // -// drift velocity change in dependence of the electric field!!! // -// // -// date: 19/06/2010 // -// Authors: Stefan Rossegger // -// // -// Example usage: // -////////////////////////////////////////////////////////////////////////////// +// _________________________________________________________________ +// +// Begin_Html +//

AliTPCSpaceCharge3D class

+// The class calculates the space point distortions due to an arbitrary space +// charge distribution in 3D. +//

+// The method of calculation is based on the analytical solution for the Poisson +// problem in 3D (cylindrical coordinates). The solution is used in form of +// look up tables, where the pre calculated solutions for different voxel +// positions are stored. These voxel solutions can be summed up according +// to the weight of the position of the applied space charge distribution. +// Further details can be found in \cite[chap.5]{PhD-thesis_S.Rossegger}. +//

+// The class also allows a simple scaling of the resulting distortions +// via the function SetCorrectionFactor. This speeds up the calculation +// time under the assumption, that the distortions scales linearly with the +// magnitude of the space charge distribution $\rho(r,z)$ and the shape stays +// the same at higher luminosities. +//

+// In contrast to the implementation in 2D (see the class AliTPCSpaceChargeabove), +// the input charge distribution can be of arbitrary character. An example on how +// to produce a corresponding charge distribution can be found in the function +// WriteChargeDistributionToFile. In there, a $\rho(r,z) = (A-B\,z)/r^2$, +// with slightly different magnitude on the A and C side (due to the muon absorber), +// is superpositioned with a few leaking wires at arbitrary positions. +// End_Html +// +// Begin_Macro(source) +// { +// gROOT->SetStyle("Plain"); gStyle->SetPalette(1); +// TCanvas *c2 = new TCanvas("c2","c2",500,400); +// AliTPCSpaceCharge3D sc; +// sc.WriteChargeDistributionToFile("SC_zr2_GGleaks.root"); +// sc.SetSCDataFileName("SC_zr2_GGleaks.root"); +// sc.SetOmegaTauT1T2(0,1,1); // B=0 +// sc.InitSpaceCharge3DDistortion(); +// sc.CreateHistoDRinXY(15,300,300)->Draw("colz"); +// return c2; +// } +// End_Macro +// +// Begin_Html +//

+// Date: 19/06/2010
+// Authors: Stefan Rossegger +// End_Html +// _________________________________________________________________ + #include "AliMagF.h" #include "TGeoGlobalMagField.h" diff --git a/TPC/AliTPCSpaceCharge3D.h b/TPC/AliTPCSpaceCharge3D.h index f557d2e0e1a..b69b7fdc74f 100644 --- a/TPC/AliTPCSpaceCharge3D.h +++ b/TPC/AliTPCSpaceCharge3D.h @@ -5,9 +5,7 @@ * See cxx source for full Copyright notice */ //////////////////////////////////////////////////////////////////////////// -// // -// AliTPCSpaceCharge3D class // -// date: 19/06/2010 // +// AliTPCSpaceCharge3D class // // Authors: Stefan Rossegger // //////////////////////////////////////////////////////////////////////////// diff --git a/TPC/TPCbaseLinkDef.h b/TPC/TPCbaseLinkDef.h index e120ff988fa..33aa06b6dbc 100644 --- a/TPC/TPCbaseLinkDef.h +++ b/TPC/TPCbaseLinkDef.h @@ -102,6 +102,7 @@ #pragma link C++ class AliTPCBoundaryVoltError+; #pragma link C++ class AliTPCCalibGlobalMisalignment+; #pragma link C++ class AliTPCSpaceCharge+; +#pragma link C++ class AliTPCSpaceCharge3D+; #pragma link C++ class AliTPCExBEffective+; #pragma link C++ class AliTPCExBEffectiveSector+; diff --git a/TPC/libTPCbase.pkg b/TPC/libTPCbase.pkg index 39de901575b..558ff739adb 100644 --- a/TPC/libTPCbase.pkg +++ b/TPC/libTPCbase.pkg @@ -25,7 +25,10 @@ SRCS:= AliSegmentID.cxx AliSegmentArray.cxx AliDigits.cxx AliH2F.cxx \ AliTPCkalmanTime.cxx AliESDcosmic.cxx AliTPCPointCorrection.cxx AliTPCTransformation.cxx \ AliTPCkalmanFit.cxx AliTPCLaserTrack.cxx AliTPCcalibBase.cxx \ AliTPCCorrection.cxx AliTPCInverseCorrection.cxx AliTPCComposedCorrection.cxx \ - AliTPCExBBShape.cxx AliTPCExBTwist.cxx AliTPCGGVoltError.cxx AliTPCFCVoltError3D.cxx AliTPCROCVoltError3D.cxx AliTPCBoundaryVoltError.cxx AliTPCSpaceCharge.cxx AliXRDPROOFtoolkit.cxx AliTPCCalibGlobalMisalignment.cxx AliTPCExBEffective.cxx AliTPCExBEffectiveSector.cxx + AliTPCExBBShape.cxx AliTPCExBTwist.cxx AliTPCGGVoltError.cxx AliTPCBoundaryVoltError.cxx \ + AliTPCCalibGlobalMisalignment.cxx AliTPCFCVoltError3D.cxx AliTPCROCVoltError3D.cxx \ + AliTPCSpaceCharge.cxx AliTPCSpaceCharge3D.cxx AliXRDPROOFtoolkit.cxx \ + AliTPCExBEffective.cxx AliTPCExBEffectiveSector.cxx HDRS:= $(SRCS:.cxx=.h) -- 2.43.5