Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-29 07:05:49

0001 /**
0002  \file
0003  Declaration of class Smear::PerfectId.
0004  
0005  \author    Michael Savastio
0006  \date      2011-08-19
0007  \copyright 2011 Brookhaven National Lab
0008  */
0009 
0010 #ifndef INCLUDE_EICSMEAR_SMEAR_PERFECTID_H_
0011 #define INCLUDE_EICSMEAR_SMEAR_PERFECTID_H_
0012 
0013 #include <set>
0014 #include <vector>
0015 
0016 #include "eicsmear/smear/Smearer.h"
0017 
0018 namespace Smear {
0019 
0020 /**
0021  Smearer that copies the PDG ID of a particle to a smeared particle
0022  with no modification.
0023  Use this to represent perfect particle identification performance,
0024  or if you don't care about modelling ID performance but want PID copied to
0025  the output smeared tree.
0026  */
0027 class PerfectID : public Smearer {
0028  public:
0029   /**
0030    Constructor
0031    @param pdg [in] An optional list of PDG codes with which the PerfectID
0032    works. The ID will not be copied for particles with other PDG codes.
0033    If the list is empty the PerfectID operates on all PDG codes.
0034    */
0035   PerfectID(const std::vector<Int_t>& pdg = std::vector<int>());
0036 
0037   /**
0038    Destructor.
0039    */
0040   virtual ~PerfectID();
0041 
0042   /**
0043    Returns a new copy of this object.
0044    The argument has no effect.
0045    */
0046   virtual PerfectID* Clone(const char* = "") const;
0047 
0048   /**
0049    Copies the PDG code from the ParticleMC to the ParticleMCS if either
0050    the PDG code is in the initialisation list or if the list was empty.
0051    Otherwise, does nothing.
0052    */
0053   virtual void Smear(const erhic::VirtualParticle&, ParticleMCS&);
0054 
0055   /**
0056    Prints information about this object.
0057    */
0058   virtual void Print(Option_t* = "") const;
0059 
0060   /**
0061    Add a PDG code to the list.
0062    */
0063   virtual void Insert(Int_t);
0064 
0065  protected:
0066   /// PDG codes to copy. Does not operate on particles with other codes.
0067   std::set<Int_t> mPdg;
0068 
0069   ClassDef(Smear::PerfectID, 1)
0070 };
0071 
0072 }  // namespace Smear
0073 
0074 #endif  // INCLUDE_EICSMEAR_SMEAR_PERFECTID_H_