AliPhysics  8b695ca (8b695ca)
AliEmcalJetTaggerTaskFast.h
Go to the documentation of this file.
1 /************************************************************************************
2  * Copyright (C) 2017, Copyright Holders of the ALICE Collaboration *
3  * All rights reserved. *
4  * *
5  * Redistribution and use in source and binary forms, with or without *
6  * modification, are permitted provided that the following conditions are met: *
7  * * Redistributions of source code must retain the above copyright *
8  * notice, this list of conditions and the following disclaimer. *
9  * * Redistributions in binary form must reproduce the above copyright *
10  * notice, this list of conditions and the following disclaimer in the *
11  * documentation and/or other materials provided with the distribution. *
12  * * Neither the name of the <organization> nor the *
13  * names of its contributors may be used to endorse or promote products *
14  * derived from this software without specific prior written permission. *
15  * *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
19  * DISCLAIMED. IN NO EVENT SHALL ALICE COLLABORATION BE LIABLE FOR ANY *
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
26  ************************************************************************************/
27 #ifndef ALIEMCALJETTAGGERTASKFAST_H
28 #define ALIEMCALJETTAGGERTASKFAST_H
29 
30 //#define JETTAGGERFAST_TEST
31 
32 class TH1;
33 class TH2;
34 class TH3;
35 class AliJetContainer;
36 
38 
39 namespace PWGJE {
40 namespace EMCALJetTasks {
41 
54  public:
56  kGeo = 0,
58  };
59 
61  kTag = 0,
63  };
69  kNoLimit = 0,
73  };
74 
79 
83  AliEmcalJetTaggerTaskFast(const char *name);
84 
89 
91 
92  //Setters
95 
98 
100 
101  void SetUseSumw2(Bool_t b) { fUseSumw2 = b;}
102 
104  void SetMaxDistance(Double_t dist) { fMaxDist = dist; }
105  void SetSpecialParticleContainer(Int_t contnumb) { fSpecPartContTag = contnumb; }
106 
107 
128  static AliEmcalJetTaggerTaskFast *AddTaskJetTaggerFast(const char * njetsBase,
129  const char * njetsTag,
130  const Double_t R,
131  const char * nrhoBase,
132  const char * nrhoTag,
133  const char * ntracks,
134  const char * nclusters,
135  const char * type,
136  const char * CentEst,
137  Int_t pSel,
138  const char * trigClass);
139 
140  protected:
141 
152  Bool_t Run();
153 
159 
165  void Init();
166 
172  Double_t GetDeltaPhi(const AliEmcalJet* jet1, const AliEmcalJet* jet2);
173 
180 
194  Bool_t MatchJetsGeo(AliJetContainer &contBase, AliJetContainer &contTag, Float_t maxDist = 0.3) const;
195 
201  void ResetTagging(const AliJetContainer &cont) const;
202 
203  private:
218 
223 
227 #ifdef JETTAGGERFAST_TEST
228  TH1 *fIndexErrorRateBase;
229  TH1 *fIndexErrorRateTag;
230  TH1 *fContainerErrorRateBase;
231  TH1 *fContainerErrorRateTag;
232 #endif
233  AliEmcalJetTaggerTaskFast(const AliEmcalJetTaggerTaskFast&); // not implemented
235 
237  ClassDef(AliEmcalJetTaggerTaskFast, 2);
239 };
240 }
241 }
242 
243 #endif
244 
double Double_t
Definition: External.C:58
Definition: External.C:244
TH2 ** fh2PtJet1VsPtJet2
! pT of base jet vs tagged jet
AcceptanceType
Accpetance type used for the two jet containers.
Adding 0.1 in eta and phi limits for both base and tag jets.
Double_t fMaxDist
distance allowed for two jets to match
TCanvas * c
Definition: TestFitELoss.C:172
Double_t GetDeltaPhi(const AliEmcalJet *jet1, const AliEmcalJet *jet2)
Calculate azimuthal angle between the axes of the jets.
Bool_t fInit
true when the containers are initialized
Bool_t FillHistograms()
Filling QA histograms monitoring the quality of the matching.
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
static AliEmcalJetTaggerTaskFast * AddTaskJetTaggerFast(const char *njetsBase, const char *njetsTag, const Double_t R, const char *nrhoBase, const char *nrhoTag, const char *ntracks, const char *nclusters, const char *type, const char *CentEst, Int_t pSel, const char *trigClass)
Factory creating new jet matching task.
TH3 * fh3PtJetDEtaDPhiConst
! jet vs delta eta vs delta phi of constituents
void Init()
Initializing the matching task by defining the accepted range on both jet containers.
Bool_t fMatchingDone
flag to indicate if matching is done or not
AliEmcalJetTaggerTaskFast & operator=(const AliEmcalJetTaggerTaskFast &)
TH2 ** fh2PtJet1VsLeadPtAllSel
! all jets after std selection
Bool_t fUseSumw2
activate sumw2 for output histograms
TH2 ** fh2PtJet2VsRelPt
! pT of tagged jet vs pt base jet / pt tagged jet
void ResetTagging(const AliJetContainer &cont) const
Reset tagging for all jets in jet container.
Definition: External.C:220
JetTaggingMethod fJetTaggingMethod
jet matching method
TH3 * fh3PtJetAreaDRConst
! jet vs Area vs delta R of constituents
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
AcceptanceType fTypeAcc
acceptance cut for the jet containers, see method MatchJetsGeo in .cxx for possibilities ...
bool Bool_t
Definition: External.C:53
Double_t fMinFractionShared
only fill histos for jets if shared fraction larger than X
Int_t fSpecPartContTag
particle container optionally used in AliJetContainer::GetFractionSharedPt(). Set only if needed...
No Additional limit compared to jet containers.
Container for jet within the EMCAL jet framework.
Bool_t MatchJetsGeo(AliJetContainer &contBase, AliJetContainer &contTag, Float_t maxDist=0.3) const
Match the full jets to the corresponding charged jets.
Definition: External.C:196
Fast jet tagger for geometric matching of jets.