CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/DataFormats/METReco/interface/CSCHaloData.h

Go to the documentation of this file.
00001 #ifndef DATAFORMATS_METRECO_CSCHALODATA_H
00002 #define DATAFORMATS_METRECO_CSCHALODATA_H
00003 #include "TMath.h"
00004 #include <vector>
00005 
00006 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00007 #include "DataFormats/TrackReco/interface/Track.h"
00008 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00009 
00010 #include "DataFormats/METReco/interface/HaloData.h"
00011 
00012 #include "DataFormats/Common/interface/RefVector.h"
00013 #include <vector>
00014 
00015 /*
00016   [class]:  CSCHaloData
00017   [authors]: R. Remington, The University of Florida
00018   [description]: Container class to store beam halo data specific to the CSC subdetector
00019   [date]: October 15, 2009
00020 */
00021 
00022 namespace reco {
00023   
00024   class CSCHaloData{
00025     
00026   public:
00027     // Default constructor
00028     CSCHaloData();
00029 
00030     virtual ~CSCHaloData(){}
00031 
00032     // Number of HaloTriggers in +/- endcap
00033     int NumberOfHaloTriggers (HaloData::Endcap z= HaloData::both) const ;
00034     int NHaloTriggers(HaloData::Endcap z = HaloData::both ) const { return NumberOfHaloTriggers(z);}
00035     // Number of Halo Tracks in +/-  endcap
00036     int NumberOfHaloTracks(HaloData::Endcap z= HaloData::both) const ;
00037     int NHaloTracks(HaloData::Endcap z = HaloData::both) const { return NumberOfHaloTracks(z) ;}
00038 
00039     // Halo trigger bit from the HLT  
00040     bool CSCHaloHLTAccept() const {return HLTAccept;}
00041 
00042     // Number of chamber-level triggers with non-collision timing
00043     short int NumberOfOutOfTimeTriggers(HaloData::Endcap z = HaloData::both ) const;
00044     short int NOutOfTimeTriggers(HaloData::Endcap z = HaloData::both) const {return NumberOfOutOfTimeTriggers(z);}
00045     // Number of CSCRecHits with non-collision timing
00046     short int NumberOfOutTimeHits() const { return nOutOfTimeHits;}
00047     short int NOutOfTimeHits() const {return nOutOfTimeHits;}
00048     // Look at number of muons with timing consistent with incoming particles
00049     short int NTracksSmalldT() const { return nTracks_Small_dT;}
00050     short int NTracksSmallBeta() const{ return nTracks_Small_beta; }
00051     short int NTracksSmallBetaAndSmalldT() const { return nTracks_Small_dT_Small_beta; }
00052 
00053     // MLR
00054     short int NFlatHaloSegments() const{ return nFlatHaloSegments; }
00055     bool GetSegmentsInBothEndcaps() const{ return segments_in_both_endcaps; }
00056     // End MLR
00057 
00058     // Get Reference to the Tracks
00059     edm::RefVector<reco::TrackCollection>& GetTracks(){return TheTrackRefs;}
00060     const edm::RefVector<reco::TrackCollection>& GetTracks()const {return TheTrackRefs;}
00061     
00062     // Set Number of Halo Triggers
00063     void SetNumberOfHaloTriggers(int PlusZ,  int MinusZ ){ nTriggers_PlusZ =PlusZ; nTriggers_MinusZ = MinusZ ;}
00064 
00065     // Set number of chamber-level triggers with non-collision timing
00066     void SetNOutOfTimeTriggers(short int PlusZ,short int MinusZ){ nOutOfTimeTriggers_PlusZ = PlusZ ; nOutOfTimeTriggers_MinusZ = MinusZ;}
00067     // Set number of CSCRecHits with non-collision timing
00068     void SetNOutOfTimeHits(short int num){ nOutOfTimeHits = num ;}
00069     // Set number of tracks with timing consistent with incoming particles
00070     void SetNIncomingTracks(short int n_small_dT, short int n_small_beta, short int n_small_both) {  nTracks_Small_dT = n_small_dT; 
00071       nTracks_Small_beta = n_small_beta; nTracks_Small_dT_Small_beta = n_small_both;}
00072 
00073     // Set HLT Bit
00074     void SetHLTBit(bool status) { HLTAccept = status ;} 
00075 
00076     // Get GlobalPoints of CSC tracking rechits nearest to the calorimeters
00077     //std::vector<const GlobalPoint>& GetCSCTrackImpactPositions() const {return TheGlobalPositions;}
00078     const std::vector<GlobalPoint>& GetCSCTrackImpactPositions() const {return TheGlobalPositions;}
00079     std::vector<GlobalPoint>& GetCSCTrackImpactPositions() {return TheGlobalPositions;}
00080 
00081     // MLR
00082     // Set # of CSCSegments that appear to be part of a halo muon
00083     // If there is more than 1 muon, this is the number of segments in the halo muon
00084     // with the largest number of segments that pass the cut.
00085     void SetNFlatHaloSegments(short int nSegments) {nFlatHaloSegments = nSegments;}
00086     void SetSegmentsBothEndcaps(bool b) { segments_in_both_endcaps = b; }
00087     // End MLR
00088   private:
00089     edm::RefVector<reco::TrackCollection> TheTrackRefs;
00090 
00091     // The GlobalPoints from constituent rechits nearest to the calorimeter of CSC tracks
00092     std::vector<GlobalPoint> TheGlobalPositions;
00093     int nTriggers_PlusZ;
00094     int nTriggers_MinusZ;
00095 
00096     // CSC halo trigger reported by the HLT
00097     bool HLTAccept;
00098    
00099     int nTracks_PlusZ;
00100     int nTracks_MinusZ;
00101 
00102     // number of  out-of-time chamber-level triggers (assumes the event triggered at the bx of the beam crossing)
00103     short int nOutOfTimeTriggers_PlusZ;
00104     short int nOutOfTimeTriggers_MinusZ;
00105     // number of out-of-time CSCRecHit2Ds (assumes the event triggered at the bx of the beam crossing)
00106     short int nOutOfTimeHits;
00107     // number of cosmic muon outer (CSC) tracks with (T_segment_outer - T_segment_inner) < max_dt_muon_segment
00108     short int nTracks_Small_dT;
00109     // number of cosmic muon outer (CSC) tracks with free inverse beta < max_free_inverse_beta
00110     short int nTracks_Small_beta;
00111     // number of cosmic muon outer (CSC) tracks with both 
00112     // (T_segment_outer - T_segment_inner) <  max_dt_muon_segment and free inverse beta < max_free_inverse_beta
00113     short int nTracks_Small_dT_Small_beta;
00114 
00115     // MLR
00116     // number of CSCSegments that are flat and have the same (r,phi)
00117     short int nFlatHaloSegments;
00118     bool segments_in_both_endcaps;
00119     // end MLR
00120 
00121   };
00122 
00123 
00124   
00125 }
00126   
00127 
00128 #endif