Skip to content

Commit

Permalink
New analysis tag v5-04-56-AN
Browse files Browse the repository at this point in the history
  • Loading branch information
morsch committed May 13, 2013
2 parents 9094fef + d6abd74 commit 297cfdc
Show file tree
Hide file tree
Showing 18 changed files with 584 additions and 530 deletions.
102 changes: 87 additions & 15 deletions EMCAL/AliEMCALDigitizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
#include "AliEMCALCalibData.h"
#include "AliEMCALSimParam.h"
#include "AliEMCALRawDigit.h"
#include "AliCaloCalibPedestal.h"

namespace
{
Expand Down Expand Up @@ -395,6 +396,9 @@ void AliEMCALDigitizer::Digitize(Int_t event)
//Put Noise contribution, smear time and energy
Float_t timeResolution = 0;
for(absID = 0; absID < nEMC; absID++){ // Nov 30, 2006 by PAI; was from 1 to nEMC

if (IsDead(absID)) continue; // Don't instantiate dead digits

Float_t energy = 0 ;

// amplitude set to zero, noise will be added later
Expand Down Expand Up @@ -674,7 +678,7 @@ void AliEMCALDigitizer::Decalibrate(AliEMCALDigit *digit)

Bool_t bCell = geom->GetCellIndex(absId, iSupMod, nModule, nIphi, nIeta) ;

if (!bCell) Error("DigitizeEnergyTime","Wrong cell id number : absId %i ", absId) ;
if (!bCell) Error("Decalibrate","Wrong cell id number : absId %i ", absId) ;
geom->GetCellPhiEtaIndexInSModule(iSupMod,nModule,nIphi, nIeta,iphi,ieta);

if (fCalibData) {
Expand Down Expand Up @@ -843,16 +847,10 @@ void AliEMCALDigitizer::Digits2FastOR(TClonesArray* digitsTMP, TClonesArray* dig

AliRunLoader *runLoader = AliRunLoader::Instance();

AliRun* run = runLoader->GetAliRun();

AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>(runLoader->GetDetectorLoader("EMCAL"));
if(!emcalLoader){
AliFatal("Did not get the Loader");
}
else {
AliEMCAL* emcal = dynamic_cast<AliEMCAL*>(run->GetDetector("EMCAL"));
if(emcal){
AliEMCALGeometry* geom = emcal->GetGeometry();
if (!emcalLoader) AliFatal("Did not get the Loader");

const AliEMCALGeometry* geom = AliEMCALGeometry::GetInstance();

// build FOR from simulated digits
// and xfer to the corresponding TRU input (mapping)
Expand All @@ -866,7 +864,9 @@ void AliEMCALDigitizer::Digits2FastOR(TClonesArray* digitsTMP, TClonesArray* dig
TIter NextDigit(digits);
while (AliEMCALDigit* digit = (AliEMCALDigit*)NextDigit())
{
Decalibrate(digit);
if (IsDead(digit)) continue;

Decalibrate(digit);

Int_t id = digit->GetId();

Expand Down Expand Up @@ -930,10 +930,6 @@ void AliEMCALDigitizer::Digits2FastOR(TClonesArray* digitsTMP, TClonesArray* dig
delete [] timeSamples;

if (digits && digits->GetEntriesFast()) digits->Delete();
}// AliEMCAL exists
else AliFatal("Could not get AliEMCAL");
}// loader exists

}

//____________________________________________________________________________
Expand Down Expand Up @@ -1232,3 +1228,79 @@ void AliEMCALDigitizer::WriteDigits(TClonesArray* digits, const char* branchName
else AliFatal("Loader not available");
}

//__________________________________________________________________
Bool_t AliEMCALDigitizer::IsDead(AliEMCALDigit *digit)
{
AliRunLoader *runLoader = AliRunLoader::Instance();
AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>(runLoader->GetDetectorLoader("EMCAL"));
if (!emcalLoader) AliFatal("Did not get the Loader");

AliCaloCalibPedestal *caloPed = emcalLoader->PedestalData();
if (!caloPed) {
AliWarning("Could not access pedestal data! No dead channel removal applied");
return kFALSE;
}

// Load Geometry
const AliEMCALGeometry *geom = AliEMCALGeometry::GetInstance();
if (!geom) AliFatal("Did not get geometry from EMCALLoader");

Int_t absId = digit->GetId();
Int_t iSupMod = -1;
Int_t nModule = -1;
Int_t nIphi = -1;
Int_t nIeta = -1;
Int_t iphi = -1;
Int_t ieta = -1;

Bool_t bCell = geom->GetCellIndex(absId, iSupMod, nModule, nIphi, nIeta) ;

if (!bCell) Error("IsDead","Wrong cell id number : absId %i ", absId) ;
geom->GetCellPhiEtaIndexInSModule(iSupMod,nModule,nIphi, nIeta,iphi,ieta);

Int_t channelStatus = (Int_t)(caloPed->GetDeadMap(iSupMod))->GetBinContent(ieta,iphi);

if (channelStatus == AliCaloCalibPedestal::kDead)
return kTRUE;
else
return kFALSE;
}


//__________________________________________________________________
Bool_t AliEMCALDigitizer::IsDead(Int_t absId)
{
AliRunLoader *runLoader = AliRunLoader::Instance();
AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>(runLoader->GetDetectorLoader("EMCAL"));
if (!emcalLoader) AliFatal("Did not get the Loader");

AliCaloCalibPedestal *caloPed = emcalLoader->PedestalData();
if (!caloPed) {
AliWarning("Could not access pedestal data! No dead channel removal applied");
return kFALSE;
}

// Load Geometry
const AliEMCALGeometry *geom = AliEMCALGeometry::GetInstance();
if (!geom) AliFatal("Did not get geometry from EMCALLoader");

Int_t iSupMod = -1;
Int_t nModule = -1;
Int_t nIphi = -1;
Int_t nIeta = -1;
Int_t iphi = -1;
Int_t ieta = -1;

Bool_t bCell = geom->GetCellIndex(absId, iSupMod, nModule, nIphi, nIeta) ;

if (!bCell) Error("IsDead","Wrong cell id number : absId %i ", absId) ;
geom->GetCellPhiEtaIndexInSModule(iSupMod,nModule,nIphi, nIeta,iphi,ieta);

Int_t channelStatus = (Int_t)(caloPed->GetDeadMap(iSupMod))->GetBinContent(ieta,iphi);

if (channelStatus == AliCaloCalibPedestal::kDead)
return kTRUE;
else
return kFALSE;
}

2 changes: 2 additions & 0 deletions EMCAL/AliEMCALDigitizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ class AliEMCALDigitizer: public AliDigitizer {
void Digits2FastOR(TClonesArray*digitsTMP, TClonesArray* digitsTRG);
void DigitalFastOR(Double_t time, Double_t dE, Int_t timeSamples[], Int_t nSamples);
void Decalibrate(AliEMCALDigit *digit);
Bool_t IsDead(AliEMCALDigit *digit);
Bool_t IsDead(Int_t absId);

private:

Expand Down
35 changes: 24 additions & 11 deletions EMCAL/AliEMCALRecoUtils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ AliEMCALRecoUtils::AliEMCALRecoUtils():
fNCellsFromEMCALBorder(0), fNoEMCALBorderAtEta0(kTRUE),
fRejectExoticCluster(kFALSE), fRejectExoticCells(kFALSE),
fExoticCellFraction(0), fExoticCellDiffTime(0), fExoticCellMinAmplitude(0),
fPIDUtils(), fAODFilterMask(0), fAODHybridTracks(0),
fPIDUtils(), fAODFilterMask(0),
fAODHybridTracks(0), fAODTPCOnlyTracks(0),
fMatchedTrackIndex(0x0), fMatchedClusterIndex(0x0),
fResidualEta(0x0), fResidualPhi(0x0), fCutEtaPhiSum(kFALSE), fCutEtaPhiSeparate(kFALSE),
fCutR(0), fCutEta(0), fCutPhi(0),
Expand Down Expand Up @@ -119,7 +120,7 @@ AliEMCALRecoUtils::AliEMCALRecoUtils(const AliEMCALRecoUtils & reco)
fExoticCellFraction(reco.fExoticCellFraction), fExoticCellDiffTime(reco.fExoticCellDiffTime),
fExoticCellMinAmplitude(reco.fExoticCellMinAmplitude),
fPIDUtils(reco.fPIDUtils), fAODFilterMask(reco.fAODFilterMask),
fAODHybridTracks(reco.fAODHybridTracks),
fAODHybridTracks(reco.fAODHybridTracks), fAODTPCOnlyTracks(reco.fAODTPCOnlyTracks),
fMatchedTrackIndex( reco.fMatchedTrackIndex? new TArrayI(*reco.fMatchedTrackIndex):0x0),
fMatchedClusterIndex(reco.fMatchedClusterIndex?new TArrayI(*reco.fMatchedClusterIndex):0x0),
fResidualEta( reco.fResidualEta? new TArrayF(*reco.fResidualEta):0x0),
Expand Down Expand Up @@ -194,6 +195,7 @@ AliEMCALRecoUtils & AliEMCALRecoUtils::operator = (const AliEMCALRecoUtils & rec

fAODFilterMask = reco.fAODFilterMask;
fAODHybridTracks = reco.fAODHybridTracks;
fAODTPCOnlyTracks = reco.fAODTPCOnlyTracks;

fCutEtaPhiSum = reco.fCutEtaPhiSum;
fCutEtaPhiSeparate = reco.fCutEtaPhiSeparate;
Expand Down Expand Up @@ -997,8 +999,9 @@ void AliEMCALRecoUtils::InitParameters()
fExoticCellDiffTime = 1e6;
fExoticCellMinAmplitude = 0.5;

fAODFilterMask = 32;
fAODHybridTracks = kFALSE;
fAODFilterMask = 128;
fAODHybridTracks = kFALSE;
fAODTPCOnlyTracks = kTRUE;

fCutEtaPhiSum = kTRUE;
fCutEtaPhiSeparate = kFALSE;
Expand Down Expand Up @@ -1878,12 +1881,22 @@ void AliEMCALRecoUtils::FindMatches(AliVEvent *event,
{
aodTrack = aodevent->GetTrack(itr);
if(!aodTrack) continue;

//Check mask if not hybrid
if(!fAODHybridTracks && !aodTrack->TestFilterMask(fAODFilterMask) ) continue; //Select AOD tracks that fulfill GetStandardITSTPCTrackCuts2010()

//Check hybrid
if( fAODHybridTracks && !aodTrack->IsHybridGlobalConstrainedGlobal()) continue ;

if(fAODTPCOnlyTracks) // Match with TPC only tracks, default from May 2013, before filter bit 32
{
//printf("Match with TPC only tracks, accept? %d, test bit 128 <%d> \n", aodTrack->IsTPCOnly(), aodTrack->TestFilterMask(128));
if(!aodTrack->IsTPCOnly()) continue ;
}
else if(fAODHybridTracks) // Match with hybrid tracks
{
//printf("Match with Hybrid tracks, accept? %d \n", aodTrack->IsHybridGlobalConstrainedGlobal());
if(!aodTrack->IsHybridGlobalConstrainedGlobal()) continue ;
}
else // Match with tracks on a mask
{
//printf("Match with tracks having filter bit mask %d, accept? %d \n",fAODFilterMask,aodTrack->TestFilterMask(fAODFilterMask));
if(!aodTrack->TestFilterMask(fAODFilterMask) ) continue; //Select AOD tracks
}

if(aodTrack->Pt()<fCutMinTrackPt) continue;

Expand Down Expand Up @@ -2633,7 +2646,7 @@ void AliEMCALRecoUtils::Print(const Option_t *) const

printf("Track cuts: \n");
printf("Minimum track pT: %1.2f\n",fCutMinTrackPt);
printf("AOD track selection mask: %d\n",fAODFilterMask);
printf("AOD track selection: tpc only %d, or hybrid %d, or mask: %d\n",fAODTPCOnlyTracks,fAODHybridTracks, fAODFilterMask);
printf("TPCRefit = %d, ITSRefit = %d\n",fCutRequireTPCRefit,fCutRequireITSRefit);
printf("AcceptKinks = %d\n",fCutAcceptKinkDaughters);
printf("MinNCulsterTPC = %d, MinNClusterITS = %d\n",fCutMinNClusterTPC,fCutMinNClusterITS);
Expand Down
16 changes: 11 additions & 5 deletions EMCAL/AliEMCALRecoUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,15 @@ class AliEMCALRecoUtils : public TNamed {
InitTrackCuts() ; }
Int_t GetTrackCutsType() const { return fTrackCutsType; }

void SetAODTrackFilterMask( UInt_t mask) {fAODFilterMask = mask ; }
void SwitchOnAODHybridTracksMatch() {fAODHybridTracks = kTRUE ; }
void SwitchOffAODHybridTracksMatch() {fAODHybridTracks = kFALSE ; }

// track quality cut setters
// Define AOD track type for matching
void SwitchOffAODHybridTracksMatch() { fAODHybridTracks = kFALSE ; }
void SwitchOffAODTPCOnlyTracksMatch() { fAODTPCOnlyTracks = kFALSE ; }
void SwitchOnAODHybridTracksMatch() { fAODHybridTracks = kTRUE ; SwitchOffAODTPCOnlyTracksMatch() ; }
void SwitchOnAODTPCOnlyTracksMatch() { fAODTPCOnlyTracks = kTRUE ; SwitchOffAODHybridTracksMatch() ; }
void SetAODTrackFilterMask( UInt_t mask) { fAODFilterMask = mask ;
SwitchOffAODTPCOnlyTracksMatch() ; SwitchOffAODHybridTracksMatch() ; }

// track quality cut setters
void SetMinTrackPt(Double_t pt=0) { fCutMinTrackPt = pt ; }
void SetMinNClustersTPC(Int_t min=-1) { fCutMinNClusterTPC = min ; }
void SetMinNClustersITS(Int_t min=-1) { fCutMinNClusterITS = min ; }
Expand All @@ -367,6 +371,7 @@ class AliEMCALRecoUtils : public TNamed {
void SetDCAToVertex2D(Bool_t b=kFALSE) { fCutDCAToVertex2D = b ; }
void SetRequireITSStandAlone(Bool_t b=kFALSE) {fCutRequireITSStandAlone = b;} //Marcel
void SetRequireITSPureStandAlone(Bool_t b=kFALSE){fCutRequireITSpureSA = b;}

// getters
Double_t GetMinTrackPt() const { return fCutMinTrackPt ; }
Int_t GetMinNClusterTPC() const { return fCutMinNClusterTPC ; }
Expand Down Expand Up @@ -433,6 +438,7 @@ class AliEMCALRecoUtils : public TNamed {
//Track matching
UInt_t fAODFilterMask; // Filter mask to select AOD tracks. Refer to $ALICE_ROOT/ANALYSIS/macros/AddTaskESDFilter.C
Bool_t fAODHybridTracks; // Match with hybrid
Bool_t fAODTPCOnlyTracks; // Match with TPC only tracks

TArrayI * fMatchedTrackIndex; // Array that stores indexes of matched tracks
TArrayI * fMatchedClusterIndex; // Array that stores indexes of matched clusters
Expand Down
13 changes: 9 additions & 4 deletions EVGEN/AliGenMUONLMR.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ ClassImp(AliGenMUONLMR)
fPt[i] = NULL;
fY[i] = NULL;
fMult[i] = NULL;
fDecay[i] = NULL;
fParticle[i] = NULL;
}
for (int i=0; i<3; i++) fDalitz[i] = NULL;
for (int i=0; i<3; i++) fMu[i] = NULL;

for (int i=0; i<2; i++) {
fMu[i] = NULL;
fDecay[i] = NULL;
}

for (int i=0; i<3; i++) {
fDalitz[i] = NULL;
}

}

//-----------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions ITS/UPGRADE/AliITSUAux.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
// //
///////////////////////////////////////////////////////////////////////

#define _ITSU_TUNING_MODE_

class AliITSUGeomTGeo;
class AliITSsegmentation;
using namespace TMath;



namespace AliITSUAux {
void BringTo02Pi(double &phi);
Bool_t OKforPhiMin(double phiMin,double phi);
Expand Down
3 changes: 3 additions & 0 deletions ITS/UPGRADE/AliITSUClusterPix.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ UInt_t AliITSUClusterPix::fgMode = 0;
//_____________________________________________________
AliITSUClusterPix::AliITSUClusterPix()
: fCharge(0)
, fRecoInfo(0)
, fNxNzN(0)
{
// default constructor
Expand All @@ -29,6 +30,7 @@ AliITSUClusterPix::~AliITSUClusterPix()
AliITSUClusterPix::AliITSUClusterPix(const AliITSUClusterPix& cluster)
:AliCluster(cluster)
,fCharge(cluster.fCharge)
,fRecoInfo(cluster.fRecoInfo)
,fNxNzN(cluster.fNxNzN)
{
// copy constructor
Expand All @@ -41,6 +43,7 @@ AliITSUClusterPix& AliITSUClusterPix::operator=(const AliITSUClusterPix& cluster
if(&cluster == this) return *this;
fNxNzN = cluster.fNxNzN;
fCharge = cluster.fCharge;
fRecoInfo = cluster.fRecoInfo;
TObject::operator=(cluster);
AliCluster::operator=(cluster);
return *this;
Expand Down
6 changes: 5 additions & 1 deletion ITS/UPGRADE/AliITSUClusterPix.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class AliITSUClusterPix : public AliCluster
virtual Bool_t IsEqual(const TObject* obj) const;
virtual Int_t Compare(const TObject* obj) const;
//
UShort_t GetRecoInfo() const {return fRecoInfo;}
void SetRecoInfo(UShort_t v) {fRecoInfo = v; ModClUsage(v>0);}
//
Bool_t HasCommonTrack(const AliCluster* cl) const;
//
static void SetGeom(AliITSUGeomTGeo* gm) {fgGeom = gm;}
Expand All @@ -85,12 +88,13 @@ class AliITSUClusterPix : public AliCluster
protected:
//
UShort_t fCharge; // charge (for MC studies only)
UShort_t fRecoInfo; //! space reserved for reco time manipulations
Int_t fNxNzN; // effective cluster size in X (1st byte) and Z (2nd byte) directions
// and total Npix(3d byte). 4th byte is used for clusters usage counter
static UInt_t fgMode; //! general mode (sorting mode etc)
static AliITSUGeomTGeo* fgGeom; //! pointer on the geometry data

ClassDef(AliITSUClusterPix,1)
ClassDef(AliITSUClusterPix,2)
};

//______________________________________________________
Expand Down
2 changes: 1 addition & 1 deletion ITS/UPGRADE/AliITSURecoLayer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void AliITSURecoLayer::Build()
} // ladders
//
}
///*

//______________________________________________________
Int_t AliITSURecoLayer::FindSensors(const double* impPar, AliITSURecoSens *sensors[AliITSURecoSens::kNNeighbors])
{
Expand Down
10 changes: 9 additions & 1 deletion ITS/UPGRADE/AliITSUSeed.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ AliITSUSeed::AliITSUSeed()
,fChi2Match(0)
,fChi2ITSSA(0)
,fParent(0)
#ifdef _ITSU_TUNING_MODE_ // this is used only for tuning histo filling
,fOrdBranch(0)
,fOrdCand(0)
#endif
{
// def c-tor
ResetFMatrix();
Expand All @@ -41,6 +45,10 @@ AliITSUSeed::AliITSUSeed(const AliITSUSeed& src)
,fChi2Match(src.fChi2Match)
,fChi2ITSSA(src.fChi2ITSSA)
,fParent(src.fParent)
#ifdef _ITSU_TUNING_MODE_ // this is used only for tuning histo filling
,fOrdBranch(src.fOrdBranch)
,fOrdCand(src.fOrdCand)
#endif
{
// def c-tor
for (int i=kNFElem;i--;) fFMatrix[i] = src.fFMatrix[i];
Expand Down Expand Up @@ -69,7 +77,7 @@ void AliITSUSeed::Print(Option_t* opt) const
{
// print seed info
int lr,cl = GetLrCluster(lr);
printf("%cLr%d Nchild: %3d Cl:%4d Chi2Glo:%7.2f(%7.2f) Chi2Cl:%7.2f Penalty: %7.2f Mtc:%6.2f Bwd:%6.2f",IsKilled() ? '-':' ',
printf("%cLr%d Nchild: %3d Cl:%4d Chi2Glo:%7.2f(%7.2f) Chi2Cl:%7.2f Penalty: %7.2f Mtc:%6.3f Bwd:%6.3f",IsKilled() ? '-':' ',
lr,GetNChildren(),cl,GetChi2Glo(),GetChi2GloNrm(),GetChi2Cl(), GetChi2Penalty(), GetChi2ITSTPC(), GetChi2ITSSA());
printf(" |");
int lrc=0;
Expand Down
Loading

0 comments on commit 297cfdc

Please sign in to comment.