]> git.uio.no Git - u/mrichter/AliRoot.git/blob - LHC/AliLhcProcessBB.cxx
Adding MUON HLT code to the repository.
[u/mrichter/AliRoot.git] / LHC / AliLhcProcessBB.cxx
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
16 /* $Id$ */
17
18 #include "AliLhcProcessBB.h"
19 #include "AliLHC.h"
20 #include "AliLhcIRegion.h"
21 #include "AliLhcBeam.h"
22
23 ClassImp(AliLhcProcessBB)
24
25 AliLhcProcessBB::AliLhcProcessBB(AliLHC* lhc, const char* name, const char* title)
26     :AliLhcProcess(lhc,name,title)
27 {
28 // Constructor
29 }
30
31
32 AliLhcProcessBB::~AliLhcProcessBB()
33 {
34 // Destructor
35
36 }
37
38 void AliLhcProcessBB::Init()
39 {
40   // Initialization
41    printf("\n Initializing Process %s", GetName());
42    printf("\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
43    fIRegions = fAccelerator->IRegions();
44    fBeam1 = fAccelerator->Beam(0);
45    fBeam2 = fAccelerator->Beam(1);
46 }
47
48 void AliLhcProcessBB::Evolve(Float_t dt)
49 {
50   printf("\n Here process %s %f:", GetName(), dt);
51   TIter next(fIRegions);
52   AliLhcIRegion *region;
53   //
54   // Loop over generators and initialize
55   while((region = (AliLhcIRegion*)next())) {
56       Float_t rate = region->Luminosity()*fCrossSection;
57       Float_t loss = rate*dt;
58       fBeam1->RemoveParticles(loss);
59       fBeam2->RemoveParticles(loss);
60   }  
61 }
62
63
64 AliLhcProcessBB& AliLhcProcessBB::operator=(const  AliLhcProcessBB & /*rhs*/)
65 {
66 // Assignment operator
67     return *this;
68 }
69
70