1 ///////////////////////////////////////////////////////////////////////////////
3 // Time Projection Chamber version 2 -- detailed TPC and slow simulation //
7 <img src="gif/AliTPCv2Class.gif">
12 ///////////////////////////////////////////////////////////////////////////////
15 #include <TGeometry.h>
25 #include "AliTPCParam.h"
30 //_____________________________________________________________________________
31 AliTPCv2::AliTPCv2(const char *name, const char *title) :
35 // Standard constructor for Time Projection Chamber version 2
39 SetBufferSize(128000);
42 //_____________________________________________________________________________
43 void AliTPCv2::CreateGeometry()
46 // Create the geometry of Time Projection Chamber version 2
50 <img src="gif/AliTPCv2.gif">
55 <img src="gif/AliTPCv2Tree.gif">
59 AliMC* pMC = AliMC::GetMC();
61 Int_t *idtmed = gAlice->Idtmed();
63 AliTPCParam * fTPCParam = &(fDigParam->GetParam());
67 Float_t rlsl, wlsl, rssl, rlsu, wssl, wlsu, rssu, wssu;
69 Float_t alpha, x, y, z, sec_thick;
71 Float_t r1, r2, x1, z0, z1, x2, theta1, theta2, theta3, dm[21];
81 Int_t ifl1 = 0, ifl2 = 0;
82 Float_t phi1, phi2, phi3;
84 // ---------------------------------------------------
85 // sector specification check
86 // ---------------------------------------------------
90 for (i = 0; i < 6; ++i) {
91 if (fSecLows[i] > 0 && fSecLows[i] <25) {
93 printf("*** SECTOR %d selected\n",fSecLows[i]);
98 printf("*** ALL LOWER SECTORS SELECTED ***\n");
105 for (i = 0; i < 12; ++i) {
106 if (fSecUps[i] > 24 && fSecUps[i] < 73) {
108 printf("*** SECTOR %d selected\n",fSecUps[i]);
113 printf("*** ALL UPPER SECTORS SELECTED ***\n");
117 if (ifl1 == 0 && ifl2 == 0) {
118 printf("*** ERROR: AT LEAST ONE SECTOR MUST BE SPECIFIED ***\n");
119 printf("!!! PROGRAM STOPPED !!!\n");
123 if ((fSecAL < 0 || fSecAU < 0) && fSens >= 0) {
124 printf("** ERROR: STRIPS CANNOT BE SPECIFIED FOR ALL SECTORS **\n");
125 printf("!!! PROGRAM STOPPED !!!\n");
128 // ----------------------------------------------------
129 // FIELD CAGE WITH ENDCAPS - CARBON FIBER
130 // THIS IS ALSO A TPC MOTHER VOLUME
131 // ----------------------------------------------------
136 pMC->Gsvolu("TPC ", "TUBE", idtmed[407], dm, 3);
137 // -------------------------------------------------------
138 // drift gas Ne/CO2 (90/10 volume) - nonsensitive
139 // field cage thickness = 0.52% X0
140 // ----------------------------------------------------
145 pMC->Gsvolu("TGAS", "TUBE", idtmed[402], dm, 3);
146 // ------------------------------------------------------
147 // "side" gas volume (the same as drift gas),
148 // here the readout chambers are positioned
149 // ------------------------------------------------------
150 dm[2] = 0.5*(275.-250.);
153 pMC->Gsvolu("TPSG", "TUBE", idtmed[401], dm, 3);
154 // ------------------------------------------------------
155 // HV midplane - 20 microns of mylar
156 // -----------------------------------------------------
159 pMC->Gsvolu("TPHV", "TUBE", idtmed[405], dm, 3);
161 // ====================================================
162 // lower and upper readout chambers
163 // ====================================================
164 // sectros opening angles in degrees
165 // ---------------------------------------------------
168 thl = TMath::Tan(opl * .5 * kDegrad);
169 thu = TMath::Tan(opu * .5 * kDegrad);
170 // ---------------------------------------------------
171 // S and L-sectors radii
172 // ---------------------------------------------------
177 // --------------------------------------------------
179 // --------------------------------------------------
184 // ---------------------------------------------------
185 // Sector thickness 25% of X0 (Al)
186 // ---------------------------------------------------
188 // ---------------------------------------------------
189 // S-sectors (lower sectors)
190 // ---------------------------------------------------
193 dm[2] = sec_thick * .5;
194 dm[3] = (rssu - rssl) * .5;
198 pMC->Gsvolu("TRCS", "TRD1", idtmed[399], dm, 4);
199 // -----------------------------------------------------
200 // S-sectors --> "gas sectors" - sensitive
201 // -----------------------------------------------------
202 dm[2] = (250.-0.001)/2.;
203 pMC->Gsvolu("TSGA", "TRD1", idtmed[403], dm, 4);
204 // -------------------------------------------------------------
205 // Only for the debugging purpose and resolution calculation
206 // Sensitive strips at the pad-row center
207 // -------------------------------------------------------------
209 pMC->Gsvolu("TSST", "TRD1", idtmed[403], dm, 0);
212 z0 = rssl + (rssu - rssl) * .5;
214 for (iss = 0; iss < fTPCParam->GetNRowLow(); ++iss) {
215 r1 = fTPCParam->GetPadRowRadiiLow(iss);
216 r2 = r1 + dm[3] * 2.;
217 dm[0] = r1 * thl - 2.63;
218 dm[1] = r2 * thl - 2.63;
220 zz = -z0 + r1 +dm[3];
222 pMC->Gsposp("TSST", iss+1, "TSGA", 0, 0, zz, 0, "ONLY", dm, 4);
224 pMC->Gsord("TSGA", 3);
226 // ---------------------------------------------------
227 // L-sectors (upper sectors)
228 // ---------------------------------------------------
231 dm[2] = sec_thick * .5;
232 dm[3] = (rlsu - rlsl) * .5;
236 pMC->Gsvolu("TRCL", "TRD1", idtmed[399], dm, 4);
237 // -----------------------------------------------------
238 // L-sectors - "gas sectors" - sensitive!
239 // -----------------------------------------------------
240 dm[2] = (250.-0.001)/2.;
241 pMC->Gsvolu("TLGA", "TRD1", idtmed[403], dm, 4);
242 // -------------------------------------------------------------
243 // Only for the debugging purpose and resolution calculation
244 // Sensitive strips at the pad-row center
245 // -------------------------------------------------------------
247 pMC->Gsvolu("TLST", "TRD1", idtmed[403], dm, 0);
251 z0 = rlsl+ (rlsu - rlsl) * .5;
253 for (ils = 0; ils <fTPCParam->GetNRowUp(); ++ils) {
254 r1 = fTPCParam->GetPadRowRadiiUp(ils);
255 r2 = r1 + dm[3] * 2.;
256 dm[0] = r1 * thu - 2.63;
257 dm[1] = r2 * thu - 2.63;
259 zz = -z0 + r1 +dm[3];
261 pMC->Gsposp("TLST", ils+1, "TLGA", 0, 0, zz, 0, "ONLY", dm, 4);
263 pMC->Gsord("TLGA", 3);
265 // ******************************************************
266 // ------------------------------------------------
267 // positioning of lower sectors (1-12)*2
268 // rotation matrices 1-12
270 // the isec_al flag allows to select all (<0) or
271 // only a few (up to 6) sectors
272 // ------------------------------------------------
274 z1 = -z_side + sec_thick * .5;
276 for (il = 1; il <= 12; ++il) {
277 phi1 = (il - 1) * opl + 270.;
284 phi3 = (il - 1) * opl;
288 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
290 alpha = (il - 1) * opl * kDegrad;
291 x = x0l * TMath::Cos(alpha);
292 y = x0l * TMath::Sin(alpha);
295 // -----------------------------------------------------------
296 // position ALL lower sectors
297 // -----------------------------------------------------------
298 pMC->Gspos("TSGA", il, "TGAS", x, y, z, idrotm[idr], "ONLY");
299 pMC->Gspos("TSGA",il+12 , "TGAS", x, y, -z, idrotm[idr], "ONLY");
301 // -----------------------------------------------------------
302 // position selected lower sectors
303 // -----------------------------------------------------------
304 for (isll = 1; isll <= 6; ++isll) {
305 if (fSecLows[isll - 1] == il) {
306 pMC->Gspos("TSGA", il, "TGAS", x, y, z, idrotm[idr], "ONLY");
307 } else if (fSecLows[isll - 1] == il + 12) {
308 pMC->Gspos("TSGA",il+12 , "TGAS", x, y, -z, idrotm[idr],"ONLY");
313 pMC->Gspos("TRCS", il, "TPSG", x, y, z1, idrotm[idr], "ONLY");
316 // ----------------------------------------------------
317 // positioning of upper sectors (1-24)*2
318 // rotation matrices 13-36
319 // the isec_au flag allows to select all (<0) or
320 // only a few (up to 12) sectors
321 // ----------------------------------------------------
322 for (iu = 1; iu <= 24; ++iu) {
323 phi1 = (iu - 1) * opu + 270.;
330 phi3 = (iu - 1) * opu;
334 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
336 alpha = (iu - 1) * opu * kDegrad;
337 x = x0u * TMath::Cos(alpha);
338 y = x0u * TMath::Sin(alpha);
341 // -------------------------------------------------------------
342 // position ALL upper sectors
343 // -------------------------------------------------------------
344 pMC->Gspos("TLGA", iu, "TGAS", x, y, z, idrotm[idr], "ONLY");
345 pMC->Gspos("TLGA",iu+24 , "TGAS", x, y, -z, idrotm[idr], "ONLY");
347 // -------------------------------------------------------------
348 // position selected upper sectors
349 // -------------------------------------------------------------
350 for (isll = 1; isll <= 12; ++isll) {
351 if (fSecUps[isll - 1] == iu + 24) {
352 pMC->Gspos("TLGA", iu, "TGAS", x, y, z, idrotm[idr], "ONLY");
353 } else if (fSecUps[isll - 1] == iu + 48) {
354 pMC->Gspos("TLGA",iu+24 , "TGAS", x, y, -z, idrotm[idr],"ONLY");
359 pMC->Gspos("TRCL", iu, "TPSG", x, y, z1, idrotm[idr], "ONLY");
361 // --------------------------------------------------------
362 // Spoke wheel structures
363 // --------------------------------------------------------
364 pMC->Gsvolu("TSWS", "TUBE", idtmed[399], dm, 0);
372 pMC->Gsposp("TSWS", 1, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
377 pMC->Gsposp("TSWS", 2, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
382 pMC->Gsposp("TSWS", 3, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
384 // -------------------------------------------------------
385 // this volumes are to avoid overlaping
386 // -------------------------------------------------------
392 pMC->Gsposp("TSWS", 4, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
393 pMC->Gsposp("TSWS", 5, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
397 pMC->Gsposp("TSWS", 6, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
398 pMC->Gsposp("TSWS", 7, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
401 dm[1] = 257.+0.09776;
406 pMC->Gsposp("TSWS", 8, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
407 pMC->Gsposp("TSWS", 9, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
408 // ==========================================================
410 // ==========================================================
411 // ----------------------------------------------------------
412 // Large wheel -> positioned in the TPC
413 // ----------------------------------------------------------
414 dm[0] = 257.+0.09776;
417 pMC->Gsvolu("TPW1", "TUBE", idtmed[399], dm, 3);
423 pMC->Gsvolu("TPW2", "TUBE", idtmed[498], dm, 3);
425 pMC->Gspos("TPW2", 1, "TPW1", 0, 0, 0, 0, "ONLY");
427 pMC->Gspos("TPW1", 1, "TPC ", 0, 0, z0, 0, "ONLY");
428 pMC->Gspos("TPW1", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
429 // -----------------------------------------------------------
430 // Small wheel -> positioned in the TPSG
431 // -----------------------------------------------------------
436 pMC->Gsvolu("TPW3", "TUBE", idtmed[399], dm, 3);
442 pMC->Gsvolu("TPW4", "TUBE", idtmed[401], dm, 3);
444 pMC->Gspos("TPW4", 1, "TPW3", 0, 0, 0, 0, "ONLY");
448 pMC->Gspos("TPW3", 1, "TPSG", 0, 0, z0, 0, "ONLY");
449 // ---------------------------------------------------------
450 // spokes, inner and outer, also the inner ring
451 // ---------------------------------------------------------
452 dm[0] = 0.5*(135.9-82.1);
458 pMC->Gsvolu("TSPI", "BOX ", idtmed[399], dm, 3);
463 pMC->Gsvolu("TSP1", "BOX ", idtmed[498], dm, 3);
465 pMC->Gspos("TSP1", 1, "TSPI", 0, 0, 0, 0, "ONLY");
467 dm[0] = 0.5*(256.9-142.1);
473 pMC->Gsvolu("TSPO", "BOX ", idtmed[399], dm, 3);
478 pMC->Gsvolu("TSP2", "BOX ", idtmed[498], dm, 3);
480 pMC->Gspos("TSP2", 1, "TSPO", 0, 0, 0, 0, "ONLY");
481 // --------------------------------------------------------
486 pMC->Gsvolu("TSWH", "TUBE", idtmed[399], dm, 3);
492 pMC->Gsvolu("TSW1", "TUBE", idtmed[498], dm, 3);
494 pMC->Gspos("TSW1", 1, "TSWH", 0, 0, 0, 0, "ONLY");
496 z0 = z_side - .16168 - 2.;
497 // --------------------------------------------------------
498 pMC->Gspos("TSWH", 1, "TPSG", 0, 0, z0, 0, "ONLY");
499 // -------------------------------------------------------
500 // posiioning of the inner spokes
501 // -------------------------------------------------------
502 for (il = 1; il <= 6; ++il) {
503 phi1 = opl * .5 + (il - 1) * 2. * opl;
505 phi2 = opl * .5 + 90. + (il - 1) * 2. * opl;
513 alpha = phi1 * kDegrad;
514 x = x1 * TMath::Cos(alpha);
515 y = x1 * TMath::Sin(alpha);
519 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
520 pMC->Gspos("TSPI", il, "TPSG", x, y, z0, idrotm[idr], "ONLY");
524 for (iu = 1; iu <= 12; ++iu) {
525 phi1 = opu * .5 + (iu - 1) * 2. * opu;
527 phi2 = opu * .5 + 90. + (iu - 1) * 2. * opu;
535 alpha = phi1 * kDegrad;
536 x = x2 * TMath::Cos(alpha);
537 y = x2 * TMath::Sin(alpha);
541 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
542 pMC->Gspos("TSPO", iu, "TPSG", x, y, z0, idrotm[idr], "ONLY");
544 // --------------------------------------------------------
545 // endcap cover (C, 0.86% X0)
546 // --------------------------------------------------------
551 pMC->Gsvolu("TCOV", "TUBE", idtmed[407], dm, 3);
555 pMC->Gspos("TCOV", 1, "TPSG", 0, 0, z0, 0, "ONLY");
556 // --------------------------------------------------------
557 // put the readout chambers into the TPC
558 // --------------------------------------------------------
566 AliMatrix(idrotm[55], theta1, phi1, theta2, phi2, theta3, phi3);
570 pMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY");
571 pMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[55], "ONLY");
572 // ---------------------------------------------------------
573 // outer gas insulation (CO2)
574 // ---------------------------------------------------------
575 dm[0] = 257.+0.09776;
576 dm[1] = 278.-0.25004;
579 pMC->Gsvolu("TPOI", "TUBE", idtmed[406], dm, 3);
581 pMC->Gspos("TPHV", 1, "TGAS", 0, 0, 0, 0, "ONLY");
582 pMC->Gspos("TGAS", 1, "TPC ", 0, 0, 0, 0, "ONLY");
583 pMC->Gspos("TPOI", 1, "TPC ", 0, 0, 0, 0, "ONLY");
585 pMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
586 // ======================================================
587 // all volumes below are positioned in ALIC
588 // ======================================================
589 // ------------------------------------------------------
590 // the last parts of the smaller wheel (TSWS)
591 // ------------------------------------------------------
598 pMC->Gsposp("TSWS", 10, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
599 pMC->Gsposp("TSWS", 11, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
605 pMC->Gsposp("TSWS", 12, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
606 pMC->Gsposp("TSWS", 13, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
607 // ----------------------------------------------------
608 // Inner vessel (PCON)
609 // This volume is to be positioned directly in ALIC
610 // ----------------------------------------------------
631 pMC->Gsvolu("TPIV", "PCON", idtmed[407], dm, 15);
632 // --------------------------------------------------------
633 // fill the inner vessel with CO2, (HV kDegrader)
634 // cone parts have different thickness
635 // than the central barrel, according to the TP
636 // --------------------------------------------------------
643 dm[3] = -(250.-0.2162);
644 dm[4] = (185.5-0.2126)*tana+0.2126;
663 dm[18] = (250.-0.2162);
664 dm[19] = (185.5-0.2126)*tana+0.2126;
667 pMC->Gsvolu("TPVD", "PCON", idtmed[406], dm, 21);
669 pMC->Gspos("TPVD", 1, "TPIV", 0, 0, 0, 0, "ONLY");
671 pMC->Gspos("TPIV", 1, "ALIC", 0, 0, 0, 0, "ONLY");
672 // ---------------------------------------------------
674 // ---------------------------------------------------
675 pMC->Gsord("TGAS", 6);
676 pMC->Gsord("TPSG", 6);
679 //_____________________________________________________________________________
680 void AliTPCv2::DrawDetector()
683 // Draw a shaded view of the Time Projection Chamber version 1
686 AliMC* pMC = AliMC::GetMC();
688 // Set everything unseen
689 pMC->Gsatt("*", "seen", -1);
691 // Set ALIC mother transparent
692 pMC->Gsatt("ALIC","SEEN",0);
694 // Set the volumes visible
695 pMC->Gsatt("TPC","SEEN",0);
696 pMC->Gsatt("TGAS","SEEN",0);
697 pMC->Gsatt("TPSG","SEEN",0);
698 pMC->Gsatt("TPHV","SEEN",1);
699 pMC->Gsatt("TRCS","SEEN",1);
700 pMC->Gsatt("TRCL","SEEN",1);
701 pMC->Gsatt("TSWS","SEEN",1);
702 pMC->Gsatt("TPW1","SEEN",1);
703 pMC->Gsatt("TPW3","SEEN",1);
704 pMC->Gsatt("TSPI","SEEN",1);
705 pMC->Gsatt("TSPO","SEEN",1);
706 pMC->Gsatt("TSWH","SEEN",1);
707 pMC->Gsatt("TPOI","SEEN",1);
708 pMC->Gsatt("TPIV","SEEN",1);
709 pMC->Gsatt("TPVD","SEEN",1);
711 pMC->Gdopt("hide", "on");
712 pMC->Gdopt("shad", "on");
713 pMC->Gsatt("*", "fill", 7);
714 pMC->SetClipBox(".");
715 pMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
717 pMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
718 pMC->Gdhead(1111, "Time Projection Chamber");
719 pMC->Gdman(18, 4, "MAN");
720 pMC->Gdopt("hide","off");
723 //_____________________________________________________________________________
724 void AliTPCv2::CreateMaterials()
727 // Define materials for version 2 of the Time Projection Chamber
730 AliMC* pMC = AliMC::GetMC();
733 // Increase maximum number of steps
734 pMC->SetMaxNStep(30000);
736 AliTPC::CreateMaterials();
739 //_____________________________________________________________________________
740 void AliTPCv2::Init()
743 // Initialises version 2 of the TPC after that it has been built
745 AliMC* pMC=AliMC::GetMC();
746 Int_t *idtmed = gAlice->Idtmed();
748 fIdSens1=pMC->VolId("TLGA"); // L-sector
749 fIdSens2=pMC->VolId("TSGA"); // S-sector
750 fIdSens3=pMC->VolId("TSST"); // strip - S-sector (not always used)
751 fIdSens4=pMC->VolId("TLST"); // strip - S-sector (not always used)
753 pMC->SetMaxNStep(30000); // max. number of steps increased
755 pMC->Gstpar(idtmed[403],"LOSS",5);
757 printf("*** TPC version 2 initialized ***\n");
758 printf("Maximum number of steps = %d\n",pMC->GetMaxNStep());
764 //_____________________________________________________________________________
765 void AliTPCv2::StepManager()
768 // Called for every step in the Time Projection Chamber
772 // parameters used for the energy loss calculations
774 const Float_t prim = 14.35; // number of primary collisions per 1 cm
775 const Float_t poti = 20.77e-9; // first ionization potential for Ne/CO2
776 const Float_t w_ion = 35.97e-9; // energy for the ion-electron pair creation
779 const Float_t big = 1.e10;
784 TClonesArray &lhits = *fHits;
785 AliMC* pMC=AliMC::GetMC();
791 pMC->SetMaxStep(big);
793 if(!pMC->TrackAlive()) return; // particle has disappeared
795 Float_t charge = pMC->TrackCharge();
797 if(TMath::Abs(charge)<=0.) return; // take only charged particles
800 id=pMC->CurrentVol(0, copy);
802 // Check the sensitive volume
806 vol[0] = copy + 24; // L-sector number
808 else if(id == fIdSens2)
810 vol[0] = copy; // S-sector number
812 else if(id == fIdSens3 && pMC->TrackEntering())
814 vol[1] = copy; // row number
815 id = pMC->CurrentVolOff(1,0,copy);
816 vol[0] = copy; // sector number (S-sector)
818 pMC->TrackPosition(hits);
819 hits[3]=0.; // this hit has no energy loss
820 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
822 else if(id == fIdSens4 && pMC->TrackEntering())
824 vol[1] = copy; // row number
825 id = pMC->CurrentVolOff(1,0,copy);
826 vol[0] = copy+24; // sector number (L-sector)
828 pMC->TrackPosition(hits);
829 hits[3]=0.; // this hit has no energy loss
830 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
835 // charged particle is in the sensitive volume
838 if(pMC->TrackStep() > 0) {
840 Int_t nel = (Int_t)(((pMC->Edep())-poti)/w_ion) + 1;
841 nel=TMath::Min(nel,300); // 300 electrons corresponds to 10 keV
843 pMC->TrackPosition(hits);
844 hits[3]=(Float_t)nel;
848 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
852 // Stemax calculation for the next step
856 pMC->TrackMomentum(vect);
857 Float_t ptot = vect[3];
858 Float_t beta_gamma = ptot/(pMC->TrackMass());
860 if(pMC->TrackPid() <= 3 && ptot > 0.002)
862 pp = prim*1.58; // electrons above 20 MeV/c are on the plateau!
866 pp=prim*BetheBloch(beta_gamma);
867 if(TMath::Abs(charge) > 1.) pp *= (charge*charge);
871 pMC->Rndm(random,1); // good, old GRNDM from Geant3
873 Double_t rnd = (Double_t)random[0];
875 pMC->SetMaxStep(-TMath::Log(rnd)/pp);
879 //_____________________________________________________________________________
880 Float_t AliTPCv2::BetheBloch(Float_t bg)
883 // Bethe-Bloch energy loss formula
885 const Double_t p1=0.76176e-1;
886 const Double_t p2=10.632;
887 const Double_t p3=0.13279e-4;
888 const Double_t p4=1.8631;
889 const Double_t p5=1.9479;
891 Double_t dbg = (Double_t) bg;
893 Double_t beta = dbg/TMath::Sqrt(1.+dbg*dbg);
895 Double_t aa = TMath::Power(beta,p4);
896 Double_t bb = TMath::Power(1./dbg,p5);
898 bb=TMath::Log(p3+bb);
900 return ((Float_t)((p2-aa-bb)*p1/aa));