24 #include "TLorentzVector.h"
39 parentBoson_(iConfig.getParameter<edm::InputTag>(
"parentBoson"))
41 produces<edm::ValueMap<float> >(
"costheta");
42 produces<edm::ValueMap<float> >(
"sin2theta");
43 produces<edm::ValueMap<float> >(
"tanphi");
62 std::vector<float> values2;
63 std::vector<float> values3;
66 double costheta = -10.0;
67 double sin2theta = -10.0;
68 double tanphi = -10.0;
72 TLorentzVector
mu (0., 0., 0., 0.);
73 TLorentzVector
mubar (0., 0., 0., 0.);
75 int charge1=0, charge2 =0;
76 double res[3] = { -10., -10., -10.};
80 for (boson = bosons->begin(); boson != endbosons; ++boson) {
82 daughter1 = boson->daughter(0);
83 daughter2 = boson->daughter(1);
85 if( !(0==daughter1 || 0==daughter2) ) {
87 charge1 = daughter1->charge();
88 charge2 = daughter2->charge();
89 isOS = charge1*charge2<0;
90 if(isOS && charge1<0) {
91 mu.SetPxPyPzE( daughter1->px(), daughter1->py(), daughter1->pz(), daughter1->energy() );
92 mubar.SetPxPyPzE( daughter2->px(), daughter2->py(), daughter2->pz(), daughter2->energy() );
94 if(isOS && charge1>0) {
95 mu.SetPxPyPzE( daughter2->px(), daughter2->py(), daughter2->pz(), daughter2->energy() );
96 mubar.SetPxPyPzE( daughter1->px(), daughter1->py(), daughter1->pz(), daughter1->energy() );
107 values.push_back(costheta);
108 values2.push_back(sin2theta);
109 values3.push_back(tanphi);
118 iEvent.
put(valMap,
"costheta");
124 filler2.insert(bosons, values2.begin(), values2.end());
126 iEvent.
put(valMap2,
"sin2theta");
131 filler3.insert(bosons, values3.begin(), values3.end());
133 iEvent.
put(valMap3,
"tanphi");
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
virtual ~ColinsSoperVariablesComputer()
#define DEFINE_FWK_MODULE(type)
ColinsSoperVariablesComputer(const edm::ParameterSet &iConfig)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag parentBoson_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void calCSVariables(TLorentzVector mu, TLorentzVector mubar, double *res, bool swap)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)