]>
Commit | Line | Data |
---|---|---|
c962be25 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2014, 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 | // Comment describing what this class does needed! | |
17 | ||
18 | //=========================================================== | |
19 | // Dummy comment, should be replaced by a real one | |
20 | // comment | |
21 | // comment | |
22 | // Simple class for the jt anlyais by Beomkyu Kim and Dongjo Kim | |
23 | //=========================================================== | |
24 | ||
25 | #include <TMath.h> | |
26 | #include "AliJJet.h" | |
27 | #include "AliJJetAnalysis.h" | |
28 | #include "TClonesArray.h" | |
29 | ||
30 | AliJJetAnalysis::AliJJetAnalysis(): | |
31 | fJetListOfList() | |
32 | { | |
33 | ||
34 | } | |
35 | ||
36 | AliJJetAnalysis::AliJJetAnalysis(const AliJJetAnalysis& ap) : | |
37 | fJetListOfList(ap.fJetListOfList) | |
38 | { | |
39 | ||
40 | } | |
41 | ||
42 | AliJJetAnalysis& AliJJetAnalysis::operator = (const AliJJetAnalysis& ap) | |
43 | { | |
44 | // assignment operator | |
45 | ||
46 | this->~AliJJetAnalysis(); | |
47 | new(this) AliJJetAnalysis(ap); | |
48 | return *this; | |
49 | } | |
50 | ||
51 | ||
52 | AliJJetAnalysis::~AliJJetAnalysis(){ | |
53 | } | |
54 | ||
55 | ||
56 | void AliJJetAnalysis::Run(){ | |
57 | ||
58 | int iS1 = 0; | |
59 | int iS2 = 3; | |
60 | TObjArray * jetfinder1 = (TObjArray*) fJetListOfList[iS1]; | |
61 | TObjArray * jetfinder2 = (TObjArray*) fJetListOfList[iS2]; | |
62 | AliJJet *jet1 = NULL; | |
63 | AliJJet *jet2 = NULL; | |
64 | for (int ijet = 0; ijet<jetfinder1->GetEntriesFast(); ijet++){ | |
65 | jet1 = dynamic_cast<AliJJet*>( jetfinder1->At(ijet) ); | |
66 | if (!jet1) continue; | |
67 | for (int jjet = 0; jjet<jetfinder2->GetEntriesFast(); jjet++){ | |
68 | jet2 = dynamic_cast<AliJJet*>( jetfinder2->At(jjet) ); | |
69 | if (!jet2) continue; | |
70 | if (jet2->E() < 5 ) continue; | |
71 | if( TMath::Abs(jet1->Eta()-jet2->Eta()) < 0.4 ) { | |
72 | //CompareTwoJets(jet1, jet2, -1000., -1000); | |
73 | } | |
74 | } | |
75 | } | |
76 | ||
77 | } | |
78 | ||
79 | void AliJJetAnalysis::CompareTwoJets(AliJJet *jet1, AliJJet *jet2, double & dE , int &dN ){ | |
80 | ||
81 | if (!jet1 || !jet2) return; | |
82 | double commEsum=0; | |
83 | double chargedEsum=0; | |
84 | int commN=0; | |
85 | for (int icon = 0; icon<jet1->GetConstituents()->GetEntriesFast(); icon++){ | |
86 | AliJBaseTrack *con1 = jet1->GetConstituent(icon); | |
87 | if (!con1) continue; | |
88 | chargedEsum = 0; | |
89 | for (int jcon = 0; jcon<jet2->GetConstituents()->GetEntriesFast(); jcon++){ | |
90 | AliJBaseTrack *con2 = jet2->GetConstituent(jcon); | |
91 | if (!con2) continue; | |
92 | chargedEsum += con2->E(); | |
93 | if(con1->GetID() == con2->GetID()){ | |
94 | ||
95 | commEsum += con2->E(); | |
96 | commN ++; | |
97 | } | |
98 | ||
99 | ||
100 | } | |
101 | } | |
102 | //deltaE = jet2->E()- commEsum; | |
103 | dE = chargedEsum - commEsum; | |
104 | dN = jet2->GetConstituents()->GetEntriesFast() - commN; | |
105 | ||
106 | ||
107 | ||
108 | } |