]>
Commit | Line | Data |
---|---|---|
f7d5860b | 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 | ||
ee6b678f | 17 | /* $Id$ */ |
f7d5860b | 18 | |
19 | //_________________________________________________________________________ | |
20 | // Base Class for JetFinder Algorithms | |
44f59d68 | 21 | // -- |
f7d5860b | 22 | //*-- Author: Mark Horner (LBL/UCT) |
44f59d68 | 23 | // -- |
f7d5860b | 24 | |
25 | ||
26 | ||
27 | #include "AliEMCALJetFinderAlgo.h" | |
28 | #include "AliRun.h" | |
29 | #include "AliEMCALGeometry.h" | |
30 | #include "AliMagF.h" | |
31 | ClassImp(AliEMCALJetFinderAlgo) | |
32 | ||
33 | AliEMCALJetFinderAlgo::AliEMCALJetFinderAlgo() | |
34 | { | |
35 | fDebug =0; | |
36 | } | |
37 | AliEMCALJetFinderAlgo::~AliEMCALJetFinderAlgo() | |
38 | { | |
39 | ||
40 | } | |
41 | ||
42 | void AliEMCALJetFinderAlgo::InitInput(AliEMCALJetFinderInput* input) | |
3950acef | 43 | { |
44 | // Take input data | |
f7d5860b | 45 | if (fDebug>1) Info("InitInput","Beginning InitInput"); |
46 | fInputPointer = input; | |
47 | fOutputObject.Reset(kResetAll); | |
48 | // automatically copy parton and particle info to output object | |
49 | ||
50 | for (Int_t counter = 0 ; counter < fInputPointer->GetNPartons();counter++) | |
51 | { | |
52 | fOutputObject.AddParton(fInputPointer->GetParton(counter)); | |
53 | } | |
54 | for (Int_t counter = 0 ; counter < fInputPointer->GetNParticles();counter++) | |
55 | { | |
56 | fOutputObject.AddParticle(fInputPointer->GetParticle(counter)); | |
57 | } | |
58 | } | |
59 | ||
60 | Float_t AliEMCALJetFinderAlgo::PropagatePhi(Float_t pt, Float_t charge, Bool_t& curls) | |
61 | { | |
62 | // Propagates phi angle to EMCAL radius | |
63 | // // | |
64 | Float_t b = 0.0, rEMCAL = -1.0; | |
65 | if(rEMCAL<0) | |
66 | { | |
67 | b = gAlice->Field()->SolenoidField(); | |
68 | rEMCAL = AliEMCALGeometry::GetInstance()->GetIPDistance(); | |
69 | } | |
70 | Float_t dPhi = 0.; | |
71 | Float_t rB = 3335.6 * pt / b; // [cm] (case of |charge|=1) | |
72 | if (2.*rB < rEMCAL) | |
73 | { | |
74 | curls = kTRUE; | |
75 | return dPhi; | |
76 | } | |
77 | Float_t phi = TMath::ACos(1.-rEMCAL*rEMCAL/(2.*rB*rB)); | |
78 | dPhi = TMath::ATan2(1.-TMath::Cos(phi), TMath::Sin(phi)); | |
79 | dPhi = -TMath::Sign(dPhi, charge); | |
80 | return dPhi; | |
81 | } | |
82 |