CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
15  public:
16  // Constructors
17  PhiWedge();
18  PhiWedge(float E, int iphi, int constituents);
19  PhiWedge(float E, int iphi, int constituents, float min_time , float max_time);
20  PhiWedge(const PhiWedge&);
21  // Destructors
22 
24 
25  // Energy sum of all rechits above threshold in this 5-degree window
26  float Energy() const {return energy_;}
27 
28  // Number of rechits above threshold in this 5-degree window
29  int NumberOfConstituents() const {return constituents_;}
30 
31  // iPhi value of this 5-degree window
32  int iPhi() const {return iphi_;}
33 
34  // Global phi lower bound of this 5-degree window (between 0 and 2Pi)
35  float PhiLow() const {return 2.*TMath::Pi()*(float)((iphi_ * 5)-(5.));}
36 
37  // Global phi upper bound of this 5-degree window (between 0 and 2Pi
38  float PhiHigh() const {return 2.*TMath::Pi()*(float)((iphi_* 5));}
39 
40  // Get Min/Max Time
41  float MinTime()const{return min_time_;}
42  float MaxTime()const{return max_time_;}
43 
44  // Get halo direction confidence based on time ordering of the rechits ( must be within range of -1 to + 1 )
45  // 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
46  // 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.
47  float ZDirectionConfidence() const { return (1. - PlusZOriginConfidence_)*2. -1. ;}
50 
51  // Get halo origin confidence based on time ordering of the rechits
52  float PlusZOriginConfidence() const { return PlusZOriginConfidence_ ;}
53  float MinusZOriginConfidence() const { return 1.- PlusZOriginConfidence_;}
54 
55  // To be filled later or removed
60 
61  // Setters
66  void SetMinMaxTime(float min, float max ){ min_time_ = min; max_time_ = max;}
68 
69 
70 
71  private:
72  float energy_;
73  int iphi_;
75  float min_time_;
76  float max_time_;
82 
83  };
84  typedef std::vector<PhiWedge> PhiWedgeCollection;
85 }
86 #endif
const double Pi
float MaxTime() const
Definition: PhiWedge.h:42
float MinTime() const
Definition: PhiWedge.h:41
float Energy() const
Definition: PhiWedge.h:26
int OverlappingCSCRecHits() const
Definition: PhiWedge.h:58
int OverlappingCSCHaloTriggers() const
Definition: PhiWedge.h:59
float energy_
Definition: PhiWedge.h:72
int iPhi() const
Definition: PhiWedge.h:32
int OverlappingCSCTracks() const
Definition: PhiWedge.h:56
float max_time_
Definition: PhiWedge.h:76
float MinusZDirectionConfidence() const
Definition: PhiWedge.h:49
std::vector< PhiWedge > PhiWedgeCollection
Definition: PhiWedge.h:84
float PhiLow() const
Definition: PhiWedge.h:35
int constituents_
Definition: PhiWedge.h:74
const T & max(const T &a, const T &b)
float ZDirectionConfidence() const
Definition: PhiWedge.h:47
float PhiHigh() const
Definition: PhiWedge.h:38
int OverlappingCSCSegments() const
Definition: PhiWedge.h:57
void SetPlusZOriginConfidence(float x)
Definition: PhiWedge.h:67
float PlusZDirectionConfidence() const
Definition: PhiWedge.h:48
int OverlappingCSCRecHits_
Definition: PhiWedge.h:80
float MinusZOriginConfidence() const
Definition: PhiWedge.h:53
void SetOverlappingCSCHaloTriggers(int x)
Definition: PhiWedge.h:65
int NumberOfConstituents() const
Definition: PhiWedge.h:29
float min_time_
Definition: PhiWedge.h:75
float PlusZOriginConfidence() const
Definition: PhiWedge.h:52
int OverlappingCSCSegments_
Definition: PhiWedge.h:79
void SetOverlappingCSCRecHits(int x)
Definition: PhiWedge.h:64
int OverlappingCSCTracks_
Definition: PhiWedge.h:78
void SetOverlappingCSCSegments(int x)
Definition: PhiWedge.h:63
Definition: DDAxes.h:10
int OverlappingCSCHaloTriggers_
Definition: PhiWedge.h:81
void SetOverlappingCSCTracks(int x)
Definition: PhiWedge.h:62
void SetMinMaxTime(float min, float max)
Definition: PhiWedge.h:66
float PlusZOriginConfidence_
Definition: PhiWedge.h:77