New developments of the analysis framework - selectorised version of the manager...
[u/mrichter/AliRoot.git] / LHC / AliLhcProcessBB.cxx
CommitLineData
11141716 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
803d1ab0 16/* $Id$ */
11141716 17
18#include "AliLhcProcessBB.h"
19#include "AliLHC.h"
20#include "AliLhcIRegion.h"
21#include "AliLhcBeam.h"
22
23ClassImp(AliLhcProcessBB)
24
25AliLhcProcessBB::AliLhcProcessBB(AliLHC* lhc, const char* name, const char* title)
64eb707f 26 :AliLhcProcess(lhc,name,title),
27 fCrossSection(0.),
28 fIRegions(0),
29 fBeam1(0),
30 fBeam2(0)
11141716 31{
32// Constructor
33}
34
64eb707f 35AliLhcProcessBB::AliLhcProcessBB(const AliLhcProcessBB& bb):
36 AliLhcProcess(bb),
37 fCrossSection(0.),
38 fIRegions(0),
39 fBeam1(0),
40 fBeam2(0)
41{
42// Copy Constructor
43}
11141716 44
45AliLhcProcessBB::~AliLhcProcessBB()
46{
47// Destructor
48
49}
50
51void AliLhcProcessBB::Init()
52{
53 // Initialization
54 printf("\n Initializing Process %s", GetName());
55 printf("\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
56 fIRegions = fAccelerator->IRegions();
57 fBeam1 = fAccelerator->Beam(0);
58 fBeam2 = fAccelerator->Beam(1);
59}
60
61void AliLhcProcessBB::Evolve(Float_t dt)
62{
63 printf("\n Here process %s %f:", GetName(), dt);
64 TIter next(fIRegions);
65 AliLhcIRegion *region;
66 //
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);
73 }
74}
75
76
e76f229f 77AliLhcProcessBB& AliLhcProcessBB::operator=(const AliLhcProcessBB & /*rhs*/)
11141716 78{
79// Assignment operator
80 return *this;
81}
82
83