25 #include "AliAODTrack.h"
26 #include "AliESDtrack.h"
27 #include "AliAnalysisManager.h"
28 #include "AliInputEventHandler.h"
29 #include "AliMCEventHandler.h"
30 #include "AliAODHandler.h"
34 #include "TObjString.h"
35 #include "AliMCEvent.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(mcEvent && event->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(event->IsA()==AliESDEvent::Class()){
559 AliTriggerAnalysis fTriggerAnalysis;
560 fHasV0AND = fTriggerAnalysis.IsOfflineTriggerFired((
AliESDEvent*)event, AliTriggerAnalysis::kV0AND);
587 Int_t nClustersLayer0 =
event->GetNumberOfITSClusters(0);
588 Int_t nClustersLayer1 =
event->GetNumberOfITSClusters(1);
589 Int_t nTracklets =
event->GetMultiplicity()->GetNumberOfTracklets();
594 if(event->IsA()==AliESDEvent::Class()){
598 for(
Int_t i=0; i<nPileVert;i++){
599 const AliESDVertex* pv = ((
AliESDEvent*)event)->GetPileupVertexSPD(i);
600 Int_t nc2 = pv->GetNContributors();
605 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
616 if(
fUtils->IsFirstEventInChunk(event)){
622 if(
fUtils->IsPileUpEvent(event)){
628 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
636 if(event->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
642 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
675 AliEventplane *EventPlane =
event->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 =
event->GetHeader()->GetIRInt1InteractionMap();
2153 TBits fIR2 =
event->GetHeader()->GetIRInt2InteractionMap();
2154 UShort_t bunchCrossings =
event->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 =
event->GetVZEROData()->GetMTotV0A();
2189 multV0M =
event->GetVZEROData()->GetMTotV0A() +
event->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 Bool_t headerFound = kFALSE;
2269 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2270 if(cHeader) headerFound = kTRUE;
2278 TList *genHeaders = 0x0;
2279 if(cHeader) genHeaders = cHeader->GetHeaders();
2280 AliGenEventHeader* gh = 0;
2281 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2282 gh = (AliGenEventHeader*)genHeaders->At(i);
2283 TString GeneratorName = gh->GetName();
2284 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2285 Bool_t eventAccepted = kTRUE;
2286 TParticle * jet = 0;
2287 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(gh)->NTriggerJets();
2290 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2291 dynamic_cast<AliGenPythiaEventHeader*
>(gh)->TriggerJet(ijet, tmpjet);
2292 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2295 eventAccepted= kFALSE;
2299 if (jet)
delete jet;
2301 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2302 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2303 if (!particle)
continue;
2304 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2306 eventAccepted= kFALSE;
2314 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2316 70, 85, 99, 115, 132,
2317 150, 169, 190, 212, 235,
2319 Double_t weightsBins[20] = { 43.7553, 13.5848, 6.788, 2.67826, 0.975255,
2320 0.39069, 0.127342, 0.0465597, 0.0206539, 0.00750243,
2321 0.00319118, 0.00122291, 0.000641232, 0.000321437, 0.000168273,
2322 9.17033e-05, 5.34755e-05, 3.01354e-05, 1.74518e-05, 2.8004e-05};
2325 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2326 if (bin < 20) weight = weightsBins[bin];
2329 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2331 70, 85, 99, 115, 132,
2332 150, 169, 190, 212, 235,
2334 Double_t weightsBins[20] = { 43.8654, 13.6215, 6.79856, 2.67526, 0.978794,
2335 0.390797, 0.127769, 0.0465714, 0.0206173, 0.00750282,
2336 0.00318773, 0.00122533, 0.000644385, 0.000321225, 0.00016846,
2337 9.18305e-05, 5.33507e-05, 3.00677e-05, 1.74608e-05, 2.80823e-05};
2340 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2341 if (bin < 20) weight = weightsBins[bin];
2344 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2346 70, 85, 99, 115, 132,
2347 150, 169, 190, 212, 235,
2349 Double_t weightsBins[20] = { 0.957702, 0.41837, 0.406279, 0.266936, 0.135179,
2350 6.4687e-02, 2.27254e-02, 8.30769e-03, 3.56008e-03, 1.22934e-03,
2351 4.91352e-04, 1.77601e-04, 8.79608e-05, 4.13652e-05, 2.02997e-05,
2352 1.03682e-06, 5.64732e-06, 2.96158e-06, 1.5999e-06, 2.08374e-06};
2355 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2356 if (bin < 20) weight = weightsBins[bin];
2360 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2363 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2364 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2365 1.933238e-05, 1.562895e-05};
2367 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2368 if (bin < 12) weight = weightsBins[bin];
2371 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2372 84, 117, 152, 191, 1000000,
2374 21, 28, 36, 45, 57 };
2380 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2381 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2382 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2383 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2387 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2388 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2389 if (bin < 19) weight = weightsBins[bin];
2392 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2393 84, 117, 152, 191, 1000000,
2395 21, 28, 36, 45, 57 };
2397 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2398 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2399 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2400 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2403 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2404 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2405 if (bin < 19) weight = weightsBins[bin];
2408 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2410 70, 85, 99, 115, 132,
2411 150, 169, 190, 212, 235,
2413 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2414 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2415 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2416 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2418 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2419 if (bin < 20) weight = weightsBins[bin];
2422 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2423 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2425 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2426 if (bin < 5) weight = weightsBins[bin];
2429 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2430 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2432 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2433 if (bin < 6) weight = weightsBins[bin];
2436 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2437 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2439 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2440 if (bin < 7) weight = weightsBins[bin];
2443 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2444 84, 117, 152, 191, 234,
2446 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2447 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2449 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2450 if (bin < 10) weight = weightsBins[bin];
2456 if (weight == -1)
return kFALSE;
2457 else return eventAccepted;
2462 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2463 TString eventHeaderName = eventHeader->ClassName();
2464 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2465 Bool_t eventAccepted = kTRUE;
2466 TParticle * jet = 0;
2467 Int_t nTriggerJets =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->NTriggerJets();
2468 Float_t ptHard =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2470 for(
Int_t ijet = 0; ijet< nTriggerJets; ijet++){
2471 dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->TriggerJet(ijet, tmpjet);
2472 jet =
new TParticle(94, 21, -1, -1, -1, -1, tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3], 0,0,0,0);
2475 eventAccepted= kFALSE;
2480 for(Long_t i = 0; i < mcEvent->GetNumberOfPrimaries(); i++) {
2481 TParticle* particle = (TParticle *)mcEvent->Particle(i);
2482 if (!particle)
continue;
2483 if (TMath::Abs(particle->GetPdgCode()) == 111 || TMath::Abs(particle->GetPdgCode()) == 221){
2485 eventAccepted= kFALSE;
2493 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2495 70, 85, 99, 115, 132,
2496 150, 169, 190, 212, 235,
2498 Double_t weightsBins[20] = { 0.957702, 0.41837, 0.406279, 0.266936, 0.135179,
2499 6.4687e-02, 2.27254e-02, 8.30769e-03, 3.56008e-03, 1.22934e-03,
2500 4.91352e-04, 1.77601e-04, 8.79608e-05, 4.13652e-05, 2.02997e-05,
2501 1.03682e-06, 5.64732e-06, 2.96158e-06, 1.5999e-06, 2.08374e-06};
2504 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2505 if (bin < 20) weight = weightsBins[bin];
2508 Double_t ptHardBinRanges[13] = { 5, 7, 9, 12, 16,
2511 Double_t weightsBins[12] = { 7.858393e-03, 4.718691e-03, 4.077575e-03, 2.814527e-03, 1.669625e-03,
2512 1.007535e-03, 4.536554e-04, 2.111041e-04, 1.094840e-04, 4.404973e-05,
2513 1.933238e-05, 1.562895e-05};
2515 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2516 if (bin < 12) weight = weightsBins[bin];
2519 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2520 84, 117, 152, 191, 1000000,
2522 21, 28, 36, 45, 57 };
2528 Double_t weightsBins[19] = { 4.43629 , 0.49523, 0.0394921, 0.00383174, 0.000446559,
2529 6.37374e-05, 1.03134e-05, 2.27012e-06, 7.59281e-07, 0,
2530 2.62906, 1.12884, 0.656873, 0.262822, 0.0876732,
2531 0.0307759, 0.0087083, 0.0027664, 0.00106203};
2535 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2536 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2537 if (bin < 19) weight = weightsBins[bin];
2540 Double_t ptHardBinRanges[20] = { 5, 11, 21, 36, 57,
2541 84, 117, 152, 191, 1000000,
2543 21, 28, 36, 45, 57 };
2545 Double_t weightsBins[19] = { 4.43897 , 0.495766, 0.039486, 0.00383011, 0.000447104,
2546 6.37277e-05, 1.03166e-05, 2.26971e-06, 7.59023e-07, 0,
2547 2.63331, 1.12815, 0.657034, 0.262756, 0.0877227,
2548 0.0307638, 0.00870635, 0.00276658, 0.00106229};
2551 if (binFromFile != -1 && binFromFile >9 && ptHard < 57) bin = 9;
2552 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2553 if (bin < 19) weight = weightsBins[bin];
2556 Double_t ptHardBinRanges[21] = { 5, 7, 9, 12, 16,
2558 70, 85, 99, 115, 132,
2559 150, 169, 190, 212, 235,
2561 Double_t weightsBins[20] = { 28.3084, 8.43277, 4.07753, 1.54359, 0.543318,
2562 0.208394, 0.0652349, 0.0186904, 0.00834528, 0.00301414,
2563 0.00125939, 0.000474403, 0.000244052, 0.00011924, 6.09838e-05,
2564 3.24148e-05, 1.84314e-05, 1.00926e-05, 5.68632e-06, 8.38092e-06};
2566 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2567 if (bin < 20) weight = weightsBins[bin];
2570 Double_t ptHardBinRanges[6] = { 7, 9, 12, 16, 21, 1000};
2571 Double_t weightsBins[5] = { 0.00672445, 0.00799158, 0.00678934, 0.00463908, 0.00600068};
2573 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2574 if (bin < 5) weight = weightsBins[bin];
2577 Double_t ptHardBinRanges[7] = { 14, 19, 26, 35, 48, 66, 1000};
2578 Double_t weightsBins[6] = { 0.00608281, 0.00393646, 0.00200138, 0.000986267, 0.000389051, 0.0001863};
2580 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2581 if (bin < 6) weight = weightsBins[bin];
2584 Double_t ptHardBinRanges[8] = { 0, 5, 11, 21, 36, 57, 84, 1000};
2585 Double_t weightsBins[7] = { 0.00151999, 0.000100346, 1.27688e-05, 1.82388e-06, 3.08506e-07, 6.00308e-08, 1.88414e-08};
2587 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2588 if (bin < 7) weight = weightsBins[bin];
2591 Double_t ptHardBinRanges[11] = { 5, 11, 21, 36, 57,
2592 84, 117, 152, 191, 234,
2594 Double_t weightsBins[10] = { 2.24185e-6 , 2.48463e-7, 2.23171e-8, 2.43667e-9, 3.29934e-10,
2595 5.34592e-11, 1.00937e-11, 2.6493e-12, 8.53912e-13, 5.43077e-13};
2597 while (!((ptHard< ptHardBinRanges[bin+1] && ptHard > ptHardBinRanges[bin]) || (ptHard == ptHardBinRanges[bin]) ) )bin++;
2598 if (bin < 10) weight = weightsBins[bin];
2603 if (weight == -1)
return kFALSE;
2604 else return eventAccepted;
2619 AliGenCocktailEventHeader *cHeader = 0x0;
2620 Bool_t headerFound = kFALSE;
2637 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2638 if(cHeader) headerFound = kTRUE;
2647 TList *genHeaders = 0x0;
2648 if(cHeader) genHeaders = cHeader->GetHeaders();
2649 AliGenEventHeader* gh = 0;
2650 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2651 gh = (AliGenEventHeader*)genHeaders->At(i);
2652 TString GeneratorName = gh->GetName();
2653 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2654 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(gh);
2655 NTrials = gPythia->Trials();
2656 XSection = gPythia->GetXsection();
2661 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2663 TString eventHeaderName = eventHeader->ClassName();
2664 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2665 AliGenPythiaEventHeader* gPythia =
dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader);
2666 NTrials = gPythia->Trials();
2667 XSection = gPythia->GetXsection();
2683 AliGenCocktailEventHeader *cHeader = 0x0;
2684 Bool_t headerFound = kFALSE;
2697 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(mcEvent->GenEventHeader());
2698 if(cHeader) headerFound = kTRUE;
2705 TList *genHeaders = 0x0;
2706 if(cHeader) genHeaders = cHeader->GetHeaders();
2707 AliGenEventHeader* gh = 0;
2708 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
2709 gh = (AliGenEventHeader*)genHeaders->At(i);
2710 TString GeneratorName = gh->GetName();
2711 if (GeneratorName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2712 return dynamic_cast<AliGenPythiaEventHeader*
>(gh)->
GetPtHard();
2716 AliGenEventHeader * eventHeader = mcEvent->GenEventHeader();
2718 TString eventHeaderName = eventHeader->ClassName();
2719 if (eventHeaderName.CompareTo(
"AliGenPythiaEventHeader") == 0){
2720 return dynamic_cast<AliGenPythiaEventHeader*
>(eventHeader)->
GetPtHard();
2735 Int_t runRangesEMCalL0 [35] = { 144871, 145288, 146375, 146382,
2737 150209, 153056, 153911, 153915,
2738 158135, 158136, 158178, 158182, 160683,
2739 160764, 161139, 161256, 161379, 161457,
2740 161525, 161556, 161558, 161609, 161630,
2742 173731, 177144, 177147, 177653, 177724, 178327,
2747 Double_t thresholdEMCalL0[34] = { 2.11, 3.43, 1.71, 2.05,
2749 1.94, 3.39, 4.01, 5.25, 5.5,
2750 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,
2751 2.01, 1.75, 1.52, 2.01, 1.52, 1.85,
2755 Double_t spreadEMCalL0[34] = { 0., 0., 0, 0,
2758 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
2759 0., 0., 0., 0., 0.2, 0.2,
2764 Int_t runRangesEMCalL1[4] = { 179796,
2769 Double_t thresholdEMCalL1[3] = { 9.5, 11.5, 5.5};
2770 Double_t spreadEMCalL1[3] = { 1.0, 0.5, 0.6};
2772 Int_t runRangesEMCalL1G2[3] = { 195180,
2776 Double_t thresholdEMCalL1G2[2] = { 7.2, 3.75};
2777 Double_t spreadEMCalL1G2[2] = { 0.3, 0.25};
2779 Int_t runnumber =
event->GetRunNumber();
2782 if (runnumber < runRangesEMCalL0[0])
return kTRUE;
2784 while (!(runnumber >= runRangesEMCalL0[binRun] && runnumber < runRangesEMCalL0[binRun+1] ) && binRun < 34 ){
2788 if (binRun==34)
return kFALSE;
2789 Double_t threshold = thresholdEMCalL0[binRun];
2791 if (isMC && spreadEMCalL0[binRun] != 0.){
2792 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2793 triggerSmearing->SetParameter(0, 1/(spreadEMCalL0[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2794 triggerSmearing->SetParameter(1, thresholdEMCalL0[binRun]);
2795 triggerSmearing->SetParameter(2, spreadEMCalL0[binRun]);
2796 threshold = triggerSmearing->GetRandom();
2797 delete triggerSmearing;
2803 nclus =
event->GetNumberOfCaloClusters();
2805 if(nclus == 0)
return kFALSE;
2808 Bool_t eventIsAccepted = kFALSE;
2809 for(
Int_t i = 0; i < nclus; i++){
2810 AliVCluster* clus = NULL;
2811 clus =
event->GetCaloCluster(i);
2812 if (!clus)
continue;
2813 if (!clus->IsEMCAL())
continue;
2814 if (clus->GetM02()<0.1)
continue;
2815 if (clus->GetNCells()<2)
continue;
2816 if (clus->E() > threshold ){
2818 eventIsAccepted = kTRUE;
2821 return eventIsAccepted;
2828 if (runnumber < runRangesEMCalL1[0])
return kTRUE;
2830 while (!(runnumber >= runRangesEMCalL1[binRun] && runnumber < runRangesEMCalL1[binRun+1] ) && binRun < 3 ){
2834 if (binRun==3)
return kFALSE;
2835 Double_t threshold = thresholdEMCalL1[binRun];
2837 if (isMC && spreadEMCalL1[binRun] != 0.){
2838 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2839 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2840 triggerSmearing->SetParameter(1, thresholdEMCalL1[binRun]);
2841 triggerSmearing->SetParameter(2, spreadEMCalL1[binRun]);
2842 threshold = triggerSmearing->GetRandom();
2843 delete triggerSmearing;
2849 nclus =
event->GetNumberOfCaloClusters();
2851 if(nclus == 0)
return kFALSE;
2854 Bool_t eventIsAccepted = kFALSE;
2855 for(
Int_t i = 0; i < nclus; i++){
2856 AliVCluster* clus = NULL;
2857 clus =
event->GetCaloCluster(i);
2858 if (!clus)
continue;
2859 if (!clus->IsEMCAL())
continue;
2860 if (clus->GetM02()<0.1)
continue;
2861 if (clus->GetNCells()<2)
continue;
2862 if (clus->E() > threshold ){
2864 eventIsAccepted = kTRUE;
2867 return eventIsAccepted;
2869 if (runnumber < runRangesEMCalL1G2[0])
return kTRUE;
2871 while (!(runnumber >= runRangesEMCalL1G2[binRun] && runnumber < runRangesEMCalL1G2[binRun+1] ) && binRun < 2 ){
2875 if (binRun==2)
return kFALSE;
2876 Double_t threshold = thresholdEMCalL1G2[binRun];
2877 if (isMC && spreadEMCalL1G2[binRun] != 0.){
2878 TF1* triggerSmearing =
new TF1(
"triggerSmearing",
"[0]*exp(-0.5*((x-[1])/[2])**2)",0,15);
2879 triggerSmearing->SetParameter(0, 1/(spreadEMCalL1G2[binRun]*TMath::Sqrt(TMath::Pi()*2)));
2880 triggerSmearing->SetParameter(1, thresholdEMCalL1G2[binRun]);
2881 triggerSmearing->SetParameter(2, spreadEMCalL1G2[binRun]);
2882 threshold = triggerSmearing->GetRandom();
2883 delete triggerSmearing;
2888 nclus =
event->GetNumberOfCaloClusters();
2890 if(nclus == 0)
return kFALSE;
2893 Bool_t eventIsAccepted = kFALSE;
2894 for(
Int_t i = 0; i < nclus; i++){
2895 AliVCluster* clus = NULL;
2896 clus =
event->GetCaloCluster(i);
2897 if (!clus)
continue;
2898 if (!clus->IsEMCAL())
continue;
2899 if (clus->GetM02()<0.1)
continue;
2900 if (clus->GetNCells()<2)
continue;
2901 if (clus->E() > threshold ){
2903 eventIsAccepted = kTRUE;
2906 return eventIsAccepted;
2923 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
2926 UInt_t isSelected = AliVEvent::kAny;
2928 if (fInputHandler==NULL)
return kFALSE;
2929 if( fInputHandler->GetEventSelection() ||
event->IsA()==AliAODEvent::Class()) {
2931 TString firedTrigClass =
event->GetFiredTriggerClasses();
2972 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
2974 if (fInputHandler->IsEventSelected() & AliVEvent::kMB) isSelected = 0;
2976 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
2980 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
2981 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
2983 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
2984 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
2991 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
2993 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
2995 if (firedTrigClass.Contains(
"7EG2")) isSelected = 0;
2998 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
2999 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3000 if (firedTrigClass.Contains(
"8EG2")) isSelected = 0;
3003 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3005 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3008 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3009 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3014 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3015 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3016 if (firedTrigClass.Contains(
"7EG1")) isSelected = 0;
3018 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8) isSelected = 0;
3019 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3020 if (firedTrigClass.Contains(
"8EG1")) isSelected = 0;
3022 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3023 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3025 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7) isSelected = 0;
3026 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7) isSelected = 0;
3030 if (isSelected != 0 ){
3062 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3063 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3064 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3068 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3069 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3070 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3074 for (
Int_t i=0; i<ClassesList->GetEntriesFast();++i){
3075 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3076 if (firedTrigClass.Contains(NameClass->GetString())) isSelected = 1;
3081 for (
Int_t i=0; i<ClassesList->GetEntriesFast(); i++){
3082 TObjString *NameClass = (TObjString*)ClassesList->At(i);
3083 if (firedTrigClass.Contains(NameClass->GetString())) CheckClass+=
"1";
3084 else CheckClass+=
"0";
3086 if(CheckClass.Contains(
"0")) isSelected = 0;
3093 fIsSDDFired = !(fInputHandler->IsEventSelected() & AliVEvent::kFastOnly);
3095 Bool_t mimickedTrigger = kTRUE;
3102 if (mimickedTrigger){
3103 if (fInputHandler->IsEventSelected() & AliVEvent::kMB)
hTriggerClass->Fill(0);
3104 if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)
hTriggerClass->Fill(1);
3105 if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)
hTriggerClass->Fill(2);
3106 if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)
hTriggerClass->Fill(3);
3107 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)
hTriggerClass->Fill(4);
3108 if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)
hTriggerClass->Fill(5);
3109 if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)
hTriggerClass->Fill(6);
3111 if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)
hTriggerClass->Fill(7);
3113 if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)
hTriggerClass->Fill(8);
3115 if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)
hTriggerClass->Fill(9);
3117 if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)
hTriggerClass->Fill(10);
3119 if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)
hTriggerClass->Fill(11);
3120 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)
hTriggerClass->Fill(12);
3121 if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)
hTriggerClass->Fill(13);
3124 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)
hTriggerClass->Fill(14);
3125 if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)
hTriggerClass->Fill(15);
3126 if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)
hTriggerClass->Fill(16);
3127 if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)
hTriggerClass->Fill(17);
3128 if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)
hTriggerClass->Fill(18);
3129 if (fInputHandler->IsEventSelected() & AliVEvent::kZED)
hTriggerClass->Fill(19);
3130 if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)
hTriggerClass->Fill(20);
3132 if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)
hTriggerClass->Fill(21);
3133 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClass->Fill(22);
3134 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClass->Fill(23);
3135 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)
hTriggerClass->Fill(24);
3136 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClass->Fill(25);
3137 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClass->Fill(26);
3138 if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)
hTriggerClass->Fill(27);
3139 if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)
hTriggerClass->Fill(28);
3140 if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)
hTriggerClass->Fill(29);
3141 if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)
hTriggerClass->Fill(30);
3142 if (fInputHandler->IsEventSelected() & AliVEvent::kAny)
hTriggerClass->Fill(31);
3143 if (!fInputHandler->IsEventSelected())
hTriggerClass->Fill(34);
3149 if (mimickedTrigger){
3181 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)
hTriggerClassSelected->Fill(22);
3182 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)
hTriggerClassSelected->Fill(23);
3184 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)
hTriggerClassSelected->Fill(25);
3185 if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)
hTriggerClassSelected->Fill(26);
3195 if(!isSelected)
return kFALSE;
3197 if (!mimickedTrigger )
return kFALSE;
3224 if(rejection == 0)
return;
3226 AliGenCocktailEventHeader *cHeader = 0x0;
3227 AliAODMCHeader *cHeaderAOD = 0x0;
3228 Bool_t headerFound = kFALSE;
3229 AliMCEvent *fMCEvent = 0x0;
3230 TClonesArray *fMCEventAOD = 0x0;
3231 if(event->IsA()==AliMCEvent::Class()){
3232 if(dynamic_cast<AliMCEvent*>(event)){
3233 cHeader =
dynamic_cast<AliGenCocktailEventHeader*
>(
dynamic_cast<AliMCEvent*
>(event)->GenEventHeader());
3234 fMCEvent =
dynamic_cast<AliMCEvent*
>(event);
3235 if(cHeader) headerFound = kTRUE;
3238 if(event->IsA()==AliAODEvent::Class()){
3239 cHeaderAOD =
dynamic_cast<AliAODMCHeader*
>(
event->FindListObject(AliAODMCHeader::StdBranchName()));
3240 fMCEventAOD =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
3241 if(cHeaderAOD) headerFound = kTRUE;
3244 if (
fDebugLevel > 0 ) cout <<
"event starts here" << endl;
3246 TList *genHeaders = 0x0;
3247 if(cHeader) genHeaders = cHeader->GetHeaders();
3249 genHeaders = cHeaderAOD->GetCocktailHeaders();
3250 if(genHeaders->GetEntries()==1){
3255 AliGenEventHeader* gh = 0;
3257 Int_t firstindexA = 0;
3258 Int_t lastindexA = -1;
3259 if(rejection == 1 || rejection == 3)
fnHeaders = 1;
3261 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3262 gh = (AliGenEventHeader*)genHeaders->At(i);
3263 TString GeneratorName = gh->GetName();
3264 lastindexA = lastindexA + gh->NProduced();
3265 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3266 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3267 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3268 if (
fDebugLevel > 0 ) cout << GeneratorInList.Data() << endl;
3269 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3271 if (GeneratorInList.CompareTo(
"PARAM") == 0 || GeneratorInList.CompareTo(
"BOX") == 0 ){
3275 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindexA+10)->GetPdgCode() ==
fAddedSignalPDGCode ){
3290 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA));
3293 if (gh->NProduced() > 10){
3294 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindexA+10));
3316 firstindexA = firstindexA + gh->NProduced();
3325 if(rejection == 1 || rejection == 3){
3327 fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1;
3328 fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName();
3333 Int_t firstindex = 0;
3334 Int_t lastindex = -1;
3337 for(
Int_t i = 0; i<genHeaders->GetEntries();i++){
3338 gh = (AliGenEventHeader*)genHeaders->At(i);
3339 TString GeneratorName = gh->GetName();
3340 lastindex = lastindex + gh->NProduced();
3341 for(
Int_t j = 0; j<HeaderList->GetEntries();j++){
3342 TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
3343 if (
fDebugLevel > 0 ) cout << i <<
"\t" << GeneratorName.Data() << endl;
3344 if(GeneratorName.CompareTo(GeneratorInList) == 0){
3345 if (GeneratorInList.CompareTo(
"PARAM") == 0 || GeneratorInList.CompareTo(
"BOX") == 0 ){
3349 if (
fDebugLevel > 0 ) cout <<
"produced " << gh->NProduced() <<
" with box generator" << endl;
3350 if (gh->NProduced() > 10 && fMCEvent->Particle(firstindex+10)->GetPdgCode() ==
fAddedSignalPDGCode){
3351 if (
fDebugLevel > 0 ) cout <<
"one of them was a pi0 or eta" << endl;
3356 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3369 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex));
3372 if (gh->NProduced() > 10) {
3373 AliAODMCParticle *aodMCParticle2 =
static_cast<AliAODMCParticle*
>(fMCEventAOD->At(firstindex+10));
3396 if (
fDebugLevel > 0 ) cout <<
"Number of particles produced for: " << i <<
"\t" << GeneratorName.Data() <<
"\t" << lastindex-firstindex+1 << endl;
3403 firstindex = firstindex + gh->NProduced();
3406 for (
Int_t i = 0; i < number; i++){
3416 fNotRejectedEnd[0] =
static_cast<AliMCEvent*
>(event)->GetNumberOfPrimaries()-1;
3433 if(index < 0)
return 0;
3436 if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){
3437 if(!mcEvent)
return 0;
3438 if(index >= mcEvent->GetNumberOfPrimaries()){
3439 if( ((TParticle*)mcEvent->Particle(index))->GetMother(0) < 0)
return 0;
3440 return IsParticleFromBGEvent(((TParticle*)mcEvent->Particle(index))->GetMother(0),mcEvent,InputEvent);
3447 if(i == 0) accepted = 2;
3451 else if(InputEvent->IsA()==AliAODEvent::Class()){
3452 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3453 if (AODMCTrackArray){
3454 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3455 if(!aodMCParticle)
return 0;
3456 if(!aodMCParticle->IsPrimary()){
3457 if( aodMCParticle->GetMother() < 0)
return 0;
3460 index = TMath::Abs(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index))->GetLabel());
3464 if(i == 0) accepted = 2;
3477 if (mcEvent){isMC = kTRUE;}
3505 Int_t runnumber =
event->GetRunNumber();
3506 if ((runnumber>=144871) && (runnumber<=146860)) {
3508 AliVCaloCells *cells =
event->GetEMCALCells();
3509 const Short_t nCells = cells->GetNumberOfCells();
3511 if (event->IsA()==AliESDEvent::Class()) AliAnalysisManager::GetAnalysisManager()->LoadBranch(
"EMCALCells.");
3513 AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
3514 if (!fInputHandler)
return 3;
3517 Int_t nCellCount[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
3518 for(
Int_t iCell=0; iCell<nCells; ++iCell) {
3519 Short_t cellId = cells->GetCellNumber(iCell);
3520 Double_t cellE = cells->GetCellAmplitude(cellId);
3521 Int_t sm = cellId / (24*48);
3522 if (cellE>0.1) ++nCellCount[sm];
3525 Bool_t fIsLedEvent = kFALSE;
3526 if (nCellCount[4] > 100) {
3527 fIsLedEvent = kTRUE;
3529 if ((runnumber>=146858) && (runnumber<=146860)) {
3530 if ((fInputHandler->IsEventSelected() & AliVEvent::kMB) && (nCellCount[3]>=21))
3531 fIsLedEvent = kTRUE;
3532 else if ((fInputHandler->IsEventSelected() & AliVEvent::kEMC1) && (nCellCount[3]>=35))
3533 fIsLedEvent = kTRUE;
3543 Int_t nClustersLayer0 =
event->GetNumberOfITSClusters(0);
3544 Int_t nClustersLayer1 =
event->GetNumberOfITSClusters(1);
3545 Int_t nTracklets =
event->GetMultiplicity()->GetNumberOfTracklets();
3550 if(event->IsA()==AliESDEvent::Class()){
3554 for(
Int_t i=0; i<nPileVert;i++){
3555 const AliESDVertex* pv= ((
AliESDEvent*)event)->GetPileupVertexSPD(i);
3556 Int_t nc2 = pv->GetNContributors();
3561 if (TMath::Abs(distZMax) < TMath::Abs(distZ) ){
3575 if(event->IsPileupFromSPD(3,0.8,3.,2.,5.) ){
3579 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
3585 if(
fUtils->IsPileUpEvent(event) ){
3589 if (
fUtils->IsSPDClusterVsTrackletBG(event)){
3610 AliEventplane *EventPlane =
event->GetEventplane();
3623 AliInfo(
"Inside the GetWeightForCentralityFlattening function");
3626 if(!event || event->IsA()==AliESDEvent::Class()){
3629 AliCentrality *fESDCentrality=(AliCentrality*)esdEvent->GetCentrality();
3631 centrality = fESDCentrality->GetCentralityPercentile(
"V0M");
3634 }
else if(event->IsA()==AliAODEvent::Class()){
3637 if(aodEvent->GetHeader()){
3638 centrality = ((AliVAODHeader*)aodEvent->GetHeader())->
GetCentrality();
3644 Float_t GetValueForWeight = 1.;
3647 Bool_t CorrCentrLoop = kFALSE;
3653 CorrCentrLoop = kTRUE;
3654 }
else if (
fDoCentralityFlat == 2 && (centrality >=10. && centrality <= 20.) ){
3657 CorrCentrLoop = kTRUE;
3661 CorrCentrLoop = kTRUE;
3663 CorrCentrLoop = kFALSE;
3666 if (CorrCentrLoop && GetValueForWeight != 0. && maximum !=0. && isfinite(GetValueForWeight) && isfinite(maximum) ){
3667 weightCentrality = maximum/GetValueForWeight;
3668 if (!isfinite(GetValueForWeight)) weightCentrality = 1.;
3669 if (!isfinite(weightCentrality)) weightCentrality = 1.;
3672 return weightCentrality;
3691 if (relativeErrorData < 0.2 && relativeErrorMC < 0.2 ){
3692 if (isfinite(valueMultData) && isfinite(valueMultMC) ){
3693 weightMult = valueMultData/valueMultMC;
3712 if(index < 0)
return 0;
3720 if (kCaseGen == 0)
return 1;
3725 if(!event || event->IsA()==AliESDEvent::Class()){
3726 mesonPt = ((TParticle*)mcEvent->Particle(index))->Pt();
3727 mesonMass = ((TParticle*)mcEvent->Particle(index))->GetCalcMass();
3728 PDGCode = ((TParticle*)mcEvent->Particle(index))->GetPdgCode();
3729 }
else if(event->IsA()==AliAODEvent::Class()){
3730 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
3731 if (AODMCTrackArray){
3732 AliAODMCParticle *aodMCParticle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(index));
3733 mesonPt = aodMCParticle->Pt();
3734 mesonMass = aodMCParticle->GetCalcMass();
3735 PDGCode = aodMCParticle->GetPdgCode();
3741 Float_t functionResultMC = 1.;
3752 Float_t functionResultData = 1;
3764 if (PDGCode == 111 || PDGCode == 221){
3765 if (functionResultData != 0. && functionResultMC != 0. && isfinite(functionResultData) && isfinite(functionResultMC)){
3766 weight = functionResultData/functionResultMC;
3767 if ( kCaseGen == 3){
3768 if (PDGCode == 111){
3773 if (PDGCode == 221){
3779 if (!isfinite(functionResultData)) weight = 1.;
3780 if (!isfinite(weight)) weight = 1.;
3782 }
else if (PDGCode == 310 && functionResultMC != 0 && isfinite(functionResultMC)){
3783 weight = functionResultMC;
3799 printf(
" Gamma Conversion Cuts %s :: pPb Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),-0.465);
3802 printf(
" Gamma Conversion Cuts %s :: Pbp Run doing Eta Shift of %f \n\n",(
GetCutNumber()).
Data(),0.465);
3805 else printf(
" Gamma Conversion Cuts %s :: Automatic Eta Shift requested but Period is not known -> No Shift \n\n",(
GetCutNumber()).
Data());
3817 AliError(Form(
"%s: fTriggerPatchInfo not available",GetName()));
3825 AliEMCALTriggerPatchInfo *patch;
3826 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
3828 if (patch->IsMainTrigger()) {
3845 if (event->IsA()==AliESDEvent::Class()){
3855 AliError(Form(
"%s: Could not retrieve calo triggers %s!", GetName(),
fCaloTriggersName.Data()));
3861 if (event->IsA()==AliESDEvent::Class()){
3893 AliEMCALTriggerPatchInfo *patch;
3895 for (
Int_t iPatch = 0; iPatch < nPatch; iPatch++) {
3900 if (patch->IsGammaHigh()){
3904 if (patch->IsGammaLow()){
3908 if (patch->IsJetHigh()){
3912 if (patch->IsJetLow()){
3916 if (patch->IsLevel0()){
3927 AliDebug(2,
"Patch summary: ");
3928 AliDebug(2, Form(
"Number of patches: %d", nPatch));
3929 AliDebug(2, Form(
"Level0: [%d]" ,nL0));
3930 AliDebug(2, Form(
"Jet: low[%d], high[%d]" ,nJ2, nJ1));
3931 AliDebug(2, Form(
"Gamma: low[%d], high[%d]" ,nG2, nG1));
3943 SETBIT(triggers,
kG1);
3945 SETBIT(triggers,
kG2);
3947 SETBIT(triggers,
kJ1);
3949 SETBIT(triggers,
kJ2);
3951 SETBIT(triggers,
kL0);
3970 TClonesArray *arr = 0;
3972 if (!sname.IsNull()) {
3973 arr =
dynamic_cast<TClonesArray*
>(
event->FindListObject(sname));
3975 AliWarning(Form(
"%s: Could not retrieve array with name %s!", GetName(), name));
3985 TString objname(arr->GetClass()->GetName());
3986 TClass cls(objname);
3987 if (!cls.InheritsFrom(clname)) {
3988 AliWarning(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
3989 GetName(), cls.GetName(), name, clname));
3998 if (eventpos < 0)
return kFALSE;
3999 TParticle* particle = (TParticle *)mcEvent->Particle(eventpos);
4000 if (!particle)
return kFALSE;
4001 if (TMath::Abs(particle->GetPdgCode()) == 11 ){
4002 if (particle->GetMother(0) != -1){
4003 TParticle* particleMother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4004 if (particleMother){
4005 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4006 particle = particleMother;
4010 if (particle->GetMother(0) != -1){
4011 Double_t deltaX = particle->Vx() - prodVtxX;
4012 Double_t deltaY = particle->Vy() - prodVtxY;
4013 Double_t deltaZ = particle->Vz() - prodVtxZ;
4016 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4019 Bool_t dalitzCand = kFALSE;
4021 TParticle* firstmother = (TParticle *)mcEvent->Particle(particle->GetMother(0));
4022 if (!firstmother)
return kFALSE;
4023 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4024 Bool_t intDecay = kFALSE;
4025 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4026 if ( intDecay && TMath::Abs(particle->GetPdgCode()) == 11 ){
4031 Long_t source = particle->GetMother(0);
4032 Bool_t foundExcludedPart = kFALSE;
4033 Bool_t foundShower = kFALSE;
4034 Int_t pdgCodeMotherPrev = 0;
4035 Int_t pdgCodeMotherPPrevMother = 0;
4043 TParticle* mother = (TParticle *)mcEvent->Particle(source);
4044 source = mother->GetMother(0);
4046 Int_t pdgCodeMother = mother->GetPdgCode();
4048 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4049 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4050 foundShower = kTRUE;
4053 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4054 foundShower = kTRUE;
4066 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4067 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4068 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312
4070 foundExcludedPart = kTRUE;
4073 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4074 pdgCodeMotherPrev = pdgCodeMother;
4075 if (source == -1) depth = 20;
4081 if (foundExcludedPart){
4087 }
else if (foundShower){
4102 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
event->FindListObject(AliAODMCParticle::StdBranchName()));
4103 if (AODMCTrackArray == NULL)
return kFALSE;
4104 AliAODMCParticle* currentParticle = AODMCParticle;
4105 if (TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4106 if (currentParticle->GetMother() != -1){
4107 AliAODMCParticle* particleMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4108 if (particleMother){
4109 if (TMath::Abs(particleMother->GetPdgCode()) == 22)
4110 currentParticle = particleMother;
4114 if (currentParticle->GetMother() > -1){
4115 Double_t deltaX = currentParticle->Xv() - prodVtxX;
4116 Double_t deltaY = currentParticle->Yv() - prodVtxY;
4117 Double_t deltaZ = currentParticle->Zv() - prodVtxZ;
4120 Double_t realRadius3D = TMath::Sqrt(deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ);
4122 Bool_t dalitzCand = kFALSE;
4124 AliAODMCParticle* firstmother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(currentParticle->GetMother()));
4125 if (!firstmother)
return kFALSE;
4126 Int_t pdgCodeFirstMother = firstmother->GetPdgCode();
4127 Bool_t intDecay = kFALSE;
4128 if ( pdgCodeFirstMother == 111 || pdgCodeFirstMother == 221 ) intDecay = kTRUE;
4129 if ( intDecay && TMath::Abs(currentParticle->GetPdgCode()) == 11 ){
4134 Long_t source = currentParticle->GetMother();
4135 Bool_t foundExcludedPart = kFALSE;
4136 Bool_t foundShower = kFALSE;
4137 Int_t pdgCodeMotherPrev = 0;
4138 Int_t pdgCodeMotherPPrevMother = 0;
4146 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(source));
4147 source = mother->GetMother();
4149 Int_t pdgCodeMother = mother->GetPdgCode();
4151 if (pdgCodeMother == pdgCodeMotherPrev && pdgCodeMother == pdgCodeMotherPPrevMother) depth = 20;
4152 if (TMath::Abs(pdgCodeMother) == 11 && TMath::Abs(pdgCodeMotherPrev) == 22 && TMath::Abs(pdgCodeMotherPPrevMother) == 11 ){
4153 foundShower = kTRUE;
4156 if (TMath::Abs(pdgCodeMother) == 22 && TMath::Abs(pdgCodeMotherPrev) == 11 && TMath::Abs(pdgCodeMotherPPrevMother) == 22 ){
4157 foundShower = kTRUE;
4169 if (TMath::Abs(pdgCodeMother) == 310 || TMath::Abs(pdgCodeMother) == 130 || TMath::Abs(pdgCodeMother) == 321 ||
4170 TMath::Abs(pdgCodeMother) == 3122 || TMath::Abs(pdgCodeMother) == 3212 || TMath::Abs(pdgCodeMother) == 3222 ||
4171 TMath::Abs(pdgCodeMother) == 3112 || TMath::Abs(pdgCodeMother) == 3322 || TMath::Abs(pdgCodeMother) == 3312)
4173 foundExcludedPart = kTRUE;
4176 pdgCodeMotherPPrevMother = pdgCodeMotherPrev;
4177 pdgCodeMotherPrev = pdgCodeMother;
4178 if (source == -1) depth = 20;
4184 if (foundExcludedPart){
4190 }
else if (foundShower){
4205 if (particle != NULL && mcEvent != NULL){
4206 Int_t pdgSecondary = 0;
4208 Bool_t hasMother = kFALSE;
4209 Bool_t hasGrandMother = kFALSE;
4210 Long_t motherID = particle->GetMother(0);
4211 Long_t grandMotherID = -1;
4215 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4217 if (grandMotherID > -1){
4218 hasGrandMother = kTRUE;
4219 pdgSecondary = mcEvent->Particle(grandMotherID)->GetPdgCode();
4223 Bool_t hasMother = kFALSE;
4224 Bool_t hasGrandMother = kFALSE;
4225 Bool_t hasGreatGrandMother = kFALSE;
4226 Long_t motherID = particle->GetMother(0);
4227 Long_t grandMotherID = -1;
4228 Long_t greatGrandMotherID = -1;
4232 grandMotherID = mcEvent->Particle(motherID)->GetMother(0);
4234 if (grandMotherID > -1){
4235 hasGrandMother = kTRUE;
4236 greatGrandMotherID = mcEvent->Particle(grandMotherID)->GetMother(0);
4238 if (greatGrandMotherID > -1){
4239 hasGreatGrandMother = kTRUE;
4240 pdgSecondary = mcEvent->Particle(greatGrandMotherID)->GetPdgCode();
4246 if (TMath::Abs(pdgSecondary) == 3122 )
4249 else if ( TMath::Abs(pdgSecondary) == 310 )
4252 else if ( TMath::Abs(pdgSecondary) == 130 )
4255 else if ( TMath::Abs(pdgSecondary) == 221 )
4258 else if ( TMath::Abs(pdgSecondary) != 0 )
4268 if (particle != NULL && aodmcArray != NULL){
4269 Int_t pdgSecondary = 0;
4271 Bool_t hasMother = kFALSE;
4272 Bool_t hasGrandMother = kFALSE;
4273 Long_t motherID = particle->GetMother();
4274 Long_t grandMotherID = -1;
4278 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4280 if (grandMotherID > -1){
4281 hasGrandMother = kTRUE;
4282 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetPdgCode();
4286 Bool_t hasMother = kFALSE;
4287 Bool_t hasGrandMother = kFALSE;
4288 Bool_t hasGreatGrandMother = kFALSE;
4289 Long_t motherID = particle->GetMother();
4290 Long_t grandMotherID = -1;
4291 Long_t greatGrandMotherID = -1;
4295 grandMotherID = ((AliAODMCParticle*)aodmcArray->At(motherID))->GetMother();
4297 if (grandMotherID > -1){
4298 hasGrandMother = kTRUE;
4299 greatGrandMotherID = ((AliAODMCParticle*)aodmcArray->At(grandMotherID))->GetMother();
4301 if (greatGrandMotherID > -1){
4302 hasGreatGrandMother = kTRUE;
4303 pdgSecondary = ((AliAODMCParticle*)aodmcArray->At(greatGrandMotherID))->GetPdgCode();
4309 if (TMath::Abs(pdgSecondary) == 3122 )
4312 else if ( TMath::Abs(pdgSecondary) == 310 )
4315 else if ( TMath::Abs(pdgSecondary) == 130 )
4318 else if ( TMath::Abs(pdgSecondary) == 221 )
4321 else if ( TMath::Abs(pdgSecondary) != 0 )
4331 if (periodName.CompareTo(
"") == 0){
4335 if (periodName.CompareTo(
"") == 0) {
4338 AliError(
"No correct period could be set, periodName string empty");
4343 if (periodName.CompareTo(
"LHC10b") == 0 || periodName.CompareTo(
"LHC10c") == 0 || periodName.CompareTo(
"LHC10d") == 0 || periodName.CompareTo(
"LHC10e") == 0 ||
4344 periodName.CompareTo(
"LHC10f") == 0 || periodName.CompareTo(
"LHC10g") == 0
4348 }
else if (periodName.CompareTo(
"LHC10h") == 0) {
4351 }
else if (periodName.CompareTo(
"LHC11a") == 0) {
4354 }
else if (periodName.CompareTo(
"LHC11b") == 0) {
4357 }
else if (periodName.CompareTo(
"LHC11c") == 0 || periodName.CompareTo(
"LHC11d") == 0 || periodName.CompareTo(
"LHC11e") == 0 || periodName.CompareTo(
"LHC11f") == 0 ||
4358 periodName.CompareTo(
"LHC11g") == 0
4362 }
else if (periodName.CompareTo(
"LHC11h") == 0) {
4365 }
else if (periodName.CompareTo(
"LHC12a") == 0 || periodName.CompareTo(
"LHC12b") == 0 || periodName.CompareTo(
"LHC12c") == 0 || periodName.CompareTo(
"LHC12d") == 0 ||
4366 periodName.CompareTo(
"LHC12e") == 0 || periodName.CompareTo(
"LHC12f") == 0 || periodName.CompareTo(
"LHC12g") == 0 || periodName.CompareTo(
"LHC12h") == 0 ||
4367 periodName.CompareTo(
"LHC12i") == 0
4371 }
else if (periodName.CompareTo(
"LHC13b") == 0 || periodName.CompareTo(
"LHC13c") == 0 ){
4374 }
else if (periodName.CompareTo(
"LHC13d") == 0 || periodName.CompareTo(
"LHC13e") == 0 ){
4377 }
else if (periodName.CompareTo(
"LHC13f") == 0 ){
4380 }
else if (periodName.CompareTo(
"LHC13g") == 0 ){
4383 }
else if (periodName.CompareTo(
"LHC15f") == 0 || periodName.CompareTo(
"LHC15g") == 0 || periodName.CompareTo(
"LHC15h") == 0 || periodName.CompareTo(
"LHC15i") == 0 ||
4384 periodName.CompareTo(
"LHC15j") == 0 || periodName.CompareTo(
"LHC15k") == 0 || periodName.CompareTo(
"LHC15l") == 0 || periodName.CompareTo(
"LHC15m") == 0
4388 }
else if (periodName.CompareTo(
"LHC15n") == 0 ){
4391 }
else if (periodName.CompareTo(
"LHC15o") == 0 ){
4394 }
else if (periodName.CompareTo(
"LHC16k") == 0 || periodName.CompareTo(
"LHC16l") == 0 ){
4397 }
else if (periodName.CompareTo(
"LHC16d") == 0 ){
4400 }
else if (periodName.CompareTo(
"LHC16e") == 0 ){
4403 }
else if (periodName.CompareTo(
"LHC16f") == 0 ){
4406 }
else if (periodName.CompareTo(
"LHC16g") == 0 ){
4409 }
else if (periodName.CompareTo(
"LHC16h") == 0 ){
4412 }
else if (periodName.CompareTo(
"LHC16i") == 0 ){
4415 }
else if (periodName.CompareTo(
"LHC16j") == 0 ){
4418 }
else if (periodName.CompareTo(
"LHC16o") == 0 ){
4421 }
else if (periodName.CompareTo(
"LHC16p") == 0 ){
4424 }
else if (periodName.CompareTo(
"LHC16q") == 0 ){
4427 }
else if (periodName.CompareTo(
"LHC16r") == 0 ){
4430 }
else if (periodName.CompareTo(
"LHC16s") == 0 ){
4433 }
else if (periodName.CompareTo(
"LHC16t") == 0 ){
4438 }
else if (periodName.CompareTo(
"LHC10d1") == 0){
4441 }
else if (periodName.CompareTo(
"LHC10d2") == 0){
4444 }
else if (periodName.CompareTo(
"LHC10d4a") == 0){
4447 }
else if (periodName.CompareTo(
"LHC10d4") == 0){
4450 }
else if (periodName.CompareTo(
"LHC10e12") == 0){
4453 }
else if (periodName.CompareTo(
"LHC10e13") == 0){
4456 }
else if (periodName.CompareTo(
"LHC10e20") == 0){
4459 }
else if (periodName.CompareTo(
"LHC10e21") == 0){
4462 }
else if (periodName.CompareTo(
"LHC10f6a") == 0){
4465 }
else if (periodName.CompareTo(
"LHC10f6") == 0){
4468 }
else if (periodName.Contains(
"LHC14j4")){
4471 }
else if (periodName.CompareTo(
"LHC13d2") == 0){
4474 }
else if (periodName.CompareTo(
"LHC13d2b") == 0){
4477 }
else if (periodName.CompareTo(
"LHC12a11a") == 0){
4480 }
else if (periodName.CompareTo(
"LHC12a11b") == 0){
4483 }
else if (periodName.CompareTo(
"LHC12a11c") == 0){
4486 }
else if (periodName.CompareTo(
"LHC12a11d") == 0){
4489 }
else if (periodName.CompareTo(
"LHC12a11e") == 0){
4492 }
else if (periodName.CompareTo(
"LHC12a11f") == 0){
4496 }
else if (periodName.CompareTo(
"LHC12a15c") == 0){
4499 }
else if (periodName.Contains(
"LHC12f1a") ){
4502 }
else if (periodName.Contains(
"LHC12f1b") ){
4505 }
else if (periodName.Contains(
"LHC12i3") ){
4508 }
else if (periodName.CompareTo(
"LHC15g1a") == 0){
4511 }
else if (periodName.CompareTo(
"LHC15g1b") == 0){
4514 }
else if (periodName.CompareTo(
"LHC13e4") == 0){
4517 }
else if (periodName.CompareTo(
"LHC13e5") == 0){
4520 }
else if (periodName.CompareTo(
"LHC14k1a") == 0){
4523 }
else if (periodName.CompareTo(
"LHC14k1b") == 0){
4526 }
else if (periodName.CompareTo(
"LHC12a15f") == 0){
4529 }
else if (periodName.CompareTo(
"LHC12a15g") == 0){
4532 }
else if (periodName.CompareTo(
"LHC12f2a") == 0){
4535 }
else if (periodName.CompareTo(
"LHC14a1a") == 0){
4538 }
else if (periodName.CompareTo(
"LHC14a1b") == 0){
4541 }
else if (periodName.CompareTo(
"LHC14a1c") == 0){
4545 }
else if (periodName.CompareTo(
"LHC14e2a") == 0){
4548 }
else if (periodName.CompareTo(
"LHC14e2b") == 0){
4551 }
else if (periodName.CompareTo(
"LHC14e2c") == 0){
4554 }
else if (periodName.Contains(
"LHC15h1")){
4557 }
else if (periodName.Contains(
"LHC15h2")){
4560 }
else if (periodName.CompareTo(
"LHC16c2") == 0){
4563 }
else if (periodName.CompareTo(
"LHC16c2_plus") == 0){
4567 }
else if (periodName.Contains(
"LHC13b2_efix")){
4570 }
else if (periodName.CompareTo(
"LHC13e7") == 0){
4573 }
else if (periodName.CompareTo(
"LHC14b2") == 0){
4576 }
else if (periodName.CompareTo(
"LHC13b4_fix") == 0){
4579 }
else if (periodName.CompareTo(
"LHC13b4_plus") == 0){
4582 }
else if (periodName.CompareTo(
"LHC16c3a") == 0){
4585 }
else if (periodName.CompareTo(
"LHC16c3b") == 0){
4588 }
else if (periodName.CompareTo(
"LHC16c3c") == 0){
4591 }
else if (periodName.CompareTo(
"LHC15g2") == 0){
4594 }
else if (periodName.CompareTo(
"LHC15a3a") == 0){
4597 }
else if (periodName.CompareTo(
"LHC15a3a_plus") == 0){
4600 }
else if (periodName.CompareTo(
"LHC15a3b") == 0){
4603 }
else if (periodName.CompareTo(
"LHC15d3a") == 0){
4606 }
else if (periodName.CompareTo(
"LHC15d3b") == 0){
4610 }
else if (periodName.CompareTo(
"LHC15g3a3") == 0){
4613 }
else if (periodName.CompareTo(
"LHC15g3a") == 0){
4616 }
else if (periodName.CompareTo(
"LHC15g3c2") == 0){
4619 }
else if (periodName.CompareTo(
"LHC15g3c3") == 0){
4622 }
else if (periodName.CompareTo(
"LHC15g3") == 0){
4625 }
else if (periodName.CompareTo(
"LHC16a2a") == 0){
4628 }
else if (periodName.CompareTo(
"LHC16a2b") == 0){
4631 }
else if (periodName.CompareTo(
"LHC16a2c") == 0){
4634 }
else if (periodName.CompareTo(
"LHC15l1a2") == 0){
4637 }
else if (periodName.CompareTo(
"LHC15l1b2") == 0){
4640 }
else if (periodName.CompareTo(
"LHC16h3") == 0){
4643 }
else if (periodName.CompareTo(
"LHC16h8a") == 0){
4646 }
else if (periodName.CompareTo(
"LHC16h8b") == 0){
4649 }
else if (periodName.CompareTo(
"LHC16k5a") == 0){
4652 }
else if (periodName.CompareTo(
"LHC16k5b") == 0){
4655 }
else if (periodName.CompareTo(
"LHC16k3a") == 0){
4658 }
else if (periodName.CompareTo(
"LHC16k3a2") == 0){
4661 }
else if (periodName.CompareTo(
"LHC17e2") == 0){
4664 }
else if (periodName.Contains(
"LHC15k1a1")){
4667 }
else if (periodName.Contains(
"LHC15k1a2")){
4670 }
else if (periodName.Contains(
"LHC15k1a3")){
4673 }
else if (periodName.Contains(
"LHC16j7")){
4676 }
else if (periodName.Contains(
"LHC16h4")){
4679 }
else if (periodName.Contains(
"LHC16g1")){
4682 }
else if (periodName.Contains(
"LHC16g1a")){
4685 }
else if (periodName.Contains(
"LHC16g1b")){
4688 }
else if (periodName.Contains(
"LHC16g1c")){
4691 }
else if (periodName.Contains(
"LHC16g2")){
4694 }
else if (periodName.Contains(
"LHC16g3")){
4697 }
else if (periodName.Contains(
"LHC16h2a")){
4700 }
else if (periodName.Contains(
"LHC16h2b")){
4703 }
else if (periodName.Contains(
"LHC16h2c")){
4706 }
else if (periodName.CompareTo(
"LHC16k3b") == 0){
4709 }
else if (periodName.CompareTo(
"LHC16k3b2") == 0){
4713 }
else if (periodName.CompareTo(
"LHC16j2a1") == 0){
4716 }
else if (periodName.CompareTo(
"LHC16j2b1") == 0){
4719 }
else if (periodName.CompareTo(
"LHC16j2a2") == 0){
4722 }
else if (periodName.CompareTo(
"LHC16j2b2") == 0){
4726 }
else if (periodName.CompareTo(
"LHC17f6") == 0){
4729 }
else if (periodName.CompareTo(
"LHC17f9") == 0){
4732 }
else if (periodName.CompareTo(
"LHC17d1") == 0){
4735 }
else if (periodName.CompareTo(
"LHC17d17") == 0){
4738 }
else if (periodName.CompareTo(
"LHC17f5") == 0){
4741 }
else if (periodName.CompareTo(
"LHC17d3") == 0){
4744 }
else if (periodName.CompareTo(
"LHC17e5") == 0){
4747 }
else if (periodName.CompareTo(
"LHC17d20a1") == 0){
4750 }
else if (periodName.CompareTo(
"LHC17d20a1_extra") == 0){
4753 }
else if (periodName.CompareTo(
"LHC17d20a2") == 0){
4756 }
else if (periodName.CompareTo(
"LHC17d20a2_extra") == 0){
4759 }
else if (periodName.CompareTo(
"LHC17d16") == 0){
4762 }
else if (periodName.CompareTo(
"LHC17d18") == 0){
4765 }
else if (periodName.CompareTo(
"LHC17f8a") == 0){
4768 }
else if (periodName.CompareTo(
"LHC17f8b") == 0){
4771 }
else if (periodName.CompareTo(
"LHC17f8c") == 0){
4774 }
else if (periodName.CompareTo(
"LHC17f8d") == 0){
4777 }
else if (periodName.CompareTo(
"LHC17f8e") == 0){
4781 }
else if (periodName.CompareTo(
"LHC17a2a") == 0){
4784 }
else if (periodName.CompareTo(
"LHC17a2a_fast") == 0){
4787 }
else if (periodName.CompareTo(
"LHC17a2a_cent") == 0){
4790 }
else if (periodName.CompareTo(
"LHC17a2a_cent_woSDD") == 0){
4793 }
else if (periodName.CompareTo(
"LHC17a2b") == 0){
4796 }
else if (periodName.CompareTo(
"LHC17a2b_fast") == 0){
4799 }
else if (periodName.CompareTo(
"LHC17a2b_cent") == 0){
4802 }
else if (periodName.CompareTo(
"LHC17a2b_cent_woSDD") == 0){
4805 }
else if (periodName.CompareTo(
"LHC17f2a") == 0){
4808 }
else if (periodName.CompareTo(
"LHC17f2a_fast") == 0){
4811 }
else if (periodName.CompareTo(
"LHC17f2a_cent") == 0){
4814 }
else if (periodName.CompareTo(
"LHC17f2a_cent_woSDD") == 0){
4817 }
else if (periodName.CompareTo(
"LHC17f2b") == 0){
4820 }
else if (periodName.CompareTo(
"LHC17f2b_fast") == 0){
4823 }
else if (periodName.CompareTo(
"LHC17f2b_cent") == 0){
4826 }
else if (periodName.CompareTo(
"LHC17f2b_cent_woSDD") == 0){
4830 }
else if (periodName.CompareTo(
"LHC17a3a") == 0){
4833 }
else if (periodName.CompareTo(
"LHC17a3a_fast") == 0){
4836 }
else if (periodName.CompareTo(
"LHC17a3a_cent") == 0){
4839 }
else if (periodName.CompareTo(
"LHC17a3a_cent_woSDD") == 0){
4842 }
else if (periodName.CompareTo(
"LHC17a3b") == 0){
4845 }
else if (periodName.CompareTo(
"LHC17a3b_fast") == 0){
4848 }
else if (periodName.CompareTo(
"LHC17a3b_cent") == 0){
4851 }
else if (periodName.CompareTo(
"LHC17a3b_cent_woSDD") == 0){
4854 }
else if (periodName.CompareTo(
"LHC17f3a") == 0){
4857 }
else if (periodName.CompareTo(
"LHC17f3a_fast") == 0){
4860 }
else if (periodName.CompareTo(
"LHC17f3a_cent") == 0){
4863 }
else if (periodName.CompareTo(
"LHC17f3a_cent_woSDD") == 0){
4866 }
else if (periodName.CompareTo(
"LHC17f3b") == 0){
4869 }
else if (periodName.CompareTo(
"LHC17f3b_fast") == 0){
4872 }
else if (periodName.CompareTo(
"LHC17f3b_cent") == 0){
4875 }
else if (periodName.CompareTo(
"LHC17f3b_cent_woSDD") == 0){
4879 }
else if (periodName.CompareTo(
"LHC17a4a") == 0){
4882 }
else if (periodName.CompareTo(
"LHC17a4a_fast") == 0){
4885 }
else if (periodName.CompareTo(
"LHC17a4a_cent") == 0){