Skip to content

Commit

Permalink
New analysis tag v5-04-30-AN
Browse files Browse the repository at this point in the history
  • Loading branch information
morsch committed Feb 11, 2013
2 parents fd2fd19 + 13dbd0d commit fa3211c
Show file tree
Hide file tree
Showing 27 changed files with 1,088 additions and 24 deletions.
2 changes: 2 additions & 0 deletions ANALYSIS/ANALYSISaliceLinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
#pragma link C++ class AliEventPoolManager+;
#pragma link C++ class AliUnfolding+;

#pragma link C++ class AliAnalysisUtils+;

#ifdef WITHXML
#pragma link C++ class AliTagAnalysis+;
#pragma link C++ class AliXMLCollection+;
Expand Down
107 changes: 107 additions & 0 deletions ANALYSIS/AliAnalysisUtils.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#include "AliVEvent.h"
#include "AliESDEvent.h"
#include "AliAODEvent.h"
#include "AliVVertex.h"
#include "AliLog.h"
#include "AliAODVertex.h"

#include "AliAnalysisUtils.h"

ClassImp(AliAnalysisUtils)

//______________________________________________________________________
AliAnalysisUtils::AliAnalysisUtils():TObject(),
fisAOD(kTRUE),
fMinVtxContr(0),
fMaxVtxZ(10.),
fCutOnZVertexSPD(kTRUE)
{
// Default contructor
}

//______________________________________________________________________
Bool_t AliAnalysisUtils::IsVertexSelected2013pA(AliVEvent *event)
{
Bool_t accept = kFALSE;

// Check whether the event is of AOD or ESD type
AliAODEvent *aod = 0x0;
AliESDEvent *esd = 0x0;
aod = dynamic_cast<AliAODEvent*>(event);
esd = dynamic_cast<AliESDEvent*>(event);

if(aod) {
fisAOD = kTRUE;
} else {
fisAOD = kFALSE;
if(!esd) {
AliFatal("Event is neither of AOD nor ESD type");
return accept;
}
}

const AliVVertex *trkVtx = fisAOD ?
dynamic_cast<const AliVVertex*>(aod->GetPrimaryVertex()) :
dynamic_cast<const AliVVertex*>(esd->GetPrimaryVertex()) ;
if(!trkVtx || trkVtx->GetNContributors()<=fMinVtxContr){
accept = kFALSE;
return accept;
}

TString vtxTtl = trkVtx->GetTitle();
if (!vtxTtl.Contains("VertexerTracks")) return accept;

Float_t zvtx = trkVtx->GetZ();
const AliVVertex* spdVtx = fisAOD ?
dynamic_cast<const AliVVertex*>(aod->GetPrimaryVertexSPD()) :
dynamic_cast<const AliVVertex*>(esd->GetPrimaryVertexSPD()) ;
if (spdVtx->GetNContributors()<=fMinVtxContr) return accept;

TString vtxTyp = spdVtx->GetTitle();
Double_t cov[6]={0};
spdVtx->GetCovarianceMatrix(cov);
Double_t zRes = TMath::Sqrt(cov[5]);
if (vtxTyp.Contains("vertexer:Z") && (zRes>0.25)) return accept;
if (fCutOnZVertexSPD && TMath::Abs(spdVtx->GetZ() - trkVtx->GetZ())>0.5) return accept;

if (TMath::Abs(zvtx) > fMaxVtxZ) return accept;

return kTRUE;
}

//______________________________________________________________________
Bool_t AliAnalysisUtils::IsFirstEventInChunk(AliVEvent *event)
{

Bool_t accept = kFALSE;

// Check whether the event is of AOD or ESD type
AliAODEvent *aod = 0x0;
AliESDEvent *esd = 0x0;
aod = dynamic_cast<AliAODEvent*>(event);
esd = dynamic_cast<AliESDEvent*>(event);

if(aod) {
fisAOD = kTRUE;
} else {
fisAOD = kFALSE;
if(!esd) {
AliFatal("Event is neither of AOD nor ESD type");
return accept;
}
}

if(fisAOD){
AliAODHeader *aodheader = 0x0;
aodheader = aod->GetHeader();
if(!aodheader){
AliFatal("AOD header not there ?!");
return kFALSE;
}
if(aodheader->GetEventNumberESDFile()==0) accept = kTRUE;
} else {
if(esd->GetEventNumberInFile()==0) accept = kTRUE;
}

return accept;
}
43 changes: 43 additions & 0 deletions ANALYSIS/AliAnalysisUtils.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#ifndef ALIANALYSISUTILS_H
#define ALIANALYSISUTILS_H

//////////////////////////////////////////////////////////////////////////////
// //
// Class with functions useful for different analyses //
// - vertex selection //
// * 2013 pA default cuts //
// - identification of the fist event of the chunk //
// //
//////////////////////////////////////////////////////////////////////////////

#include "TObject.h"

class AliVEvent;

class AliAnalysisUtils : public TObject {

public:

AliAnalysisUtils();
virtual ~AliAnalysisUtils(){};

Bool_t IsVertexSelected2013pA(AliVEvent *event);
Bool_t IsFirstEventInChunk(AliVEvent *event);

void SetMinVtxContr(Int_t contr=1) {fMinVtxContr=contr;}
void SetMaxVtxZ(Float_t z=1e6) {fMaxVtxZ=z;}
void SetCutOnZVertexSPD(Bool_t iscut=true) { fCutOnZVertexSPD = iscut; }

private:

Bool_t fisAOD; // flag for AOD:1 or ESD:0

Int_t fMinVtxContr; // minimum vertex contributors
Float_t fMaxVtxZ; // maximum |z| of primary vertex

Bool_t fCutOnZVertexSPD; // 0: no cut, 1: |zvtx-SPD - zvtx-TPC|<0.5cm

ClassDef(AliAnalysisUtils,0) // base helper class
};
#endif

2 changes: 2 additions & 0 deletions ANALYSIS/AliPhysicsSelection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,8 @@ Bool_t AliPhysicsSelection::Initialize(Int_t runNumber)
fTriggerOADB->GetZDCCutRefDeltaCorr(),
fTriggerOADB->GetZDCCutSigmaSumCorr(),
fTriggerOADB->GetZDCCutSigmaDeltaCorr());
triggerAnalysis->SetZNCorrCutParams(fTriggerOADB->GetZDCCutZNATimeCorr(),
fTriggerOADB->GetZDCCutZNCTimeCorr());
fTriggerAnalysis.Add(triggerAnalysis);
}

Expand Down
6 changes: 4 additions & 2 deletions ANALYSIS/AliTriggerAnalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ AliTriggerAnalysis::AliTriggerAnalysis() :
fZDCCutRefDeltaCorr(-2.1),
fZDCCutSigmaSumCorr(6.0),
fZDCCutSigmaDeltaCorr(1.2),
fZDCCutZNATimeCorr(2.0),
fZDCCutZNCTimeCorr(5.0),
fASPDCvsTCut(65),
fBSPDCvsTCut(4),
fDoFMD(kTRUE),
Expand Down Expand Up @@ -1467,8 +1469,8 @@ Bool_t AliTriggerAnalysis::ZDCTimeBGTrigger(const AliESDEvent *aEsd, AliceSide s
return kFALSE;
}

Bool_t znabg = (zna && (TMath::Abs(tdcAcorr)>2.0));
Bool_t zncbg = (znc && (TMath::Abs(tdcCcorr)>5.0));
Bool_t znabg = (zna && (TMath::Abs(tdcAcorr)>fZDCCutZNATimeCorr));
Bool_t zncbg = (znc && (TMath::Abs(tdcCcorr)>fZDCCutZNCTimeCorr));

// Printf("Checking ZN background (time) for run %d, A = %d, time=%2.2f, C = %d, time=%2.2f",runNumber,(Int_t)zna,tdcAcorr,(Int_t)znc,tdcCcorr);
// Printf("Checking ZN background (time) for run %d, A-BG = %d, C-BG = %d",runNumber,(Int_t)znabg,(Int_t)zncbg);
Expand Down
7 changes: 6 additions & 1 deletion ANALYSIS/AliTriggerAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ class AliTriggerAnalysis : public TObject
void SetDoFMD(Bool_t flag = kTRUE) {fDoFMD = flag;}
void SetZDCCutParams(Float_t refSum, Float_t refDelta, Float_t sigmaSum, Float_t sigmaDelta) { fZDCCutRefSum = refSum; fZDCCutRefDelta = refDelta; fZDCCutSigmaSum = sigmaSum; fZDCCutSigmaDelta = sigmaDelta; }
void SetCorrZDCCutParams(Float_t refSum, Float_t refDelta, Float_t sigmaSum, Float_t sigmaDelta) { fZDCCutRefSumCorr = refSum; fZDCCutRefDeltaCorr = refDelta; fZDCCutSigmaSumCorr = sigmaSum; fZDCCutSigmaDeltaCorr = sigmaDelta; }
void SetZNCorrCutParams(Float_t znaTimeCorr, Float_t zncTimeCorr)
{ fZDCCutZNATimeCorr = znaTimeCorr; fZDCCutZNCTimeCorr = zncTimeCorr; }

Int_t GetSPDGFOThreshhold() const { return fSPDGFOThreshold; }
Float_t GetV0TimeOffset() const { return fV0TimeOffset; }
Expand Down Expand Up @@ -133,6 +135,9 @@ class AliTriggerAnalysis : public TObject
Float_t fZDCCutSigmaSumCorr; // Corrected ZDC time cut configuration
Float_t fZDCCutSigmaDeltaCorr; // Corrected ZDC time cut configuration

Float_t fZDCCutZNATimeCorr; // Corrected ZNA time cut configuration
Float_t fZDCCutZNCTimeCorr; // Corrected ZNA time cut configuration

Float_t fASPDCvsTCut; // constant for the linear cut in SPD clusters vs tracklets
Float_t fBSPDCvsTCut; // slope for the linear cut in SPD clusters vs tracklets

Expand Down Expand Up @@ -163,7 +168,7 @@ class AliTriggerAnalysis : public TObject

Bool_t fTPCOnly; // flag to set whether TPC only tracks have to be used for the offline trigger

ClassDef(AliTriggerAnalysis, 18)
ClassDef(AliTriggerAnalysis, 19)

private:
AliTriggerAnalysis(const AliTriggerAnalysis&);
Expand Down
1 change: 1 addition & 0 deletions ANALYSIS/CMakelibANALYSISalice.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ set ( SRCS
AliEventPoolManager.cxx
AliAnalysisTaskPIDCombined.cxx
AliUnfolding.cxx
AliAnalysisUtils.cxx
)

if( ROOTHASALIEN STREQUAL "yes")
Expand Down
5 changes: 5 additions & 0 deletions ANALYSIS/macros/BrowseAndFillPhysicsSelectionOADB.C
Original file line number Diff line number Diff line change
Expand Up @@ -1436,12 +1436,17 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
oadbTrigAnalysisZDC6->SetZDCCorrParameters(-65.6, -2.1, 4*0.58, 4*0.5);
oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC6, 138924, 139517);

AliOADBTriggerAnalysis * oadbTrigAnalysisZDC7 = new AliOADBTriggerAnalysis("ZDCCut7");
oadbTrigAnalysisZDC7->SetZNCorrParameters(2.0,5.0);
oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC7, 194713, 250000);

oadbTrigAnalysisZDC1->Print();
oadbTrigAnalysisZDC2->Print();
oadbTrigAnalysisZDC3->Print();
oadbTrigAnalysisZDC4->Print();
oadbTrigAnalysisZDC5->Print();
oadbTrigAnalysisZDC6->Print();
oadbTrigAnalysisZDC7->Print();


// ----------------- visualize coverage
Expand Down
12 changes: 12 additions & 0 deletions ITS/AliITSAlignMille2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4156,6 +4156,10 @@ Int_t AliITSAlignMille2::LoadPreSDDCalib()
AliCDBManager* man = AliCDBManager::Instance();
man->SetRun(fRunID);
AliCDBEntry *entry = man->Get("ITS/Calib/MapsTimeSDD");
if(!entry){
AliError("Error accessing OCDB: SDD maps not found");
return -1;
}
delete fPreCorrMapSDD;
TObjArray* arr = (TObjArray*) entry->GetObject();
entry->SetObject(NULL);
Expand All @@ -4164,12 +4168,20 @@ Int_t AliITSAlignMille2::LoadPreSDDCalib()
fPreCorrMapSDD = new AliITSCorrectSDDPoints(arr);
//
entry = man->Get("ITS/Calib/RespSDD");
if(!entry){
AliError("Error accessing OCDB: SDD response not found");
return -1;
}
delete fPreRespSDD;
fPreRespSDD = (AliITSresponseSDD*) entry->GetObject();
entry->SetObject(NULL);
entry->SetOwner(kTRUE);
//
entry = man->Get("ITS/Calib/DriftSpeedSDD");
if(!entry){
AliError("Error accessing OCDB: SDD Drift speed not found");
return -1;
}
delete fPreVDriftSDD;
fPreVDriftSDD = (TObjArray*) entry->GetObject();
entry->SetObject(NULL);
Expand Down
2 changes: 2 additions & 0 deletions ITS/AliITSSumTP.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ TObject(src), fTracks(src.fTracks.GetEntriesFast()), fVertex(src.GetVertex()),
{
// copy c-tor
fCrvVars = new Double32_t[fNVars];
fTPCVars = new Double32_t[fNVars];
TObjArray& arrSrc = src.GetTracks();
for (int i=fNVars;i--;) {
fCrvVars[i] = src.fCrvVars[i];
Expand All @@ -37,6 +38,7 @@ AliITSSumTP& AliITSSumTP::operator=(const AliITSSumTP& src)
fVertex = src.GetVertex();
fNVars = src.fNVars;
fCrvVars = new Double32_t[fNVars];
fTPCVars = new Double32_t[fNVars];
TObjArray& arrSrc = src.GetTracks();
for (int i=fNVars;i--;) {
fCrvVars[i] = src.fCrvVars[i];
Expand Down
4 changes: 2 additions & 2 deletions ITS/UPGRADE/AliITSUTrackerGlo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ void AliITSUTrackerGlo::CookMCLabel(AliITSUTrackHyp* hyp)
nCl++;
for (int imc=0;imc<kMaxLbPerCl;imc++) { // labels within single cluster
int trLb = cl->GetLabel(imc);
if (imc<0) break;
if (trLb<0) break;
// search this mc track in already accounted ones
int iLab;
for (iLab=0;iLab<nLab;iLab++) if (lbID[iLab]==trLb) break;
Expand All @@ -978,7 +978,7 @@ void AliITSUTrackerGlo::CookMCLabel(AliITSUTrackHyp* hyp)
seed = (AliITSUSeed*)seed->GetParent();
} // loop over clusters
//
if (nCl) {
if (nCl && nLab) {
int maxLab=0,nTPCok=0;
AliESDtrack* esdTr = hyp->GetESDTrack();
int tpcLab = esdTr ? Abs(esdTr->GetTPCLabel()) : -kDummyLabel;
Expand Down
20 changes: 17 additions & 3 deletions MFT/AliMuonForwardTrack.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ Bool_t AliMuonForwardTrack::IsFromResonance() {

//====================================================================================================================================================

Bool_t AliMuonForwardTrack::IsFromCharm() {
Bool_t AliMuonForwardTrack::IsDirectCharm() {

Bool_t result = kFALSE;

Expand All @@ -511,7 +511,7 @@ Bool_t AliMuonForwardTrack::IsFromCharm() {

//====================================================================================================================================================

Bool_t AliMuonForwardTrack::IsFromBeauty() {
Bool_t AliMuonForwardTrack::IsDirectBeauty() {

Bool_t result = kFALSE;

Expand All @@ -525,6 +525,20 @@ Bool_t AliMuonForwardTrack::IsFromBeauty() {

//====================================================================================================================================================

Bool_t AliMuonForwardTrack::IsChainBeauty() {

Bool_t result = kFALSE;

if (IsPDGCharm(GetParentPDGCode(0)) && IsPDGBeauty(GetParentPDGCode(1))) result = kTRUE;

if (result) AliDebug(1, Form("Muon comes from a charmed hadron %d which comes from a beauty hadron %d", GetParentPDGCode(0), GetParentPDGCode(1)));

return result;

}

//====================================================================================================================================================

Bool_t AliMuonForwardTrack::IsPDGCharm(Int_t pdg) {

Bool_t result = kFALSE;
Expand Down Expand Up @@ -593,7 +607,7 @@ Bool_t AliMuonForwardTrack::IsFromBackground() {

Bool_t result = kFALSE;

if (!IsFromResonance() && !IsFromCharm() && !IsFromBeauty()) result = kTRUE;
if (!IsFromResonance() && !IsDirectCharm() && !IsDirectBeauty() && !IsChainBeauty()) result = kTRUE;

if (result) AliDebug(1, Form("Muon comes from a background source %d", GetParentPDGCode(0)));

Expand Down
7 changes: 5 additions & 2 deletions MFT/AliMuonForwardTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ class AliMuonForwardTrack : public AliMUONTrack {
Int_t GetTrackMCId() { return fTrackMCId; }

Bool_t IsFromResonance();
Bool_t IsFromCharm();
Bool_t IsFromBeauty();
Bool_t IsDirectCharm();
Bool_t IsDirectBeauty();
Bool_t IsChainBeauty();
Bool_t IsFromCharm() { return IsDirectCharm(); }
Bool_t IsFromBeauty() { return IsDirectBeauty() || IsChainBeauty(); }
Bool_t IsPDGCharm(Int_t pdg);
Bool_t IsPDGBeauty(Int_t pdg);
Bool_t IsFromBackground();
Expand Down
2 changes: 1 addition & 1 deletion MUON/AliMUONChamberCalibrationTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class AliMUONChamberCalibrationTask : public AliAnalysisTaskSE

// Getters
/// Return TTree filled with the cluster information
TTree* OutputTree() { return fClusterInfoTree; }
TTree* OutputTree() const { return fClusterInfoTree; }

UInt_t BuildClusterMap( AliMUONTrack &track );

Expand Down
7 changes: 5 additions & 2 deletions PHOS/AliPHOSSimParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ AliPHOSSimParam::AliPHOSSimParam(Int_t) :
fEMCADCchannel = 0.005 ; // [GeV]
fTOFa = 0.5e-9 ; // [sec] constant term
fTOFb = 1.e-9 ; // [sec/sqrt(GeV)]] stohastic term
fCellNonLineaityA = 0.18 ; //Amp of non-linearity of cell responce
// fCellNonLineaityA = 0.18 ; //Amp of non-linearity of cell responce
// fCellNonLineaityB = 0.109; //Scale of non-linearity of cell responce
// fCellNonLineaityC = 0.976; //Overall calibration
fCellNonLineaityA = 0. ; //Amp of non-linearity of cell responce
fCellNonLineaityB = 0.109; //Scale of non-linearity of cell responce
fCellNonLineaityC = 0.976; //Overall calibration
fCellNonLineaityC = 1.; //Overall calibration

fADCpedestalCpv = 0.012 ; // [aux units]
fADCchanelCpv = 0.0012; // [aux units]
Expand Down
Loading

0 comments on commit fa3211c

Please sign in to comment.