22 L_EcalPhiWedgeEnergy = (
float) iConfig.
getParameter<
double>(
"l_EcalPhiWedgeEnergy");
23 L_EcalPhiWedgeConstituents = iConfig.
getParameter<
int>(
"l_EcalPhiWedgeConstituents");
25 L_EcalPhiWedgeConfidence = (
float)iConfig.
getParameter<
double>(
"l_EcalPhiWedgeConfidence");
26 L_EcalShowerShapesRoundness = (
float)iConfig.
getParameter<
double>(
"l_EcalShowerShapesRoundness");
27 L_EcalShowerShapesAngle =(
float) iConfig.
getParameter<
double>(
"l_EcalShowerShapesAngle");
28 L_EcalSuperClusterSize = (
int) iConfig.
getParameter<
int>(
"l_EcalSuperClusterSize");
29 L_EcalSuperClusterEnergy = (
float) iConfig.
getParameter<
double>(
"l_EcalSuperClusterEnergy");
31 T_EcalPhiWedgeEnergy = (
float)iConfig.
getParameter<
double>(
"t_EcalPhiWedgeEnergy");
32 T_EcalPhiWedgeConstituents = iConfig.
getParameter<
int>(
"t_EcalPhiWedgeConstituents");
34 T_EcalPhiWedgeConfidence = (
float)iConfig.
getParameter<
double>(
"t_EcalPhiWedgeConfidence");
35 T_EcalShowerShapesRoundness = (
float)iConfig.
getParameter<
double>(
"t_EcalShowerShapesRoundness");
36 T_EcalShowerShapesAngle = (
float)iConfig.
getParameter<
double>(
"t_EcalShowerShapesAngle");
37 T_EcalSuperClusterSize = (
int) iConfig.
getParameter<
int>(
"t_EcalSuperClusterSize");
38 T_EcalSuperClusterEnergy = (
float) iConfig.
getParameter<
double>(
"t_EcalSuperClusterEnergy");
40 L_HcalPhiWedgeEnergy = (
float)iConfig.
getParameter<
double>(
"l_HcalPhiWedgeEnergy");
41 L_HcalPhiWedgeConstituents = iConfig.
getParameter<
int>(
"l_HcalPhiWedgeConstituents");
43 L_HcalPhiWedgeConfidence = (
float)iConfig.
getParameter<
double>(
"l_HcalPhiWedgeConfidence");
45 T_HcalPhiWedgeEnergy = (
float)iConfig.
getParameter<
double>(
"t_HcalPhiWedgeEnergy");
46 T_HcalPhiWedgeConstituents = iConfig.
getParameter<
int>(
"t_HcalPhiWedgeConstituents");
48 T_HcalPhiWedgeConfidence = (
float)iConfig.
getParameter<
double>(
"t_HcalPhiWedgeConfidence");
52 cschalodata_token_ = consumes<CSCHaloData>(IT_CSCHaloData);
53 ecalhalodata_token_ = consumes<EcalHaloData>(IT_EcalHaloData);
54 hcalhalodata_token_ = consumes<HcalHaloData>(IT_HcalHaloData);
55 globalhalodata_token_ = consumes<GlobalHaloData>(IT_GlobalHaloData);
57 produces<BeamHaloSummary>();
63 auto TheBeamHaloSummary = std::make_unique<BeamHaloSummary>();
68 iEvent.
getByToken(cschalodata_token_, TheCSCHaloData);
78 TheBeamHaloSummary->GetCSCHaloReport()[0] = 1;
87 TheBeamHaloSummary->GetCSCHaloReport()[1] = 1;
91 TheBeamHaloSummary->GetCSCHaloReport()[2] = 1;
97 TheBeamHaloSummary->GetCSCHaloReport()[3] = 1;
106 TheBeamHaloSummary->GetCSCHaloReport()[4] = 1;
113 TheBeamHaloSummary->GetCSCHaloReport()[5] = 1;
120 iEvent.
getByToken(ecalhalodata_token_, TheEcalHaloData);
124 bool EcalLooseId =
false, EcalTightId =
false;
167 float angle = vm_Angle[cluster];
168 float roundness = vm_Roundness[cluster];
171 if( (angle > 0. && angle < L_EcalShowerShapesAngle ) && ( roundness > 0. && roundness < L_EcalShowerShapesRoundness ) )
173 if( cluster->energy() > L_EcalSuperClusterEnergy && cluster->size() > (
unsigned int) L_EcalSuperClusterSize )
178 if( (angle > 0. && angle < T_EcalShowerShapesAngle ) && ( roundness > 0. && roundness < T_EcalShowerShapesRoundness ) )
180 if( cluster->energy() > T_EcalSuperClusterEnergy && cluster->size() > (
unsigned int)T_EcalSuperClusterSize )
186 TheBeamHaloSummary->GetEcalHaloReport()[0] = 1;
188 TheBeamHaloSummary->GetEcalHaloReport()[1] = 1;
193 iEvent.
getByToken(hcalhalodata_token_, TheHcalHaloData);
196 const std::vector<PhiWedge>& HcalWedges = HcalData.
GetPhiWedges();
197 bool HcalLooseId =
false, HcalTightId =
false;
198 for( std::vector<PhiWedge>::const_iterator iWedge = HcalWedges.begin() ; iWedge != HcalWedges.end() ; iWedge++ )
200 bool HcaliPhi =
false;
202 if( iWedge-> Energy() > L_HcalPhiWedgeEnergy && iWedge->NumberOfConstituents() > L_HcalPhiWedgeConstituents &&
std::abs(iWedge->ZDirectionConfidence()) > L_HcalPhiWedgeConfidence)
209 if( iWedge-> Energy() > T_HcalPhiWedgeEnergy && iWedge->NumberOfConstituents() > T_HcalPhiWedgeConstituents &&
std::abs(iWedge->ZDirectionConfidence()) > T_HcalPhiWedgeConfidence)
215 for(
unsigned int i = 0 ;
i < TheBeamHaloSummary->GetHcaliPhiSuspects().size() ;
i++ )
217 if( iWedge->iPhi() == TheBeamHaloSummary->GetHcaliPhiSuspects()[
i] )
224 TheBeamHaloSummary->GetHcaliPhiSuspects().push_back( iWedge->iPhi() ) ;
228 TheBeamHaloSummary->GetHcalHaloReport()[0] = 1;
230 TheBeamHaloSummary->GetHcalHaloReport()[1] = 1;
237 TheBeamHaloSummary->getProblematicStrips().push_back(problematicStrip);
244 iEvent.
getByToken(globalhalodata_token_, TheGlobalHaloData);
246 bool GlobalLooseId =
false;
247 bool GlobalTightId =
false;
253 if( !MatchedEcalWedges.empty() || !MatchedHcalWedges.empty() )
254 GlobalLooseId =
true;
257 for( std::vector<PhiWedge>::const_iterator iWedge = MatchedEcalWedges.begin() ; iWedge != MatchedEcalWedges.end(); iWedge ++ )
259 if( iWedge->NumberOfConstituents() > T_EcalPhiWedgeConstituents )
260 GlobalTightId =
true;
261 if(
std::abs(iWedge->ZDirectionConfidence()) > T_EcalPhiWedgeConfidence )
262 GlobalTightId =
true;
265 for( std::vector<PhiWedge>::const_iterator iWedge = MatchedHcalWedges.begin() ; iWedge != MatchedHcalWedges.end(); iWedge ++ )
267 if( iWedge->NumberOfConstituents() > T_HcalPhiWedgeConstituents )
268 GlobalTightId =
true;
269 if(
std::abs(iWedge->ZDirectionConfidence()) > T_HcalPhiWedgeConfidence )
270 GlobalTightId =
true;
274 TheBeamHaloSummary->GetGlobalHaloReport()[0] = 1;
276 TheBeamHaloSummary->GetGlobalHaloReport()[1] = 1;
284 TheBeamHaloSummary->GetGlobalHaloReport()[2] = 1;
292 TheBeamHaloSummary->GetGlobalHaloReport()[3] = 1;
300 BeamHaloSummaryProducer::~BeamHaloSummaryProducer(){}
T getParameter(std::string const &) const
bool GetSegmentIsEECaloMatched() const
int NumberOfHaloTracks(HaloData::Endcap z=HaloData::both) const
edm::ValueMap< float > & GetShowerShapesRoundness()
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
short int NFlatHaloSegments_TrkMuUnVeto() const
edm::RefVector< reco::SuperClusterCollection > & GetSuperClusters()
edm::ValueMap< float > & GetShowerShapesAngle()
short int NumberOfOutOfTimeTriggers(HaloData::Endcap z=HaloData::both) const
std::vector< PhiWedge > & GetMatchedEcalPhiWedges()
short int NFlatHaloSegments() const
bool GetHaloPatternFoundEE() const
bool GetSegmentsInBothEndcaps() const
int NumberOfHaloTriggers_TrkMuUnVeto(HaloData::Endcap z=HaloData::both) const
bool GetSegmentIsHECaloMatched() const
bool GetSegmentIsEBCaloMatched() const
short int NTracksSmalldT() const
problematicStripMinLength
bool GetSegmentIsCaloMatched() const
Abs< T >::type abs(const T &t)
bool GetSegmentsInBothEndcaps_Loose_dTcut_TrkMuUnVeto() const
short int NOutOfTimeHits() const
bool GetHaloPatternFoundHE() const
int NumberOfHaloTriggers(HaloData::Endcap z=HaloData::both) const
T const * product() const
bool GetHaloPatternFoundHB() const
std::vector< PhiWedge > & GetMatchedHcalPhiWedges()
const std::vector< HaloTowerStrip > & getProblematicStrips() const
size_type size() const
Size of the RefVector.
const std::vector< PhiWedge > & GetPhiWedges() const
bool GetHaloPatternFoundEB() const
bool GetSegmentsInBothEndcaps_Loose_TrkMuUnVeto() const
bool GetSegmentIsHBCaloMatched() const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)