/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ //------------------------------------------------------------------------ // Jet reader base class // manages the reading of input for jet algorithms // Authors: jgcn@mda.cinvestav.mx // magali.estienne@IReS.in2p3.fr // // **February 2011 // implemented standard geometry (AliEMCALGeometry) (was AliJetDummyGeo implented separately in ESDReader and AODReader // local2master matrices are now get from $ALICE_ROOT/OADB/PWG4/JetReconstruction/EMCALlocal2master.root // you can choose the geometry (EMCAL_COMPLETE, EMCAL_FIRSTYEARv1, etc) via SetEMCALgeo2bLoad('Name_of_Geometry') in the Readerheader // different options for survey(ed) matrice are provided too // ** August 2011 // OADB path changed from '../OADB/PWG4/JetReconstruction/' to '../OADB/EMCAL/' // marco.bregant@subatech.in2p3.fr //------------------------------------------------------------------------- // root #include #include #include #include #include "TTask.h" #include //AliRoot #include "AliLog.h" #include "AliJetReader.h" #include "AliJetReaderHeader.h" #include "AliESDEvent.h" #include "AliHeader.h" #include "AliEMCALGeometry.h" #include "AliEMCALEMCGeometry.h" #include "AliJetESDFillUnitArrayTracks.h" #include "AliJetESDFillUnitArrayEMCalDigits.h" #include "AliJetUnitArray.h" #include "AliJetHadronCorrectionv1.h" #include "AliOADBContainer.h" using std::cout; using std::endl; ClassImp(AliJetReader) //////////////////////////////////////////////////////////////////////// AliEMCALGeometry *AliJetReader::fGeom=0; AliJetReader::AliJetReader(): // Constructor fJetanOADBpath(""), fChain(0), fTree(0), fMomentumArray(new TClonesArray("TLorentzVector",4000)), fArrayMC(0), fFillUnitArray(new TTask("fillUnitArray","Fill unit array jet finder")), fESD(0), fReaderHeader(0), fAliHeader(0), fSignalFlag(0), fCutFlag(0), fUnitArray(new TClonesArray("AliJetUnitArray",60000)), fArrayInitialised(0), fFillUAFromTracks(new AliJetESDFillUnitArrayTracks()), fFillUAFromEMCalDigits(new AliJetESDFillUnitArrayEMCalDigits()), fNumCandidate(0), fNumCandidateCut(0), fHadronCorrector(0), fHCorrection(0), fECorrection(0), fEFlag(kFALSE), fDebug(0) { // Default constructor fSignalFlag = TArrayI(); fCutFlag = TArrayI(); } //////////////////////////////////////////////////////////////////////// AliJetReader::~AliJetReader() { // Destructor if (fMomentumArray) { fMomentumArray->Delete(); delete fMomentumArray; } if (fUnitArray) { fUnitArray->Delete(); delete fUnitArray; } if (fFillUnitArray) { delete fFillUnitArray; } if (fArrayMC) { fArrayMC->Delete(); delete fArrayMC; } } //////////////////////////////////////////////////////////////////////// void AliJetReader::ClearArray() { if (fMomentumArray) fMomentumArray->Clear(); if (fFillUnitArray) fFillUnitArray->Clear(); } Bool_t AliJetReader::SetEMCALGeometry() { // // Set the EMCal Geometry // fDebug = fReaderHeader->GetDebug(); if(fGeom != 0){ Info(" SetEMCALGeometry:","was already done.. it's called just once !!"); return kTRUE; } if(fDebug>9) cout<<"JetReader: Setting EMCALGeometry"<GetMyOADBfile(); TString OADBfile; Bool_t customFile=kFALSE; if(myPath.Length()) { Info(" SetEMCALGeometry","custom version of OADB file: %s",myPath.Data()); customFile=kTRUE; OADBfile=myPath; } else OADBfile.Form("%s/EMCAL/EMCALlocal2master.root",(const char*) fJetanOADBpath); AliOADBContainer EMCALgeoCont; Info(" SetEMCALGeometry"," I'm going to read the matrices from %s",OADBfile.Data()); TObjArray *EmcalMatrArray; if(fDebug>19) cout<<"array definito"<Print(); const char* geoType= fReaderHeader -> GetEMCALgeo2bLoad(); if(fDebug>19) cout<<"geometry: "<GetEMCALmatrices2bLoad(); if(fDebug>19) cout<<"matrices: "<9) cout<<"geometry type is: "<9) cout<<"survey matrices are: "<9) cout<<"survey matrices are (new, after overrulling): "<10) cout<<"which EMCALgeometry is going to be uploaded?"<GetEMCGeometry())->GetNumberOfSuperModules();mod+=1) { fGeom->SetMisalMatrix(((TGeoHMatrix*) EmcalMatrArray->At(mod)),mod); if(fDebug>9) cout<<"and the matrix is: SM "<11!) "<11) { cout<<"print the matrix, (will it work?)"<At(mod))->Print(); cout<<"if you read that, it did!"<