CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CosmicGenFilterHelix.h
Go to the documentation of this file.
1 
18 
22 
25 
30 
32 
33 #include <TObjArray.h>
34 
35 #include <vector>
36 
37 class MagneticField;
38 class Propagator;
39 
41  public:
43  virtual ~CosmicGenFilterHelix();
44 
45  virtual void beginJob();
46  virtual bool filter(edm::Event &event, const edm::EventSetup &eventSetup);
47  virtual void endJob();
48 
49  private:
51  bool propagateToCutCylinder(const GlobalPoint &vertStart, const GlobalVector &momStart,
52  int charge, const MagneticField *field,
53  const Propagator *propagator); //non-const: monitorEnd
55  bool charge(int id, int &charge) const;
58  const Propagator* getPropagator(const edm::EventSetup &setup) const;
59 // ----------member data ---------------------------
60 
62  const std::vector<int> theIds;
63  const std::vector<int> theCharges;
64  const std::string thePropagatorName; // tag to get propagator from ESetup
65  const double theMinP2;
66  const double theMinPt2;
67 
71 
72  unsigned int theNumTotal;
73  unsigned int theNumPass;
74 
75  // for monitoring:
76  void createHistsStart(const char *dirName, TObjArray &hists);
77  void createHistsEnd(const char *dirName, TObjArray &hists);
78  void monitorStart(const GlobalPoint &vert, const GlobalVector &mom, int charge,TObjArray &hists);
79  void monitorEnd(const GlobalPoint &endVert, const GlobalVector &endMom,
80  const GlobalPoint &vert, const GlobalVector &mom, double path, TObjArray &hists);
81  bool equidistLogBins(double* bins, int nBins, double first, double last) const;
82  const bool theDoMonitor;
83  TObjArray theHistsBefore;
84  TObjArray theHistsAfter;
85 
86 };
Cylinder::ConstCylinderPointer theTargetCylinder
minimal transverse^2 momentum after propagation to cylinder
unsigned int theNumPass
for final statistics: all seen events
Plane::ConstPlanePointer theTargetPlaneMax
plane closing cylinder at &#39;negative&#39; side
const double theMinPt2
minimal momentum^2 after propagation to cylinder
const std::vector< int > theIds
const Propagator * getPropagator(const edm::EventSetup &setup) const
TObjArray theHistsAfter
hists of properties from generator
void createHistsStart(const char *dirName, TObjArray &hists)
for final statistics: events with track reaching target
const MagneticField * getMagneticField(const edm::EventSetup &setup) const
provide magnetic field from Event Setup
bool propagateToCutCylinder(const GlobalPoint &vertStart, const GlobalVector &momStart, int charge, const MagneticField *field, const Propagator *propagator)
actually propagate to the defined cylinder
edm::EDGetTokenT< edm::HepMCProduct > theSrcToken
void monitorEnd(const GlobalPoint &endVert, const GlobalVector &endMom, const GlobalPoint &vert, const GlobalVector &mom, double path, TObjArray &hists)
CosmicGenFilterHelix(const edm::ParameterSet &config)
virtual bool filter(edm::Event &event, const edm::EventSetup &eventSetup)
const std::vector< int > theCharges
requested Ids
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool equidistLogBins(double *bins, int nBins, double first, double last) const
void createHistsEnd(const char *dirName, TObjArray &hists)
TObjArray theHistsBefore
whether or not to fill monitor hists (needs TFileService)
bool charge(int id, int &charge) const
true if ID selected, return by value its charge
void monitorStart(const GlobalPoint &vert, const GlobalVector &mom, int charge, TObjArray &hists)
const std::string thePropagatorName
charges, parallel to theIds
Plane::ConstPlanePointer theTargetPlaneMin
target cylinder, around z-axis
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
unsigned int theNumTotal
plane closing cylinder at &#39;positive&#39; side