1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 #include "AliLhcProcessBB.h"
20 #include "AliLhcIRegion.h"
21 #include "AliLhcBeam.h"
23 ClassImp(AliLhcProcessBB)
25 AliLhcProcessBB::AliLhcProcessBB(AliLHC* lhc, const char* name, const char* title)
26 :AliLhcProcess(lhc,name,title),
35 AliLhcProcessBB::AliLhcProcessBB(const AliLhcProcessBB& bb):
45 AliLhcProcessBB::~AliLhcProcessBB()
51 void AliLhcProcessBB::Init()
54 printf("\n Initializing Process %s", GetName());
55 printf("\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
56 fIRegions = fAccelerator->IRegions();
57 fBeam1 = fAccelerator->Beam(0);
58 fBeam2 = fAccelerator->Beam(1);
61 void AliLhcProcessBB::Evolve(Float_t dt)
63 printf("\n Here process %s %f:", GetName(), dt);
64 TIter next(fIRegions);
65 AliLhcIRegion *region;
67 // Loop over generators and initialize
68 while((region = (AliLhcIRegion*)next())) {
69 Float_t rate = region->Luminosity()*fCrossSection;
70 Float_t loss = rate*dt;
71 fBeam1->RemoveParticles(loss);
72 fBeam2->RemoveParticles(loss);
77 AliLhcProcessBB& AliLhcProcessBB::operator=(const AliLhcProcessBB & /*rhs*/)
79 // Assignment operator