]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
move string data members to int; add more calo specific information: time, ncells...
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Mon, 27 Oct 2014 11:12:40 +0000 (12:12 +0100)
committermorsch <andreas.morsch@cern.ch>
Mon, 27 Oct 2014 21:04:00 +0000 (22:04 +0100)
PWGGA/CaloTrackCorrelations/AliAnaParticleJetLeadingConeCorrelation.cxx
PWGGA/GammaConv/AliAnalysisTaskGCPartToPWG4Part.cxx
PWGGA/GammaConv/AliAnalysisTaskGCPartToPWG4Part.h
STEER/AOD/AliAODPWG4Particle.cxx
STEER/AOD/AliAODPWG4Particle.h
STEER/AOD/AliAODPWG4ParticleCorrelation.cxx
STEER/AOD/AliAODPWG4ParticleCorrelation.h

index 283dbc16f39f13f5984e4ca5b1792dfb6136ad27..777942e68c4f7df92691c234ad6af3f5b434061e 100755 (executable)
@@ -662,7 +662,7 @@ Bool_t  AliAnaParticleJetLeadingConeCorrelation::GetLeadingParticle(AliAODPWG4Pa
       
       //Put leading in AOD
       particle->SetLeading(fLeadingChargeMom);
-      particle->SetLeadingDetector("CTS");
+      particle->SetLeadingDetector(kCTS);
       return kTRUE;
     }
     else
@@ -674,7 +674,7 @@ Bool_t  AliAnaParticleJetLeadingConeCorrelation::GetLeadingParticle(AliAODPWG4Pa
       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;
     }
   }
@@ -1135,9 +1135,9 @@ void  AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillHistograms()
     
     //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();
@@ -1146,7 +1146,7 @@ void  AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillHistograms()
       
       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);
@@ -1159,7 +1159,7 @@ void  AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillHistograms()
         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);
index e39223c8c80eec10ad6079f2a8b9d09542565b28..f4607568c902ead9a546dca9fd16121c3e631219 100644 (file)
@@ -144,7 +144,7 @@ void AliAnalysisTaskGCPartToPWG4Part::ProcessConvGamma( const AliAODEvent * cons
     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;
@@ -167,7 +167,7 @@ void AliAnalysisTaskGCPartToPWG4Part::ProcessConvGamma( const AliAODEvent * cons
     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;
@@ -187,12 +187,12 @@ void AliAnalysisTaskGCPartToPWG4Part::ProcessConvGamma( const AliAODEvent * cons
 
 
 ///__________________________________________________________________________________
-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;
@@ -202,14 +202,14 @@ AliAODPWG4ParticleCorrelation * AliAnalysisTaskGCPartToPWG4Part::AddToAOD(AliAOD
 
 
 ///__________________________________________________________________________________
-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] << " ";
     }
index 721dad5235a8fdc102095a803f77bf323c4a881d..6ff93aabddfdf0e5af49af7aa934e1486f070e2d 100644 (file)
@@ -56,8 +56,8 @@ public:
   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 );
 
index 8e9293e031133c76c019b9f8283cb375ffd6059b..95d27114f13357c4d2cb65a85f53ba50de79413a 100755 (executable)
@@ -34,11 +34,12 @@ ClassImp(AliAODPWG4Particle)
 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;
@@ -52,12 +53,13 @@ fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(-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);
@@ -73,12 +75,13 @@ fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(-1)
 //______________________________________________________________________________
 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);
@@ -110,9 +113,11 @@ void AliAODPWG4Particle::Clear(const Option_t* /*opt*/)
 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
@@ -142,7 +147,6 @@ AliAODPWG4Particle& AliAODPWG4Particle::operator=(const AliAODPWG4Particle & par
     fTrackLabel[1] = part.fTrackLabel[1];
     
     fDetectorTag = part.fDetectorTag;
-    fDetector = part.fDetector;
     fDisp     = part.fDisp;
     fTof      = part.fTof;
     fCharged  = part.fCharged;
@@ -191,24 +195,41 @@ Bool_t AliAODPWG4Particle::IsPIDOK(const Int_t ipid, const Int_t pdgwanted) cons
 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);
 
 }
index a7bfedf7f183fc0b305e077939a8aa2027a43f9e..a8bd241b9ee34a70b12bf6f6b669eceb404b6188 100755 (executable)
@@ -22,6 +22,7 @@ class TString;
 class AliAODPWG4Particle : public AliVParticle {
   
  public:
+  
   AliAODPWG4Particle();
   AliAODPWG4Particle(Double_t px, Double_t py, Double_t pz, Double_t e);
   AliAODPWG4Particle(TLorentzVector & p);
@@ -73,7 +74,6 @@ class AliAODPWG4Particle : public AliVParticle {
   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          ; }
@@ -92,7 +92,10 @@ class AliAODPWG4Particle : public AliVParticle {
   // 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 ; }
@@ -103,7 +106,6 @@ class AliAODPWG4Particle : public AliVParticle {
   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  ; }
@@ -120,8 +122,11 @@ class AliAODPWG4Particle : public AliVParticle {
   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
@@ -143,24 +148,33 @@ class AliAODPWG4Particle : public AliVParticle {
   }
   
  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
@@ -168,7 +182,7 @@ class AliAODPWG4Particle : public AliVParticle {
   Int_t      fBtag;          // tag particle from B.
 
   
-  ClassDef(AliAODPWG4Particle, 5);
+  ClassDef(AliAODPWG4Particle, 6);
 };
 
 inline Double_t AliAODPWG4Particle::Phi() const
index 8e55b63a370ef7c69ce7f30f2b85836299c32567..702f2ac2593e65c87f6b347b06083c4c610635d6 100755 (executable)
@@ -35,7 +35,7 @@ ClassImp(AliAODPWG4ParticleCorrelation)
 //______________________________________________________________________________
  AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation() :
    AliAODPWG4Particle(),
-   fLeadingDetector(""), fLeading(), fCorrJet(),  fCorrBkg(), fRefJet(0),
+   fLeadingDetector(-1), fLeading(), fCorrJet(),  fCorrBkg(), fRefJet(0),
    fListOfObjArrays(0)
 {
   // constructor
@@ -44,7 +44,7 @@ ClassImp(AliAODPWG4ParticleCorrelation)
 //______________________________________________________________________________
 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
@@ -56,7 +56,7 @@ AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(Double_t px, Double
 //______________________________________________________________________________
 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);
@@ -66,7 +66,7 @@ AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(TLorentzVector & p)
 //______________________________________________________________________________
 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);
@@ -132,7 +132,7 @@ void AliAODPWG4ParticleCorrelation::Print(Option_t* /*option*/) const
 
   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());
index e5862e6431454536f85e61af5dd345c182d13366..a2b25ecdb12059f484b91f17eeffba675bebf0ed 100755 (executable)
@@ -25,6 +25,7 @@
 class AliAODPWG4ParticleCorrelation : public AliAODPWG4Particle {
 
  public:
+  
   AliAODPWG4ParticleCorrelation();
   AliAODPWG4ParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e);
   AliAODPWG4ParticleCorrelation(TLorentzVector & p);  
@@ -33,43 +34,47 @@ class AliAODPWG4ParticleCorrelation : public AliAODPWG4Particle {
   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);
 };