1 ///////////////////////////////////////////////////////////////////////////////
3 // Time Projection Chamber version 2 -- detailed TPC and slow simulation //
7 <img src="picts/AliTPCv2Class.gif">
12 ///////////////////////////////////////////////////////////////////////////////
24 //_____________________________________________________________________________
25 AliTPCv2::AliTPCv2(const char *name, const char *title) :
29 // Standard constructor for Time Projection Chamber version 2
33 SetBufferSize(128000);
36 //_____________________________________________________________________________
37 void AliTPCv2::CreateGeometry()
40 // Create the geometry of Time Projection Chamber version 2
44 <img src="picts/AliTPCv2.gif">
49 <img src="picts/AliTPCv2Tree.gif">
53 Int_t *idtmed = fIdtmed->GetArray()-399;
55 AliTPCParam * fTPCParam = &(fDigParam->GetParam());
59 Float_t rlsl, wlsl, rssl, rlsu, wssl, wlsu, rssu, wssu;
61 Float_t alpha, x, y, z, sec_thick;
63 Float_t r1, r2, x1, z0, z1, x2, theta1, theta2, theta3, dm[21];
73 Int_t ifl1 = 0, ifl2 = 0;
74 Float_t phi1, phi2, phi3;
76 // ---------------------------------------------------
77 // sector specification check
78 // ---------------------------------------------------
82 for (i = 0; i < 6; ++i) {
83 if (fSecLows[i] > 0 && fSecLows[i] <25) {
85 printf("*** SECTOR %d selected\n",fSecLows[i]);
90 printf("*** ALL LOWER SECTORS SELECTED ***\n");
97 for (i = 0; i < 12; ++i) {
98 if (fSecUps[i] > 24 && fSecUps[i] < 73) {
100 printf("*** SECTOR %d selected\n",fSecUps[i]);
105 printf("*** ALL UPPER SECTORS SELECTED ***\n");
109 if (ifl1 == 0 && ifl2 == 0) {
110 printf("*** ERROR: AT LEAST ONE SECTOR MUST BE SPECIFIED ***\n");
111 printf("!!! PROGRAM STOPPED !!!\n");
115 if ((fSecAL < 0 || fSecAU < 0) && fSens >= 0) {
116 printf("** ERROR: STRIPS CANNOT BE SPECIFIED FOR ALL SECTORS **\n");
117 printf("!!! PROGRAM STOPPED !!!\n");
120 // ----------------------------------------------------
121 // FIELD CAGE WITH ENDCAPS - CARBON FIBER
122 // THIS IS ALSO A TPC MOTHER VOLUME
123 // ----------------------------------------------------
128 gMC->Gsvolu("TPC ", "TUBE", idtmed[407], dm, 3);
129 // -------------------------------------------------------
130 // drift gas Ne/CO2 (90/10 volume) - nonsensitive
131 // field cage thickness = 0.52% X0
132 // ----------------------------------------------------
137 gMC->Gsvolu("TGAS", "TUBE", idtmed[402], dm, 3);
138 // ------------------------------------------------------
139 // "side" gas volume (the same as drift gas),
140 // here the readout chambers are positioned
141 // ------------------------------------------------------
142 dm[2] = 0.5*(275.-250.);
145 gMC->Gsvolu("TPSG", "TUBE", idtmed[401], dm, 3);
146 // ------------------------------------------------------
147 // HV midplane - 20 microns of mylar
148 // -----------------------------------------------------
151 gMC->Gsvolu("TPHV", "TUBE", idtmed[405], dm, 3);
153 // ====================================================
154 // lower and upper readout chambers
155 // ====================================================
156 // sectros opening angles in degrees
157 // ---------------------------------------------------
160 thl = TMath::Tan(opl * .5 * kDegrad);
161 thu = TMath::Tan(opu * .5 * kDegrad);
162 // ---------------------------------------------------
163 // S and L-sectors radii
164 // ---------------------------------------------------
169 // --------------------------------------------------
171 // --------------------------------------------------
176 // ---------------------------------------------------
177 // Sector thickness 25% of X0 (Al)
178 // ---------------------------------------------------
180 // ---------------------------------------------------
181 // S-sectors (lower sectors)
182 // ---------------------------------------------------
185 dm[2] = sec_thick * .5;
186 dm[3] = (rssu - rssl) * .5;
190 gMC->Gsvolu("TRCS", "TRD1", idtmed[399], dm, 4);
191 // -----------------------------------------------------
192 // S-sectors --> "gas sectors" - sensitive
193 // -----------------------------------------------------
194 dm[2] = (250.-0.001)/2.;
195 gMC->Gsvolu("TSGA", "TRD1", idtmed[403], dm, 4);
196 // -------------------------------------------------------------
197 // Only for the debugging purpose and resolution calculation
198 // Sensitive strips at the pad-row center
199 // -------------------------------------------------------------
201 gMC->Gsvolu("TSST", "TRD1", idtmed[403], dm, 0);
204 z0 = rssl + (rssu - rssl) * .5;
206 for (iss = 0; iss < fTPCParam->GetNRowLow(); ++iss) {
207 r1 = fTPCParam->GetPadRowRadiiLow(iss);
208 r2 = r1 + dm[3] * 2.;
209 dm[0] = r1 * thl - 2.63;
210 dm[1] = r2 * thl - 2.63;
212 zz = -z0 + r1 +dm[3];
214 gMC->Gsposp("TSST", iss+1, "TSGA", 0, 0, zz, 0, "ONLY", dm, 4);
216 gMC->Gsord("TSGA", 3);
218 // ---------------------------------------------------
219 // L-sectors (upper sectors)
220 // ---------------------------------------------------
223 dm[2] = sec_thick * .5;
224 dm[3] = (rlsu - rlsl) * .5;
228 gMC->Gsvolu("TRCL", "TRD1", idtmed[399], dm, 4);
229 // -----------------------------------------------------
230 // L-sectors - "gas sectors" - sensitive!
231 // -----------------------------------------------------
232 dm[2] = (250.-0.001)/2.;
233 gMC->Gsvolu("TLGA", "TRD1", idtmed[403], dm, 4);
234 // -------------------------------------------------------------
235 // Only for the debugging purpose and resolution calculation
236 // Sensitive strips at the pad-row center
237 // -------------------------------------------------------------
239 gMC->Gsvolu("TLST", "TRD1", idtmed[403], dm, 0);
243 z0 = rlsl+ (rlsu - rlsl) * .5;
245 for (ils = 0; ils <fTPCParam->GetNRowUp(); ++ils) {
246 r1 = fTPCParam->GetPadRowRadiiUp(ils);
247 r2 = r1 + dm[3] * 2.;
248 dm[0] = r1 * thu - 2.63;
249 dm[1] = r2 * thu - 2.63;
251 zz = -z0 + r1 +dm[3];
253 gMC->Gsposp("TLST", ils+1, "TLGA", 0, 0, zz, 0, "ONLY", dm, 4);
255 gMC->Gsord("TLGA", 3);
257 // ******************************************************
258 // ------------------------------------------------
259 // positioning of lower sectors (1-12)*2
260 // rotation matrices 1-12
262 // the isec_al flag allows to select all (<0) or
263 // only a few (up to 6) sectors
264 // ------------------------------------------------
266 z1 = -z_side + sec_thick * .5;
268 for (il = 1; il <= 12; ++il) {
269 phi1 = (il - 1) * opl + 270.;
276 phi3 = (il - 1) * opl;
280 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
282 alpha = (il - 1) * opl * kDegrad;
283 x = x0l * TMath::Cos(alpha);
284 y = x0l * TMath::Sin(alpha);
287 // -----------------------------------------------------------
288 // position ALL lower sectors
289 // -----------------------------------------------------------
290 gMC->Gspos("TSGA", il, "TGAS", x, y, z, idrotm[idr], "ONLY");
291 gMC->Gspos("TSGA",il+12 , "TGAS", x, y, -z, idrotm[idr], "ONLY");
293 // -----------------------------------------------------------
294 // position selected lower sectors
295 // -----------------------------------------------------------
296 for (isll = 1; isll <= 6; ++isll) {
297 if (fSecLows[isll - 1] == il) {
298 gMC->Gspos("TSGA", il, "TGAS", x, y, z, idrotm[idr], "ONLY");
299 } else if (fSecLows[isll - 1] == il + 12) {
300 gMC->Gspos("TSGA",il+12 , "TGAS", x, y, -z, idrotm[idr],"ONLY");
305 gMC->Gspos("TRCS", il, "TPSG", x, y, z1, idrotm[idr], "ONLY");
308 // ----------------------------------------------------
309 // positioning of upper sectors (1-24)*2
310 // rotation matrices 13-36
311 // the isec_au flag allows to select all (<0) or
312 // only a few (up to 12) sectors
313 // ----------------------------------------------------
314 for (iu = 1; iu <= 24; ++iu) {
315 phi1 = (iu - 1) * opu + 270.;
322 phi3 = (iu - 1) * opu;
326 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
328 alpha = (iu - 1) * opu * kDegrad;
329 x = x0u * TMath::Cos(alpha);
330 y = x0u * TMath::Sin(alpha);
333 // -------------------------------------------------------------
334 // position ALL upper sectors
335 // -------------------------------------------------------------
336 gMC->Gspos("TLGA", iu, "TGAS", x, y, z, idrotm[idr], "ONLY");
337 gMC->Gspos("TLGA",iu+24 , "TGAS", x, y, -z, idrotm[idr], "ONLY");
339 // -------------------------------------------------------------
340 // position selected upper sectors
341 // -------------------------------------------------------------
342 for (isll = 1; isll <= 12; ++isll) {
343 if (fSecUps[isll - 1] == iu + 24) {
344 gMC->Gspos("TLGA", iu, "TGAS", x, y, z, idrotm[idr], "ONLY");
345 } else if (fSecUps[isll - 1] == iu + 48) {
346 gMC->Gspos("TLGA",iu+24 , "TGAS", x, y, -z, idrotm[idr],"ONLY");
351 gMC->Gspos("TRCL", iu, "TPSG", x, y, z1, idrotm[idr], "ONLY");
353 // --------------------------------------------------------
354 // Spoke wheel structures
355 // --------------------------------------------------------
356 gMC->Gsvolu("TSWS", "TUBE", idtmed[399], dm, 0);
364 gMC->Gsposp("TSWS", 1, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
369 gMC->Gsposp("TSWS", 2, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
374 gMC->Gsposp("TSWS", 3, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
376 // -------------------------------------------------------
377 // this volumes are to avoid overlaping
378 // -------------------------------------------------------
384 gMC->Gsposp("TSWS", 4, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
385 gMC->Gsposp("TSWS", 5, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
389 gMC->Gsposp("TSWS", 6, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
390 gMC->Gsposp("TSWS", 7, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
393 dm[1] = 257.+0.09776;
398 gMC->Gsposp("TSWS", 8, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
399 gMC->Gsposp("TSWS", 9, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
400 // ==========================================================
402 // ==========================================================
403 // ----------------------------------------------------------
404 // Large wheel -> positioned in the TPC
405 // ----------------------------------------------------------
406 dm[0] = 257.+0.09776;
409 gMC->Gsvolu("TPW1", "TUBE", idtmed[399], dm, 3);
415 gMC->Gsvolu("TPW2", "TUBE", idtmed[498], dm, 3);
417 gMC->Gspos("TPW2", 1, "TPW1", 0, 0, 0, 0, "ONLY");
419 gMC->Gspos("TPW1", 1, "TPC ", 0, 0, z0, 0, "ONLY");
420 gMC->Gspos("TPW1", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
421 // -----------------------------------------------------------
422 // Small wheel -> positioned in the TPSG
423 // -----------------------------------------------------------
428 gMC->Gsvolu("TPW3", "TUBE", idtmed[399], dm, 3);
434 gMC->Gsvolu("TPW4", "TUBE", idtmed[401], dm, 3);
436 gMC->Gspos("TPW4", 1, "TPW3", 0, 0, 0, 0, "ONLY");
440 gMC->Gspos("TPW3", 1, "TPSG", 0, 0, z0, 0, "ONLY");
441 // ---------------------------------------------------------
442 // spokes, inner and outer, also the inner ring
443 // ---------------------------------------------------------
444 dm[0] = 0.5*(135.9-82.1);
450 gMC->Gsvolu("TSPI", "BOX ", idtmed[399], dm, 3);
455 gMC->Gsvolu("TSP1", "BOX ", idtmed[498], dm, 3);
457 gMC->Gspos("TSP1", 1, "TSPI", 0, 0, 0, 0, "ONLY");
459 dm[0] = 0.5*(256.9-142.1);
465 gMC->Gsvolu("TSPO", "BOX ", idtmed[399], dm, 3);
470 gMC->Gsvolu("TSP2", "BOX ", idtmed[498], dm, 3);
472 gMC->Gspos("TSP2", 1, "TSPO", 0, 0, 0, 0, "ONLY");
473 // --------------------------------------------------------
478 gMC->Gsvolu("TSWH", "TUBE", idtmed[399], dm, 3);
484 gMC->Gsvolu("TSW1", "TUBE", idtmed[498], dm, 3);
486 gMC->Gspos("TSW1", 1, "TSWH", 0, 0, 0, 0, "ONLY");
488 z0 = z_side - .16168 - 2.;
489 // --------------------------------------------------------
490 gMC->Gspos("TSWH", 1, "TPSG", 0, 0, z0, 0, "ONLY");
491 // -------------------------------------------------------
492 // posiioning of the inner spokes
493 // -------------------------------------------------------
494 for (il = 1; il <= 6; ++il) {
495 phi1 = opl * .5 + (il - 1) * 2. * opl;
497 phi2 = opl * .5 + 90. + (il - 1) * 2. * opl;
505 alpha = phi1 * kDegrad;
506 x = x1 * TMath::Cos(alpha);
507 y = x1 * TMath::Sin(alpha);
511 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
512 gMC->Gspos("TSPI", il, "TPSG", x, y, z0, idrotm[idr], "ONLY");
516 for (iu = 1; iu <= 12; ++iu) {
517 phi1 = opu * .5 + (iu - 1) * 2. * opu;
519 phi2 = opu * .5 + 90. + (iu - 1) * 2. * opu;
527 alpha = phi1 * kDegrad;
528 x = x2 * TMath::Cos(alpha);
529 y = x2 * TMath::Sin(alpha);
533 AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
534 gMC->Gspos("TSPO", iu, "TPSG", x, y, z0, idrotm[idr], "ONLY");
536 // --------------------------------------------------------
537 // endcap cover (C, 0.86% X0)
538 // --------------------------------------------------------
543 gMC->Gsvolu("TCOV", "TUBE", idtmed[407], dm, 3);
547 gMC->Gspos("TCOV", 1, "TPSG", 0, 0, z0, 0, "ONLY");
548 // --------------------------------------------------------
549 // put the readout chambers into the TPC
550 // --------------------------------------------------------
558 AliMatrix(idrotm[55], theta1, phi1, theta2, phi2, theta3, phi3);
562 gMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY");
563 gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[55], "ONLY");
564 // ---------------------------------------------------------
565 // outer gas insulation (CO2)
566 // ---------------------------------------------------------
567 dm[0] = 257.+0.09776;
568 dm[1] = 278.-0.25004;
571 gMC->Gsvolu("TPOI", "TUBE", idtmed[406], dm, 3);
573 gMC->Gspos("TPHV", 1, "TGAS", 0, 0, 0, 0, "ONLY");
574 gMC->Gspos("TGAS", 1, "TPC ", 0, 0, 0, 0, "ONLY");
575 gMC->Gspos("TPOI", 1, "TPC ", 0, 0, 0, 0, "ONLY");
577 gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
578 // ======================================================
579 // all volumes below are positioned in ALIC
580 // ======================================================
581 // ------------------------------------------------------
582 // the last parts of the smaller wheel (TSWS)
583 // ------------------------------------------------------
590 gMC->Gsposp("TSWS", 10, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
591 gMC->Gsposp("TSWS", 11, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
597 gMC->Gsposp("TSWS", 12, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
598 gMC->Gsposp("TSWS", 13, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
599 // ----------------------------------------------------
600 // Inner vessel (PCON)
601 // This volume is to be positioned directly in ALIC
602 // ----------------------------------------------------
623 gMC->Gsvolu("TPIV", "PCON", idtmed[407], dm, 15);
624 // --------------------------------------------------------
625 // fill the inner vessel with CO2, (HV kDegrader)
626 // cone parts have different thickness
627 // than the central barrel, according to the TP
628 // --------------------------------------------------------
635 dm[3] = -(250.-0.2162);
636 dm[4] = (185.5-0.2126)*tana+0.2126;
655 dm[18] = (250.-0.2162);
656 dm[19] = (185.5-0.2126)*tana+0.2126;
659 gMC->Gsvolu("TPVD", "PCON", idtmed[406], dm, 21);
661 gMC->Gspos("TPVD", 1, "TPIV", 0, 0, 0, 0, "ONLY");
663 gMC->Gspos("TPIV", 1, "ALIC", 0, 0, 0, 0, "ONLY");
664 // ---------------------------------------------------
666 // ---------------------------------------------------
667 gMC->Gsord("TGAS", 6);
668 gMC->Gsord("TPSG", 6);
671 //_____________________________________________________________________________
672 void AliTPCv2::DrawDetector()
675 // Draw a shaded view of the Time Projection Chamber version 1
678 // Set everything unseen
679 gMC->Gsatt("*", "seen", -1);
681 // Set ALIC mother transparent
682 gMC->Gsatt("ALIC","SEEN",0);
684 // Set the volumes visible
685 gMC->Gsatt("TPC","SEEN",0);
686 gMC->Gsatt("TGAS","SEEN",0);
687 gMC->Gsatt("TPSG","SEEN",0);
688 gMC->Gsatt("TPHV","SEEN",1);
689 gMC->Gsatt("TRCS","SEEN",1);
690 gMC->Gsatt("TRCL","SEEN",1);
691 gMC->Gsatt("TSWS","SEEN",1);
692 gMC->Gsatt("TPW1","SEEN",1);
693 gMC->Gsatt("TPW3","SEEN",1);
694 gMC->Gsatt("TSPI","SEEN",1);
695 gMC->Gsatt("TSPO","SEEN",1);
696 gMC->Gsatt("TSWH","SEEN",1);
697 gMC->Gsatt("TPOI","SEEN",1);
698 gMC->Gsatt("TPIV","SEEN",1);
699 gMC->Gsatt("TPVD","SEEN",1);
701 gMC->Gdopt("hide", "on");
702 gMC->Gdopt("shad", "on");
703 gMC->Gsatt("*", "fill", 7);
704 gMC->SetClipBox(".");
705 gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
707 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
708 gMC->Gdhead(1111, "Time Projection Chamber");
709 gMC->Gdman(18, 4, "MAN");
710 gMC->Gdopt("hide","off");
713 //_____________________________________________________________________________
714 void AliTPCv2::CreateMaterials()
717 // Define materials for version 2 of the Time Projection Chamber
721 // Increase maximum number of steps
722 gMC->SetMaxNStep(30000);
724 AliTPC::CreateMaterials();
727 //_____________________________________________________________________________
728 void AliTPCv2::Init()
731 // Initialises version 2 of the TPC after that it has been built
733 Int_t *idtmed = fIdtmed->GetArray()-399;
735 fIdSens1=gMC->VolId("TLGA"); // L-sector
736 fIdSens2=gMC->VolId("TSGA"); // S-sector
737 fIdSens3=gMC->VolId("TSST"); // strip - S-sector (not always used)
738 fIdSens4=gMC->VolId("TLST"); // strip - S-sector (not always used)
740 gMC->SetMaxNStep(30000); // max. number of steps increased
742 gMC->Gstpar(idtmed[403],"LOSS",5);
744 printf("*** TPC version 2 initialized ***\n");
745 printf("Maximum number of steps = %d\n",gMC->GetMaxNStep());
751 //_____________________________________________________________________________
752 void AliTPCv2::StepManager()
755 // Called for every step in the Time Projection Chamber
759 // parameters used for the energy loss calculations
761 const Float_t prim = 14.35; // number of primary collisions per 1 cm
762 const Float_t poti = 20.77e-9; // first ionization potential for Ne/CO2
763 const Float_t w_ion = 35.97e-9; // energy for the ion-electron pair creation
766 const Float_t big = 1.e10;
771 TClonesArray &lhits = *fHits;
778 gMC->SetMaxStep(big);
780 if(!gMC->IsTrackAlive()) return; // particle has disappeared
782 Float_t charge = gMC->TrackCharge();
784 if(TMath::Abs(charge)<=0.) return; // take only charged particles
787 id=gMC->CurrentVolID(copy);
789 // Check the sensitive volume
793 vol[0] = copy + 24; // L-sector number
795 else if(id == fIdSens2)
797 vol[0] = copy; // S-sector number
799 else if(id == fIdSens3 && gMC->IsTrackEntering())
801 vol[1] = copy; // row number
802 id = gMC->CurrentVolOffID(1,copy);
803 vol[0] = copy; // sector number (S-sector)
805 gMC->TrackPosition(pos);
809 hits[3]=0.; // this hit has no energy loss
810 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
812 else if(id == fIdSens4 && gMC->IsTrackEntering())
814 vol[1] = copy; // row number
815 id = gMC->CurrentVolOffID(1,copy);
816 vol[0] = copy+24; // sector number (L-sector)
818 gMC->TrackPosition(pos);
822 hits[3]=0.; // this hit has no energy loss
823 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
828 // charged particle is in the sensitive volume
831 if(gMC->TrackStep() > 0) {
833 Int_t nel = (Int_t)(((gMC->Edep())-poti)/w_ion) + 1;
834 nel=TMath::Min(nel,300); // 300 electrons corresponds to 10 keV
836 gMC->TrackPosition(pos);
840 hits[3]=(Float_t)nel;
844 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
848 // Stemax calculation for the next step
852 gMC->TrackMomentum(mom);
853 Float_t ptot=mom.Rho();
854 Float_t beta_gamma = ptot/gMC->TrackMass();
856 if(gMC->TrackPid() <= 3 && ptot > 0.002)
858 pp = prim*1.58; // electrons above 20 MeV/c are on the plateau!
862 pp=prim*BetheBloch(beta_gamma);
863 if(TMath::Abs(charge) > 1.) pp *= (charge*charge);
867 gMC->Rndm(random,1); // good, old GRNDM from Geant3
869 Double_t rnd = (Double_t)random[0];
871 gMC->SetMaxStep(-TMath::Log(rnd)/pp);
875 //_____________________________________________________________________________
876 Float_t AliTPCv2::BetheBloch(Float_t bg)
879 // Bethe-Bloch energy loss formula
881 const Double_t p1=0.76176e-1;
882 const Double_t p2=10.632;
883 const Double_t p3=0.13279e-4;
884 const Double_t p4=1.8631;
885 const Double_t p5=1.9479;
887 Double_t dbg = (Double_t) bg;
889 Double_t beta = dbg/TMath::Sqrt(1.+dbg*dbg);
891 Double_t aa = TMath::Power(beta,p4);
892 Double_t bb = TMath::Power(1./dbg,p5);
894 bb=TMath::Log(p3+bb);
896 return ((Float_t)((p2-aa-bb)*p1/aa));