+//_________________________________________________________________________
+// Utility Class for transverse energy studies
+// Selector Base class for PHOS
+// -
+// implementation file
+//
+//*-- Authors: Oystein Djuvsland (Bergen)
+//_________________________________________________________________________
#include "AliAnalysisEtSelectorPhos.h"
#include "AliAnalysisEtCuts.h"
#include "AliESDCaloCluster.h"
,fBadMapM2(0)
,fBadMapM3(0)
,fBadMapM4(0)
-,fInitialized(kFALSE)
,fMatrixInitialized(kFALSE)
{
}
TRefArray* AliAnalysisEtSelectorPhos::GetClusters()
-{
+{ // Get clusters
if(!fClusterArray) fClusterArray = new TRefArray;
if(fClusterArray)
}
Int_t AliAnalysisEtSelectorPhos::Init(const AliESDEvent* event)
-{
+{ // Init
AliAnalysisEtSelector::Init(event);
Printf("Initializing selector for run: %d", event->GetRunNumber());
return 0;
}
-Bool_t AliAnalysisEtSelectorPhos::CutMinEnergy(const AliESDCaloCluster& cluster) const
+Bool_t AliAnalysisEtSelectorPhos::PassMinEnergyCut(const AliESDCaloCluster& cluster) const
{
+
+// std::cout << fCuts->GetReconstructedPhosClusterEnergyCut();
return cluster.E() > fCuts->GetReconstructedPhosClusterEnergyCut();
}
-Bool_t AliAnalysisEtSelectorPhos::CutMinEnergy(const TParticle& part) const
+Bool_t AliAnalysisEtSelectorPhos::PassMinEnergyCut(const TParticle& part) const
{
+// std::cout << fCuts->GetReconstructedPhosClusterEnergyCut();
return part.Energy() > fCuts->GetReconstructedPhosClusterEnergyCut();
}
-Bool_t AliAnalysisEtSelectorPhos::CutDistanceToBadChannel(const AliESDCaloCluster& cluster) const
-{
+Bool_t AliAnalysisEtSelectorPhos::PassDistanceToBadChannelCut(const AliESDCaloCluster& cluster) const
+{ // cut distance to bad channel
if(!fMatrixInitialized)
{
Printf("Misalignment matrices are not initialized");
TVector3 glVec(gPos);
fGeoUtils->GlobalPos2RelId(glVec, relId);
+ //std::cout << "In phos distance to bad channel cut!" << std::endl;
TVector3 locVec;
fGeoUtils->Global2Local(locVec, glVec, relId[0]);
// std::cout << fGeoUtils << std::endl;
}
-Bool_t AliAnalysisEtSelectorPhos::CutTrackMatching(const AliESDCaloCluster& cluster) const
-{
+Bool_t AliAnalysisEtSelectorPhos::PassTrackMatchingCut(const AliESDCaloCluster& cluster) const
+{ // cut track matching
if(!fMatrixInitialized)
{
// cluster->GetTrackDx(), cluster->GetTrackDz(), event->GetTrack(trackMatchedIndex)->Pt(), event->GetTrack(trackMatchedIndex)->Charge(), ev
Int_t nTracksMatched = cluster.GetNTracksMatched();
- if(nTracksMatched == 0) return kFALSE;
+ if(nTracksMatched == 0) return kTRUE;
Int_t trackMatchedIndex = cluster.GetTrackMatchedIndex();
if(trackMatchedIndex < 0) return kTRUE;
}
int AliAnalysisEtSelectorPhos::LoadGeometry()
-{
+{ // load geometry
fGeoUtils = AliPHOSGeometry::GetInstance("IHEP");
// ifstream f("badchannels.txt", ios::in);
}
int AliAnalysisEtSelectorPhos::LoadBadMaps()
-{
+{ // load bad maps
TFile *f = TFile::Open("badchannels.root", "READ");
if(!f)
}
-void AliAnalysisEtSelectorPhos::SetEvent(const AliESDEvent* event)
-{
- //AliAnalysisEtSelector::SetEvent(event);
- fEvent = event;
- if(!fInitialized) Init(event);
-}
Bool_t AliAnalysisEtSelectorPhos::CutGeometricalAcceptance(const TParticle& part) const
{
track.Phi() > fCuts->GetGeometryPhosPhiAccMaxCut()*TMath::Pi()/180. &&
track.Phi() < fCuts->GetGeometryPhosPhiAccMinCut()*TMath::Pi()/180.;
}
+