X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=JETAN%2FAliJetReader.cxx;h=8bb4a17739731c56ad8977738ebb2863d250a529;hp=6cc730a06d73dccf4533b0c94c785430b535f845;hb=f34058c0b4f02a949aed54ad9c8c4619d70c5312;hpb=dee50a6543c3f54ded29bacb20983109d6125cc2 diff --git a/JETAN/AliJetReader.cxx b/JETAN/AliJetReader.cxx index 6cc730a06d7..8bb4a177397 100755 --- a/JETAN/AliJetReader.cxx +++ b/JETAN/AliJetReader.cxx @@ -18,43 +18,67 @@ // 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 "AliJetFillUnitArrayTracks.h" -#include "AliJetFillUnitArrayEMCalDigits.h" +#include "AliEMCALGeometry.h" +#include "AliEMCALEMCGeometry.h" +#include "AliJetESDFillUnitArrayTracks.h" +#include "AliJetESDFillUnitArrayEMCalDigits.h" #include "AliJetUnitArray.h" #include "AliJetHadronCorrectionv1.h" +#include "AliOADBContainer.h" ClassImp(AliJetReader) //////////////////////////////////////////////////////////////////////// +AliEMCALGeometry *AliJetReader::fGeom=0; + AliJetReader::AliJetReader(): // Constructor + fJetanOADBpath(""), fChain(0), - fMomentumArray(new TClonesArray("TLorentzVector",2000)), + 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)), - fRefArray(new TRefArray()), - fUnitArrayNoCuts(new TClonesArray("AliJetUnitArray",60000)), fArrayInitialised(0), - fFillUAFromTracks(new AliJetFillUnitArrayTracks()), - fFillUAFromEMCalDigits(new AliJetFillUnitArrayEMCalDigits()), + fFillUAFromTracks(new AliJetESDFillUnitArrayTracks()), + fFillUAFromEMCalDigits(new AliJetESDFillUnitArrayEMCalDigits()), fNumCandidate(0), - fNumCandidateCut(0) + fNumCandidateCut(0), + fHadronCorrector(0), + fHCorrection(0), + fECorrection(0), + fEFlag(kFALSE), + fDebug(0) { // Default constructor fSignalFlag = TArrayI(); @@ -72,31 +96,122 @@ AliJetReader::~AliJetReader() } if (fUnitArray) { + fUnitArray->Delete(); delete fUnitArray; } - if (fUnitArrayNoCuts) { - fUnitArrayNoCuts->Delete(); - delete fUnitArrayNoCuts; - } - if (fFillUnitArray) { - fFillUnitArray->Delete(); delete fFillUnitArray; } - if (fArrayMC) { - fArrayMC->Delete(); - delete 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!"<