LCOV - code coverage report
Current view: top level - STEER/AOD - AliAODPWG4ParticleCorrelation.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 48 2.1 %
Date: 2016-06-14 17:26:59 Functions: 1 16 6.2 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
       3             :  *                                                                        *
       4             :  * Author: The ALICE Off-line Project.                                    *
       5             :  * Contributors are mentioned in the code where appropriate.              *
       6             :  *                                                                        *
       7             :  * Permission to use, copy, modify and distribute this software and its   *
       8             :  * documentation strictly for non-commercial purposes is hereby granted   *
       9             :  * without fee, provided that the above copyright notice appears in all   *
      10             :  * copies and that both the copyright notice and this permission notice   *
      11             :  * appear in the supporting documentation. The authors make no claims     *
      12             :  * about the suitability of this software for any purpose. It is          *
      13             :  * provided "as is" without express or implied warranty.                  *
      14             :  **************************************************************************/
      15             : 
      16             : #include "AliAODPWG4ParticleCorrelation.h"
      17             : #include "AliAODJet.h"
      18             : 
      19             : /// \cond CLASSIMP
      20         170 : ClassImp(AliAODPWG4ParticleCorrelation)
      21             : /// \endcond
      22             : 
      23             : //______________________________________________________________________________
      24             : ///
      25             : /// Default Constructor.
      26             : ///
      27             :  AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation() :
      28           0 :    AliAODPWG4Particle(),
      29           0 :    fLeadingDetector(-1), fLeading(), fCorrJet(),  fCorrBkg(), fRefJet(0),
      30           0 :    fListOfObjArrays(0)
      31           0 : {
      32           0 : }
      33             : 
      34             : //______________________________________________________________________________
      35             : ///
      36             : /// Constructor.
      37             : ///
      38             : /// \param px particle momentum in x
      39             : /// \param py particle momentum in y
      40             : /// \param pz particle momentum in z
      41             : /// \param e particle energy
      42             : ///
      43             : /// particle: cluster or track
      44             : ///
      45             : AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e):
      46           0 :   AliAODPWG4Particle(),
      47           0 :   fLeadingDetector(-1),  fLeading(), fCorrJet(),
      48           0 :   fCorrBkg(), fRefJet(0),  fListOfObjArrays(new TList)
      49           0 : {
      50           0 :   SetMomentum(new TLorentzVector(px, py, pz, e));
      51             :   
      52           0 :   fListOfObjArrays->SetOwner(kTRUE);
      53           0 : }
      54             : 
      55             : //______________________________________________________________________________
      56             : ///
      57             : /// Constructor.
      58             : ///
      59             : /// \param p: TLorentzVector of particle kinematics.
      60             : ///
      61             : /// particle: cluster or track
      62             : ///
      63             : AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(TLorentzVector & p):
      64           0 :   AliAODPWG4Particle(p),
      65           0 :   fLeadingDetector(-1),  fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0), fListOfObjArrays(new TList)
      66           0 : {
      67           0 :   fListOfObjArrays->SetOwner(kTRUE);
      68           0 : }
      69             : 
      70             : //______________________________________________________________________________
      71             : ///
      72             : /// Constructor.
      73             : ///
      74             : /// \param p: AliAODPWG4Particle of particle kinematics and detector other inputs.
      75             : ///
      76             : /// particle: cluster or track
      77             : ///
      78             : AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(AliAODPWG4Particle & p):
      79           0 :   AliAODPWG4Particle(p),
      80           0 :   fLeadingDetector(-1),  fLeading(), fCorrJet(), fCorrBkg(),fRefJet(0), fListOfObjArrays(new TList)
      81           0 : {
      82           0 :   fListOfObjArrays->SetOwner(kTRUE);
      83           0 : }
      84             : 
      85             : //______________________________________________________________________________
      86             : ///
      87             : /// Destructor.
      88             : ///
      89             : AliAODPWG4ParticleCorrelation::~AliAODPWG4ParticleCorrelation() 
      90           0 : {
      91           0 :   if(fListOfObjArrays)
      92             :   {
      93           0 :     fListOfObjArrays->Clear();
      94           0 :     delete   fListOfObjArrays ;
      95             :   }
      96           0 : }
      97             : 
      98             : //______________________________________________________________________________
      99             : ///
     100             : /// Clear object.
     101             : ///
     102             : void AliAODPWG4ParticleCorrelation::Clear(const Option_t* /*opt*/) 
     103             : {  
     104           0 :   AliAODPWG4Particle::Clear(""); //delete fMomentum
     105             :   
     106           0 :   if(fListOfObjArrays)
     107             :   {
     108           0 :     fListOfObjArrays->Clear();
     109           0 :     delete   fListOfObjArrays ;
     110             :   }
     111           0 : }
     112             : 
     113             : 
     114             : //______________________________________________________________________________
     115             : ///
     116             : /// Copy constructor
     117             : ///
     118             : AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(const AliAODPWG4ParticleCorrelation& part) :
     119           0 :   AliAODPWG4Particle(part), fLeadingDetector(part.fLeadingDetector), fLeading(part.fLeading),  
     120           0 :   fCorrJet(part.fCorrJet), fCorrBkg(part.fCorrBkg), fRefJet(part.fRefJet),   
     121           0 :   fListOfObjArrays(new TList)
     122           0 : {
     123           0 : }
     124             : 
     125             : //______________________________________________________________________________
     126             : ///
     127             : /// Assignment operator
     128             : ///
     129             : //AliAODPWG4ParticleCorrelation& AliAODPWG4ParticleCorrelation::operator=(const AliAODPWG4ParticleCorrelation& part)
     130             : //{
     131             : //  if(this!=&part) 
     132             : //  {
     133             : //    fRefJet   = part.fRefJet ;
     134             : //    fLeading  = part.fLeading;
     135             : //    fCorrJet  = part.fCorrJet ;
     136             : //    fCorrBkg  = part.fCorrBkg; 
     137             : //    fListOfObjArrays = fListOfObjArrays;
     138             : //  }
     139             : //  return *this;
     140             : //}
     141             : 
     142             : //______________________________________________________________________________
     143             : ///
     144             : /// Print information of all data members.
     145             : ///
     146             : void AliAODPWG4ParticleCorrelation::Print(Option_t* /*option*/) const 
     147             : {
     148           0 :   AliAODPWG4Particle::Print("");
     149             : 
     150           0 :   if(GetJet()) GetJet()->Print("");
     151             : 
     152           0 :   printf("Leading Detector : %d\n",fLeadingDetector);
     153           0 :   printf("Leading Particle 4-vector:\n");
     154           0 :   printf("     E  = %13.3f",   fLeading.E() );
     155           0 :   printf("     Px = %13.3f",   fLeading.Px());
     156           0 :   printf("     Py = %13.3f",   fLeading.Py());
     157           0 :   printf("     Pz = %13.3f\n", fLeading.Pz());
     158             : 
     159           0 :   if( fListOfObjArrays)   fListOfObjArrays->Print("");
     160           0 : }

Generated by: LCOV version 1.11