Added possibility to process only charged particles (without smearing and TPC accepta...
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Sep 2009 09:04:53 +0000 (09:04 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Sep 2009 09:04:53 +0000 (09:04 +0000)
JETAN/AliJetKineReader.cxx
JETAN/AliJetKineReaderHeader.cxx
JETAN/AliJetKineReaderHeader.h
JETAN/testFastJet.C

index c46fbf2..4fd19fb 100644 (file)
@@ -111,6 +111,15 @@ Bool_t AliJetKineReader::FillMomentumArray()
        Float_t p0      = p;
        Float_t eta     = part->Eta();
        Float_t phi     = part->Phi();
+
+
+       if (((AliJetKineReaderHeader*)fReaderHeader)->ChargedOnly()) {
+           // Charged particles only
+           Float_t charge = 
+               TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
+           if (charge == 0)               continue;
+       } // End charged only
+
        
        // Fast simulation of TPC if requested
        if (((AliJetKineReaderHeader*)fReaderHeader)->FastSimTPC()) {
index 2557fe1..fb73fab 100644 (file)
@@ -29,7 +29,8 @@ ClassImp(AliJetKineReaderHeader)
 AliJetKineReaderHeader::AliJetKineReaderHeader():
   AliJetReaderHeader("AliJetKineReaderHeader"),
   fFastSimTPC(kFALSE),
-  fFastSimEMCAL(kFALSE)
+  fFastSimEMCAL(kFALSE),
+  fChargedOnly(kFALSE)
 {
   // Default constructor
 
index e190359..ff4c13c 100644 (file)
@@ -20,18 +20,21 @@ class AliJetKineReaderHeader : public AliJetReaderHeader
   // Setters
   void SetFastSimTPC(Bool_t flag = kTRUE) {fFastSimTPC = flag;} // if TPC fast simulation
   void SetFastSimEMCAL(Bool_t flag = kTRUE) {fFastSimEMCAL = flag;} // if EMCAL fast simulation
+  void SetChargedOnly(Bool_t flag = kTRUE) {fChargedOnly = flag;} // for charged particles only, no smearing and no acceptance cuts
 
   // Getter
   Bool_t  FastSimTPC() const  {return fFastSimTPC;}
   Bool_t  FastSimEMCAL() const  {return fFastSimEMCAL;}
+  Bool_t  ChargedOnly() const  {return fChargedOnly;}
 
          
  protected:
   //parameters set by user
   Bool_t fFastSimTPC;
   Bool_t fFastSimEMCAL;
+  Bool_t fChargedOnly;
 
-  ClassDef(AliJetKineReaderHeader,1);
+  ClassDef(AliJetKineReaderHeader,2);
 };
  
 #endif
index 82d70d5..cd3f6a6 100644 (file)
@@ -7,7 +7,7 @@ void testFastJet(const char* file="testdata.dat")
       gSystem->Load("libVMC.so");
       gSystem->Load("libPhysics.so");
 
-      gSystem->Load("libCGAL.so");
+      gSystem->Load("libCGAL.dylib");
 
       gSystem->Load("libfastjet.so");
       gSystem->Load("libSISConePlugin.so");