21 L_EcalPhiWedgeEnergy = (float) iConfig.
getParameter<
double>(
"l_EcalPhiWedgeEnergy");
22 L_EcalPhiWedgeConstituents = iConfig.
getParameter<
int>(
"l_EcalPhiWedgeConstituents");
23 L_EcalPhiWedgeToF = (float)iConfig.
getParameter<
double>(
"l_EcalPhiWedgeToF");
24 L_EcalPhiWedgeConfidence = (float)iConfig.
getParameter<
double>(
"l_EcalPhiWedgeConfidence");
25 L_EcalShowerShapesRoundness = (float)iConfig.
getParameter<
double>(
"l_EcalShowerShapesRoundness");
26 L_EcalShowerShapesAngle =(float) iConfig.
getParameter<
double>(
"l_EcalShowerShapesAngle");
27 L_EcalSuperClusterSize = (int) iConfig.
getParameter<
int>(
"l_EcalSuperClusterSize");
28 L_EcalSuperClusterEnergy = (float) iConfig.
getParameter<
double>(
"l_EcalSuperClusterEnergy");
30 T_EcalPhiWedgeEnergy = (float)iConfig.
getParameter<
double>(
"t_EcalPhiWedgeEnergy");
31 T_EcalPhiWedgeConstituents = iConfig.
getParameter<
int>(
"t_EcalPhiWedgeConstituents");
32 T_EcalPhiWedgeToF = (float)iConfig.
getParameter<
double>(
"t_EcalPhiWedgeToF");
33 T_EcalPhiWedgeConfidence = (float)iConfig.
getParameter<
double>(
"t_EcalPhiWedgeConfidence");
34 T_EcalShowerShapesRoundness = (float)iConfig.
getParameter<
double>(
"t_EcalShowerShapesRoundness");
35 T_EcalShowerShapesAngle = (float)iConfig.
getParameter<
double>(
"t_EcalShowerShapesAngle");
36 T_EcalSuperClusterSize = (int) iConfig.
getParameter<
int>(
"t_EcalSuperClusterSize");
37 T_EcalSuperClusterEnergy = (float) iConfig.
getParameter<
double>(
"t_EcalSuperClusterEnergy");
39 L_HcalPhiWedgeEnergy = (float)iConfig.
getParameter<
double>(
"l_HcalPhiWedgeEnergy");
40 L_HcalPhiWedgeConstituents = iConfig.
getParameter<
int>(
"l_HcalPhiWedgeConstituents");
41 L_HcalPhiWedgeToF = (float)iConfig.
getParameter<
double>(
"l_HcalPhiWedgeToF");
42 L_HcalPhiWedgeConfidence = (float)iConfig.
getParameter<
double>(
"l_HcalPhiWedgeConfidence");
44 T_HcalPhiWedgeEnergy = (float)iConfig.
getParameter<
double>(
"t_HcalPhiWedgeEnergy");
45 T_HcalPhiWedgeConstituents = iConfig.
getParameter<
int>(
"t_HcalPhiWedgeConstituents");
46 T_HcalPhiWedgeToF = (float)iConfig.
getParameter<
double>(
"t_HcalPhiWedgeToF");
47 T_HcalPhiWedgeConfidence = (float)iConfig.
getParameter<
double>(
"t_HcalPhiWedgeConfidence");
49 produces<BeamHaloSummary>();
55 std::auto_ptr<BeamHaloSummary> TheBeamHaloSummary(
new BeamHaloSummary() );
59 iEvent.
getByLabel(IT_CSCHaloData, TheCSCHaloData);
64 TheBeamHaloSummary->GetCSCHaloReport()[0] = 1;
70 TheBeamHaloSummary->GetCSCHaloReport()[1] = 1;
74 iEvent.
getByLabel(IT_EcalHaloData, TheEcalHaloData);
78 bool EcalLooseId =
false, EcalTightId =
false;
121 float angle = vm_Angle[cluster];
122 float roundness = vm_Roundness[cluster];
125 if( (angle > 0. && angle < L_EcalShowerShapesAngle ) && ( roundness > 0. && roundness < L_EcalShowerShapesRoundness ) )
127 if( cluster->energy() > L_EcalSuperClusterEnergy && cluster->size() > (
unsigned int) L_EcalSuperClusterSize )
132 if( (angle > 0. && angle < T_EcalShowerShapesAngle ) && ( roundness > 0. && roundness < T_EcalShowerShapesRoundness ) )
134 if( cluster->energy() > T_EcalSuperClusterEnergy && cluster->size() > (
unsigned int)T_EcalSuperClusterSize )
140 TheBeamHaloSummary->GetEcalHaloReport()[0] = 1;
142 TheBeamHaloSummary->GetEcalHaloReport()[1] = 1;
148 iEvent.
getByLabel(IT_HcalHaloData, TheHcalHaloData);
150 const std::vector<PhiWedge> HcalWedges = HcalData.
GetPhiWedges();
151 bool HcalLooseId =
false, HcalTightId =
false;
152 for( std::vector<PhiWedge>::const_iterator iWedge = HcalWedges.begin() ; iWedge != HcalWedges.end() ; iWedge++ )
154 bool HcaliPhi =
false;
156 if( iWedge-> Energy() > L_HcalPhiWedgeEnergy && iWedge->NumberOfConstituents() > L_HcalPhiWedgeConstituents &&
std::abs(iWedge->ZDirectionConfidence()) > L_HcalPhiWedgeConfidence)
163 if( iWedge-> Energy() > T_HcalPhiWedgeEnergy && iWedge->NumberOfConstituents() > T_HcalPhiWedgeConstituents &&
std::abs(iWedge->ZDirectionConfidence()) > T_HcalPhiWedgeConfidence)
169 for(
unsigned int i = 0 ;
i < TheBeamHaloSummary->GetHcaliPhiSuspects().size() ;
i++ )
171 if( iWedge->iPhi() == TheBeamHaloSummary->GetHcaliPhiSuspects()[
i] )
178 TheBeamHaloSummary->GetHcaliPhiSuspects().push_back( iWedge->iPhi() ) ;
182 TheBeamHaloSummary->GetHcalHaloReport()[0] = 1;
184 TheBeamHaloSummary->GetHcalHaloReport()[1] = 1;
188 iEvent.
getByLabel(IT_GlobalHaloData, TheGlobalHaloData);
189 bool GlobalLooseId =
false;
190 bool GlobalTightId =
false;
196 if( MatchedEcalWedges.size() || MatchedHcalWedges.size() )
197 GlobalLooseId =
true;
200 for( std::vector<PhiWedge>::const_iterator iWedge = MatchedEcalWedges.begin() ; iWedge != MatchedEcalWedges.end(); iWedge ++ )
202 if( iWedge->NumberOfConstituents() > T_EcalPhiWedgeConstituents )
203 GlobalTightId =
true;
204 if(
std::abs(iWedge->ZDirectionConfidence() > T_EcalPhiWedgeConfidence) )
205 GlobalTightId =
true;
208 for( std::vector<PhiWedge>::const_iterator iWedge = MatchedHcalWedges.begin() ; iWedge != MatchedHcalWedges.end(); iWedge ++ )
210 if( iWedge->NumberOfConstituents() > T_HcalPhiWedgeConstituents )
211 GlobalTightId =
true;
212 if(
std::abs(iWedge->ZDirectionConfidence()) > T_HcalPhiWedgeConfidence )
213 GlobalTightId =
true;
217 TheBeamHaloSummary->GetGlobalHaloReport()[0] = 1;
219 TheBeamHaloSummary->GetGlobalHaloReport()[1] = 1;
221 iEvent.
put(TheBeamHaloSummary);
226 void BeamHaloSummaryProducer::endJob(){
return;}
229 BeamHaloSummaryProducer::~BeamHaloSummaryProducer(){}
T getParameter(std::string const &) const
int NumberOfHaloTracks(HaloData::Endcap z=HaloData::both) const
edm::ValueMap< float > & GetShowerShapesRoundness()
edm::RefVector< reco::SuperClusterCollection > & GetSuperClusters()
edm::ValueMap< float > & GetShowerShapesAngle()
short int NumberOfOutOfTimeTriggers(HaloData::Endcap z=HaloData::both) const
std::vector< PhiWedge > & GetMatchedEcalPhiWedges()
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int NumberOfHaloTriggers(HaloData::Endcap z=HaloData::both) const
T const * product() const
std::vector< PhiWedge > & GetMatchedHcalPhiWedges()
size_type size() const
Size of the RefVector.
const std::vector< PhiWedge > & GetPhiWedges() const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)