2 /**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
18 //_________________________________________________________________________
19 // Class for reading data (ESDs) in order to do prompt gamma
20 // or other particle identification and correlations
25 //*-- Author: Gustavo Conesa (LNF-INFN)
26 //////////////////////////////////////////////////////////////////////////////
29 // --- ROOT system ---
30 //#include "Riostream.h"
32 //---- ANALYSIS system ----
33 #include "AliCaloTrackESDReader.h"
34 #include "AliAODEvent.h"
35 #include "AliMultiEventInputHandler.h"
36 #include "AliAnalysisManager.h"
37 #include "AliMixedEvent.h"
40 ClassImp(AliCaloTrackESDReader)
42 //____________________________________________________________________________
43 AliCaloTrackESDReader::AliCaloTrackESDReader() :
48 //Initialize parameters
51 fReadAODMCParticles = kFALSE;
55 //____________________________________________________________________________
56 Double_t AliCaloTrackESDReader::GetBField() const {
57 //Return magnetic field
59 Double_t bfield = fInputEvent->GetMagneticField();
65 //____________________________________________________________________________
66 void AliCaloTrackESDReader::SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) {
67 // Connect the data pointers
69 Bool_t tesd = kFALSE ;
71 if ( strcmp(esd->GetName(), "AliMixedEvent") == 0 ) {
72 AliMultiEventInputHandler* multiEH = dynamic_cast<AliMultiEventInputHandler*>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
73 if (multiEH->GetFormat() == 0 ) {
77 if (strcmp(esd->GetName(),"AliESDEvent") == 0) {
82 AliFatal(Form("AliCaloTrackESDReader::SetInputOutputMCEvent() - STOP ::Wrong reader, here only ESDs. Input name: %s != AliESDEvent \n",esd->GetName()));