25 #include "AliAODTrack.h"
26 #include "AliESDtrack.h"
27 #include "AliAnalysisManager.h"
28 #include "AliInputEventHandler.h"
29 #include "AliMCEventHandler.h"
30 #include "AliAODHandler.h"
35 #include "TObjString.h"
36 #include "AliAODEvent.h"
37 #include "AliESDEvent.h"
38 #include "AliCentrality.h"
39 #include "AliMultSelection.h"
43 #include "AliGenCocktailEventHeader.h"
44 #include "AliGenDPMjetEventHeader.h"
45 #include "AliGenPythiaEventHeader.h"
46 #include "AliGenHijingEventHeader.h"
47 #include "AliTriggerAnalysis.h"
49 #include "AliVCaloCells.h"
50 #include "AliAODMCParticle.h"
51 #include "AliAODMCHeader.h"
52 #include "AliEMCALTriggerPatchInfo.h"
67 "SelectSpecialTrigger",
68 "SelectSpecialSubTriggerClass",
77 AliAnalysisCuts(name,title),
80 fDoLightOutput(kFALSE),
83 fDetectorCentrality(0),
84 fModCentralityClass(0),
85 fEnableVertexCut(kTRUE),
89 fMultiplicityMethod(0),
91 fSpecialSubTrigger(0),
92 fRemovePileUp(kFALSE),
93 fPastFutureRejectionLow(0),
94 fPastFutureRejectionHigh(0),
95 fDoPileUpRejectV0MTPCout(0),
96 fFPileUpRejectV0MTPCout(0),
97 fRejectExtraSignals(0),
98 fOfflineTriggerMask(0),
103 fNotRejectedStart(NULL),
104 fNotRejectedEnd(NULL),
105 fGeneratorNames(NULL),
106 fPeriodEnum(kNoPeriod),
113 fDoCentralityFlat(0),
114 fPathWeightsFlatCent(
""),
115 fNameHistoNotFlatCentrality(
""),
116 fDoReweightHistoMCPi0(kFALSE),
117 fDoReweightHistoMCEta(kFALSE),
118 fDoReweightHistoMCK0s(kFALSE),
119 fPathTrFReweighting(
""),
120 fNameHistoReweightingPi0(
""),
121 fNameHistoReweightingEta(
""),
122 fNameHistoReweightingK0s(
""),
126 fHistoEventCuts(NULL),
127 fHistoPastFutureBits(NULL),
129 hCentralityNotFlat(NULL),
132 hNPileupVertices(NULL),
133 hPileupVertexToPrimZ(NULL),
134 hPileupVertexToPrimZSPDPileup(NULL),
135 hPileupVertexToPrimZTrackletvsHits(NULL),
136 hEventPlaneAngle(NULL),
139 hTriggerClassSelected(NULL),
140 hTriggerClassesCorrelated(NULL),
141 hReweightMCHistPi0(NULL),
142 hReweightMCHistEta(NULL),
143 hReweightMCHistK0s(NULL),
147 fAddedSignalPDGCode(0),
149 fTriggerSelectedManually(kFALSE),
150 fSpecialTriggerName(
""),
151 fSpecialSubTriggerName(
""),
152 fNSpecialSubTriggerOptions(0),
153 hSPDClusterTrackletBackgroundBefore(NULL),
154 hSPDClusterTrackletBackground(NULL),
157 fTriggerPatchInfo(NULL),
158 fMainTriggerPatchEMCAL(NULL),
159 fCaloTriggersName(
""),
160 fCaloTriggerPatchInfoName(
""),
162 fTriggersEMCALSelected(-1),
163 fEMCALTrigInitialized(kFALSE),
164 fSecProdBoundary(1.0),
167 fMaxFacPtHardSingleParticle(1.5),
168 fMimicTrigger(kFALSE),
169 fRejectTriggerOverlap(kFALSE),
170 fDoMultiplicityWeighting(kFALSE),
171 fPathReweightingMult(
""),
172 fNameHistoReweightingMultData(
""),
173 fNameHistoReweightingMultMC(
""),
174 hReweightMultData(NULL),
175 hReweightMultMC(NULL),
181 fUtils =
new AliAnalysisUtils();
190 AliAnalysisCuts(ref),
192 fHeaderList(ref.fHeaderList),
193 fDoLightOutput(ref.fDoLightOutput),
194 fEventQuality(ref.fEventQuality),
195 fIsHeavyIon(ref.fIsHeavyIon),
196 fDetectorCentrality(ref.fDetectorCentrality),
197 fModCentralityClass(ref.fModCentralityClass),
198 fEnableVertexCut(ref.fEnableVertexCut),
199 fMaxVertexZ(ref.fMaxVertexZ),
200 fCentralityMin(ref.fCentralityMin),
201 fCentralityMax(ref.fCentralityMax),
202 fMultiplicityMethod(ref.fMultiplicityMethod),
203 fSpecialTrigger(ref.fSpecialTrigger),
204 fSpecialSubTrigger(ref.fSpecialSubTrigger),
205 fRemovePileUp(ref.fRemovePileUp),
206 fPastFutureRejectionLow(ref.fPastFutureRejectionLow),
207 fPastFutureRejectionHigh(ref.fPastFutureRejectionHigh),
208 fDoPileUpRejectV0MTPCout(ref.fDoPileUpRejectV0MTPCout),
209 fFPileUpRejectV0MTPCout(ref.fFPileUpRejectV0MTPCout),
210 fRejectExtraSignals(ref.fRejectExtraSignals),
211 fOfflineTriggerMask(ref.fOfflineTriggerMask),
212 fHasV0AND(ref.fHasV0AND),
213 fIsSDDFired(ref.fIsSDDFired),
214 fRandom(ref.fRandom),
215 fnHeaders(ref.fnHeaders),
216 fNotRejectedStart(NULL),
217 fNotRejectedEnd(NULL),
218 fGeneratorNames(ref.fGeneratorNames),
219 fPeriodEnum(ref.fPeriodEnum),
224 fEtaShift(ref.fEtaShift),
225 fDoEtaShift(ref.fDoEtaShift),
226 fDoCentralityFlat(ref.fDoCentralityFlat),
227 fPathWeightsFlatCent(ref.fPathWeightsFlatCent),
228 fNameHistoNotFlatCentrality(ref.fNameHistoNotFlatCentrality),
229 fDoReweightHistoMCPi0(ref.fDoReweightHistoMCPi0),
230 fDoReweightHistoMCEta(ref.fDoReweightHistoMCEta),
231 fDoReweightHistoMCK0s(ref.fDoReweightHistoMCK0s),
232 fPathTrFReweighting(ref.fPathTrFReweighting),
233 fNameHistoReweightingPi0(ref.fNameHistoReweightingPi0),
234 fNameHistoReweightingEta(ref.fNameHistoReweightingEta),
235 fNameHistoReweightingK0s(ref.fNameHistoReweightingK0s),
236 fNameFitDataPi0(ref.fNameFitDataPi0),
237 fNameFitDataEta(ref.fNameFitDataEta),
238 fNameFitDataK0s(ref.fNameFitDataK0s),
239 fHistoEventCuts(NULL),
240 fHistoPastFutureBits(NULL),
241 hCentrality(ref.hCentrality),
242 hCentralityNotFlat(ref.hCentralityNotFlat),
244 hVertexZ(ref.hVertexZ),
245 hNPileupVertices(ref.hNPileupVertices),
246 hPileupVertexToPrimZ(ref.hPileupVertexToPrimZ),
247 hPileupVertexToPrimZSPDPileup(ref.hPileupVertexToPrimZSPDPileup),
248 hPileupVertexToPrimZTrackletvsHits(ref.hPileupVertexToPrimZTrackletvsHits),
249 hEventPlaneAngle(ref.hEventPlaneAngle),
250 fEventPlaneAngle(ref.fEventPlaneAngle),
252 hTriggerClassSelected(NULL),
253 hTriggerClassesCorrelated(NULL),
254 hReweightMCHistPi0(ref.hReweightMCHistPi0),
255 hReweightMCHistEta(ref.hReweightMCHistEta),
256 hReweightMCHistK0s(ref.hReweightMCHistK0s),
257 fFitDataPi0(ref.fFitDataPi0),
258 fFitDataEta(ref.fFitDataEta),
259 fFitDataK0s(ref.fFitDataK0s),
260 fAddedSignalPDGCode(ref.fAddedSignalPDGCode),
261 fPreSelCut(ref.fPreSelCut),
262 fTriggerSelectedManually(ref.fTriggerSelectedManually),
263 fSpecialTriggerName(ref.fSpecialTriggerName),
264 fSpecialSubTriggerName(ref.fSpecialSubTriggerName),
265 fNSpecialSubTriggerOptions(ref.fNSpecialSubTriggerOptions),
266 hSPDClusterTrackletBackgroundBefore(NULL),
267 hSPDClusterTrackletBackground(NULL),
268 fV0ReaderName(ref.fV0ReaderName),
270 fTriggerPatchInfo(NULL),
271 fMainTriggerPatchEMCAL(NULL),
272 fCaloTriggersName(ref.fCaloTriggersName),
273 fCaloTriggerPatchInfoName(ref.fCaloTriggerPatchInfoName),
274 fTriggersEMCAL(ref.fTriggersEMCAL),
275 fTriggersEMCALSelected(ref.fTriggersEMCALSelected),
276 fEMCALTrigInitialized(kFALSE),
277 fSecProdBoundary(ref.fSecProdBoundary),
278 fMaxPtJetMC(ref.fMaxPtJetMC),
279 fMaxFacPtHard(ref.fMaxFacPtHard),
280 fMaxFacPtHardSingleParticle(ref.fMaxFacPtHardSingleParticle),
281 fMimicTrigger(ref.fMimicTrigger),
282 fRejectTriggerOverlap(ref.fRejectTriggerOverlap),
283 fDoMultiplicityWeighting(ref.fDoMultiplicityWeighting),
284 fPathReweightingMult(ref.fPathReweightingMult),
285 fNameHistoReweightingMultData(ref.fNameHistoReweightingMultData),
286 fNameHistoReweightingMultMC(ref.fNameHistoReweightingMultMC),
287 hReweightMultData(ref.hReweightMultData),
288 hReweightMultMC(ref.hReweightMultMC),
294 fUtils =
new AliAnalysisUtils();
334 TH1::AddDirectory(kFALSE);
427 hTriggerClass->GetXaxis()->SetBinLabel( 9,
"kMUL7/kMuonLikePB");
428 hTriggerClass->GetXaxis()->SetBinLabel(10,
"kMUU7/kMuonUnlikePB");
432 hTriggerClass->GetXaxis()->SetBinLabel(14,
"kPHI7/kPHI8/kPHOSPb");
441 hTriggerClass->GetXaxis()->SetBinLabel(23,
"kMuonSingleLowPt8");
442 hTriggerClass->GetXaxis()->SetBinLabel(24,
"kMuonSingleHighPt8");
443 hTriggerClass->GetXaxis()->SetBinLabel(25,
"kMuonLikeLowPt8");
444 hTriggerClass->GetXaxis()->SetBinLabel(26,
"kMuonUnlikeLowPt8");
445 hTriggerClass->GetXaxis()->SetBinLabel(27,
"kMuonUnlikeLowPt0");
453 hTriggerClass->GetXaxis()->SetBinLabel(35,
"failed Physics Selection");
454 hTriggerClass->GetXaxis()->SetBinLabel(36,
"mimickedTrigger");
512 TH1::AddDirectory(kTRUE);
525 if(fMCEvent && fInputEvent->IsA()==AliESDEvent::Class()){
527 AliMCEventHandler* mcHandler =
dynamic_cast<AliMCEventHandler*
> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
532 if (!mcHandler->InitOk() ){
536 if (!mcHandler->TreeK() ){
540 if (!mcHandler->TreeTR() ) {
558 if(fInputEvent->IsA()==AliESDEvent::Class()){
559 AliTriggerAnalysis fTriggerAnalysis;
560 fHasV0AND = fTriggerAnalysis.IsOfflineTriggerFired((
AliESDEvent*)fInputEvent, AliTriggerAnalysis::kV0AND);
587 Int_t nClustersLayer0 = fInputEvent->GetNumberOfITSClusters(0);
588 Int_t nClustersLayer1 = fInputEvent->GetNumberOfITSClusters(1);
589 Int_t nTracklets = fInputEvent->GetMultiplicity()->GetNumberOfTracklets();
594 if(fInputEvent->IsA()==AliESDEvent::Class()){
595 Int_t nPileVert = ((
AliESDEvent*)fInputEvent)->GetNumberOfPileupVerticesSPD();
598 for(
Int_t i=0; i<nPileVert;i++){
599 const AliESDVertex* pv = ((
AliESDEvent*)fInputEvent)->GetPileupVertexSPD(i);
600 Int_t nc2 = pv->GetNContributors();
605 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
616 if(
fUtils->IsFirstEventInChunk(fInputEvent)){
622 if(
fUtils->IsPileUpEvent(fInputEvent)){
628 if (
fUtils->IsSPDClusterVsTrackletBG(fInputEvent)){
636 if(fInputEvent->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
642 if (
fUtils->IsSPDClusterVsTrackletBG(fInputEvent)){
675 AliEventplane *EventPlane = fInputEvent->GetEventplane();
700 AliInfo(
"Entering loading of weights for centrality flattening");
723 AliInfo(
"Entering loading of weights for multiplicity weighting");
757 AliInfo(
"Entering loading of histograms for weighting");
823 AliInfo(
"Centrality flattening was enabled");
828 AliInfo(
"Multiplicity weighting was enabled");
832 AliInfo(
"Particle Weighting was enabled");
837 AliInfo(Form(
"Set Event Cut Number: %s",analysisCutSelection.Data()));
838 if(analysisCutSelection.Length()!=
kNCuts) {
839 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
842 if(!analysisCutSelection.IsAlnum()){
843 AliError(
"Cut selection is not alphanumeric");
850 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
851 analysisCutSelectionLowerCase.ToLower();
852 const char *cutSelection = analysisCutSelectionLowerCase.Data();
853 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0'
886 }
else return kFALSE;
892 }
else return kFALSE;
898 }
else return kFALSE;
904 }
else return kFALSE;
910 }
else return kFALSE;
916 }
else return kFALSE;
922 }
else return kFALSE;
928 }
else return kFALSE;
931 AliError(
"Cut id out of range");
935 AliError(
"Cut id %d not recognized");
949 printf(
"\nEvent cutnumber \n");
951 printf(
"%d",
fCuts[ic]);
955 printf(
"Running in pp mode \n");
958 printf(
"\t only events triggered by V0OR will be analysed \n");
960 printf(
"\t only events where SDD was present will be analysed \n");
964 printf(
"\t only events triggered by V0AND will be analysed \n");
966 printf(
"\t only events where SDD was present will be analysed and triggered by VOAND\n");
977 printf(
"Running in PbPb mode \n");
979 printf(
"\t centrality selection based on V0M \n");
981 printf(
"\t centrality selection based on Cl1 \n");
997 printf(
"\t only events triggered by kMB, kCentral, kSemiCentral will be analysed \n");
1005 printf(
"Running in pPb mode \n");
1007 printf(
"\t centrality selection based on V0A \n");
1009 printf(
"\t centrality selection based on Cl1 \n");
1015 printf(
"\t only events triggered by kINT7 will be analysed \n");
1022 else printf(
"\t No vertex cut \n");
1025 printf(
"\t Doing pile up removal \n");
1027 printf(
"\t Doing extra pile up removal V0M vs TPCout \n");
1031 printf(
"MC event cuts: \n");
1035 printf(
"\t maximum factor between jet and pt hard = %2.2f \n",
fMaxFacPtHard);
1089 AliError(Form(
"SetHeavyIon not defined %d",isHeavyIon));
1099 if(minCentrality<0||minCentrality>9){
1100 AliError(Form(
"minCentrality not defined %d",minCentrality));
1112 if(maxCentrality<0||maxCentrality>9){
1113 AliError(Form(
"maxCentrality not defined %d",maxCentrality));
1124 switch(selectSpecialTrigger){
1154 fOfflineTriggerMask=AliVEvent::kPHI7 | AliVEvent::kPHI1 | AliVEvent::kPHI8 | AliVEvent::kPHOSPb;
1181 AliError(
"Warning: Special Trigger Not known");
1192 switch(selectSpecialSubTriggerClass){
1203 AliError(
"Warning: Special Subtrigger Class Not known");
1207 switch(selectSpecialSubTriggerClass){
1232 AliError(
"Warning: Special Subtrigger Class Not known");
1236 switch(selectSpecialSubTriggerClass){
1297 AliError(
"Warning: Special Subtrigger Class Not known");
1301 switch(selectSpecialSubTriggerClass){
1348 AliError(
"Warning: Special Subtrigger Class Not known");
1352 switch(selectSpecialSubTriggerClass){
1401 AliError(
"Warning: Special Subtrigger Class Not known");
1405 switch(selectSpecialSubTriggerClass){
1433 AliError(
"Warning: Special Subtrigger Class Not known");
1437 switch(selectSpecialSubTriggerClass){
1474 AliError(
"Warning: Special Subtrigger Class Not known");
1478 switch(selectSpecialSubTriggerClass){
1570 AliError(
"Warning: Special Subtrigger Class Not known");
1574 switch(selectSpecialSubTriggerClass){
1652 AliError(
"Warning: Special Subtrigger Class Not known");
1676 switch(removePileUp){
1810 AliError(
"RemovePileUpCut not defined");
1819 switch(extraSignal){
1833 AliError(Form(
"Extra Signal Rejection not defined %d",extraSignal));
1868 AliError(Form(
"Vertex Cut not defined %d",vertexCut));
1901 AliMultSelection *MultSelection = (AliMultSelection*)event->FindListObject(
"MultSelection");
1903 return MultSelection->GetMultiplicityPercentile(
"V0M",kTRUE);
1904 }
else if(
fDetectorCentrality==1)
return MultSelection->GetMultiplicityPercentile(
"CL1",kTRUE);
1906 AliCentrality *fESDCentrality = (AliCentrality*)esdEvent->GetCentrality();
1908 if(
fIsHeavyIon==2)
return fESDCentrality->GetCentralityPercentile(
"V0A");
1909 else return fESDCentrality->GetCentralityPercentile(
"V0M");
1917 AliMultSelection *MultSelection = (AliMultSelection*)aodEvent->FindListObject(
"MultSelection");
1919 else if(
fDetectorCentrality==1)
return MultSelection->GetMultiplicityPercentile(
"CL1",kTRUE);
1921 if(aodEvent->GetHeader()){
return ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();}
1935 Int_t primaryTracksPP[9] = { 0, 2, 5, 10, 15,
1950 if(centrality<0)
return kFALSE;
1952 Int_t centralityC=0;
1954 centralityC=
Int_t(centrality/10);
1960 centralityC=
Int_t(centrality);
1963 }
else return kFALSE;
1966 centralityC=
Int_t(centrality);
1973 Int_t PrimaryTracks10[11][2] =
1987 Int_t PrimaryTracksLHC11h10[11][2] =
2001 Int_t PrimaryTracks5a[11][2] =
2015 Int_t PrimaryTracksLHC11h5a[11][2] =
2029 Int_t PrimaryTracks5b[11][2] =
2043 Int_t PrimaryTracksLHC11h5b[11][2] =
2058 if(event->IsA()==AliESDEvent::Class()) column = 0;
2059 if(event->IsA()==AliAODEvent::Class()) column = 1;
2074 centralityC=
Int_t(centrality/10);
2093 centralityC=
Int_t(centrality);
2096 }
else return kFALSE;
2112 centralityC=
Int_t(centrality);
2125 Double_t fVertexZ=
event->GetPrimaryVertex()->GetZ();
2129 fVertexZSPD = fESDEvent->GetPrimaryVertexSPD()->GetZ();
2133 fVertexZSPD = fAODEvent->GetPrimaryVertexSPD()->GetZ();
2136 if(TMath::Abs(fVertexZ)>
fMaxVertexZ)
return kFALSE;
2140 if (TMath::Abs(fVertexZ-fVertexZSPD) > 0.1)
return kFALSE;
2143 if(!
fUtils->IsVertexSelected2013pA(event))
return kFALSE;
2152 TBits fIR1 = InputEvent->GetHeader()->GetIRInt1InteractionMap();
2153 TBits fIR2 = InputEvent->GetHeader()->GetIRInt2InteractionMap();
2154 UShort_t bunchCrossings = InputEvent->GetBunchCrossNumber();
2157 for(
Int_t i = 0; i<180;i++){
2158 if(fIR1.TestBitNumber(i))
2163 Bool_t isOutOfBunchPileup = 0;
2166 if(pf1 < -89) pf1 = -89;
2167 if(pf2 > 89) pf2 = 89;
2168 Int_t pf2maxForT0 = pf2;
2170 for (
Int_t i=pf1;i<=pf2;i++) {
2172 if (i<=pf2maxForT0) isOutOfBunchPileup|=fIR2.TestBitNumber(90+i);
2173 if (i>0 && i<=ir1skip)
continue;
2174 isOutOfBunchPileup|=fIR1.TestBitNumber(90+i);
2176 return isOutOfBunchPileup;
2182 Bool_t isPileUpV0MTPCout=0;
2187 multV0M = InputEvent->GetVZEROData()->GetMTotV0A();
2189 multV0M = InputEvent->GetVZEROData()->GetMTotV0A() + InputEvent->GetVZEROData()->GetMTotV0C() ;
2194 if (multV0M < valFunc ) isPileUpV0MTPCout=1;
2197 return isPileUpV0MTPCout;
2206 if (fESDEvent->GetPrimaryVertex() != NULL){
2207 if(fESDEvent->GetPrimaryVertex()->GetNContributors()>0) {
2209 return fESDEvent->GetPrimaryVertex()->GetNContributors();
2213 if(fESDEvent->GetPrimaryVertexSPD() !=NULL){
2214 if(fESDEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2216 return fESDEvent->GetPrimaryVertexSPD()->GetNContributors();
2218 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fESDEvent->GetPrimaryVertex()->GetName()));
2227 if (fAODEvent->GetPrimaryVertex() != NULL){
2228 if(fAODEvent->GetPrimaryVertex()->GetNContributors()>0) {
2229 return fAODEvent->GetPrimaryVertex()->GetNContributors();
2232 if(fAODEvent->GetPrimaryVertexSPD() !=NULL){
2233 if(fAODEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
2234 return fAODEvent->GetPrimaryVertexSPD()->GetNContributors();
2236 AliWarning(Form(
"Number of contributors from bad vertex type:: %s",fAODEvent->GetPrimaryVertex()->GetName()));
2249 AliGenCocktailEventHeader *cHeader = 0x0;
2250 AliAODMCHeader *cHeaderAOD = 0x0;
2251 Bool_t headerFound = kFALSE;
2252 AliStack *fMCStack = 0x0;
2253 TClonesArray *fMCStackAOD = 0x0;
2271 if(MCEvent->IsA()==AliMCEvent::Class()){
2272 if(dynamic_cast<AliMCEvent*>(MCEvent)){
2273 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(
dynamic_cast<AliMCEvent*
>(MCEvent)->GenEventHeader());
2274 if(cHeader) headerFound = kTRUE;
2275 fMCStack =
dynamic_cast<AliStack*
>(
dynamic_cast<AliMCEvent*
>(MCEvent)->Stack());
2278 if(MCEvent->IsA()==AliAODEvent::Class()){
2279 cHeaderAOD =
dynamic_cast<AliAODMCHeader*
>(MCEvent->FindListObject(AliAODMCHeader::StdBranchName()));
2280 fMCStackAOD =
dynamic_cast<TClonesArray*
>(MCEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2281 if(cHeaderAOD) headerFound = kTRUE;
2285 TList *genHeaders = 0x0;
2286 if(cHeader) genHeaders = cHeader->GetHeaders();
2288 genHeaders = cHeaderAOD->GetCocktailHeaders();
2289 if(genHeaders->GetEntries()==1)
return kFALSE;
2291 AliGenEventHeader* gh = 0;
2292 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2293 gh = (AliGenEventHeader*)genHeaders->At(i);
2294 TString GeneratorName = gh->GetName();
2295 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2296 Bool_t eventAccepted = kTRUE;
2297 TParticle * jet = 0;
2298 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(gh)->NTriggerJets();
2301 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2302 dynamic_cast<AliGenPythiaEventHeader*
>(gh)->TriggerJet(ijet, tmpjet);
2303 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2306 eventAccepted= kFALSE;
2310 if (jet)
delete jet;
2312 for(Long_t i = 0; i < fMCStack->GetNtrack(); i++) {
2313 TParticle* particle = (TParticle *)fMCStack->Particle(i);
2314 if (!particle)
continue;
2315 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2317 eventAccepted= kFALSE;
2322 }
else if (fMCStackAOD){
2323 for(Long_t i = 0; i < fMCStackAOD->GetEntriesFast(); i++){
2324 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(fMCStackAOD->At(i));
2325 if (!particle)
continue;
2326 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2328 eventAccepted= kFALSE;
2335 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2337 70, 85, 99, 115, 132,
2338 150, 169, 190, 212, 235,
2340 Double_t weightsBins[20] = { 0.957702, 0.41837, 0.406279, 0.266936, 0.135179,
2341 6.4687e-02, 2.27254e-02, 8.30769e-03, 3.56008e-03, 1.22934e-03,
2342 4.91352e-04, 1.77601e-04, 8.79608e-05, 4.13652e-05, 2.02997e-05,
2343 1.03682e-06, 5.64732e-06, 2.96158e-06, 1.5999e-06, 2.08374e-06};
2346 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2347 if (bin < 20) weight = weightsBins[bin];
2351 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2354 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2355 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2356 1.933238e-05, 1.562895e-05};
2358 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2359 if (bin < 12) weight = weightsBins[bin];
2362 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2363 84, 117, 152, 191, 1000000,
2365 21, 28, 36, 45, 57 };
2371 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2372 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2373 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2374 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2378 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2379 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2380 if (bin < 19) weight = weightsBins[bin];
2383 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2384 84, 117, 152, 191, 1000000,
2386 21, 28, 36, 45, 57 };
2388 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2389 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2390 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2391 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2394 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2395 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2396 if (bin < 19) weight = weightsBins[bin];
2399 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2401 70, 85, 99, 115, 132,
2402 150, 169, 190, 212, 235,
2404 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2405 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2406 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2407 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2409 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2410 if (bin < 20) weight = weightsBins[bin];
2413 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2414 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2416 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2417 if (bin < 5) weight = weightsBins[bin];
2420 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2421 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2423 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2424 if (bin < 6) weight = weightsBins[bin];
2427 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2428 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2430 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2431 if (bin < 7) weight = weightsBins[bin];
2434 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2435 84, 117, 152, 191, 234,
2437 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2438 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2440 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2441 if (bin < 10) weight = weightsBins[bin];
2447 if (weight == -1)
return kFALSE;
2448 else return eventAccepted;
2453 AliGenEventHeader * eventHeader =
dynamic_cast<AliMCEvent*
>(MCEvent)->GenEventHeader();
2454 TString eventHeaderName = eventHeader->ClassName();
2455 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2456 Bool_t eventAccepted = kTRUE;
2457 TParticle * jet = 0;
2458 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->NTriggerJets();
2459 Float_t ptHard =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2461 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2462 dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->TriggerJet(ijet, tmpjet);
2463 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2466 eventAccepted= kFALSE;
2471 for(Long_t i = 0; i < fMCStack->GetNtrack(); i++) {
2472 TParticle* particle = (TParticle *)fMCStack->Particle(i);
2473 if (!particle)
continue;
2474 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2476 eventAccepted= kFALSE;
2481 }
else if (fMCStackAOD){
2482 for(Long_t i = 0; i < fMCStackAOD->GetEntriesFast(); i++){
2483 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(fMCStackAOD->At(i));
2484 if (!particle)
continue;
2485 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2487 eventAccepted= kFALSE;
2494 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2496 70, 85, 99, 115, 132,
2497 150, 169, 190, 212, 235,
2499 Double_t weightsBins[20] = { 0.957702, 0.41837, 0.406279, 0.266936, 0.135179,
2500 6.4687e-02, 2.27254e-02, 8.30769e-03, 3.56008e-03, 1.22934e-03,
2501 4.91352e-04, 1.77601e-04, 8.79608e-05, 4.13652e-05, 2.02997e-05,
2502 1.03682e-06, 5.64732e-06, 2.96158e-06, 1.5999e-06, 2.08374e-06};
2505 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2506 if (bin < 20) weight = weightsBins[bin];
2509 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2512 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2513 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2514 1.933238e-05, 1.562895e-05};
2516 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2517 if (bin < 12) weight = weightsBins[bin];
2520 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2521 84, 117, 152, 191, 1000000,
2523 21, 28, 36, 45, 57 };
2529 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2530 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2531 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2532 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2536 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2537 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2538 if (bin < 19) weight = weightsBins[bin];
2541 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2542 84, 117, 152, 191, 1000000,
2544 21, 28, 36, 45, 57 };
2546 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2547 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2548 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2549 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2552 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2553 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2554 if (bin < 19) weight = weightsBins[bin];
2557 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2559 70, 85, 99, 115, 132,
2560 150, 169, 190, 212, 235,
2562 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2563 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2564 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2565 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2567 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2568 if (bin < 20) weight = weightsBins[bin];
2571 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2572 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2574 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2575 if (bin < 5) weight = weightsBins[bin];
2578 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2579 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2581 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2582 if (bin < 6) weight = weightsBins[bin];
2585 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2586 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2588 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2589 if (bin < 7) weight = weightsBins[bin];
2592 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2593 84, 117, 152, 191, 234,
2595 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2596 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2598 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2599 if (bin < 10) weight = weightsBins[bin];
2604 if (weight == -1)
return kFALSE;
2605 else return eventAccepted;
2620 AliGenCocktailEventHeader *cHeader = 0x0;
2621 AliAODMCHeader *cHeaderAOD = 0x0;
2622 Bool_t headerFound = kFALSE;
2638 if(MCEvent->IsA()==AliMCEvent::Class()){
2639 if(dynamic_cast<AliMCEvent*>(MCEvent)){
2640 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(
dynamic_cast<AliMCEvent*
>(MCEvent)->GenEventHeader());
2641 if(cHeader) headerFound = kTRUE;
2644 if(MCEvent->IsA()==AliAODEvent::Class()){
2645 cHeaderAOD =
dynamic_cast<AliAODMCHeader*
>(MCEvent->FindListObject(AliAODMCHeader::StdBranchName()));
2646 if(cHeaderAOD) headerFound = kTRUE;
2650 TList *genHeaders = 0x0;
2651 if(cHeader) genHeaders = cHeader->GetHeaders();
2653 genHeaders = cHeaderAOD->GetCocktailHeaders();
2654 if(genHeaders->GetEntries()==1){
2660 AliGenEventHeader* gh = 0;
2661 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2662 gh = (AliGenEventHeader*)genHeaders->At(i);
2663 TString GeneratorName = gh->GetName();
2664 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2665 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(gh);
2666 NTrials = gPythia->Trials();
2667 XSection = gPythia->GetXsection();
2672 AliGenEventHeader * eventHeader =
dynamic_cast<AliMCEvent*
>(MCEvent)->GenEventHeader();
2673 TString eventHeaderName = eventHeader->ClassName();
2674 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2675 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader);
2676 NTrials = gPythia->Trials();
2677 XSection = gPythia->GetXsection();
2692 AliGenCocktailEventHeader *cHeader = 0x0;
2693 AliAODMCHeader *cHeaderAOD = 0x0;
2694 Bool_t headerFound = kFALSE;
2695 AliStack *fMCStack = 0x0;
2696 TClonesArray *fMCStackAOD = 0x0;
2708 if(MCEvent->IsA()==AliMCEvent::Class()){
2709 if(dynamic_cast<AliMCEvent*>(MCEvent)){
2710 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(
dynamic_cast<AliMCEvent*
>(MCEvent)->GenEventHeader());
2711 if(cHeader) headerFound = kTRUE;
2712 fMCStack =
dynamic_cast<AliStack*
>(
dynamic_cast<AliMCEvent*
>(MCEvent)->Stack());
2715 if(MCEvent->IsA()==AliAODEvent::Class()){
2716 cHeaderAOD =
dynamic_cast<AliAODMCHeader*
>(MCEvent->FindListObject(AliAODMCHeader::StdBranchName()));
2717 fMCStackAOD =
dynamic_cast<TClonesArray*
>(MCEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2718 if(cHeaderAOD) headerFound = kTRUE;
2722 TList *genHeaders = 0x0;
2723 if(cHeader) genHeaders = cHeader->GetHeaders();
2725 genHeaders = cHeaderAOD->GetCocktailHeaders();
2726 if(genHeaders->GetEntries()==1){
2730 AliGenEventHeader* gh = 0;
2731 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2732 gh = (AliGenEventHeader*)genHeaders->At(i);
2733 TString GeneratorName = gh->GetName();
2734 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2735 return dynamic_cast<AliGenPythiaEventHeader*
>(gh)->
GetPtHard();
2739 AliGenEventHeader * eventHeader =
dynamic_cast<AliMCEvent*
>(MCEvent)->GenEventHeader();
2740 TString eventHeaderName = eventHeader->ClassName();
2741 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2742 return dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2756 Int_t runRangesEMCalL0 [35] = { 144871, 145288, 146375, 146382,
2758 150209, 153056, 153911, 153915,
2759 158135, 158136, 158178, 158182, 160683,
2760 160764, 161139, 161256, 161379, 161457,
2761 161525, 161556, 161558, 161609, 161630,
2763 173731, 177144, 177147, 177653, 177724, 178327,
2768 Double_t thresholdEMCalL0[34] = { 2.11, 3.43, 1.71, 2.05,
2770 1.94, 3.39, 4.01, 5.25, 5.5,
2771 2.05, 5.50, 2.05, 5.50, 2.05, 1.71, 5.50, 1.71, 5.50, 1.71, 5.50, 1.71, 5.50, 1.71, 5.50, 1.71,
2772 2.01, 1.75, 1.52, 2.01, 1.52, 1.85,
2776 Double_t spreadEMCalL0[34] = { 0., 0., 0, 0,
2779 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
2780 0., 0., 0., 0., 0.2, 0.2,
2785 Int_t runRangesEMCalL1[4] = { 179796,
2790 Double_t thresholdEMCalL1[3] = { 9.5, 11.5, 5.5};
2791 Double_t spreadEMCalL1[3] = { 1.0, 0.5, 0.6};
2793 Int_t runRangesEMCalL1G2[3] = { 195180,
2797 Double_t thresholdEMCalL1G2[2] = { 7.2, 3.75};
2798 Double_t spreadEMCalL1G2[2] = { 0.3, 0.25};
2800 Int_t runnumber = fInputEvent->GetRunNumber();
2803 if (runnumber < runRangesEMCalL0[0])
return kTRUE;
2805 while (!(runnumber >= runRangesEMCalL0[binRun] && runnumber < runRangesEMCalL0[binRun+1] ) && binRun < 34 ){
2809 if (binRun==34)
return kFALSE;
2810 Double_t threshold = thresholdEMCalL0[binRun];
2812 if (isMC && spreadEMCalL0[binRun] != 0.){
2813 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2814 triggerSmearing->SetParameter(0, 1/(spreadEMCalL0[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2815 triggerSmearing->SetParameter(1, thresholdEMCalL0[binRun]);
2816 triggerSmearing->SetParameter(2, spreadEMCalL0[binRun]);
2817 threshold = triggerSmearing->GetRandom();
2818 delete triggerSmearing;
2824 nclus = fInputEvent->GetNumberOfCaloClusters();
2826 if(nclus == 0)
return kFALSE;
2829 Bool_t eventIsAccepted = kFALSE;
2830 for(
Int_t i = 0; i < nclus; i++){
2831 AliVCluster* clus = NULL;
2832 clus = fInputEvent->GetCaloCluster(i);
2833 if (!clus)
continue;
2834 if (!clus->IsEMCAL())
continue;
2835 if (clus->GetM02()<0.1)
continue;
2836 if (clus->GetNCells()<2)
continue;
2837 if (clus->E() > threshold ){
2839 eventIsAccepted = kTRUE;
2842 return eventIsAccepted;
2849 if (runnumber < runRangesEMCalL1[0])
return kTRUE;
2851 while (!(runnumber >= runRangesEMCalL1[binRun] && runnumber < runRangesEMCalL1[binRun+1] ) && binRun < 3 ){
2855 if (binRun==3)
return kFALSE;
2856 Double_t threshold = thresholdEMCalL1[binRun];
2858 if (isMC && spreadEMCalL1[binRun] != 0.){
2859 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2860 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2861 triggerSmearing->SetParameter(1, thresholdEMCalL1[binRun]);
2862 triggerSmearing->SetParameter(2, spreadEMCalL1[binRun]);
2863 threshold = triggerSmearing->GetRandom();
2864 delete triggerSmearing;
2870 nclus = fInputEvent->GetNumberOfCaloClusters();
2872 if(nclus == 0)
return kFALSE;
2875 Bool_t eventIsAccepted = kFALSE;
2876 for(
Int_t i = 0; i < nclus; i++){
2877 AliVCluster* clus = NULL;
2878 clus = fInputEvent->GetCaloCluster(i);
2879 if (!clus)
continue;
2880 if (!clus->IsEMCAL())
continue;
2881 if (clus->GetM02()<0.1)
continue;
2882 if (clus->GetNCells()<2)
continue;
2883 if (clus->E() > threshold ){
2885 eventIsAccepted = kTRUE;
2888 return eventIsAccepted;
2890 if (runnumber < runRangesEMCalL1G2[0])
return kTRUE;
2892 while (!(runnumber >= runRangesEMCalL1G2[binRun] && runnumber < runRangesEMCalL1G2[binRun+1] ) && binRun < 2 ){
2896 if (binRun==2)
return kFALSE;
2897 Double_t threshold = thresholdEMCalL1G2[binRun];
2898 if (isMC && spreadEMCalL1G2[binRun] != 0.){
2899 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2900 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1G2[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2901 triggerSmearing->SetParameter(1, thresholdEMCalL1G2[binRun]);
2902 triggerSmearing->SetParameter(2, spreadEMCalL1G2[binRun]);
2903 threshold = triggerSmearing->GetRandom();
2904 delete triggerSmearing;
2909 nclus = fInputEvent->GetNumberOfCaloClusters();
2911 if(nclus == 0)
return kFALSE;
2914 Bool_t eventIsAccepted = kFALSE;
2915 for(
Int_t i = 0; i < nclus; i++){
2916 AliVCluster* clus = NULL;
2917 clus = fInputEvent->GetCaloCluster(i);
2918 if (!clus)
continue;
2919 if (!clus->IsEMCAL())
continue;
2920 if (clus->GetM02()<0.1)
continue;
2921 if (clus->GetNCells()<2)
continue;
2922 if (clus->E() > threshold ){
2924 eventIsAccepted = kTRUE;
2927 return eventIsAccepted;
2944 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
2947 UInt_t isSelected = AliVEvent::kAny;
2949 if (fInputHandler==NULL)
return kFALSE;
2950 if( fInputHandler->GetEventSelection() || fInputEvent->IsA()==AliAODEvent::Class()) {
2952 TString firedTrigClass = fInputEvent->GetFiredTriggerClasses();
2993 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
2995 if (fInputHandler->IsEventSelected() & AliVEvent::kMB) isSelected = 0;
2997 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3001 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3002 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3004 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3005 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3012 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3014 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3016 if (firedTrigClass.Contains(
"7EG2")) isSelected = 0;
3019 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3020 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3021 if (firedTrigClass.Contains(
"8EG2")) isSelected = 0;
3024 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3026 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3029 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3030 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3035 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3036 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3037 if (firedTrigClass.Contains(
"7EG1")) isSelected = 0;
3039 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3040 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3041 if (firedTrigClass.Contains(
"8EG1")) isSelected = 0;
3043 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3044 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3046 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3047 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3051 if (isSelected != 0 ){
3083 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3084 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3085 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3089 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3090 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3091 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3095 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3096 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3097 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3102 for (
Int_t i=0; i<ClassesList->GetEntriesFast(); i++){
3103 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3104 if (firedTrigClass.Contains(NameClass->GetString())) CheckClass+=
"1";
3105 else CheckClass+=
"0";
3107 if(CheckClass.Contains(
"0")) isSelected = 0;
3114 fIsSDDFired = !(fInputHandler->IsEventSelected() & AliVEvent::kFastOnly);
3116 Bool_t mimickedTrigger = kTRUE;
3123 if (mimickedTrigger){
3124 if (fInputHandler->IsEventSelected() & AliVEvent::kMB)
hTriggerClass->Fill(0);
3125 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)
hTriggerClass->Fill(1);
3126 if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)
hTriggerClass->Fill(2);
3127 if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)
hTriggerClass->Fill(3);
3128 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)
hTriggerClass->Fill(4);
3129 if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)
hTriggerClass->Fill(5);
3130 if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)
hTriggerClass->Fill(6);
3132 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)
hTriggerClass->Fill(7);
3134 if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)
hTriggerClass->Fill(8);
3136 if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)
hTriggerClass->Fill(9);
3138 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)
hTriggerClass->Fill(10);
3140 if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)
hTriggerClass->Fill(11);
3141 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)
hTriggerClass->Fill(12);
3142 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)
hTriggerClass->Fill(13);
3145 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)
hTriggerClass->Fill(14);
3146 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)
hTriggerClass->Fill(15);
3147 if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)
hTriggerClass->Fill(16);
3148 if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)
hTriggerClass->Fill(17);
3149 if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)
hTriggerClass->Fill(18);
3150 if (fInputHandler->IsEventSelected() & AliVEvent::kZED)
hTriggerClass->Fill(19);
3151 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)
hTriggerClass->Fill(20);
3153 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)
hTriggerClass->Fill(21);
3154 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClass->Fill(22);
3155 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClass->Fill(23);
3156 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)
hTriggerClass->Fill(24);
3157 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClass->Fill(25);
3158 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClass->Fill(26);
3159 if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)
hTriggerClass->Fill(27);
3160 if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)
hTriggerClass->Fill(28);
3161 if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)
hTriggerClass->Fill(29);
3162 if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)
hTriggerClass->Fill(30);
3163 if (fInputHandler->IsEventSelected() & AliVEvent::kAny)
hTriggerClass->Fill(31);
3164 if (!fInputHandler->IsEventSelected())
hTriggerClass->Fill(34);
3170 if (mimickedTrigger){
3202 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClassSelected->Fill(22);
3203 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClassSelected->Fill(23);
3205 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClassSelected->Fill(25);
3206 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClassSelected->Fill(26);
3216 if(!isSelected)
return kFALSE;
3218 if (!mimickedTrigger )
return kFALSE;
3245 if(rejection == 0)
return;
3247 AliGenCocktailEventHeader *cHeader = 0x0;
3248 AliAODMCHeader *cHeaderAOD = 0x0;
3249 Bool_t headerFound = kFALSE;
3250 AliStack *fMCStack = 0x0;
3251 TClonesArray *fMCStackAOD = 0x0;
3252 if(MCEvent->IsA()==AliMCEvent::Class()){
3253 if(dynamic_cast<AliMCEvent*>(MCEvent)){
3254 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(
dynamic_cast<AliMCEvent*
>(MCEvent)->GenEventHeader());
3255 if(cHeader) headerFound = kTRUE;
3256 fMCStack =
dynamic_cast<AliStack*
>(
dynamic_cast<AliMCEvent*
>(MCEvent)->Stack());
3259 if(MCEvent->IsA()==AliAODEvent::Class()){
3260 cHeaderAOD =
dynamic_cast<AliAODMCHeader*
>(MCEvent->FindListObject(AliAODMCHeader::StdBranchName()));
3261 fMCStackAOD =
dynamic_cast<TClonesArray*
>(MCEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3262 if(cHeaderAOD) headerFound = kTRUE;
3265 if (
fDebugLevel > 0 ) cout <<
"event starts here" << endl;
3267 TList *genHeaders = 0x0;
3268 if(cHeader) genHeaders = cHeader->GetHeaders();
3270 genHeaders = cHeaderAOD->GetCocktailHeaders();
3271 if(genHeaders->GetEntries()==1){
3276 AliGenEventHeader* gh = 0;
3278 Int_t firstindexA = 0;
3279 Int_t lastindexA = -1;
3280 if(rejection == 1 || rejection == 3)
fnHeaders = 1;
3282 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3283 gh = (AliGenEventHeader*)genHeaders->At(i);
3284 TString GeneratorName = gh->GetName();
3285 lastindexA = lastindexA + gh->NProduced();
3286 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3287 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3288 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3289 if (
fDebugLevel > 0 ) cout << GeneratorInList.Data() << endl;
3290 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3292 if (GeneratorInList.CompareTo(
"PARAM") == 0 || GeneratorInList.CompareTo(
"BOX") == 0 ){
3296 if (gh->NProduced() > 10 && fMCStack->Particle(firstindexA+10)->GetPdgCode() ==
fAddedSignalPDGCode ){
3311 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCStackAOD->At(firstindexA));
3314 if (gh->NProduced() > 10){
3315 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCStackAOD->At(firstindexA+10));
3337 firstindexA = firstindexA + gh->NProduced();
3346 if(rejection == 1 || rejection == 3){
3348 fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1;
3349 fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName();
3354 Int_t firstindex = 0;
3355 Int_t lastindex = -1;
3358 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3359 gh = (AliGenEventHeader*)genHeaders->At(i);
3360 TString GeneratorName = gh->GetName();
3361 lastindex = lastindex + gh->NProduced();
3362 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3363 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3364 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3365 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3366 if (GeneratorInList.CompareTo(
"PARAM") == 0 || GeneratorInList.CompareTo(
"BOX") == 0 ){
3370 if (
fDebugLevel > 0 ) cout <<
"produced " << gh->NProduced() <<
" with box generator" << endl;
3371 if (gh->NProduced() > 10 && fMCStack->Particle(firstindex+10)->GetPdgCode() ==
fAddedSignalPDGCode){
3372 if (
fDebugLevel > 0 ) cout <<
"one of them was a pi0 or eta" << endl;
3377 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3390 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCStackAOD->At(firstindex));
3393 if (gh->NProduced() > 10) {
3394 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCStackAOD->At(firstindex+10));
3417 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3424 firstindex = firstindex + gh->NProduced();
3427 for (
Int_t i = 0; i < number; i++){
3437 fNotRejectedEnd[0] =
static_cast<AliMCEvent*
>(MCEvent)->Stack()->GetNprimary()-1;
3454 if(index < 0)
return 0;
3457 if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
3458 if(!MCStack)
return 0;
3459 if(index >= MCStack->GetNprimary()){
3460 if( ((TParticle*)MCStack->Particle(index))->GetMother(0) < 0)
return 0;
3461 return IsParticleFromBGEvent(((TParticle*)MCStack->Particle(index))->GetMother(0),MCStack,InputEvent);
3468 if(i == 0) accepted = 2;
3472 else if(InputEvent->IsA()==AliAODEvent::Class()){
3473 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3474 if (AODMCTrackArray){
3475 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3476 if(!aodMCParticle)
return 0;
3477 if(!aodMCParticle->IsPrimary()){
3478 if( aodMCParticle->GetMother() < 0)
return 0;
3481 index = TMath::Abs(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index))->GetLabel());
3485 if(i == 0) accepted = 2;
3498 if (MCEvent){isMC = kTRUE;}
3526 Int_t runnumber = InputEvent->GetRunNumber();
3527 if ((runnumber>=144871) && (runnumber<=146860)) {
3529 AliVCaloCells *cells = InputEvent->GetEMCALCells();
3530 const Short_t nCells = cells->GetNumberOfCells();
3532 if (InputEvent->IsA()==AliESDEvent::Class()) AliAnalysisManager::GetAnalysisManager()->LoadBranch(
"EMCALCells.");
3534 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3535 if (!fInputHandler)
return 3;
3538 Int_t nCellCount[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
3539 for(
Int_t iCell=0; iCell<nCells; ++iCell) {
3540 Short_t cellId = cells->GetCellNumber(iCell);
3541 Double_t cellE = cells->GetCellAmplitude(cellId);
3542 Int_t sm = cellId / (24*48);
3543 if (cellE>0.1) ++nCellCount[sm];
3546 Bool_t fIsLedEvent = kFALSE;
3547 if (nCellCount[4] > 100) {
3548 fIsLedEvent = kTRUE;
3550 if ((runnumber>=146858) && (runnumber<=146860)) {
3551 if ((fInputHandler->IsEventSelected() & AliVEvent::kMB) && (nCellCount[3]>=21))
3552 fIsLedEvent = kTRUE;
3553 else if ((fInputHandler->IsEventSelected() & AliVEvent::kEMC1) && (nCellCount[3]>=35))
3554 fIsLedEvent = kTRUE;
3564 Int_t nClustersLayer0 = InputEvent->GetNumberOfITSClusters(0);
3565 Int_t nClustersLayer1 = InputEvent->GetNumberOfITSClusters(1);
3566 Int_t nTracklets = InputEvent->GetMultiplicity()->GetNumberOfTracklets();
3571 if(InputEvent->IsA()==AliESDEvent::Class()){
3572 Int_t nPileVert = ((
AliESDEvent*)InputEvent)->GetNumberOfPileupVerticesSPD();
3575 for(
Int_t i=0; i<nPileVert;i++){
3576 const AliESDVertex* pv= ((
AliESDEvent*)InputEvent)->GetPileupVertexSPD(i);
3577 Int_t nc2 = pv->GetNContributors();
3582 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
3596 if(InputEvent->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
3600 if (
fUtils->IsSPDClusterVsTrackletBG(InputEvent)){
3606 if(
fUtils->IsPileUpEvent(InputEvent) ){
3610 if (
fUtils->IsSPDClusterVsTrackletBG(InputEvent)){
3631 AliEventplane *EventPlane = InputEvent->GetEventplane();
3644 AliInfo(
"Inside the GetWeightForCentralityFlattening function");
3647 if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
3650 AliCentrality *fESDCentrality=(AliCentrality*)esdEvent->GetCentrality();
3652 centrality = fESDCentrality->GetCentralityPercentile(
"V0M");
3655 }
else if(InputEvent->IsA()==AliAODEvent::Class()){
3658 if(aodEvent->GetHeader()){
3659 centrality = ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();
3665 Float_t GetValueForWeight = 1.;
3668 Bool_t CorrCentrLoop = kFALSE;
3674 CorrCentrLoop = kTRUE;
3675 }
else if (
fDoCentralityFlat == 2 && (centrality >=10. && centrality <= 20.) ){
3678 CorrCentrLoop = kTRUE;
3682 CorrCentrLoop = kTRUE;
3684 CorrCentrLoop = kFALSE;
3687 if (CorrCentrLoop && GetValueForWeight != 0. && maximum !=0. && isfinite(GetValueForWeight) && isfinite(maximum) ){
3688 weightCentrality = maximum/GetValueForWeight;
3689 if (!isfinite(GetValueForWeight)) weightCentrality = 1.;
3690 if (!isfinite(weightCentrality)) weightCentrality = 1.;
3693 return weightCentrality;
3712 if (relativeErrorData < 0.2 && relativeErrorMC < 0.2 ){
3713 if (isfinite(valueMultData) && isfinite(valueMultMC) ){
3714 weightMult = valueMultData/valueMultMC;
3733 if(index < 0)
return 0;
3741 if (kCaseGen == 0)
return 1;
3746 if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
3747 mesonPt = ((TParticle*)MCStack->Particle(index))->Pt();
3748 mesonMass = ((TParticle*)MCStack->Particle(index))->GetCalcMass();
3749 PDGCode = ((TParticle*)MCStack->Particle(index))->GetPdgCode();
3750 }
else if(InputEvent->IsA()==AliAODEvent::Class()){
3751 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3752 if (AODMCTrackArray){
3753 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3754 mesonPt = aodMCParticle->Pt();
3755 mesonMass = aodMCParticle->GetCalcMass();
3756 PDGCode = aodMCParticle->GetPdgCode();
3762 Float_t functionResultMC = 1.;
3773 Float_t functionResultData = 1;
3785 if (PDGCode == 111 || PDGCode == 221){
3786 if (functionResultData != 0. && functionResultMC != 0. && isfinite(functionResultData) && isfinite(functionResultMC)){
3787 weight = functionResultData/functionResultMC;
3788 if ( kCaseGen == 3){
3789 if (PDGCode == 111){
3794 if (PDGCode == 221){
3800 if (!isfinite(functionResultData)) weight = 1.;
3801 if (!isfinite(weight)) weight = 1.;
3803 }
else if (PDGCode == 310 && functionResultMC != 0 && isfinite(functionResultMC)){
3804 weight = functionResultMC;
3820 printf(
" Gamma Conversion Cuts %s :: pPb Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),-0.465);
3823 printf(
" Gamma Conversion Cuts %s :: Pbp Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),0.465);
3826 else printf(
" Gamma Conversion Cuts %s :: Automatic Eta Shift requested but Period is not known -> No Shift \n\n",(
GetCutNumber()).
Data());
3838 AliError(Form(
"%s: fTriggerPatchInfo not available",GetName()));
3846 AliEMCALTriggerPatchInfo *patch;
3847 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
3849 if (patch->IsMainTrigger()) {
3866 if (fInputEvent->IsA()==AliESDEvent::Class()){
3876 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
3882 if (fInputEvent->IsA()==AliESDEvent::Class()){
3914 AliEMCALTriggerPatchInfo *patch;
3916 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
3921 if (patch->IsGammaHigh()){
3925 if (patch->IsGammaLow()){
3929 if (patch->IsJetHigh()){
3933 if (patch->IsJetLow()){
3937 if (patch->IsLevel0()){
3948 AliDebug(2,
"Patch summary: ");
3949 AliDebug(2, Form(
"Number of patches: %d", nPatch));
3950 AliDebug(2, Form(
"Level0: [%d]" ,nL0));
3951 AliDebug(2, Form(
"Jet: low[%d], high[%d]" ,nJ2, nJ1));
3952 AliDebug(2, Form(
"Gamma: low[%d], high[%d]" ,nG2, nG1));
3964 SETBIT(triggers,
kG1);
3966 SETBIT(triggers,
kG2);
3968 SETBIT(triggers,
kJ1);
3970 SETBIT(triggers,
kJ2);
3972 SETBIT(triggers,
kL0);
3991 TClonesArray *arr = 0;
3993 if (!sname.IsNull()) {
3994 arr =
dynamic_cast<TClonesArray*
>(fInputEvent->FindListObject(sname));
3996 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
4006 TString objname(arr->GetClass()->GetName());
4007 TClass cls(objname);
4008 if (!cls.InheritsFrom(clname)) {
4009 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
4010 GetName(), cls.GetName(), name, clname));
4019 if (stackpos < 0)
return kFALSE;
4020 TParticle* particle = (TParticle *)MCStack->Particle(stackpos);
4021 if (!particle)
return kFALSE;
4022 if (TMath::Abs(particle->GetPdgCode()) == 11 ){
4023 if (particle->GetMother(0) != -1){
4024 TParticle* particleMother = (TParticle *)MCStack->Particle(particle->GetMother(0));
4025 if (particleMother){
4026 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4027 particle = particleMother;
4031 if (particle->GetMother(0) != -1){
4032 Double_t deltaX = particle->Vx() - prodVtxX;
4033 Double_t deltaY = particle->Vy() - prodVtxY;
4034 Double_t deltaZ = particle->Vz() - prodVtxZ;
4037 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4040 Bool_t dalitzCand = kFALSE;
4042 TParticle* firstmother = (TParticle *)MCStack->Particle(particle->GetMother(0));
4043 if (!firstmother)
return kFALSE;
4044 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4045 Bool_t intDecay = kFALSE;
4046 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4047 if ( intDecay && TMath::Abs(particle->GetPdgCode()) == 11 ){
4052 Long_t source = particle->GetMother(0);
4053 Bool_t foundExcludedPart = kFALSE;
4054 Bool_t foundShower = kFALSE;
4055 Int_t pdgCodeMotherPrev = 0;
4056 Int_t pdgCodeMotherPPrevMother = 0;
4064 TParticle* mother = (TParticle *)MCStack->Particle(source);
4065 source = mother->GetMother(0);
4067 Int_t pdgCodeMother = mother->GetPdgCode();
4069 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4070 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4071 foundShower = kTRUE;
4074 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4075 foundShower = kTRUE;
4087 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4088 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4089 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312
4091 foundExcludedPart = kTRUE;
4094 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4095 pdgCodeMotherPrev = pdgCodeMother;
4096 if (source == -1) depth = 20;
4102 if (foundExcludedPart){
4108 }
else if (foundShower){
4123 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
4124 if (AODMCTrackArray == NULL)
return kFALSE;
4125 AliAODMCParticle* currentParticle = AODMCParticle;
4126 if (TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4127 if (currentParticle->GetMother() != -1){
4128 AliAODMCParticle* particleMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4129 if (particleMother){
4130 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4131 currentParticle = particleMother;
4135 if (currentParticle->GetMother() > -1){
4136 Double_t deltaX = currentParticle->Xv() - prodVtxX;
4137 Double_t deltaY = currentParticle->Yv() - prodVtxY;
4138 Double_t deltaZ = currentParticle->Zv() - prodVtxZ;
4141 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4143 Bool_t dalitzCand = kFALSE;
4145 AliAODMCParticle* firstmother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4146 if (!firstmother)
return kFALSE;
4147 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4148 Bool_t intDecay = kFALSE;
4149 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4150 if ( intDecay && TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4155 Long_t source = currentParticle->GetMother();
4156 Bool_t foundExcludedPart = kFALSE;
4157 Bool_t foundShower = kFALSE;
4158 Int_t pdgCodeMotherPrev = 0;
4159 Int_t pdgCodeMotherPPrevMother = 0;
4167 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(source));
4168 source = mother->GetMother();
4170 Int_t pdgCodeMother = mother->GetPdgCode();
4172 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4173 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4174 foundShower = kTRUE;
4177 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4178 foundShower = kTRUE;
4190 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4191 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4192 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312)
4194 foundExcludedPart = kTRUE;
4197 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4198 pdgCodeMotherPrev = pdgCodeMother;
4199 if (source == -1) depth = 20;
4205 if (foundExcludedPart){
4211 }
else if (foundShower){
4226 if (particle != NULL && fMCStack != NULL){
4227 Int_t pdgSecondary = 0;
4229 Bool_t hasMother = kFALSE;
4230 Bool_t hasGrandMother = kFALSE;
4231 Long_t motherID = particle->GetMother(0);
4232 Long_t grandMotherID = -1;
4236 grandMotherID = fMCStack->Particle(motherID)->GetMother(0);
4238 if (grandMotherID > -1){
4239 hasGrandMother = kTRUE;
4240 pdgSecondary = fMCStack->Particle(grandMotherID)->GetPdgCode();
4244 Bool_t hasMother = kFALSE;
4245 Bool_t hasGrandMother = kFALSE;
4246 Bool_t hasGreatGrandMother = kFALSE;
4247 Long_t motherID = particle->GetMother(0);
4248 Long_t grandMotherID = -1;
4249 Long_t greatGrandMotherID = -1;
4253 grandMotherID = fMCStack->Particle(motherID)->GetMother(0);
4255 if (grandMotherID > -1){
4256 hasGrandMother = kTRUE;
4257 greatGrandMotherID = fMCStack->Particle(grandMotherID)->GetMother(0);
4259 if (greatGrandMotherID > -1){
4260 hasGreatGrandMother = kTRUE;
4261 pdgSecondary = fMCStack->Particle(greatGrandMotherID)->GetPdgCode();
4267 if (TMath::Abs(pdgSecondary) == 3122 )
4270 else if ( TMath::Abs(pdgSecondary) == 310 )
4273 else if ( TMath::Abs(pdgSecondary) == 130 )
4276 else if ( TMath::Abs(pdgSecondary) == 221 )
4279 else if ( TMath::Abs(pdgSecondary) != 0 )
4289 if (particle != NULL && aodmcArray != NULL){
4290 Int_t pdgSecondary = 0;
4292 Bool_t hasMother = kFALSE;
4293 Bool_t hasGrandMother = kFALSE;
4294 Long_t motherID = particle->GetMother();
4295 Long_t grandMotherID = -1;
4299 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4301 if (grandMotherID > -1){
4302 hasGrandMother = kTRUE;
4303 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetPdgCode();
4307 Bool_t hasMother = kFALSE;
4308 Bool_t hasGrandMother = kFALSE;
4309 Bool_t hasGreatGrandMother = kFALSE;
4310 Long_t motherID = particle->GetMother();
4311 Long_t grandMotherID = -1;
4312 Long_t greatGrandMotherID = -1;
4316 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4318 if (grandMotherID > -1){
4319 hasGrandMother = kTRUE;
4320 greatGrandMotherID = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetMother();
4322 if (greatGrandMotherID > -1){
4323 hasGreatGrandMother = kTRUE;
4324 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(greatGrandMotherID))->GetPdgCode();
4330 if (TMath::Abs(pdgSecondary) == 3122 )
4333 else if ( TMath::Abs(pdgSecondary) == 310 )
4336 else if ( TMath::Abs(pdgSecondary) == 130 )
4339 else if ( TMath::Abs(pdgSecondary) == 221 )
4342 else if ( TMath::Abs(pdgSecondary) != 0 )
4352 if (periodName.CompareTo(
"") == 0){
4356 if (periodName.CompareTo(
"") == 0) {
4359 AliError(
"No correct period could be set, periodName string empty");
4364 if (periodName.CompareTo(
"LHC10b") == 0 || periodName.CompareTo(
"LHC10c") == 0 || periodName.CompareTo(
"LHC10d") == 0 || periodName.CompareTo(
"LHC10e") == 0 ||
4365 periodName.CompareTo(
"LHC10f") == 0 || periodName.CompareTo(
"LHC10g") == 0
4369 }
else if (periodName.CompareTo(
"LHC10h") == 0) {
4372 }
else if (periodName.CompareTo(
"LHC11a") == 0) {
4375 }
else if (periodName.CompareTo(
"LHC11b") == 0) {
4378 }
else if (periodName.CompareTo(
"LHC11c") == 0 || periodName.CompareTo(
"LHC11d") == 0 || periodName.CompareTo(
"LHC11e") == 0 || periodName.CompareTo(
"LHC11f") == 0 ||
4379 periodName.CompareTo(
"LHC11g") == 0
4383 }
else if (periodName.CompareTo(
"LHC11h") == 0) {
4386 }
else if (periodName.CompareTo(
"LHC12a") == 0 || periodName.CompareTo(
"LHC12b") == 0 || periodName.CompareTo(
"LHC12c") == 0 || periodName.CompareTo(
"LHC12d") == 0 ||
4387 periodName.CompareTo(
"LHC12e") == 0 || periodName.CompareTo(
"LHC12f") == 0 || periodName.CompareTo(
"LHC12g") == 0 || periodName.CompareTo(
"LHC12h") == 0 ||
4388 periodName.CompareTo(
"LHC12i") == 0
4392 }
else if (periodName.CompareTo(
"LHC13b") == 0 || periodName.CompareTo(
"LHC13c") == 0 ){
4395 }
else if (periodName.CompareTo(
"LHC13d") == 0 || periodName.CompareTo(
"LHC13e") == 0 ){
4398 }
else if (periodName.CompareTo(
"LHC13f") == 0 ){
4401 }
else if (periodName.CompareTo(
"LHC13g") == 0 ){
4404 }
else if (periodName.CompareTo(
"LHC15f") == 0 || periodName.CompareTo(
"LHC15g") == 0 || periodName.CompareTo(
"LHC15h") == 0 || periodName.CompareTo(
"LHC15i") == 0 ||
4405 periodName.CompareTo(
"LHC15j") == 0 || periodName.CompareTo(
"LHC15k") == 0 || periodName.CompareTo(
"LHC15l") == 0 || periodName.CompareTo(
"LHC15m") == 0
4409 }
else if (periodName.CompareTo(
"LHC15n") == 0 ){
4412 }
else if (periodName.CompareTo(
"LHC15o") == 0 ){
4415 }
else if (periodName.CompareTo(
"LHC16k") == 0 || periodName.CompareTo(
"LHC16l") == 0 ){
4418 }
else if (periodName.CompareTo(
"LHC16d") == 0 ){
4421 }
else if (periodName.CompareTo(
"LHC16e") == 0 ){
4424 }
else if (periodName.CompareTo(
"LHC16f") == 0 ){
4427 }
else if (periodName.CompareTo(
"LHC16g") == 0 ){
4430 }
else if (periodName.CompareTo(
"LHC16h") == 0 ){
4433 }
else if (periodName.CompareTo(
"LHC16i") == 0 ){
4436 }
else if (periodName.CompareTo(
"LHC16j") == 0 ){
4439 }
else if (periodName.CompareTo(
"LHC16o") == 0 ){
4442 }
else if (periodName.CompareTo(
"LHC16p") == 0 ){
4445 }
else if (periodName.CompareTo(
"LHC16q") == 0 ){
4448 }
else if (periodName.CompareTo(
"LHC16r") == 0 ){
4451 }
else if (periodName.CompareTo(
"LHC16s") == 0 ){
4454 }
else if (periodName.CompareTo(
"LHC16t") == 0 ){
4459 }
else if (periodName.CompareTo(
"LHC10d1") == 0){
4462 }
else if (periodName.CompareTo(
"LHC10d2") == 0){
4465 }
else if (periodName.CompareTo(
"LHC10d4a") == 0){
4468 }
else if (periodName.CompareTo(
"LHC10d4") == 0){
4471 }
else if (periodName.CompareTo(
"LHC10e12") == 0){
4474 }
else if (periodName.CompareTo(
"LHC10e13") == 0){
4477 }
else if (periodName.CompareTo(
"LHC10e20") == 0){
4480 }
else if (periodName.CompareTo(
"LHC10e21") == 0){
4483 }
else if (periodName.CompareTo(
"LHC10f6a") == 0){
4486 }
else if (periodName.CompareTo(
"LHC10f6") == 0){
4489 }
else if (periodName.Contains(
"LHC14j4")){
4492 }
else if (periodName.CompareTo(
"LHC13d2") == 0){
4495 }
else if (periodName.CompareTo(
"LHC13d2b") == 0){
4498 }
else if (periodName.CompareTo(
"LHC12a11a") == 0){
4501 }
else if (periodName.CompareTo(
"LHC12a11b") == 0){
4504 }
else if (periodName.CompareTo(
"LHC12a11c") == 0){
4507 }
else if (periodName.CompareTo(
"LHC12a11d") == 0){
4510 }
else if (periodName.CompareTo(
"LHC12a11e") == 0){
4513 }
else if (periodName.CompareTo(
"LHC12a11f") == 0){
4517 }
else if (periodName.CompareTo(
"LHC12a15c") == 0){
4520 }
else if (periodName.Contains(
"LHC12f1a") ){
4523 }
else if (periodName.Contains(
"LHC12f1b") ){
4526 }
else if (periodName.Contains(
"LHC12i3") ){
4529 }
else if (periodName.CompareTo(
"LHC15g1a") == 0){
4532 }
else if (periodName.CompareTo(
"LHC15g1b") == 0){
4535 }
else if (periodName.CompareTo(
"LHC13e4") == 0){
4538 }
else if (periodName.CompareTo(
"LHC13e5") == 0){
4541 }
else if (periodName.CompareTo(
"LHC14k1a") == 0){
4544 }
else if (periodName.CompareTo(
"LHC14k1b") == 0){
4547 }
else if (periodName.CompareTo(
"LHC12a15f") == 0){
4550 }
else if (periodName.CompareTo(
"LHC12a15g") == 0){
4553 }
else if (periodName.CompareTo(
"LHC12f2a") == 0){
4556 }
else if (periodName.CompareTo(
"LHC14a1a") == 0){
4559 }
else if (periodName.CompareTo(
"LHC14a1b") == 0){
4562 }
else if (periodName.CompareTo(
"LHC14a1c") == 0){
4566 }
else if (periodName.CompareTo(
"LHC14e2a") == 0){
4569 }
else if (periodName.CompareTo(
"LHC14e2b") == 0){
4572 }
else if (periodName.CompareTo(
"LHC14e2c") == 0){
4575 }
else if (periodName.Contains(
"LHC15h1")){
4578 }
else if (periodName.Contains(
"LHC15h2")){
4581 }
else if (periodName.CompareTo(
"LHC16c2") == 0){
4584 }
else if (periodName.CompareTo(
"LHC16c2_plus") == 0){
4588 }
else if (periodName.Contains(
"LHC13b2_efix")){
4591 }
else if (periodName.CompareTo(
"LHC13e7") == 0){
4594 }
else if (periodName.CompareTo(
"LHC14b2") == 0){
4597 }
else if (periodName.CompareTo(
"LHC13b4_fix") == 0){
4600 }
else if (periodName.CompareTo(
"LHC13b4_plus") == 0){
4603 }
else if (periodName.CompareTo(
"LHC16c3a") == 0){
4606 }
else if (periodName.CompareTo(
"LHC16c3b") == 0){
4609 }
else if (periodName.CompareTo(
"LHC16c3c") == 0){
4612 }
else if (periodName.CompareTo(
"LHC15g2") == 0){
4615 }
else if (periodName.CompareTo(
"LHC15a3a") == 0){
4618 }
else if (periodName.CompareTo(
"LHC15a3a_plus") == 0){
4621 }
else if (periodName.CompareTo(
"LHC15a3b") == 0){
4624 }
else if (periodName.CompareTo(
"LHC15d3a") == 0){
4627 }
else if (periodName.CompareTo(
"LHC15d3b") == 0){
4631 }
else if (periodName.CompareTo(
"LHC15g3a3") == 0){
4634 }
else if (periodName.CompareTo(
"LHC15g3a") == 0){
4637 }
else if (periodName.CompareTo(
"LHC15g3c2") == 0){
4640 }
else if (periodName.CompareTo(
"LHC15g3c3") == 0){
4643 }
else if (periodName.CompareTo(
"LHC15g3") == 0){
4646 }
else if (periodName.CompareTo(
"LHC16a2a") == 0){
4649 }
else if (periodName.CompareTo(
"LHC16a2b") == 0){
4652 }
else if (periodName.CompareTo(
"LHC16a2c") == 0){
4655 }
else if (periodName.CompareTo(
"LHC15l1a2") == 0){
4658 }
else if (periodName.CompareTo(
"LHC15l1b2") == 0){
4661 }
else if (periodName.CompareTo(
"LHC16h3") == 0){
4664 }
else if (periodName.CompareTo(
"LHC16h8a") == 0){
4667 }
else if (periodName.CompareTo(
"LHC16h8b") == 0){
4670 }
else if (periodName.CompareTo(
"LHC16k5a") == 0){
4673 }
else if (periodName.CompareTo(
"LHC16k5b") == 0){
4676 }
else if (periodName.CompareTo(
"LHC16k3a") == 0){
4679 }
else if (periodName.CompareTo(
"LHC16k3a2") == 0){
4682 }
else if (periodName.CompareTo(
"LHC17e2") == 0){
4685 }
else if (periodName.Contains(
"LHC15k1a1")){
4688 }
else if (periodName.Contains(
"LHC15k1a2")){
4691 }
else if (periodName.Contains(
"LHC15k1a3")){
4694 }
else if (periodName.Contains(
"LHC16j7")){
4697 }
else if (periodName.Contains(
"LHC16h4")){
4700 }
else if (periodName.Contains(
"LHC16g1")){
4703 }
else if (periodName.Contains(
"LHC16g1a")){
4706 }
else if (periodName.Contains(
"LHC16g1b")){
4709 }
else if (periodName.Contains(
"LHC16g1c")){
4712 }
else if (periodName.Contains(
"LHC16g2")){
4715 }
else if (periodName.Contains(
"LHC16g3")){
4718 }
else if (periodName.Contains(
"LHC16h2a")){
4721 }
else if (periodName.Contains(
"LHC16h2b")){
4724 }
else if (periodName.Contains(
"LHC16h2c")){
4727 }
else if (periodName.CompareTo(
"LHC16k3b") == 0){
4730 }
else if (periodName.CompareTo(
"LHC16k3b2") == 0){
4734 }
else if (periodName.CompareTo(
"LHC16j2a1") == 0){
4737 }
else if (periodName.CompareTo(
"LHC16j2b1") == 0){
4740 }
else if (periodName.CompareTo(
"LHC16j2a2") == 0){
4743 }
else if (periodName.CompareTo(
"LHC16j2b2") == 0){
4747 }
else if (periodName.CompareTo(
"LHC17f6") == 0){
4750 }
else if (periodName.CompareTo(
"LHC17f9") == 0){
4753 }
else if (periodName.CompareTo(
"LHC17d1") == 0){
4756 }
else if (periodName.CompareTo(
"LHC17d17") == 0){
4759 }
else if (periodName.CompareTo(
"LHC17f5") == 0){
4762 }
else if (periodName.CompareTo(
"LHC17d3") == 0){
4765 }
else if (periodName.CompareTo(
"LHC17e5") == 0){
4768 }
else if (periodName.CompareTo(
"LHC17d20a1") == 0){
4771 }
else if (periodName.CompareTo(
"LHC17d20a1_extra") == 0){
4774 }
else if (periodName.CompareTo(
"LHC17d20a2") == 0){
4777 }
else if (periodName.CompareTo(
"LHC17d20a2_extra") == 0){
4780 }
else if (periodName.CompareTo(
"LHC17d16") == 0){
4783 }
else if (periodName.CompareTo(
"LHC17d18") == 0){
4786 }
else if (periodName.CompareTo(
"LHC17f8a") == 0){
4789 }
else if (periodName.CompareTo(
"LHC17f8b") == 0){
4792 }
else if (periodName.CompareTo(
"LHC17f8c") == 0){
4795 }
else if (periodName.CompareTo(
"LHC17f8d") == 0){
4798 }
else if (periodName.CompareTo(
"LHC17f8e") == 0){
4802 }
else if (periodName.CompareTo(
"LHC17a2a") == 0){
4805 }
else if (periodName.CompareTo(
"LHC17a2a_fast") == 0){
4808 }
else if (periodName.CompareTo(
"LHC17a2a_cent") == 0){
4811 }
else if (periodName.CompareTo(
"LHC17a2a_cent_woSDD") == 0){
4814 }
else if (periodName.CompareTo(
"LHC17a2b") == 0){
4817 }
else if (periodName.CompareTo(
"LHC17a2b_fast") == 0){
4820 }
else if (periodName.CompareTo(
"LHC17a2b_cent") == 0){
4823 }
else if (periodName.CompareTo(
"LHC17a2b_cent_woSDD") == 0){
4826 }
else if (periodName.CompareTo(
"LHC17f2a") == 0){
4829 }
else if (periodName.CompareTo(
"LHC17f2a_fast") == 0){
4832 }
else if (periodName.CompareTo(
"LHC17f2a_cent") == 0){
4835 }
else if (periodName.CompareTo(
"LHC17f2a_cent_woSDD") == 0){
4838 }
else if (periodName.CompareTo(
"LHC17f2b") == 0){
4841 }
else if (periodName.CompareTo(
"LHC17f2b_fast") == 0){
4844 }
else if (periodName.CompareTo(
"LHC17f2b_cent") == 0){
4847 }
else if (periodName.CompareTo(
"LHC17f2b_cent_woSDD") == 0){
4851 }
else if (periodName.CompareTo(
"LHC17a3a") == 0){
4854 }
else if (periodName.CompareTo(
"LHC17a3a_fast") == 0){
4857 }
else if (periodName.CompareTo(
"LHC17a3a_cent") == 0){
4860 }
else if (periodName.CompareTo(
"LHC17a3a_cent_woSDD") == 0){
4863 }
else if (periodName.CompareTo(
"LHC17a3b") == 0){
4866 }
else if (periodName.CompareTo(
"LHC17a3b_fast") == 0){
4869 }
else if (periodName.CompareTo(
"LHC17a3b_cent") == 0){
4872 }
else if (periodName.CompareTo(
"LHC17a3b_cent_woSDD") == 0){
4875 }
else if (periodName.CompareTo(
"LHC17f3a") == 0){
4878 }
else if (periodName.CompareTo(
"LHC17f3a_fast") == 0){
4881 }
else if (periodName.CompareTo(
"LHC17f3a_cent") == 0){
4884 }
else if (periodName.CompareTo(
"LHC17f3a_cent_woSDD") == 0){
4887 }
else if (periodName.CompareTo(
"LHC17f3b") == 0){
4890 }
else if (periodName.CompareTo(
"LHC17f3b_fast") == 0){
4893 }
else if (periodName.CompareTo(
"LHC17f3b_cent") == 0){