AliPhysics  master (3d17d9d)
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 
55  public:
57  kGeo = 0,
59  };
60 
62  kTag = 0,
64  };
70  kNoLimit = 0,
74  };
75 
80 
84  AliEmcalJetTaggerTaskFast(const char *name);
85 
90 
92 
93  //Setters
96 
99 
101 
102  void SetUseSumw2(Bool_t b) { fUseSumw2 = b;}
103 
105  void SetMaxDistance(Double_t dist) { fMaxDist = dist; }
106  void SetSpecialParticleContainer(Int_t contnumb) { fSpecPartContTag = contnumb; }
107 
108 
129  static AliEmcalJetTaggerTaskFast *AddTaskJetTaggerFast(const char * njetsBase,
130  const char * njetsTag,
131  const Double_t R,
132  const char * nrhoBase,
133  const char * nrhoTag,
134  const char * ntracks,
135  const char * nclusters,
136  const char * type,
137  const char * CentEst,
138  Int_t pSel,
139  const char * trigClass);
140 
141  protected:
142 
153  Bool_t Run();
154 
160 
166  void Init();
167 
173  Double_t GetDeltaPhi(const AliEmcalJet* jet1, const AliEmcalJet* jet2);
174 
181 
195  Bool_t MatchJetsGeo(AliJetContainer &contBase, AliJetContainer &contTag, Float_t maxDist = 0.3) const;
196 
202  void ResetTagging(const AliJetContainer &cont) const;
203 
204  private:
219 
224 
228 #ifdef JETTAGGERFAST_TEST
229  TH1 *fIndexErrorRateBase;
230  TH1 *fIndexErrorRateTag;
231  TH1 *fContainerErrorRateBase;
232  TH1 *fContainerErrorRateTag;
233 #endif
234  AliEmcalJetTaggerTaskFast(const AliEmcalJetTaggerTaskFast&); // not implemented
236 
238  ClassDef(AliEmcalJetTaggerTaskFast, 2);
240 };
241 }
242 }
243 
244 #endif
245 
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.