CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PhiWedge.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_METRECO_PHIWEDGE_H
2 #define DATAFORMATS_METRECO_PHIWEDGE_H
3 /*
4  [class]: PhiWedge
5  [authors]: R. Remington, The University of Florida
6  [description]: Simple class analogous to CaloTower but in z-direction. Stores basic information related to Hcal and Ecal rechits within constant 5-degree phi windows. The idea will be to match these reconstructed phi-wedges with csc tracks for BeamHalo identification.
7  [date]: October 15, 2009
8 */
9 #include "TMath.h"
10 #include <vector>
11 namespace reco {
12 
13  class PhiWedge {
14  public:
15  // Constructors
16  PhiWedge();
17  PhiWedge(float E, int iphi, int constituents);
18  PhiWedge(float E, int iphi, int constituents, float min_time, float max_time);
19  PhiWedge(const PhiWedge&);
20  // Destructors
21 
22  ~PhiWedge() {}
23 
24  // Energy sum of all rechits above threshold in this 5-degree window
25  float Energy() const { return energy_; }
26 
27  // Number of rechits above threshold in this 5-degree window
28  int NumberOfConstituents() const { return constituents_; }
29 
30  // iPhi value of this 5-degree window
31  int iPhi() const { return iphi_; }
32 
33  // Global phi lower bound of this 5-degree window (between 0 and 2Pi)
34  float PhiLow() const { return 2. * TMath::Pi() * (float)((iphi_ * 5) - (5.)); }
35 
36  // Global phi upper bound of this 5-degree window (between 0 and 2Pi
37  float PhiHigh() const { return 2. * TMath::Pi() * (float)((iphi_ * 5)); }
38 
39  // Get Min/Max Time
40  float MinTime() const { return min_time_; }
41  float MaxTime() const { return max_time_; }
42 
43  // Get halo direction confidence based on time ordering of the rechits ( must be within range of -1 to + 1 )
44  // Direction is calculated by counting the number of pair-wise time-ascending rechits from -Z to +Z and then normalizing this count by number of pair-wise combinations
45  // If all pair-wise combinations are consistent with a common z-direction, then this value will be plus or minus 1 exactly. Otherwise it will be somewhere in between.
46  float ZDirectionConfidence() const { return (1. - PlusZOriginConfidence_) * 2. - 1.; }
47  float PlusZDirectionConfidence() const { return 1. - PlusZOriginConfidence_; }
49 
50  // Get halo origin confidence based on time ordering of the rechits
52  float MinusZOriginConfidence() const { return 1. - PlusZOriginConfidence_; }
53 
54  // To be filled later or removed
59 
60  // Setters
65  void SetMinMaxTime(float min, float max) {
66  min_time_ = min;
67  max_time_ = max;
68  }
70 
71  private:
72  float energy_;
73  int iphi_;
75  float min_time_;
76  float max_time_;
82  };
83  typedef std::vector<PhiWedge> PhiWedgeCollection;
84 } // namespace reco
85 #endif
const double Pi
float MaxTime() const
Definition: PhiWedge.h:41
float MinTime() const
Definition: PhiWedge.h:40
float Energy() const
Definition: PhiWedge.h:25
int OverlappingCSCRecHits() const
Definition: PhiWedge.h:57
int OverlappingCSCHaloTriggers() const
Definition: PhiWedge.h:58
float energy_
Definition: PhiWedge.h:72
int iPhi() const
Definition: PhiWedge.h:31
int OverlappingCSCTracks() const
Definition: PhiWedge.h:55
float max_time_
Definition: PhiWedge.h:76
float MinusZDirectionConfidence() const
Definition: PhiWedge.h:48
std::vector< PhiWedge > PhiWedgeCollection
Definition: PhiWedge.h:83
float PhiLow() const
Definition: PhiWedge.h:34
int constituents_
Definition: PhiWedge.h:74
float ZDirectionConfidence() const
Definition: PhiWedge.h:46
float PhiHigh() const
Definition: PhiWedge.h:37
int OverlappingCSCSegments() const
Definition: PhiWedge.h:56
void SetPlusZOriginConfidence(float x)
Definition: PhiWedge.h:69
float PlusZDirectionConfidence() const
Definition: PhiWedge.h:47
T min(T a, T b)
Definition: MathUtil.h:58
int OverlappingCSCRecHits_
Definition: PhiWedge.h:80
float MinusZOriginConfidence() const
Definition: PhiWedge.h:52
void SetOverlappingCSCHaloTriggers(int x)
Definition: PhiWedge.h:64
int NumberOfConstituents() const
Definition: PhiWedge.h:28
float min_time_
Definition: PhiWedge.h:75
float PlusZOriginConfidence() const
Definition: PhiWedge.h:51
int OverlappingCSCSegments_
Definition: PhiWedge.h:79
void SetOverlappingCSCRecHits(int x)
Definition: PhiWedge.h:63
int OverlappingCSCTracks_
Definition: PhiWedge.h:78
void SetOverlappingCSCSegments(int x)
Definition: PhiWedge.h:62
int OverlappingCSCHaloTriggers_
Definition: PhiWedge.h:81
void SetOverlappingCSCTracks(int x)
Definition: PhiWedge.h:61
void SetMinMaxTime(float min, float max)
Definition: PhiWedge.h:65
float PlusZOriginConfidence_
Definition: PhiWedge.h:77