//Put leading in AOD
particle->SetLeading(fLeadingChargeMom);
- particle->SetLeadingDetector("CTS");
+ particle->SetLeadingDetector(kCTS);
return kTRUE;
}
else
AliDebug(1,Form("Found Leading: pt %2.3f, phi %2.3f, eta %2.3f",fLeadingMom.Pt(),fLeadingMom.Phi()*TMath::RadToDeg(),fLeadingMom.Eta())) ;
//Put leading in AOD
particle->SetLeading(fLeadingPi0Mom);
- particle->SetLeadingDetector("EMCAL");
+ particle->SetLeadingDetector(kEMCAL);
return kTRUE;
}
}
//Get leading particle, fill histograms
fLeadingMom = particle->GetLeading();
- TString det = particle->GetLeadingDetector();
+ Int_t det = particle->GetLeadingDetector();
- if(det!="" && fLeadingMom.Pt() > 0)
+ if(det > 0 && fLeadingMom.Pt() > 0)
{
Double_t ptL = fLeadingMom.Pt();
Double_t phiL = fLeadingMom.Phi();
AliDebug(1,Form("Trigger with pt %3.2f, phi %2.2f, eta %2.2f", pt, phi, eta));
- if(det == "CTS")
+ if(det == kCTS)
{
fhChargedLeadingPt->Fill(pt,ptL);
fhChargedLeadingPhi->Fill(pt,phiL);
if(pt > 30) fhChargedLeadingDeltaPhiRatioPt30->Fill(TMath::Abs(phi-phiL),ptL/pt);
if(pt > 50) fhChargedLeadingDeltaPhiRatioPt50->Fill(TMath::Abs(phi-phiL),ptL/pt);
}
- else if(det== "EMCAL")
+ else if(det== kEMCAL)
{
fhNeutralLeadingPt->Fill(pt,ptL);
fhNeutralLeadingPhi->Fill(pt,phiL);
AliAODPWG4ParticleCorrelation * photon = NULL;
AliAODConversionPhoton * convParticle = dynamic_cast<AliAODConversionPhoton*>(convGamma->At(iPhot));
if (convParticle && BothTracksPresent(convParticle, tracks)) {
- photon = AddToAOD(convParticle, fAODPWG4Photons, "ConvGamma");
+ photon = AddToAOD(convParticle, fAODPWG4Photons, 2); //"ConvGamma");
} else {
continue;
AliAODPWG4ParticleCorrelation * pion = NULL;
AliAODConversionPhoton * convParticle = dynamic_cast<AliAODConversionPhoton*>(pions->At(iPhot));
if (convParticle && BothGammaPresent(convParticle, convGamma, tracks)) {
- pion = AddPionToAOD(convParticle, fAODPWG4Pi0, "ConvGamma");
+ pion = AddPionToAOD(convParticle, fAODPWG4Pi0, 2); //"ConvGamma");
} else {
continue;
///__________________________________________________________________________________
-AliAODPWG4ParticleCorrelation * AliAnalysisTaskGCPartToPWG4Part::AddToAOD(AliAODConversionPhoton * aodO, TClonesArray * branch, TString detector) {
+AliAODPWG4ParticleCorrelation * AliAnalysisTaskGCPartToPWG4Part::AddToAOD(AliAODConversionPhoton * aodO, TClonesArray * branch, Int_t detector) {
new((*branch)[branch->GetEntriesFast()]) AliAODPWG4ParticleCorrelation(aodO->Px(), aodO->Py(), aodO->Pz(), aodO->E());
AliAODPWG4ParticleCorrelation * photon = dynamic_cast<AliAODPWG4ParticleCorrelation*>(branch->Last());
if(photon) {
photon->SetTrackLabel(aodO->GetLabel1(), aodO->GetLabel2());
- photon->SetDetector(detector);
+ photon->SetDetectorTag(detector);
return photon;
} else {
return NULL;
///__________________________________________________________________________________
-AliAODPWG4ParticleCorrelation * AliAnalysisTaskGCPartToPWG4Part::AddPionToAOD(AliAODConversionPhoton * pion, TClonesArray * branch, TString detector) {
+AliAODPWG4ParticleCorrelation * AliAnalysisTaskGCPartToPWG4Part::AddPionToAOD(AliAODConversionPhoton * pion, TClonesArray * branch, Int_t detector) {
new((*branch)[branch->GetEntriesFast()]) AliAODPWG4ParticleCorrelation(pion->Px(), pion->Py(), pion->Pz(), pion->E());
AliAODPWG4ParticleCorrelation * pwg4Pion = dynamic_cast<AliAODPWG4ParticleCorrelation*>(branch->Last());
if(pwg4Pion) {
Int_t tl[4] = {-1, -1, -1, -1};
//pion->GetGrandChildren(photons, tl);
pwg4Pion->SetTrackLabel(tl[0], tl[1], tl[2], tl[3]);
- pwg4Pion->SetDetector(detector);
+ pwg4Pion->SetDetectorTag(detector);
for(Int_t i = 0; i < 4; i++) {
cout << tl[i] << " ";
}
TClonesArray * GetAODBranch(const AliAODEvent * aodEvent, TString branchName) const;
//Fill AOD tree with PWG4 particles
- AliAODPWG4ParticleCorrelation * AddToAOD(AliAODConversionPhoton * aodO, TClonesArray * branch, TString detector);
- AliAODPWG4ParticleCorrelation * AddPionToAOD(AliAODConversionPhoton * pion, TClonesArray * branch, TString detector);
+ AliAODPWG4ParticleCorrelation * AddToAOD(AliAODConversionPhoton * aodO, TClonesArray * branch, Int_t detector);
+ AliAODPWG4ParticleCorrelation * AddPionToAOD(AliAODConversionPhoton * pion, TClonesArray * branch, Int_t detector);
//Process conv gamma
void ProcessConvGamma( const AliAODEvent * const aodEvent );
AliAODPWG4Particle::AliAODPWG4Particle() :
AliVParticle(),
fMomentum(0),fPdg(-1), fTag(0), fLabel(-1),
-fCaloLabel(), fTrackLabel(),fDetector(""), fDetectorTag(0),
-fDisp(0), fTof(0), fCharged(0), fDecayTag(-1),
+fCaloLabel(), fTrackLabel(), fDetectorTag(-1),
fBadDist(0), fNLM(0), fM02(0),
-fIsolated(0), fLeadingParticle(0),
-fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(-1)
+fTime(0),fNCells(0),fSuperModule(0),
+fDecayTag(0),fIsolated(0), fLeadingParticle(0),
+fDisp(0), fTof(0), fCharged(0),
+fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(0)
{
// constructor
fCaloLabel [0] = -1;
//______________________________________________________________________________
AliAODPWG4Particle::AliAODPWG4Particle(Double_t px, Double_t py, Double_t pz, Double_t e):
AliVParticle(),
-fMomentum(0),fPdg(-1), fTag(0), fLabel(-1),
-fCaloLabel(), fTrackLabel(),fDetector(""), fDetectorTag(0),
-fDisp(0), fTof(0), fCharged(0), fDecayTag(-1),
-fBadDist(0), fNLM(0), fM02(0),
-fIsolated(0), fLeadingParticle(0),
-fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(-1)
+ fMomentum(0),fPdg(-1), fTag(0), fLabel(-1),
+ fCaloLabel(), fTrackLabel(), fDetectorTag(-1),
+ fBadDist(0), fNLM(0), fM02(0),
+ fTime(0),fNCells(0),fSuperModule(0),
+ fDecayTag(0),fIsolated(0), fLeadingParticle(0),
+ fDisp(0), fTof(0), fCharged(0),
+ fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(0)
{
// constructor
fMomentum = new TLorentzVector(px, py, pz, e);
//______________________________________________________________________________
AliAODPWG4Particle::AliAODPWG4Particle(TLorentzVector & p):
AliVParticle(),
-fMomentum(0),fPdg(-1), fTag(0), fLabel(-1),
-fCaloLabel(), fTrackLabel(),fDetector(""), fDetectorTag(0),
-fDisp(0), fTof(0), fCharged(0), fDecayTag(-1),
-fBadDist(0), fNLM(0), fM02(0),
-fIsolated(0), fLeadingParticle(0),
-fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(-1)
+ fMomentum(0),fPdg(-1), fTag(0), fLabel(-1),
+ fCaloLabel(), fTrackLabel(),fDetectorTag(-1),
+ fBadDist(0), fNLM(0), fM02(0),
+ fTime(0),fNCells(0),fSuperModule(0),
+ fDecayTag(0),fIsolated(0), fLeadingParticle(0),
+ fDisp(0), fTof(0), fCharged(0),
+ fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(0)
{
// constructor
fMomentum = new TLorentzVector(p);
AliAODPWG4Particle::AliAODPWG4Particle(const AliAODPWG4Particle& part) :
AliVParticle(part),
fMomentum(0), fPdg(part.fPdg), fTag(part.fTag), fLabel(part.fLabel),
- fCaloLabel(), fTrackLabel(), fDetector(part.fDetector), fDetectorTag(part.fDetectorTag),
- fDisp(part.fDisp), fTof(part.fTof), fCharged(part.fCharged), fDecayTag(part.fDecayTag),fBadDist(part.fBadDist),
- fNLM(part.fNLM), fM02(part.fM02), fIsolated(part.fIsolated), fLeadingParticle(part.fLeadingParticle),
+ fCaloLabel(), fTrackLabel(), fDetectorTag(part.fDetectorTag),
+ fBadDist(part.fBadDist),fNLM(part.fNLM), fM02(part.fM02),
+ fTime(part.fTime),fNCells(part.fNCells),fSuperModule(part.fSuperModule),
+ fDecayTag(part.fDecayTag),fIsolated(part.fIsolated), fLeadingParticle(part.fLeadingParticle),
+ fDisp(part.fDisp), fTof(part.fTof), fCharged(part.fCharged),
fTagged(part.fTagged), fFidArea(part.fFidArea), fInputFileIndex(part.fInputFileIndex),fBtag(part.fBtag)
{
// Copy constructor
fTrackLabel[1] = part.fTrackLabel[1];
fDetectorTag = part.fDetectorTag;
- fDetector = part.fDetector;
fDisp = part.fDisp;
fTof = part.fTof;
fCharged = part.fCharged;
void AliAODPWG4Particle::Print(Option_t* /*option*/) const
{
// Print information of all data members
+
printf("Particle 4-vector:\n");
printf(" E = %13.3f", E() );
printf(" Px = %13.3f", Px());
printf(" Py = %13.3f", Py());
printf(" Pz = %13.3f\n", Pz());
+ printf("Id PDG : %d\n",fPdg);
+ printf("MC Tag : %d\n",fTag);
+ printf("Dist. to bad channel : %d\n",fBadDist);
+
+ printf("Detector : %d, Labels:\n",fDetectorTag);
+ printf(" Calo: %d, %d \n",fCaloLabel[0],fCaloLabel[1]);
+ printf(" Track: %d, %d, %d, %d \n",fTrackLabel[0],fTrackLabel[1],fTrackLabel[2],fTrackLabel[3]);
+
+ if(fDetectorTag!=2) // Avoid tracks, AliFiducialCut::kCTS
+ {
+ printf("Calo param: \n");
+ printf(" M02: %2.3f\n",fM02);
+ printf(" NCell: %d\n",fNCells);
+ printf(" Time: %2.3f\n",fTime);
+ printf(" SModule: %d\n",fSuperModule);
+ }
+
+ printf("Tags: \n");
+// printf("Btag : %d\n",fBtag);
+ printf(" Pi0 Tag : %d\n",fDecayTag);
+ if(fIsolated) printf(" Isolated! \n");
+ if(fLeadingParticle) printf(" Leading! \n");
+
printf("PID bits :\n");
printf(" TOF : %d",fTof);
printf(" Charged : %d",fCharged);
printf(" Dispersion : %d\n",fDisp);
- printf("PDG : %d\n",fPdg);
- printf("Tag : %d\n",fTag);
- printf("Btag : %d\n",fBtag);
- printf("Pi0 Tag : %d\n",fDecayTag);
- printf("Dist. to bad channel : %d\n",fBadDist);
- printf("Fid Area : %d\n",fFidArea);
- printf("Input File Index : %d\n",fInputFileIndex);
- printf("Detector : %d\n",fDetectorTag);
- if(fIsolated) printf("Isolated! \n");
- if(fLeadingParticle) printf("Leading! \n");
+
+ // printf("Fid Area : %d\n",fFidArea);
+ // printf("Input File Index : %d\n",fInputFileIndex);
}
class AliAODPWG4Particle : public AliVParticle {
public:
+
AliAODPWG4Particle();
AliAODPWG4Particle(Double_t px, Double_t py, Double_t pz, Double_t e);
AliAODPWG4Particle(TLorentzVector & p);
virtual Int_t GetLabel() const { return fLabel ; }
virtual Int_t GetCaloLabel (Int_t i) const { return fCaloLabel[i] ; }
virtual Int_t GetTrackLabel(Int_t i) const { return fTrackLabel[i]; }
- virtual TString GetDetector() const { return fDetector ; }
virtual UInt_t GetDetectorTag() const { return fDetectorTag ; }
virtual Bool_t GetDispBit() const { return fDisp ; }
virtual Bool_t GetTOFBit() const { return fTof ; }
// Calorimeter specific param
virtual Int_t GetNLM() const { return fNLM ; }
virtual Float_t GetM02() const { return fM02 ; }
-
+ virtual Float_t GetTime() const { return fTime ; }
+ virtual Int_t GetNCells() const { return fNCells ; }
+ virtual Int_t GetSModNumber() const { return fSuperModule ; }
+
//
// Specific setters
virtual void SetIdentifiedParticleType(Int_t pdg) { fPdg = pdg ; }
virtual void SetTrackLabel(Int_t a, Int_t b, Int_t c, Int_t d)
{ fTrackLabel[0] = a; fTrackLabel[1] = b ; fTrackLabel[2] = c; fTrackLabel[3] = d; }
- virtual void SetDetector(TString d) { fDetector = d ; }
virtual void SetDetectorTag(UInt_t d) { fDetectorTag = d ; }
virtual void SetDispBit(Bool_t disp) { fDisp = disp ; }
virtual void SetTOFBit(Bool_t tof) { fTof = tof ; }
virtual void SetLeadingParticle(Bool_t l) { fLeadingParticle = l ; }
// Calorimeter specific param
- virtual void SetNLM(UInt_t nlm) { fNLM = nlm ; }
- virtual void SetM02(Float_t m02) { fM02 = m02 ; }
+ virtual void SetNLM (Int_t nlm) { fNLM = nlm ; }
+ virtual void SetM02 (Float_t m02) { fM02 = m02 ; }
+ virtual void SetTime (Float_t tim) { fTime = tim ; }
+ virtual void SetNCells(Int_t nce) { fNCells = nce ; }
+ virtual void SetSModNumber(Int_t sm) { fSuperModule = sm ; }
//
// BTagging
}
private:
+
TLorentzVector* fMomentum; // Photon 4-momentum vector
Int_t fPdg ; // type of identified particle, same code as PDG, but this is not a MonteCarlo particle
Int_t fTag ; // tag of particle (decay, fragment, prompt photon), MC
Int_t fLabel ; // MC label
Int_t fCaloLabel[2]; // CaloCluster index, 1 for photons, 2 for pi0.
Int_t fTrackLabel[4]; // Track lable, 1 for pions, 2 for conversion photons
- TString fDetector ; // Detector where particle was measured.
UInt_t fDetectorTag ; // Detector where particle was measured, integer
- Bool_t fDisp ; // Dispersion bit
- Bool_t fTof ; // TOF bit
- Bool_t fCharged ; // Charged bit
- Int_t fDecayTag; // Tag the photon as decay from, pi0, eta, pi0 side band, eta side band
+
+ // Calo specific
Int_t fBadDist ; // Distance to bad module in module units
UInt_t fNLM ; // Store the number of local maxima
Float_t fM02 ; // Store the main axis of the calorimeter shower shape
+ Float_t fTime; // Store the time of cluster or track, nano seconds
+ Int_t fNCells; // Store the number of cells in cluster
+ Int_t fSuperModule; // Store the super-module number of cluster
+
+ // Tags
+ Int_t fDecayTag; // Tag the photon as decay from, pi0, eta, pi0 side band, eta side band
Bool_t fIsolated ; // Particle is isolated or not
Bool_t fLeadingParticle ; //Particle is leading or not
+ // PID bits
+ Bool_t fDisp ; // Dispersion bit
+ Bool_t fTof ; // TOF bit
+ Bool_t fCharged ; // Charged bit
+
// Not in use currently ...
Bool_t fTagged ; // If photon tagged (pi0 decay), not used anymore, replace by fDecayTag
Int_t fFidArea ; // Type of fiducial area hit by this photon
Int_t fBtag; // tag particle from B.
- ClassDef(AliAODPWG4Particle, 5);
+ ClassDef(AliAODPWG4Particle, 6);
};
inline Double_t AliAODPWG4Particle::Phi() const
//______________________________________________________________________________
AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation() :
AliAODPWG4Particle(),
- fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0),
+ fLeadingDetector(-1), fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0),
fListOfObjArrays(0)
{
// constructor
//______________________________________________________________________________
AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e):
AliAODPWG4Particle(),
- fLeadingDetector(""), fLeading(), fCorrJet(),
+ fLeadingDetector(-1), fLeading(), fCorrJet(),
fCorrBkg(), fRefJet(0), fListOfObjArrays(new TList)
{
// constructor
//______________________________________________________________________________
AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(TLorentzVector & p):
AliAODPWG4Particle(p),
- fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0), fListOfObjArrays(new TList)
+ fLeadingDetector(-1), fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0), fListOfObjArrays(new TList)
{
// constructor
fListOfObjArrays->SetOwner(kTRUE);
//______________________________________________________________________________
AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(AliAODPWG4Particle & p):
AliAODPWG4Particle(p),
- fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(),fRefJet(0), fListOfObjArrays(new TList)
+ fLeadingDetector(-1), fLeading(), fCorrJet(), fCorrBkg(),fRefJet(0), fListOfObjArrays(new TList)
{
// constructor
fListOfObjArrays->SetOwner(kTRUE);
if(GetJet()) GetJet()->Print("");
- printf("Leading Detector : %s\n",fLeadingDetector.Data());
+ printf("Leading Detector : %d\n",fLeadingDetector);
printf("Leading Particle 4-vector:\n");
printf(" E = %13.3f", fLeading.E() );
printf(" Px = %13.3f", fLeading.Px());
class AliAODPWG4ParticleCorrelation : public AliAODPWG4Particle {
public:
+
AliAODPWG4ParticleCorrelation();
AliAODPWG4ParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e);
AliAODPWG4ParticleCorrelation(TLorentzVector & p);
virtual ~AliAODPWG4ParticleCorrelation();
virtual void Clear(const Option_t* /*opt*/);
- AliAODPWG4ParticleCorrelation(const AliAODPWG4ParticleCorrelation& photon);
+ AliAODPWG4ParticleCorrelation( const AliAODPWG4ParticleCorrelation& photon);
+
private:
+
AliAODPWG4ParticleCorrelation& operator=(const AliAODPWG4ParticleCorrelation& photon);
public:
- virtual TObjArray* GetObjArray(TString refname) const { if(fListOfObjArrays) return (TObjArray*) fListOfObjArrays->FindObject(refname);
- else return 0x0;}
- virtual TList* GetObjArrayList() const { return fListOfObjArrays; }
- virtual void AddObjArray(TObjArray * refarray) { fListOfObjArrays->Add(refarray); }
+ virtual TObjArray* GetObjArray(TString refname) const
+ { if(fListOfObjArrays) return (TObjArray*) fListOfObjArrays->FindObject(refname);
+ else return 0x0 ; }
+
+ virtual TList* GetObjArrayList() const { return fListOfObjArrays; }
+ virtual void AddObjArray(TObjArray * refarray) { fListOfObjArrays->Add(refarray); }
- virtual TString GetLeadingDetector() const {return fLeadingDetector ; }
- virtual void SetLeadingDetector(TString d) {fLeadingDetector = d ; }
+ virtual Int_t GetLeadingDetector() const { return fLeadingDetector ; }
+ virtual void SetLeadingDetector(Int_t d) { fLeadingDetector = d ; }
- virtual TLorentzVector GetLeading() const { return fLeading;}
- virtual void SetLeading(TLorentzVector lead) {fLeading = lead;}
+ virtual TLorentzVector GetLeading() const { return fLeading ; }
+ virtual void SetLeading(TLorentzVector lead) { fLeading = lead ; }
- virtual TLorentzVector GetCorrelatedJet() const { return fCorrJet;}
- virtual void SetCorrelatedJet(TLorentzVector jet) {fCorrJet = jet;}
+ virtual TLorentzVector GetCorrelatedJet() const { return fCorrJet ; }
+ virtual void SetCorrelatedJet(TLorentzVector jet) { fCorrJet = jet ; }
- virtual TLorentzVector GetCorrelatedBackground() const { return fCorrBkg;}
- virtual void SetCorrelatedBackground(TLorentzVector bkg) {fCorrBkg = bkg;}
+ virtual TLorentzVector GetCorrelatedBackground() const { return fCorrBkg ; }
+ virtual void SetCorrelatedBackground(TLorentzVector bkg) { fCorrBkg = bkg ; }
- virtual void SetRefJet(AliAODJet* jet) { fRefJet = jet;}
- virtual AliAODJet* GetJet() const {return ((AliAODJet*) fRefJet.GetObject());}
- virtual TRef GetRefJet() const {return fRefJet;}
+ virtual void SetRefJet(AliAODJet* jet) { fRefJet = jet ; }
+ virtual AliAODJet* GetJet() const { return ((AliAODJet*) fRefJet.GetObject()) ; }
+ virtual TRef GetRefJet() const { return fRefJet;}
virtual void Print(Option_t* /*option*/) const;
private:
- TString fLeadingDetector; // Detector where leading particle was measured.
+ Int_t fLeadingDetector; // Detector where leading particle was measured.
TLorentzVector fLeading; // Leading Particle 4-momentum vector
TLorentzVector fCorrJet; // Jet 4-momentum vector
TLorentzVector fCorrBkg; // Background 4-momentum vector
TRef fRefJet; // Reference to jet found with JETAN and correlated with particle
TList * fListOfObjArrays ; // List with correlation reference arrays
- ClassDef(AliAODPWG4ParticleCorrelation, 5);
+ ClassDef(AliAODPWG4ParticleCorrelation, 6);
};