AliPhysics  vAN-20150507 (0645659)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliEMCalTriggerTracksAnalysisComponent.cxx
Go to the documentation of this file.
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 #include <iostream>
16 
17 #include <TAxis.h>
21 
25 
26 namespace EMCalTriggerPtAnalysis {
27 
31 AliEMCalTriggerTracksAnalysisComponent::AliEMCalTriggerTracksAnalysisComponent() :
32  TNamed(),
33  fHistos(NULL),
34  fBinning(NULL),
35  fKineCuts(NULL),
36  fTriggerDecision(NULL),
37  fWeightHandler(NULL),
38  fComponentDebugLevel(0)
39 {
40 }
41 
46  if(fHistos) delete fHistos;
47 }
48 
54  TNamed(name,""),
55  fHistos(NULL),
56  fBinning(NULL),
57  fKineCuts(NULL),
58  fTriggerDecision(NULL),
59  fWeightHandler(NULL),
60  fComponentDebugLevel(0)
61 {
62 }
63 
69  fHistos = new AliEMCalHistoContainer(Form("Histos%s", GetName()));
71 }
72 
81  TAxis *result = new TAxis(binning->GetNumberOfBins(), binning->GetBinLimits());
82  result->SetName(name);
83  return result;
84 }
85 
94 TAxis* AliEMCalTriggerTracksAnalysisComponent::DefineAxis(const char* name, int nbins, double min, double max) {
95  TAxis *result = new TAxis(nbins, min, max);
96  result->SetName(name);
97  return result;
98 }
99 
106 void AliEMCalTriggerTracksAnalysisComponent::GetMachingTriggerNames(std::vector<std::string>& triggernames, ETriggerMethod_t method) {
107  triggernames.clear();
108  if(!fTriggerDecision) return;
109  if(fTriggerDecision->IsMinBias()) triggernames.push_back("MinBias");
111  triggernames.push_back("EMCJHigh");
113  triggernames.push_back("EMCHighBoth");
114  else
115  triggernames.push_back("EMCHighJetOnly");
116  }
118  triggernames.push_back("EMCJLow");
120  triggernames.push_back("EMCLowBoth");
121  else
122  triggernames.push_back("EMCLowJetOnly");
123  }
125  triggernames.push_back("EMCGHigh");
127  triggernames.push_back("EMCHighGammaOnly");
128  }
130  triggernames.push_back("EMCGLow");
132  triggernames.push_back("EMCLowGammaOnly");
133  }
134 }
135 
142  const std::vector<std::string>& triggernames, const std::string& componentName) const {
143 
144  std::cout << componentName << ", Triggers found: " << std::endl;
145  std::cout << "==========================================" << std::endl;
146  if(!triggernames.size()) return;
147  std::vector<std::string>::const_iterator trgiter = triggernames.begin();
148  std::cout << trgiter->c_str();
149  trgiter++;
150  while(trgiter != triggernames.end()){
151  std::cout << ", " << trgiter->c_str();
152  trgiter++;
153  }
154  std::cout << std::endl;
155 }
156 
157 } /* namespace EMCalTriggerPtAnalysis */
158 
ETriggerMethod_t
Methods available to select event as triggered events.
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Declaration of class AliEMCalTriggerAnaTriggerDecision, a container for trigger decision in EMCAL-tri...
Base class for analysis components.
void PrintTriggerNames(const std::vector< std::string > &, const std::string &componentName) const
void GetMachingTriggerNames(std::vector< std::string > &triggernames, ETriggerMethod_t usePatches)
TAxis * DefineAxis(const char *name, const AliEMCalTriggerBinningDimension *binning)
Container class for histograms for the high- charged particle analysis.
Bool_t IsTriggered(ETATriggerType trigger, ETriggerMethod_t method=kTriggerString) const
AliEMCalHistoContainer * fHistos
Histogram container of the analysis component.
const AliEMCalTriggerAnaTriggerDecision * fTriggerDecision
Trigger decision handler.
Base class for analysis components in the analysis of EMCAL-triggered events.
Declaration of the classes AliEMCalTriggerBinningComponent and AliEMCalTriggerBinningDimension.