CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
TauValidation Class Reference

#include <TauValidation.h>

Inheritance diagram for TauValidation:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Types

enum  {
  undetermined, electron, muon, pi,
  rho, a1, K, Kstar,
  pi1pi0, pinpi0, tripi, tripinpi0,
  stable
}
 
enum  {
  other, B, D, gamma,
  Z, W, HSM, H0,
  A0, Hpm
}
 
- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 

Public Member Functions

virtual void analyze (edm::Event const &, edm::EventSetup const &) override
 
virtual void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
virtual void dqmBeginRun (const edm::Run &r, const edm::EventSetup &c) override
 
 TauValidation (const edm::ParameterSet &)
 
virtual ~TauValidation ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void findFSRandBrem (const HepMC::GenParticle *p, bool doBrem, std::vector< const HepMC::GenParticle * > &ListofFSR, std::vector< const HepMC::GenParticle * > &ListofBrem)
 
int findMother (const HepMC::GenParticle *)
 
void FindPhotosFSR (const HepMC::GenParticle *p, std::vector< const HepMC::GenParticle * > &ListofFSR, double &BosonScale)
 
void findTauList (const HepMC::GenParticle *tau, std::vector< const HepMC::GenParticle * > &TauList)
 
const HepMC::GenParticle * GetMother (const HepMC::GenParticle *tau)
 
const std::vector
< HepMC::GenParticle * > 
GetMothers (const HepMC::GenParticle *boson)
 
bool isLastTauinChain (const HepMC::GenParticle *tau)
 
double leadingPionMomentum (const HepMC::GenParticle *, double weight)
 
TLorentzVector leadingPionP4 (const HepMC::GenParticle *)
 
TLorentzVector motherP4 (const HepMC::GenParticle *)
 
void photons (const HepMC::GenParticle *, double weight)
 
void rtau (const HepMC::GenParticle *, int, int, double weight)
 
void spinEffectsWHpm (const HepMC::GenParticle *, int, int, std::vector< HepMC::GenParticle * > &part, double weight)
 
void spinEffectsZH (const HepMC::GenParticle *boson, double weight)
 
int tauDecayChannel (const HepMC::GenParticle *, double weight=0.0)
 
int tauMother (const HepMC::GenParticle *, double weight)
 
int tauProngs (const HepMC::GenParticle *, double weight)
 
double visibleTauEnergy (const HepMC::GenParticle *)
 
double Zstoa (double zs)
 

Private Attributes

MonitorElementDecayLength
 
edm::ESHandle
< HepPDT::ParticleDataTable
fPDGTable
 PDT table. More...
 
edm::InputTag hepmcCollection_
 
edm::EDGetTokenT
< edm::HepMCProduct
hepmcCollectionToken_
 
MonitorElementJAKID
 
std::vector< std::vector
< MonitorElement * > > 
JAKInvMass
 
MonitorElementLifeTime
 
unsigned int NJAKID
 
MonitorElementnPrimeTaus
 
MonitorElementnTaus
 
MonitorElementTauBremPhotonsN
 
MonitorElementTauBremPhotonsPt
 
MonitorElementTauBremPhotonsPtSum
 
MonitorElementTauDecayChannels
 
MonitorElementTauEta
 
double tauEtCut
 
MonitorElementTauFSRPhotonsN
 
MonitorElementTauFSRPhotonsPt
 
MonitorElementTauFSRPhotonsPtSum
 
MonitorElementTauMothers
 
MonitorElementTauPhi
 
MonitorElementTauProngs
 
MonitorElementTauPt
 
MonitorElementTauRtauHpm
 
MonitorElementTauRtauW
 
MonitorElementTauSpinEffectsH_eX
 
MonitorElementTauSpinEffectsH_muX
 
MonitorElementTauSpinEffectsH_MVis
 
MonitorElementTauSpinEffectsH_pipiAcollinearity
 
MonitorElementTauSpinEffectsH_pipiAcollinearityzoom
 
MonitorElementTauSpinEffectsH_pipiAcoplanarity
 
MonitorElementTauSpinEffectsH_rhorhoAcoplanarityminus
 
MonitorElementTauSpinEffectsH_rhorhoAcoplanarityplus
 
MonitorElementTauSpinEffectsH_X
 
MonitorElementTauSpinEffectsH_Xb
 
MonitorElementTauSpinEffectsH_Xf
 
MonitorElementTauSpinEffectsH_Zs
 
MonitorElementTauSpinEffectsHpm_eX
 
MonitorElementTauSpinEffectsHpm_muX
 
MonitorElementTauSpinEffectsHpm_UpsilonA1
 
MonitorElementTauSpinEffectsHpm_UpsilonRho
 
MonitorElementTauSpinEffectsHpm_X
 
MonitorElementTauSpinEffectsW_eX
 
MonitorElementTauSpinEffectsW_muX
 
MonitorElementTauSpinEffectsW_UpsilonA1
 
MonitorElementTauSpinEffectsW_UpsilonRho
 
MonitorElementTauSpinEffectsW_X
 
MonitorElementTauSpinEffectsZ_eX
 
MonitorElementTauSpinEffectsZ_muX
 
MonitorElementTauSpinEffectsZ_MVis
 
MonitorElementTauSpinEffectsZ_X
 
MonitorElementTauSpinEffectsZ_Xb
 
MonitorElementTauSpinEffectsZ_Xf
 
MonitorElementTauSpinEffectsZ_Zs
 
WeightManager wmanager_
 
int zsbins
 
double zsmax
 
double zsmin
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 35 of file TauValidation.h.

Member Enumeration Documentation

anonymous enum
Enumerator
undetermined 
electron 
muon 
pi 
rho 
a1 
K 
Kstar 
pi1pi0 
pinpi0 
tripi 
tripinpi0 
stable 

Definition at line 39 of file TauValidation.h.

anonymous enum
Enumerator
other 
B 
D 
gamma 
Z 
W 
HSM 
H0 
A0 
Hpm 

Definition at line 53 of file TauValidation.h.

Constructor & Destructor Documentation

TauValidation::TauValidation ( const edm::ParameterSet iPSet)
explicit

Definition at line 19 of file TauValidation.cc.

References hepmcCollection_, and hepmcCollectionToken_.

19  :
21  ,hepmcCollection_(iPSet.getParameter<edm::InputTag>("hepmcCollection"))
22  ,tauEtCut(iPSet.getParameter<double>("tauEtCutForRtau"))
23  ,NJAKID(22)
24  ,zsbins(20)
25  ,zsmin(-0.5)
26  ,zsmax(0.5)
27 {
28  hepmcCollectionToken_=consumes<HepMCProduct>(hepmcCollection_);
29 }
T getParameter(std::string const &) const
WeightManager wmanager_
Definition: TauValidation.h:71
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::InputTag hepmcCollection_
Definition: TauValidation.h:94
unsigned int NJAKID
TauValidation::~TauValidation ( )
virtual

Definition at line 31 of file TauValidation.cc.

31 {}

Member Function Documentation

void TauValidation::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overridevirtual

Gathering the HepMCProduct information

Implements edm::stream::EDAnalyzerBase.

Definition at line 159 of file TauValidation.cc.

References funct::abs(), beta, trackerHits::c, DecayLength, MonitorElement::Fill(), edm::Event::getByToken(), hepmcCollectionToken_, PdtPdgMini::Higgs0, i, isLastTauinChain(), getDQMSummary::iter, TauDecay::JAK_A1_3PI, TauDecay::JAK_KPIK, TauDecay::JAK_KPIPI, JAKID, JAKInvMass, PdtPdgMini::K_plus, LifeTime, NJAKID, nPrimeTaus, nTaus, PdtPdgMini::nu_e, PdtPdgMini::nu_mu, PdtPdgMini::nu_tau, photons(), PdtPdgMini::pi_plus, rtau(), spinEffectsWHpm(), spinEffectsZH(), tauDecayChannel(), TauEta, tauMother(), TauPhi, tauProngs(), TauPt, WeightManager::weight(), histoStyle::weight, wmanager_, and PdtPdgMini::Z0.

160 {
163  iEvent.getByToken(hepmcCollectionToken_, evt);
164 
165  //Get EVENT
166  HepMC::GenEvent *myGenEvent = new HepMC::GenEvent(*(evt->GetEvent()));
167 
168  double weight = wmanager_.weight(iEvent);
169 
171 
172  // find taus
173  for(HepMC::GenEvent::particle_const_iterator iter = myGenEvent->particles_begin(); iter != myGenEvent->particles_end(); iter++) {
174  if(abs((*iter)->pdg_id())==PdtPdgMini::Z0 || abs((*iter)->pdg_id())==PdtPdgMini::Higgs0){
175  spinEffectsZH(*iter,weight);
176  }
177  if(abs((*iter)->pdg_id())==15){
178  if(isLastTauinChain(*iter)){
179  nTaus->Fill(0.5,weight);
180  int mother = tauMother(*iter,weight);
181  int decaychannel = tauDecayChannel(*iter,weight);
182  tauProngs(*iter, weight);
183  if(mother>-1){ // exclude B, D and other non-signal decay modes
184  nPrimeTaus->Fill(0.5,weight);
185  TauPt->Fill((*iter)->momentum().perp(),weight);
186  TauEta->Fill((*iter)->momentum().eta(),weight);
187  TauPhi->Fill((*iter)->momentum().phi(),weight);
188  rtau(*iter,mother,decaychannel,weight);
189  photons(*iter,weight);
190  }
192  //Adding JAKID and Mass information
193  //
194  TLorentzVector Tau((*iter)->momentum().px(),(*iter)->momentum().py(),(*iter)->momentum().pz(),(*iter)->momentum().e());
195  TauDecay_CMSSW TD;
196  unsigned int jak_id, TauBitMask;
197  if(TD.AnalyzeTau((*iter),jak_id,TauBitMask,false,false)){
198  JAKID->Fill(jak_id,weight);
199  if(jak_id<=NJAKID){
200  int tcharge=(*iter)->pdg_id()/abs((*iter)->pdg_id());
201  std::vector<HepMC::GenParticle*> part=TD.Get_TauDecayProducts();
202  spinEffectsWHpm(*iter,mother,jak_id,part,weight);
203  TLorentzVector LVQ(0,0,0,0);
204  TLorentzVector LVS12(0,0,0,0);
205  TLorentzVector LVS13(0,0,0,0);
206  TLorentzVector LVS23(0,0,0,0);
207  bool haspart1=false;
208  TVector3 PV,SV;
209  bool hasDL(false);
210  for(unsigned int i=0;i<part.size();i++){
211  if(abs(part.at(i)->pdg_id())!=PdtPdgMini::nu_tau && TD.isTauFinalStateParticle(part.at(i)->pdg_id()) && !hasDL){
212  PV=TVector3((*iter)->production_vertex()->point3d().x(),(*iter)->production_vertex()->point3d().y(),(*iter)->production_vertex()->point3d().z());
213  SV=TVector3(part.at(i)->production_vertex()->point3d().x(),part.at(i)->production_vertex()->point3d().y(),part.at(i)->production_vertex()->point3d().z());
214  TVector3 DL=SV-PV;
215  DecayLength->Fill(DL.Dot(Tau.Vect())/Tau.P(),weight);
216  double c(2.99792458E8),Ltau(DL.Mag()/1000),beta((*iter)->momentum().rho()/(*iter)->momentum().m());
217  LifeTime->Fill( Ltau/(c*beta),weight);
218  }
219 
220  if(TD.isTauFinalStateParticle(part.at(i)->pdg_id()) &&
221  abs(part.at(i)->pdg_id())!=PdtPdgMini::nu_e &&
222  abs(part.at(i)->pdg_id())!=PdtPdgMini::nu_mu &&
223  abs(part.at(i)->pdg_id())!=PdtPdgMini::nu_tau ){
224  TLorentzVector LV(part.at(i)->momentum().px(),part.at(i)->momentum().py(),part.at(i)->momentum().pz(),part.at(i)->momentum().e());
225  LVQ+=LV;
226  if(jak_id==TauDecay::JAK_A1_3PI ||
227  jak_id==TauDecay::JAK_KPIK ||
228  jak_id==TauDecay::JAK_KPIPI
229  ){
230  if((tcharge==part.at(i)->pdg_id()/abs(part.at(i)->pdg_id()) && TD.nProng(TauBitMask)==3) || (jak_id==TauDecay::JAK_A1_3PI && TD.nProng(TauBitMask)==1 && abs(part.at(i)->pdg_id())==PdtPdgMini::pi_plus) ){
231  LVS13+=LV;
232  LVS23+=LV;
233  }
234  else{
235  LVS12+=LV;
236  if(!haspart1 && ((jak_id==TauDecay::JAK_A1_3PI) || (jak_id!=TauDecay::JAK_A1_3PI && abs(part.at(i)->pdg_id())==PdtPdgMini::K_plus) )){
237  LVS13+=LV;
238  haspart1=true;
239  }
240  else{
241  LVS23+=LV;
242  }
243  }
244  }
245  }
246  }
247  part.clear();
248  JAKInvMass.at(jak_id).at(0)->Fill(LVQ.M(),weight);
249  if(jak_id==TauDecay::JAK_A1_3PI ||
250  jak_id==TauDecay::JAK_KPIK ||
251  jak_id==TauDecay::JAK_KPIPI
252  ){
253  JAKInvMass.at(jak_id).at(1)->Fill(LVS13.M(),weight);
254  JAKInvMass.at(jak_id).at(2)->Fill(LVS23.M(),weight);
255  JAKInvMass.at(jak_id).at(3)->Fill(LVS12.M(),weight);
256  }
257  }
258  }
259  else{
260  JAKID->Fill(jak_id,weight);
261  }
262  }
263  }
264  }
265  delete myGenEvent;
266 }//analyze
const double beta
int i
Definition: DBlmapReader.cc:9
MonitorElement * TauPhi
std::vector< std::vector< MonitorElement * > > JAKInvMass
MonitorElement * nTaus
WeightManager wmanager_
Definition: TauValidation.h:71
MonitorElement * DecayLength
MonitorElement * TauPt
void spinEffectsZH(const HepMC::GenParticle *boson, double weight)
MonitorElement * JAKID
int tauProngs(const HepMC::GenParticle *, double weight)
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
void Fill(long long x)
int tauMother(const HepMC::GenParticle *, double weight)
int tauDecayChannel(const HepMC::GenParticle *, double weight=0.0)
math::XYZTLorentzVectorD LV
int iEvent
Definition: GenABIO.cc:230
void photons(const HepMC::GenParticle *, double weight)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isLastTauinChain(const HepMC::GenParticle *tau)
void rtau(const HepMC::GenParticle *, int, int, double weight)
part
Definition: HCALResponse.h:20
void spinEffectsWHpm(const HepMC::GenParticle *, int, int, std::vector< HepMC::GenParticle * > &part, double weight)
MonitorElement * LifeTime
MonitorElement * TauEta
unsigned int NJAKID
int weight
Definition: histoStyle.py:50
double weight(const edm::Event &)
MonitorElement * nPrimeTaus
void TauValidation::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Setting the DQM top directories

Implements DQMEDAnalyzer.

Definition at line 37 of file TauValidation.cc.

References A0, a1, DQMStore::IBooker::book1D(), D, DecayLength, electron, gamma, H0, Hpm, HSM, j, TauDecay::JAK_A1_3PI, TauDecay::JAK_KPIK, TauDecay::JAK_KPIPI, JAKID, JAKInvMass, K, Kstar, LifeTime, muon, NJAKID, nPrimeTaus, nTaus, other, Pi, pi, pi1pi0, pinpi0, rho, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), stable, TauBremPhotonsN, TauBremPhotonsPt, TauBremPhotonsPtSum, TauDecayChannels, TauEta, TauFSRPhotonsN, TauFSRPhotonsPt, TauFSRPhotonsPtSum, TauMothers, TauPhi, TauProngs, TauPt, TauRtauHpm, TauRtauW, TauSpinEffectsH_eX, TauSpinEffectsH_muX, TauSpinEffectsH_MVis, TauSpinEffectsH_pipiAcollinearity, TauSpinEffectsH_pipiAcollinearityzoom, TauSpinEffectsH_pipiAcoplanarity, TauSpinEffectsH_rhorhoAcoplanarityminus, TauSpinEffectsH_rhorhoAcoplanarityplus, TauSpinEffectsH_X, TauSpinEffectsH_Xb, TauSpinEffectsH_Xf, TauSpinEffectsH_Zs, TauSpinEffectsHpm_eX, TauSpinEffectsHpm_muX, TauSpinEffectsHpm_UpsilonA1, TauSpinEffectsHpm_UpsilonRho, TauSpinEffectsHpm_X, TauSpinEffectsW_eX, TauSpinEffectsW_muX, TauSpinEffectsW_UpsilonA1, TauSpinEffectsW_UpsilonRho, TauSpinEffectsW_X, TauSpinEffectsZ_eX, TauSpinEffectsZ_muX, TauSpinEffectsZ_MVis, TauSpinEffectsZ_X, TauSpinEffectsZ_Xb, TauSpinEffectsZ_Xf, TauSpinEffectsZ_Zs, tmp, tripi, tripinpi0, undetermined, W, Z, zsbins, zsmax, and zsmin.

37  {
39  i.setCurrentFolder("Generator/Tau");
40 
41  // Number of analyzed events
42  nTaus = i.book1D("nTaus", "n analyzed Taus", 1, 0., 1.);
43  nPrimeTaus = i.book1D("nPrimeTaus", "n analyzed prime Taus", 1, 0., 1.);
44 
45  //Kinematics
46  TauPt = i.book1D("TauPt","Tau pT", 100 ,0,100);
47  TauEta = i.book1D("TauEta","Tau eta", 100 ,-2.5,2.5);
48  TauPhi = i.book1D("TauPhi","Tau phi", 100 ,-3.14,3.14);
49  TauProngs = i.book1D("TauProngs","Tau n prongs", 7 ,0,7);
50  TauDecayChannels = i.book1D("TauDecayChannels","Tau decay channels", 13 ,0,13);
54  TauDecayChannels->setBinLabel(1+pi,"#pi^{#pm}");
55  TauDecayChannels->setBinLabel(1+rho,"#rho^{#pm}");
56  TauDecayChannels->setBinLabel(1+a1,"a_{1}^{#pm}");
57  TauDecayChannels->setBinLabel(1+pi1pi0,"#pi^{#pm}#pi^{0}");
58  TauDecayChannels->setBinLabel(1+pinpi0,"#pi^{#pm}n#pi^{0}");
59  TauDecayChannels->setBinLabel(1+tripi,"3#pi^{#pm}");
60  TauDecayChannels->setBinLabel(1+tripinpi0,"3#pi^{#pm}n#pi^{0}");
63  TauDecayChannels->setBinLabel(1+stable,"Stable");
64 
65  TauMothers = i.book1D("TauMothers","Tau mother particles", 10 ,0,10);
67  TauMothers->setBinLabel(1+B,"B Decays");
68  TauMothers->setBinLabel(1+D,"D Decays");
69  TauMothers->setBinLabel(1+gamma,"#gamma");
70  TauMothers->setBinLabel(1+Z,"Z");
71  TauMothers->setBinLabel(1+W,"W");
72  TauMothers->setBinLabel(1+HSM,"H_{SM}/h^{0}");
73  TauMothers->setBinLabel(1+H0,"H^{0}");
74  TauMothers->setBinLabel(1+A0,"A^{0}");
75  TauMothers->setBinLabel(1+Hpm,"H^{#pm}");
76 
77  DecayLength = i.book1D("DecayLength","#tau Decay Length", 100 ,-20,20); DecayLength->setAxisTitle("L_{#tau} (mm)");
78  LifeTime = i.book1D("LifeTime","#tau LifeTime ", 500 ,0,1000E-14); LifeTime->setAxisTitle("#tau_{#tau} (s)");
79 
80  TauRtauW = i.book1D("TauRtauW","W->Tau p(leading track)/E(visible tau)", 50 ,0,1); TauRtauW->setAxisTitle("rtau");
81  TauRtauHpm = i.book1D("TauRtauHpm","Hpm->Tau p(leading track)/E(visible tau)", 50 ,0,1); TauRtauHpm->setAxisTitle("rtau");
82 
83  TauSpinEffectsW_X = i.book1D("TauSpinEffectsWX","Pion energy in W rest frame", 50 ,0,1); TauSpinEffectsW_X->setAxisTitle("X");
84  TauSpinEffectsHpm_X = i.book1D("TauSpinEffectsHpmX","Pion energy in Hpm rest frame", 50 ,0,1); TauSpinEffectsHpm_X->setAxisTitle("X");
85 
86  TauSpinEffectsW_eX = i.book1D("TauSpinEffectsWeX","e energy in W rest frame", 50 ,0,1); TauSpinEffectsW_eX->setAxisTitle("X");
87  TauSpinEffectsHpm_eX = i.book1D("TauSpinEffectsHpmeX","e energy in Hpm rest frame", 50 ,0,1); TauSpinEffectsHpm_eX->setAxisTitle("X");
88 
89  TauSpinEffectsW_muX = i.book1D("TauSpinEffectsWmuX","mu energy in W rest frame", 50 ,0,1); TauSpinEffectsW_muX->setAxisTitle("X");
90  TauSpinEffectsHpm_muX = i.book1D("TauSpinEffectsHpmmuX","mu energy in Hpm rest frame", 50 ,0,1); TauSpinEffectsHpm_muX->setAxisTitle("X");
91 
92  TauSpinEffectsW_UpsilonRho = i.book1D("TauSpinEffectsWUpsilonRho","#Upsilon for #rho", 50 ,-1,1); TauSpinEffectsW_UpsilonRho->setAxisTitle("#Upsilon");
93  TauSpinEffectsHpm_UpsilonRho = i.book1D("TauSpinEffectsHpmUpsilonRho","#Upsilon for #rho", 50 ,-1,1); TauSpinEffectsHpm_UpsilonRho->setAxisTitle("#Upsilon");
94 
95  TauSpinEffectsW_UpsilonA1 = i.book1D("TauSpinEffectsWUpsilonA1","#Upsilon for a1", 50 ,-1,1); TauSpinEffectsW_UpsilonA1->setAxisTitle("#Upsilon");
96  TauSpinEffectsHpm_UpsilonA1 = i.book1D("TauSpinEffectsHpmUpsilonA1","#Upsilon for a1", 50 ,-1,1); TauSpinEffectsHpm_UpsilonA1->setAxisTitle("#Upsilon");
97 
98  TauSpinEffectsH_pipiAcoplanarity = i.book1D("TauSpinEffectsH_pipiAcoplanarity","H Acoplanarity for #pi^{-}#pi^{+}", 50 ,0,2*TMath::Pi()); TauSpinEffectsH_pipiAcoplanarity->setAxisTitle("Acoplanarity");
99 
100  TauSpinEffectsH_pipiAcollinearity = i.book1D("TauSpinEffectsH_pipiAcollinearity","H Acollinearity for #pi^{-}#pi^{+}", 50 ,0,TMath::Pi()); TauSpinEffectsH_pipiAcollinearity->setAxisTitle("Acollinearity");
101  TauSpinEffectsH_pipiAcollinearityzoom = i.book1D("TauSpinEffectsH_pipiAcollinearityzoom","H Acollinearity for #pi^{-}#pi^{+}", 50 ,3,TMath::Pi()); TauSpinEffectsH_pipiAcollinearityzoom->setAxisTitle("Acollinearity");
102 
103  TauSpinEffectsZ_MVis = i.book1D("TauSpinEffectsZMVis","Mass of pi+ pi-", 25 ,0,1.1); TauSpinEffectsZ_MVis->setAxisTitle("M_{#pi^{+}#pi^{-}}");
104  TauSpinEffectsH_MVis = i.book1D("TauSpinEffectsHMVis","Mass of pi+ pi-", 25 ,0,1.1); TauSpinEffectsZ_MVis->setAxisTitle("M_{#pi^{+}#pi^{-}}");
105 
106  TauSpinEffectsZ_Zs = i.book1D("TauSpinEffectsZZs","Z_{s}", zsbins ,zsmin,zsmax); TauSpinEffectsZ_Zs->setAxisTitle("Z_{s}");
107  TauSpinEffectsH_Zs = i.book1D("TauSpinEffectsHZs","Z_{s}", zsbins ,zsmin,zsmax); TauSpinEffectsZ_Zs->setAxisTitle("Z_{s}");
108 
109  TauSpinEffectsZ_X= i.book1D("TauSpinEffectsZX","X of #tau^{-}", 25 ,0,1.0); TauSpinEffectsZ_X->setAxisTitle("X");
110  TauSpinEffectsH_X= i.book1D("TauSpinEffectsH_X","X of #tau^{-}", 25 ,0,1.0); TauSpinEffectsH_X->setAxisTitle("X");
111 
112  TauSpinEffectsZ_Xf = i.book1D("TauSpinEffectsZXf","X of forward emitted #tau^{-}", 25 ,0,1.0); TauSpinEffectsZ_Xf->setAxisTitle("X_{f}");
113  TauSpinEffectsH_Xf = i.book1D("TauSpinEffectsHXf","X of forward emitted #tau^{-}", 25 ,0,1.0); TauSpinEffectsZ_Xf->setAxisTitle("X_{f}");
114 
115  TauSpinEffectsZ_Xb = i.book1D("TauSpinEffectsZXb","X of backward emitted #tau^{-}", 25 ,0,1.0); TauSpinEffectsZ_Xb->setAxisTitle("X_{b}");
116  TauSpinEffectsH_Xb = i.book1D("TauSpinEffectsHXb","X of backward emitted #tau^{-}", 25 ,0,1.0); TauSpinEffectsZ_Xb->setAxisTitle("X_{b}");
117 
118  TauSpinEffectsZ_eX = i.book1D("TauSpinEffectsZeX","e energy in Z rest frame", 50 ,0,1); TauSpinEffectsZ_eX->setAxisTitle("X");
119  TauSpinEffectsH_eX = i.book1D("TauSpinEffectsHeX","e energy in H rest frame", 50 ,0,1); TauSpinEffectsH_eX->setAxisTitle("X");
120 
121  TauSpinEffectsZ_muX = i.book1D("TauSpinEffectsZmuX","mu energy in z rest frame", 50 ,0,1); TauSpinEffectsZ_muX->setAxisTitle("X");
122  TauSpinEffectsH_muX = i.book1D("TauSpinEffectsHmuX","mu energy in H rest frame", 50 ,0,1); TauSpinEffectsH_muX->setAxisTitle("X");
123 
124  TauSpinEffectsH_rhorhoAcoplanarityminus = i.book1D("TauSpinEffectsH_rhorhoAcoplanarityminus","#phi^{*-} (acoplanarity) for Higgs #rightarrow #rho-#rho (y_{1}*y_{2}<0)", 32 ,0,2*TMath::Pi()); TauSpinEffectsH_rhorhoAcoplanarityminus->setAxisTitle("#phi^{*-} (Acoplanarity)");
125  TauSpinEffectsH_rhorhoAcoplanarityplus = i.book1D("TauSpinEffectsH_rhorhoAcoplanarityplus","#phi^{*+} (acoplanarity) for Higgs #rightarrow #rho-#rho (y_{1}*y_{2}>0)", 32 ,0,2*TMath::Pi()); TauSpinEffectsH_rhorhoAcoplanarityplus->setAxisTitle("#phi^{*+} (Acoplanarity)");
126 
127  TauFSRPhotonsN=i.book1D("TauFSRPhotonsN","FSR Photons radiating from/with tau (Gauge Boson)", 5 ,-0.5,4.5);
128  TauFSRPhotonsN->setAxisTitle("N FSR Photons radiating from/with tau");
129  TauFSRPhotonsPt=i.book1D("TauFSRPhotonsPt","Pt of FSR Photons radiating from/with tau (Gauge Boson)", 100 ,0,100);
130  TauFSRPhotonsPt->setAxisTitle("P_{t} of FSR Photons radiating from/with tau [per tau]");
131  TauFSRPhotonsPtSum=i.book1D("TauFSRPhotonsPtSum","Pt of FSR Photons radiating from/with tau (Gauge Boson)", 100 ,0,100);
132  TauFSRPhotonsPtSum->setAxisTitle("P_{t} of FSR Photons radiating from/with tau [per tau]");
133 
134  TauBremPhotonsN=i.book1D("TauBremPhotonsN","Brem. Photons radiating in tau decay", 5 ,-0.5,4.5);
135  TauBremPhotonsN->setAxisTitle("N FSR Photons radiating from/with tau");
136  TauBremPhotonsPt=i.book1D("TauBremPhotonsPt","Sum Brem Pt ", 100 ,0,100);
137  TauFSRPhotonsPt->setAxisTitle("P_{t} of Brem. Photons radiating in tau decay");
138  TauBremPhotonsPtSum =i.book1D("TauBremPhotonsPtSum","Sum of Brem Pt ", 100 ,0,100);
139  TauFSRPhotonsPtSum->setAxisTitle("Sum P_{t} of Brem. Photons radiating in tau decay");
140 
141  JAKID =i.book1D("JAKID","JAK ID",NJAKID+1,-0.5,NJAKID+0.5);
142  for(unsigned int j=0; j<NJAKID+1;j++){
143  JAKInvMass.push_back(std::vector<MonitorElement *>());
144  TString tmp="JAKID";
145  tmp+=j;
146  JAKInvMass.at(j).push_back(i.book1D("M"+tmp,"M_{"+tmp+"} (GeV)", 80 ,0,2.0));
147  if(j==TauDecay::JAK_A1_3PI ||
150  JAKInvMass.at(j).push_back(i.book1D("M13"+tmp,"M_{13,"+tmp+"} (GeV)", 80 ,0,2.0));
151  JAKInvMass.at(j).push_back(i.book1D("M23"+tmp,"M_{23,"+tmp+"} (GeV)", 80 ,0,2.0));
152  JAKInvMass.at(j).push_back(i.book1D("M12"+tmp,"M_{12,"+tmp+"} (GeV)", 80 ,0,2.0));
153  }
154  }
155  return;
156 }
MonitorElement * TauFSRPhotonsN
const double Pi
MonitorElement * TauSpinEffectsH_rhorhoAcoplanarityplus
MonitorElement * TauPhi
MonitorElement * TauSpinEffectsW_X
MonitorElement * TauSpinEffectsHpm_UpsilonA1
std::vector< std::vector< MonitorElement * > > JAKInvMass
MonitorElement * TauSpinEffectsZ_Xb
MonitorElement * nTaus
MonitorElement * DecayLength
MonitorElement * TauRtauW
MonitorElement * TauPt
MonitorElement * TauSpinEffectsH_MVis
MonitorElement * TauMothers
MonitorElement * TauSpinEffectsHpm_eX
MonitorElement * TauSpinEffectsW_muX
MonitorElement * TauBremPhotonsN
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * JAKID
MonitorElement * TauSpinEffectsZ_Xf
MonitorElement * TauBremPhotonsPtSum
MonitorElement * TauSpinEffectsH_pipiAcoplanarity
MonitorElement * TauSpinEffectsHpm_UpsilonRho
MonitorElement * TauSpinEffectsZ_eX
MonitorElement * TauProngs
MonitorElement * TauSpinEffectsH_pipiAcollinearityzoom
MonitorElement * TauSpinEffectsW_UpsilonRho
MonitorElement * TauSpinEffectsH_rhorhoAcoplanarityminus
MonitorElement * TauSpinEffectsH_Xf
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
MonitorElement * TauFSRPhotonsPt
int j
Definition: DBlmapReader.cc:9
MonitorElement * TauSpinEffectsZ_muX
MonitorElement * TauDecayChannels
MonitorElement * TauSpinEffectsH_Zs
MonitorElement * TauFSRPhotonsPtSum
MonitorElement * TauSpinEffectsZ_MVis
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * TauSpinEffectsH_pipiAcollinearity
MonitorElement * TauSpinEffectsZ_X
MonitorElement * TauSpinEffectsH_eX
MonitorElement * TauSpinEffectsW_eX
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
MonitorElement * LifeTime
MonitorElement * TauSpinEffectsH_muX
MonitorElement * TauSpinEffectsW_UpsilonA1
MonitorElement * TauEta
unsigned int NJAKID
MonitorElement * TauSpinEffectsZ_Zs
MonitorElement * TauSpinEffectsHpm_X
MonitorElement * TauSpinEffectsHpm_muX
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * TauSpinEffectsH_Xb
MonitorElement * nPrimeTaus
MonitorElement * TauBremPhotonsPt
MonitorElement * TauRtauHpm
MonitorElement * TauSpinEffectsH_X
void TauValidation::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 33 of file TauValidation.cc.

References fPDGTable, and edm::EventSetup::getData().

33  {
34  c.getData( fPDGTable );
35 }
void getData(T &iHolder) const
Definition: EventSetup.h:67
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
PDT table.
Definition: TauValidation.h:99
void TauValidation::findFSRandBrem ( const HepMC::GenParticle *  p,
bool  doBrem,
std::vector< const HepMC::GenParticle * > &  ListofFSR,
std::vector< const HepMC::GenParticle * > &  ListofBrem 
)
private

Definition at line 330 of file TauValidation.cc.

References funct::abs(), and isLastTauinChain().

Referenced by photons().

331  {
332  // note this code split the FSR and Brem based one if the tau decays into a tau+photon or not with the Fortran Tauola Interface, this is not 100% correct because photos puts the tau with the regular tau decay products.
333  if(abs(p->pdg_id())==15){
334  if(isLastTauinChain(p)){ doBrem=true;}
335  else{ doBrem=false;}
336  }
337  int photo_ID=22;
338  if ( p->end_vertex() ) {
339  HepMC::GenVertex::particle_iterator dau;
340  for (dau = p->end_vertex()->particles_begin(HepMC::children); dau!= p->end_vertex()->particles_end(HepMC::children); dau++ ) {
341  //if(doBrem) std::cout << "true " << (*dau)->pdg_id() << " " << std::endl;
342  //else std::cout << "false " << (*dau)->pdg_id() << " " << std::endl;
343  if(abs((*dau)->pdg_id()) == abs(photo_ID) && !doBrem){ListofFSR.push_back(*dau);}
344  if(abs((*dau)->pdg_id()) == abs(photo_ID) && doBrem){ListofBrem.push_back(*dau);}
345  if((*dau)->end_vertex() && (*dau)->end_vertex()->particles_out_size()>0 && abs((*dau)->pdg_id()) != 111 && abs((*dau)->pdg_id()) != 221/* remove pi0 and eta decays*/){
346  findFSRandBrem(*dau,doBrem,ListofFSR,ListofBrem);
347  }
348  }
349  }
350 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isLastTauinChain(const HepMC::GenParticle *tau)
void findFSRandBrem(const HepMC::GenParticle *p, bool doBrem, std::vector< const HepMC::GenParticle * > &ListofFSR, std::vector< const HepMC::GenParticle * > &ListofBrem)
int TauValidation::findMother ( const HepMC::GenParticle *  tau)
private

Definition at line 293 of file TauValidation.cc.

References parents.

Referenced by spinEffectsZH(), and tauMother().

293  {
294  int mother_pid = 0;
295  if ( tau->production_vertex() ) {
296  HepMC::GenVertex::particle_iterator mother;
297  for (mother = tau->production_vertex()->particles_begin(HepMC::parents); mother!= tau->production_vertex()->particles_end(HepMC::parents); mother++ ) {
298  mother_pid = (*mother)->pdg_id();
299  if(mother_pid == tau->pdg_id()) return findMother(*mother); //mother_pid = -1; Make recursive to look for last tau in chain
300  }
301  }
302  return mother_pid;
303 }
TPRegexp parents
Definition: eve_filter.cc:24
int findMother(const HepMC::GenParticle *)
void TauValidation::FindPhotosFSR ( const HepMC::GenParticle *  p,
std::vector< const HepMC::GenParticle * > &  ListofFSR,
double &  BosonScale 
)
private

Definition at line 354 of file TauValidation.cc.

References funct::abs(), configurableAnalysis::GenParticle, GetMother(), and m.

Referenced by photons().

354  {
355  BosonScale=0.0;
357  double mother_pid=m->pdg_id();
358  if(m->end_vertex() && mother_pid!=p->pdg_id()){
359  HepMC::GenVertex::particle_iterator dau;
360  for (dau = m->end_vertex()->particles_begin(HepMC::children); dau!= m->end_vertex()->particles_end(HepMC::children); dau++ ) {
361  int dau_pid = (*dau)->pdg_id();
362  if(fabs(dau_pid) == 22) {
363  ListofFSR.push_back(*dau);
364  }
365  }
366  }
367  if(abs(mother_pid) == 24) BosonScale=1.0; // W
368  if(abs(mother_pid) == 23) BosonScale=2.0; // Z;
369  if(abs(mother_pid) == 22) BosonScale=2.0; // gamma;
370  if(abs(mother_pid) == 25) BosonScale=2.0; // HSM;
371  if(abs(mother_pid) == 35) BosonScale=2.0; // H0;
372  if(abs(mother_pid) == 36) BosonScale=2.0; // A0;
373  if(abs(mother_pid) == 37) BosonScale=1.0; //Hpm;
374 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const HepMC::GenParticle * GetMother(const HepMC::GenParticle *tau)
void TauValidation::findTauList ( const HepMC::GenParticle *  tau,
std::vector< const HepMC::GenParticle * > &  TauList 
)
private

Definition at line 318 of file TauValidation.cc.

References parents, and metsig::tau.

Referenced by photons().

318  {
319  TauList.insert(TauList.begin(),tau);
320  if ( tau->production_vertex() ) {
321  HepMC::GenVertex::particle_iterator mother;
322  for (mother = tau->production_vertex()->particles_begin(HepMC::parents); mother!= tau->production_vertex()->particles_end(HepMC::parents);mother++) {
323  if((*mother)->pdg_id() == tau->pdg_id()){
324  findTauList(*mother,TauList);
325  }
326  }
327  }
328 }
void findTauList(const HepMC::GenParticle *tau, std::vector< const HepMC::GenParticle * > &TauList)
TPRegexp parents
Definition: eve_filter.cc:24
const HepMC::GenParticle * TauValidation::GetMother ( const HepMC::GenParticle *  tau)
private

Definition at line 268 of file TauValidation.cc.

References parents, and metsig::tau.

Referenced by FindPhotosFSR(), and motherP4().

268  {
269  if ( tau->production_vertex() ) {
270  HepMC::GenVertex::particle_iterator mother;
271  for (mother = tau->production_vertex()->particles_begin(HepMC::parents); mother!= tau->production_vertex()->particles_end(HepMC::parents); mother++ ) {
272  if((*mother)->pdg_id() == tau->pdg_id()) return GetMother(*mother);
273  return (*mother);
274  }
275  }
276  return tau;
277 }
TPRegexp parents
Definition: eve_filter.cc:24
const HepMC::GenParticle * GetMother(const HepMC::GenParticle *tau)
const std::vector< HepMC::GenParticle * > TauValidation::GetMothers ( const HepMC::GenParticle *  boson)
private

Definition at line 280 of file TauValidation.cc.

References parents.

Referenced by spinEffectsZH().

280  {
281  std::vector<HepMC::GenParticle*> mothers;
282  if ( boson->production_vertex() ) {
283  HepMC::GenVertex::particle_iterator mother;
284  for (mother = boson->production_vertex()->particles_begin(HepMC::parents); mother!= boson->production_vertex()->particles_end(HepMC::parents); mother++ ) {
285  if((*mother)->pdg_id() == boson->pdg_id()) return GetMothers(*mother);
286  mothers.push_back(*mother);
287  }
288  }
289  return mothers;
290 }
TPRegexp parents
Definition: eve_filter.cc:24
const std::vector< HepMC::GenParticle * > GetMothers(const HepMC::GenParticle *boson)
bool TauValidation::isLastTauinChain ( const HepMC::GenParticle *  tau)
private

Definition at line 306 of file TauValidation.cc.

Referenced by analyze(), and findFSRandBrem().

306  {
307  if ( tau->end_vertex() ) {
308  HepMC::GenVertex::particle_iterator dau;
309  for (dau = tau->end_vertex()->particles_begin(HepMC::children); dau!= tau->end_vertex()->particles_end(HepMC::children); dau++ ) {
310  int dau_pid = (*dau)->pdg_id();
311  if(dau_pid == tau->pdg_id()) return false;
312  }
313  }
314  return true;
315 }
double TauValidation::leadingPionMomentum ( const HepMC::GenParticle *  tau,
double  weight 
)
private

Definition at line 747 of file TauValidation.cc.

References leadingPionP4().

Referenced by rtau().

747  {
748  return leadingPionP4(tau).P();
749 }
TLorentzVector leadingPionP4(const HepMC::GenParticle *)
TLorentzVector TauValidation::leadingPionP4 ( const HepMC::GenParticle *  tau)
private

Definition at line 751 of file TauValidation.cc.

References funct::abs(), p4, and sysUtil::pid.

Referenced by leadingPionMomentum(), spinEffectsWHpm(), and spinEffectsZH().

751  {
752 
753  TLorentzVector p4(0,0,0,0);
754 
755  if ( tau->end_vertex() ) {
756  HepMC::GenVertex::particle_iterator des;
757  for(des = tau->end_vertex()->particles_begin(HepMC::descendants);
758  des!= tau->end_vertex()->particles_end(HepMC::descendants);++des ) {
759  int pid = (*des)->pdg_id();
760 
761  if(abs(pid) == 15) return leadingPionP4(*des);
762 
763  if(!(abs(pid)==211 || abs(pid)==13 || abs(pid)==11)) continue;
764 
765  if((*des)->momentum().rho() > p4.P()) {
766  p4 = TLorentzVector((*des)->momentum().px(),
767  (*des)->momentum().py(),
768  (*des)->momentum().pz(),
769  (*des)->momentum().e());
770  }
771  }
772  }
773 
774  return p4;
775 }
double p4[4]
Definition: TauolaWrapper.h:92
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TLorentzVector leadingPionP4(const HepMC::GenParticle *)
tuple pid
Definition: sysUtil.py:22
TLorentzVector TauValidation::motherP4 ( const HepMC::GenParticle *  tau)
private

Definition at line 777 of file TauValidation.cc.

References configurableAnalysis::GenParticle, GetMother(), and m.

Referenced by spinEffectsWHpm().

777  {
779  return TLorentzVector(m->momentum().px(),m->momentum().py(),m->momentum().pz(),m->momentum().e());
780 }
const HepMC::GenParticle * GetMother(const HepMC::GenParticle *tau)
void TauValidation::photons ( const HepMC::GenParticle *  tau,
double  weight 
)
private

Definition at line 808 of file TauValidation.cc.

References MonitorElement::Fill(), findFSRandBrem(), FindPhotosFSR(), findTauList(), i, TauBremPhotonsN, TauBremPhotonsPt, TauBremPhotonsPtSum, TauFSRPhotonsN, TauFSRPhotonsPt, TauFSRPhotonsPtSum, and histoStyle::weight.

Referenced by analyze().

808  {
809  // Find First tau in chain
810  std::vector<const HepMC::GenParticle*> TauList;
811  findTauList(tau,TauList);
812 
813  // Get List of Gauge Boson to tau(s) FSR and Brem
814  bool passedW=false;
815  std::vector<const HepMC::GenParticle*> ListofFSR; ListofFSR.clear();
816  std::vector<const HepMC::GenParticle*> ListofBrem; ListofBrem.clear();
817  std::vector<const HepMC::GenParticle*> FSR_photos; FSR_photos.clear();
818  double BosonScale(1);
819  if(TauList.size()>0){
820  TauValidation::findFSRandBrem(TauList.at(0),passedW,ListofFSR,ListofBrem);
821  TauValidation::FindPhotosFSR(TauList.at(0),FSR_photos,BosonScale);
822 
823  // Add the Tau Brem. information
824  TauBremPhotonsN->Fill(ListofBrem.size(),weight);
825  double photonPtSum=0;
826  for(unsigned int i=0;i<ListofBrem.size();i++){
827  photonPtSum+=ListofBrem.at(i)->momentum().perp();
828  TauBremPhotonsPt->Fill(ListofBrem.at(i)->momentum().perp(),weight);
829  }
830  TauBremPhotonsPtSum->Fill(photonPtSum,weight);
831 
832  // Now add the Gauge Boson FSR information
833  if(BosonScale!=0){
834  TauFSRPhotonsN->Fill(ListofFSR.size(),weight);
835  photonPtSum=0;
836  for(unsigned int i=0;i<ListofFSR.size();i++){
837  photonPtSum+=ListofFSR.at(i)->momentum().perp();
838  TauFSRPhotonsPt->Fill(ListofFSR.at(i)->momentum().perp(),weight);
839  }
840  double FSR_photosSum(0);
841  for(unsigned int i=0;i<FSR_photos.size();i++){
842  FSR_photosSum+=FSR_photos.at(i)->momentum().perp();
843  TauFSRPhotonsPt->Fill(FSR_photos.at(i)->momentum().perp()/BosonScale,weight*BosonScale);
844  }
845  TauFSRPhotonsPtSum->Fill(photonPtSum+FSR_photosSum/BosonScale,weight);
846  }
847  }
848 }
void findTauList(const HepMC::GenParticle *tau, std::vector< const HepMC::GenParticle * > &TauList)
MonitorElement * TauFSRPhotonsN
int i
Definition: DBlmapReader.cc:9
MonitorElement * TauBremPhotonsN
MonitorElement * TauBremPhotonsPtSum
void Fill(long long x)
MonitorElement * TauFSRPhotonsPt
MonitorElement * TauFSRPhotonsPtSum
void FindPhotosFSR(const HepMC::GenParticle *p, std::vector< const HepMC::GenParticle * > &ListofFSR, double &BosonScale)
void findFSRandBrem(const HepMC::GenParticle *p, bool doBrem, std::vector< const HepMC::GenParticle * > &ListofFSR, std::vector< const HepMC::GenParticle * > &ListofBrem)
int weight
Definition: histoStyle.py:50
MonitorElement * TauBremPhotonsPt
void TauValidation::rtau ( const HepMC::GenParticle *  tau,
int  mother,
int  decay,
double  weight 
)
private

Definition at line 475 of file TauValidation.cc.

References funct::abs(), MonitorElement::Fill(), leadingPionMomentum(), pi1pi0, tauEtCut, TauRtauHpm, TauRtauW, and visibleTauEnergy().

Referenced by analyze().

475  {
476 
477  if(decay != pi1pi0) return; // polarization only for 1-prong hadronic taus with one neutral pion to make a clean case
478 
479  if(tau->momentum().perp() < tauEtCut) return; // rtau visible only for boosted taus
480 
481  double rTau = 0;
482  double ltrack = leadingPionMomentum(tau, weight);
483  double visibleTauE = visibleTauEnergy(tau);
484 
485  if(visibleTauE != 0) rTau = ltrack/visibleTauE;
486 
487  if(abs(mother) == 24) TauRtauW->Fill(rTau,weight);
488  if(abs(mother) == 37) TauRtauHpm->Fill(rTau,weight);
489 }
MonitorElement * TauRtauW
void Fill(long long x)
double leadingPionMomentum(const HepMC::GenParticle *, double weight)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double visibleTauEnergy(const HepMC::GenParticle *)
int weight
Definition: histoStyle.py:50
MonitorElement * TauRtauHpm
void TauValidation::spinEffectsWHpm ( const HepMC::GenParticle *  tau,
int  mother,
int  decay,
std::vector< HepMC::GenParticle * > &  part,
double  weight 
)
private

Definition at line 491 of file TauValidation.cc.

References a1, funct::abs(), relval_parameters_module::energy, MonitorElement::Fill(), gamma, i, TauDecay::JAK_A1_3PI, TauDecay::JAK_ELECTRON, TauDecay::JAK_MUON, TauDecay::JAK_PION, TauDecay::JAK_RHO_PIPI0, leadingPionP4(), motherP4(), pi, PdtPdgMini::pi0, PdtPdgMini::pi_minus, PdtPdgMini::pi_plus, rho, TauSpinEffectsHpm_eX, TauSpinEffectsHpm_muX, TauSpinEffectsHpm_UpsilonA1, TauSpinEffectsHpm_UpsilonRho, TauSpinEffectsHpm_X, TauSpinEffectsW_eX, TauSpinEffectsW_muX, TauSpinEffectsW_UpsilonA1, TauSpinEffectsW_UpsilonRho, TauSpinEffectsW_X, and histoStyle::weight.

Referenced by analyze().

491  {
492  if(decay == TauDecay::JAK_PION || decay == TauDecay::JAK_MUON || decay == TauDecay::JAK_ELECTRON){ // polarization only for 1-prong hadronic taus with no neutral pions
493  TLorentzVector momP4 = motherP4(tau);
494  TLorentzVector pionP4 = leadingPionP4(tau);
495  pionP4.Boost(-1*momP4.BoostVector());
496  double energy = pionP4.E()/(momP4.M()/2);
497  if(decay == TauDecay::JAK_PION){
498  if(abs(mother) == 24) TauSpinEffectsW_X->Fill(energy,weight);
499  if(abs(mother) == 37) TauSpinEffectsHpm_X->Fill(energy,weight);
500  }
501  if(decay == TauDecay::JAK_MUON){
502  if(abs(mother) == 24) TauSpinEffectsW_muX->Fill(energy,weight);
503  if(abs(mother) == 37) TauSpinEffectsHpm_muX->Fill(energy,weight);
504  }
505  if(decay == TauDecay::JAK_ELECTRON){
506  if(abs(mother) == 24) TauSpinEffectsW_eX->Fill(energy,weight);
507  if(abs(mother) == 37) TauSpinEffectsHpm_eX->Fill(energy,weight);
508  }
509 
510  }
511  else if(decay==TauDecay::JAK_RHO_PIPI0){
512  TLorentzVector rho(0,0,0,0),pi(0,0,0,0);
513  for(unsigned int i=0;i<part.size();i++){
514  TLorentzVector LV(part.at(i)->momentum().px(),part.at(i)->momentum().py(),part.at(i)->momentum().pz(),part.at(i)->momentum().e());
515  if(abs(part.at(i)->pdg_id())==PdtPdgMini::pi_plus){pi+=LV; rho+=LV;}
516  if(abs(part.at(i)->pdg_id())==PdtPdgMini::pi0){rho+=LV;}
517  }
518  if(abs(mother) == 24) TauSpinEffectsW_UpsilonRho->Fill(2*pi.Pt()/rho.Pt()-1,weight);
519  if(abs(mother) == 37) TauSpinEffectsHpm_UpsilonRho->Fill(2*pi.Pt()/rho.Pt()-1,weight);
520  }
521  else if(decay==TauDecay::JAK_A1_3PI){ // only for pi2pi0 for now
522  TLorentzVector a1(0,0,0,0),pi_p(0,0,0,0),pi_m(0,0,0,0);
523  int nplus(0),nminus(0);
524  for(unsigned int i=0;i<part.size();i++){
525  TLorentzVector LV(part.at(i)->momentum().px(),part.at(i)->momentum().py(),part.at(i)->momentum().pz(),part.at(i)->momentum().e());
526  if(part.at(i)->pdg_id()==PdtPdgMini::pi_plus){ pi_p+=LV; a1+=LV; nplus++;}
527  if(part.at(i)->pdg_id()==PdtPdgMini::pi_minus){pi_m+=LV; a1+=LV; nminus++;}
528  }
529  double gamma=0;
530  if(nplus+nminus==3 && nplus==1) gamma=2*pi_p.Pt()/a1.Pt()-1;
531  if(nplus+nminus==3 && nminus==1) gamma=2*pi_m.Pt()/a1.Pt()-1;
532  else{
533  pi_p+=pi_m; gamma=2*pi_p.Pt()/a1.Pt()-1;
534  }
535  if(abs(mother) == 24) TauSpinEffectsW_UpsilonA1->Fill(gamma,weight);
536  if(abs(mother) == 37) TauSpinEffectsHpm_UpsilonA1->Fill(gamma,weight);
537  }
538 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * TauSpinEffectsW_X
MonitorElement * TauSpinEffectsHpm_UpsilonA1
MonitorElement * TauSpinEffectsHpm_eX
MonitorElement * TauSpinEffectsW_muX
MonitorElement * TauSpinEffectsHpm_UpsilonRho
void Fill(long long x)
math::XYZTLorentzVectorD LV
MonitorElement * TauSpinEffectsW_UpsilonRho
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TLorentzVector leadingPionP4(const HepMC::GenParticle *)
TLorentzVector motherP4(const HepMC::GenParticle *)
part
Definition: HCALResponse.h:20
MonitorElement * TauSpinEffectsW_eX
MonitorElement * TauSpinEffectsW_UpsilonA1
MonitorElement * TauSpinEffectsHpm_X
int weight
Definition: histoStyle.py:50
MonitorElement * TauSpinEffectsHpm_muX
void TauValidation::spinEffectsZH ( const HepMC::GenParticle *  boson,
double  weight 
)
private

Definition at line 540 of file TauValidation.cc.

References funct::abs(), PdtPdgMini::anti_d, PdtPdgMini::anti_u, DeDxDiscriminatorTools::charge(), PdtPdgMini::d, electron, MonitorElement::Fill(), findMother(), fPDGTable, GetMothers(), PdtPdgMini::Higgs0, i, leadingPionP4(), m, muon, n, Pi, pi, pi1pi0, sysUtil::pid, lumiQueryAPI::q, rho, tauDecayChannel(), TauSpinEffectsH_eX, TauSpinEffectsH_muX, TauSpinEffectsH_MVis, TauSpinEffectsH_pipiAcollinearity, TauSpinEffectsH_pipiAcollinearityzoom, TauSpinEffectsH_pipiAcoplanarity, TauSpinEffectsH_rhorhoAcoplanarityminus, TauSpinEffectsH_rhorhoAcoplanarityplus, TauSpinEffectsH_X, TauSpinEffectsH_Xb, TauSpinEffectsH_Xf, TauSpinEffectsH_Zs, TauSpinEffectsZ_eX, TauSpinEffectsZ_muX, TauSpinEffectsZ_MVis, TauSpinEffectsZ_X, TauSpinEffectsZ_Xb, TauSpinEffectsZ_Xf, TauSpinEffectsZ_Zs, PdtPdgMini::u, histoStyle::weight, Z, PdtPdgMini::Z0, zsbins, zsmax, zsmin, and Zstoa().

Referenced by analyze().

540  {
541  TLorentzVector tautau(0,0,0,0);
542  TLorentzVector pipi(0,0,0,0);
543  TLorentzVector taum(0,0,0,0);
544  TLorentzVector taup(0,0,0,0);
545  TLorentzVector rho_plus,rho_minus,pi_rhominus,pi0_rhominus,pi_rhoplus,pi0_rhoplus,pi_plus,pi_minus;
546  bool hasrho_minus(false),hasrho_plus(false),haspi_minus(false),haspi_plus(false);
547  int nSinglePionDecays(0),nSingleMuonDecays(0),nSingleElectronDecays(0);
548  double x1(0),x2(0);
549  TLorentzVector Zboson(boson->momentum().px(),boson->momentum().py(),boson->momentum().pz(),boson->momentum().e());
550  if ( boson->end_vertex() ) {
551  HepMC::GenVertex::particle_iterator des;
552  for(des = boson->end_vertex()->particles_begin(HepMC::children); des!= boson->end_vertex()->particles_end(HepMC::children);++des ) {
553  int pid = (*des)->pdg_id();
554  if(abs(findMother(*des)) != 15 && abs(pid) == 15 && (tauDecayChannel(*des) == pi || tauDecayChannel(*des) == muon || tauDecayChannel(*des) == electron )){
555  if(tauDecayChannel(*des) == pi)nSinglePionDecays++;
556  if(tauDecayChannel(*des) == muon)nSingleMuonDecays++;
557  if(tauDecayChannel(*des) == electron)nSingleElectronDecays++;
558  TLorentzVector LVtau((*des)->momentum().px(),(*des)->momentum().py(),(*des)->momentum().pz(),(*des)->momentum().e());
559  tautau += LVtau;
560  TLorentzVector LVpi=leadingPionP4(*des);
561  pipi+=LVpi;
562  const HepPDT::ParticleData* pd = fPDGTable->particle((*des)->pdg_id ());
563  int charge = (int) pd->charge();
564  LVtau.Boost(-1*Zboson.BoostVector());
565  LVpi.Boost(-1*Zboson.BoostVector());
566  if(tauDecayChannel(*des) == pi){
567  if(abs(boson->pdg_id())==PdtPdgMini::Z0) TauSpinEffectsZ_X->Fill(LVpi.P()/LVtau.E(),weight);
568  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0) TauSpinEffectsH_X->Fill(LVpi.P()/LVtau.E(),weight);
569  }
570  if(charge<0){x1=LVpi.P()/LVtau.E(); taum=LVtau;}
571  else{ x2=LVpi.P()/LVtau.E();}
572  }
573  if(abs(findMother(*des)) != 15 && abs(pid) == 15 && (tauDecayChannel(*des) == rho || tauDecayChannel(*des) == pi1pi0) ){
574  if ( (*des)->end_vertex() ) {
575  HepMC::GenVertex::particle_iterator tauprod;
576  TLorentzVector LVtau((*des)->momentum().px(),(*des)->momentum().py(),(*des)->momentum().pz(),(*des)->momentum().e());
577  if(pid == 15)taum=LVtau;
578  if(pid ==-15)taup=LVtau;
579  for(tauprod = (*des)->end_vertex()->particles_begin(HepMC::descendants); tauprod!= (*des)->end_vertex()->particles_end(HepMC::descendants);++tauprod ) {
580  int pid_d = (*tauprod)->pdg_id();
581  if(abs(pid_d)==211 || abs(pid_d)==111){
582  TLorentzVector LV((*tauprod)->momentum().px(),(*tauprod)->momentum().py(),(*tauprod)->momentum().pz(),(*tauprod)->momentum().e());
583  if(pid==15){
584  hasrho_minus=true;
585  if(pid_d==-211 ){ pi_rhominus=LV;}
586  if(abs(pid_d)==111 ){ pi0_rhominus=LV;}
587  }
588  if(pid==-15){
589  hasrho_plus=true;
590  if(pid_d==211 ){pi_rhoplus=LV;}
591  if(abs(pid_d)==111 ){pi0_rhoplus=LV;}
592  }
593  }
594  }
595  }
596  }
597  if(abs(findMother(*des)) != 15 && abs(pid) == 15 && (tauDecayChannel(*des) == pi) ){
598  if ( (*des)->end_vertex() ) {
599  HepMC::GenVertex::particle_iterator tauprod;
600  TLorentzVector LVtau((*des)->momentum().px(),(*des)->momentum().py(),(*des)->momentum().pz(),(*des)->momentum().e());
601  if(pid == 15)taum=LVtau;
602  if(pid ==-15)taup=LVtau;
603  for(tauprod = (*des)->end_vertex()->particles_begin(HepMC::descendants); tauprod!= (*des)->end_vertex()->particles_end(HepMC::descendants);++tauprod ) {
604  int pid_d = (*tauprod)->pdg_id();
605  if(abs(pid_d)==211 || abs(pid_d)==111){
606  TLorentzVector LV((*tauprod)->momentum().px(),(*tauprod)->momentum().py(),(*tauprod)->momentum().pz(),(*tauprod)->momentum().e());
607  if(pid==15){
608  haspi_minus=true;
609  if(pid_d==-211 ){ pi_minus=LV;}
610  }
611  if(pid==-15){
612  haspi_plus=true;
613  if(pid_d==211 ){pi_plus=LV;}
614  }
615  }
616  }
617  }
618  }
619  }
620  }
621  if(hasrho_minus && hasrho_plus){
622  //compute rhorho
623  rho_minus=pi_rhominus;
624  rho_minus+=pi0_rhominus;
625  rho_plus=pi_rhoplus;
626  rho_plus+=pi0_rhoplus;
627  TLorentzVector rhorho=rho_minus;rhorho+=rho_plus;
628 
629  // boost to rhorho cm
630  TLorentzVector pi_rhoplusb=pi_rhoplus; pi_rhoplusb.Boost(-1*rhorho.BoostVector());
631  TLorentzVector pi0_rhoplusb=pi0_rhoplus; pi0_rhoplusb.Boost(-1*rhorho.BoostVector());
632  TLorentzVector pi_rhominusb=pi_rhominus; pi_rhominusb.Boost(-1*rhorho.BoostVector());
633  TLorentzVector pi0_rhominusb=pi0_rhominus; pi0_rhominusb.Boost(-1*rhorho.BoostVector());
634 
635  // compute n+/-
636  TVector3 n_plus=pi_rhoplusb.Vect().Cross(pi0_rhoplusb.Vect());
637  TVector3 n_minus=pi_rhominusb.Vect().Cross(pi0_rhominusb.Vect());
638 
639  // compute the acoplanarity
640  double Acoplanarity=acos(n_plus.Dot(n_minus)/(n_plus.Mag()*n_minus.Mag()));
641  if(pi_rhominus.Vect().Dot(n_plus)>0){Acoplanarity*=-1;Acoplanarity+=2*TMath::Pi();}
642 
643  // now boost to tau frame
644  pi_rhoplus.Boost(-1*taup.BoostVector());
645  pi0_rhoplus.Boost(-1*taup.BoostVector());
646  pi_rhominus.Boost(-1*taum.BoostVector());
647  pi0_rhominus.Boost(-1*taum.BoostVector());
648 
649  // compute y1 and y2
650  double y1=(pi_rhoplus.E()-pi0_rhoplus.E())/(pi_rhoplus.E()+pi0_rhoplus.E());
651  double y2=(pi_rhominus.E()-pi0_rhominus.E())/(pi_rhominus.E()+pi0_rhominus.E());
652 
653  // fill histograms
654  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0 && y1*y2<0) TauSpinEffectsH_rhorhoAcoplanarityminus->Fill(Acoplanarity,weight);
655  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0 && y1*y2>0) TauSpinEffectsH_rhorhoAcoplanarityplus->Fill(Acoplanarity,weight);
656  }
657  if(haspi_minus && haspi_plus){
658  TLorentzVector tauporig=taup;
659  TLorentzVector taumorig=taum;
660 
661  // now boost to Higgs frame
662  pi_plus.Boost(-1*Zboson.BoostVector());
663  pi_minus.Boost(-1*Zboson.BoostVector());
664 
665  taup.Boost(-1*Zboson.BoostVector());
666  taum.Boost(-1*Zboson.BoostVector());
667 
668  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0){
669  TauSpinEffectsH_pipiAcollinearity->Fill(acos(pi_plus.Vect().Dot(pi_minus.Vect())/(pi_plus.P()*pi_minus.P())));
670  TauSpinEffectsH_pipiAcollinearityzoom->Fill(acos(pi_plus.Vect().Dot(pi_minus.Vect())/(pi_plus.P()*pi_minus.P())));
671  }
672 
673  double proj_m=taum.Vect().Dot(pi_minus.Vect())/(taum.P()*taup.P());
674  double proj_p=taup.Vect().Dot(pi_plus.Vect())/(taup.P()*taup.P());
675  TVector3 Tau_m=taum.Vect();
676  TVector3 Tau_p=taup.Vect();
677  Tau_m*=proj_m;
678  Tau_p*=proj_p;
679  TVector3 Pit_m=pi_minus.Vect()-Tau_m;
680  TVector3 Pit_p=pi_plus.Vect()-Tau_p;
681 
682  double Acoplanarity=acos(Pit_m.Dot(Pit_p)/(Pit_p.Mag()*Pit_m.Mag()));
683  TVector3 n=Pit_p.Cross(Pit_m);
684  if(n.Dot(Tau_m)/Tau_m.Mag()>0){Acoplanarity*=-1; Acoplanarity+=2*TMath::Pi();}
685  // fill histograms
686  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0) TauSpinEffectsH_pipiAcoplanarity->Fill(Acoplanarity,weight);
687  taup=tauporig;
688  taum=taumorig;
689 
690  }
691 
692 
693  if(nSingleMuonDecays==2){
694  if(abs(boson->pdg_id())==PdtPdgMini::Z0) TauSpinEffectsZ_muX->Fill(x1,weight);
695  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0) TauSpinEffectsH_muX->Fill(x1,weight);
696  }
697  if(nSingleElectronDecays==2){
698  if(abs(boson->pdg_id())==PdtPdgMini::Z0) TauSpinEffectsZ_eX->Fill(x1,weight);
699  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0) TauSpinEffectsH_eX->Fill(x1,weight);
700  }
701  if(nSinglePionDecays == 2 && tautau.M()!= 0) {
702  for(int i=0;i<zsbins;i++){
703  double zslow=((double)i)*(zsmax-zsmin)/((double)zsbins)+zsmin;
704  double zsup=((double)i+1)*(zsmax-zsmin)/((double)zsbins)+zsmin;
705  double aup=Zstoa(zsup), alow=Zstoa(zslow);
706  if(x2-x1>alow && x2-x1<aup){
707  double zs=(zsup+zslow)/2;
708  if(abs(boson->pdg_id())==PdtPdgMini::Z0) TauSpinEffectsZ_Zs->Fill(zs,weight);
709  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0) TauSpinEffectsH_Zs->Fill(zs,weight);
710  break;
711  }
712  }
713  if(abs(boson->pdg_id())==PdtPdgMini::Z0) TauSpinEffectsZ_MVis->Fill(pipi.M()/tautau.M(),weight);
714  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0) TauSpinEffectsH_MVis->Fill(pipi.M()/tautau.M(),weight);
715 
716  if(x1!=0){
717  const std::vector<HepMC::GenParticle*> m=GetMothers(boson);
718  int q(0),qbar(0);
719  TLorentzVector Z(0,0,0,0);
720  for(unsigned int i=0;i<m.size();i++){
721  if(m.at(i)->pdg_id()==PdtPdgMini::d || m.at(i)->pdg_id()==PdtPdgMini::u ){q++;}
722  if(m.at(i)->pdg_id()==PdtPdgMini::anti_d || m.at(i)->pdg_id()==PdtPdgMini::anti_u ){qbar++;}
723  }
724  if(q==1 && qbar==1){// assume q has largest E (valence vs see quarks)
725  if(taum.Vect().Dot(Zboson.Vect())/(Zboson.P()*taum.P())>0){
726  if(abs(boson->pdg_id())==PdtPdgMini::Z0) TauSpinEffectsZ_Xf->Fill(x1,weight);
727  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0) TauSpinEffectsH_Xf->Fill(x1,weight);
728  }
729  else{
730  if(abs(boson->pdg_id())==PdtPdgMini::Z0) TauSpinEffectsZ_Xb->Fill(x1,weight);
731  if(abs(boson->pdg_id())==PdtPdgMini::Higgs0) TauSpinEffectsH_Xb->Fill(x1,weight);
732  }
733  }
734  }
735  }
736 }
const double Pi
int i
Definition: DBlmapReader.cc:9
MonitorElement * TauSpinEffectsH_rhorhoAcoplanarityplus
MonitorElement * TauSpinEffectsZ_Xb
MonitorElement * TauSpinEffectsH_MVis
MonitorElement * TauSpinEffectsZ_Xf
MonitorElement * TauSpinEffectsH_pipiAcoplanarity
double charge(const std::vector< uint8_t > &Ampls)
MonitorElement * TauSpinEffectsZ_eX
int findMother(const HepMC::GenParticle *)
void Fill(long long x)
int tauDecayChannel(const HepMC::GenParticle *, double weight=0.0)
MonitorElement * TauSpinEffectsH_pipiAcollinearityzoom
const std::vector< HepMC::GenParticle * > GetMothers(const HepMC::GenParticle *boson)
math::XYZTLorentzVectorD LV
MonitorElement * TauSpinEffectsH_rhorhoAcoplanarityminus
MonitorElement * TauSpinEffectsH_Xf
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * TauSpinEffectsZ_muX
MonitorElement * TauSpinEffectsH_Zs
HepPDT::ParticleData ParticleData
TLorentzVector leadingPionP4(const HepMC::GenParticle *)
MonitorElement * TauSpinEffectsZ_MVis
MonitorElement * TauSpinEffectsH_pipiAcollinearity
tuple pid
Definition: sysUtil.py:22
MonitorElement * TauSpinEffectsZ_X
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
PDT table.
Definition: TauValidation.h:99
MonitorElement * TauSpinEffectsH_eX
double Zstoa(double zs)
MonitorElement * TauSpinEffectsH_muX
MonitorElement * TauSpinEffectsZ_Zs
int weight
Definition: histoStyle.py:50
MonitorElement * TauSpinEffectsH_Xb
MonitorElement * TauSpinEffectsH_X
int TauValidation::tauDecayChannel ( const HepMC::GenParticle *  tau,
double  weight = 0.0 
)
private

Definition at line 422 of file TauValidation.cc.

References a1, funct::abs(), electron, MonitorElement::Fill(), K, Kstar, muon, pi, pi1pi0, sysUtil::pid, pinpi0, rho, stable, TauDecayChannels, tripi, tripinpi0, and undetermined.

Referenced by analyze(), and spinEffectsZH().

422  {
423 
424  int channel = undetermined;
425  if(tau->status() == 1) channel = stable;
426  int allCount = 0,
427  eCount = 0,
428  muCount = 0,
429  pi0Count = 0,
430  piCount = 0,
431  rhoCount = 0,
432  a1Count = 0,
433  KCount = 0,
434  KstarCount = 0;
435 
436  if ( tau->end_vertex() ) {
437  HepMC::GenVertex::particle_iterator des;
438  for(des = tau->end_vertex()->particles_begin(HepMC::descendants);
439  des!= tau->end_vertex()->particles_end(HepMC::descendants);++des ) {
440  int pid = (*des)->pdg_id();
441  if(abs(pid) == 15) return tauDecayChannel(*des,weight);
442 
443  allCount++;
444  if(abs(pid) == 11) eCount++;
445  if(abs(pid) == 13) muCount++;
446  if(abs(pid) == 111) pi0Count++;
447  if(abs(pid) == 211) piCount++;
448  if(abs(pid) == 213) rhoCount++;
449  if(abs(pid) == 20213) a1Count++;
450  if(abs(pid) == 321) KCount++;
451  if(abs(pid) == 323) KstarCount++;
452 
453  }
454  }
455  // resonances
456  if(KCount >= 1) channel = K;
457  if(KstarCount >= 1) channel = Kstar;
458  if(a1Count >= 1) channel = a1;
459  if(rhoCount >= 1) channel = rho;
460  if(channel!=undetermined && weight!=0.0) TauDecayChannels->Fill(channel,weight);
461 
462  // final state products
463  if(piCount == 1 && pi0Count == 0) channel = pi;
464  if(piCount == 1 && pi0Count == 1) channel = pi1pi0;
465  if(piCount == 1 && pi0Count > 1) channel = pinpi0;
466  if(piCount == 3 && pi0Count == 0) channel = tripi;
467  if(piCount == 3 && pi0Count > 0) channel = tripinpi0;
468  if(eCount == 1) channel = electron;
469  if(muCount == 1) channel = muon;
470  if(weight!=0.0) TauDecayChannels->Fill(channel,weight);
471  return channel;
472 }
void Fill(long long x)
int tauDecayChannel(const HepMC::GenParticle *, double weight=0.0)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * TauDecayChannels
tuple pid
Definition: sysUtil.py:22
int weight
Definition: histoStyle.py:50
int TauValidation::tauMother ( const HepMC::GenParticle *  tau,
double  weight 
)
private

Definition at line 377 of file TauValidation.cc.

References A0, funct::abs(), B, D, MonitorElement::Fill(), findMother(), gamma, H0, Hpm, HSM, diffTwoXMLs::label, other, TauMothers, W, and Z.

Referenced by analyze().

377  {
378 
379  if(abs(tau->pdg_id()) != 15 ) return -3;
380 
381  int mother_pid = findMother(tau);
382  if(mother_pid == -2) return -2;
383 
384  int label = other;
385  if(abs(mother_pid) == 24) label = W;
386  if(abs(mother_pid) == 23) label = Z;
387  if(abs(mother_pid) == 22) label = gamma;
388  if(abs(mother_pid) == 25) label = HSM;
389  if(abs(mother_pid) == 35) label = H0;
390  if(abs(mother_pid) == 36) label = A0;
391  if(abs(mother_pid) == 37) label = Hpm;
392 
393  int mother_shortpid=(abs(mother_pid)%10000);
394  if(mother_shortpid>500 && mother_shortpid<600 )label = B;
395  if(mother_shortpid>400 && mother_shortpid<500)label = D;
396  TauMothers->Fill(label,weight);
397  if(label==B || label == D || label == other) return -1;
398 
399  return mother_pid;
400 }
MonitorElement * TauMothers
int findMother(const HepMC::GenParticle *)
void Fill(long long x)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int weight
Definition: histoStyle.py:50
int TauValidation::tauProngs ( const HepMC::GenParticle *  tau,
double  weight 
)
private

Definition at line 402 of file TauValidation.cc.

References funct::abs(), DeDxDiscriminatorTools::charge(), MonitorElement::Fill(), fPDGTable, sysUtil::pid, and TauProngs.

Referenced by analyze().

402  {
403  int nProngs = 0;
404  if ( tau->end_vertex() ) {
405  HepMC::GenVertex::particle_iterator des;
406  for(des = tau->end_vertex()->particles_begin(HepMC::descendants);
407  des!= tau->end_vertex()->particles_end(HepMC::descendants);++des ) {
408  int pid = (*des)->pdg_id();
409  if(abs(pid) == 15) return tauProngs(*des, weight);
410  if((*des)->status() != 1) continue; // dont count unstable particles
411 
412  const HepPDT::ParticleData* pd = fPDGTable->particle((*des)->pdg_id ());
413  int charge = (int) pd->charge();
414  if(charge == 0) continue;
415  nProngs++;
416  }
417  }
418  TauProngs->Fill(nProngs,weight);
419  return nProngs;
420 }
int tauProngs(const HepMC::GenParticle *, double weight)
double charge(const std::vector< uint8_t > &Ampls)
void Fill(long long x)
MonitorElement * TauProngs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HepPDT::ParticleData ParticleData
tuple pid
Definition: sysUtil.py:22
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
PDT table.
Definition: TauValidation.h:99
int weight
Definition: histoStyle.py:50
double TauValidation::visibleTauEnergy ( const HepMC::GenParticle *  tau)
private

Definition at line 782 of file TauValidation.cc.

References funct::abs(), p4, and sysUtil::pid.

Referenced by rtau().

782  {
783  TLorentzVector p4(tau->momentum().px(),
784  tau->momentum().py(),
785  tau->momentum().pz(),
786  tau->momentum().e());
787 
788  if ( tau->end_vertex() ) {
789  HepMC::GenVertex::particle_iterator des;
790  for(des = tau->end_vertex()->particles_begin(HepMC::descendants);
791  des!= tau->end_vertex()->particles_end(HepMC::descendants);++des ) {
792  int pid = (*des)->pdg_id();
793 
794  if(abs(pid) == 15) return visibleTauEnergy(*des);
795 
796  if(abs(pid) == 12 || abs(pid) == 14 || abs(pid) == 16) {
797  p4 -= TLorentzVector((*des)->momentum().px(),
798  (*des)->momentum().py(),
799  (*des)->momentum().pz(),
800  (*des)->momentum().e());
801  }
802  }
803  }
804 
805  return p4.E();
806 }
double p4[4]
Definition: TauolaWrapper.h:92
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double visibleTauEnergy(const HepMC::GenParticle *)
tuple pid
Definition: sysUtil.py:22
double TauValidation::Zstoa ( double  zs)
private

Definition at line 738 of file TauValidation.cc.

References a, and mathSSE::sqrt().

Referenced by spinEffectsZH().

738  {
739  double a=1-sqrt(fabs(1.0-2*fabs(zs)));
740  if(zs<0){
741  a*=-1.0;
742  }
743  return a;
744 }
T sqrt(T t)
Definition: SSEVec.h:48
double a
Definition: hdecay.h:121

Member Data Documentation

MonitorElement * TauValidation::DecayLength
private

Definition at line 102 of file TauValidation.h.

Referenced by analyze(), and bookHistograms().

edm::ESHandle<HepPDT::ParticleDataTable> TauValidation::fPDGTable
private

PDT table.

Definition at line 99 of file TauValidation.h.

Referenced by dqmBeginRun(), spinEffectsZH(), and tauProngs().

edm::InputTag TauValidation::hepmcCollection_
private

Definition at line 94 of file TauValidation.h.

Referenced by TauValidation().

edm::EDGetTokenT<edm::HepMCProduct> TauValidation::hepmcCollectionToken_
private

Definition at line 121 of file TauValidation.h.

Referenced by analyze(), and TauValidation().

MonitorElement* TauValidation::JAKID
private

Definition at line 115 of file TauValidation.h.

Referenced by analyze(), and bookHistograms().

std::vector<std::vector<MonitorElement *> > TauValidation::JAKInvMass
private

Definition at line 116 of file TauValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * TauValidation::LifeTime
private

Definition at line 102 of file TauValidation.h.

Referenced by analyze(), and bookHistograms().

unsigned int TauValidation::NJAKID
private

Definition at line 114 of file TauValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * TauValidation::nPrimeTaus
private

Definition at line 101 of file TauValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TauValidation::nTaus
private

Definition at line 101 of file TauValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * TauValidation::TauBremPhotonsN
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and photons().

MonitorElement * TauValidation::TauBremPhotonsPt
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and photons().

MonitorElement * TauValidation::TauBremPhotonsPtSum
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and photons().

MonitorElement * TauValidation::TauDecayChannels
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and tauDecayChannel().

MonitorElement * TauValidation::TauEta
private

Definition at line 102 of file TauValidation.h.

Referenced by analyze(), and bookHistograms().

double TauValidation::tauEtCut
private

Definition at line 96 of file TauValidation.h.

Referenced by rtau().

MonitorElement * TauValidation::TauFSRPhotonsN
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and photons().

MonitorElement * TauValidation::TauFSRPhotonsPt
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and photons().

MonitorElement * TauValidation::TauFSRPhotonsPtSum
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and photons().

MonitorElement * TauValidation::TauMothers
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and tauMother().

MonitorElement * TauValidation::TauPhi
private

Definition at line 102 of file TauValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * TauValidation::TauProngs
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and tauProngs().

MonitorElement* TauValidation::TauPt
private

Definition at line 102 of file TauValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * TauValidation::TauRtauHpm
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and rtau().

MonitorElement * TauValidation::TauRtauW
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and rtau().

MonitorElement * TauValidation::TauSpinEffectsH_eX
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_muX
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_MVis
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_pipiAcollinearity
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_pipiAcollinearityzoom
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_pipiAcoplanarity
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_rhorhoAcoplanarityminus
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_rhorhoAcoplanarityplus
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_X
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_Xb
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_Xf
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsH_Zs
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsHpm_eX
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsWHpm().

MonitorElement * TauValidation::TauSpinEffectsHpm_muX
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsWHpm().

MonitorElement * TauValidation::TauSpinEffectsHpm_UpsilonA1
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsWHpm().

MonitorElement * TauValidation::TauSpinEffectsHpm_UpsilonRho
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsWHpm().

MonitorElement * TauValidation::TauSpinEffectsHpm_X
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsWHpm().

MonitorElement * TauValidation::TauSpinEffectsW_eX
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsWHpm().

MonitorElement * TauValidation::TauSpinEffectsW_muX
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsWHpm().

MonitorElement * TauValidation::TauSpinEffectsW_UpsilonA1
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsWHpm().

MonitorElement * TauValidation::TauSpinEffectsW_UpsilonRho
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsWHpm().

MonitorElement * TauValidation::TauSpinEffectsW_X
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsWHpm().

MonitorElement * TauValidation::TauSpinEffectsZ_eX
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsZ_muX
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsZ_MVis
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsZ_X
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsZ_Xb
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsZ_Xf
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

MonitorElement * TauValidation::TauSpinEffectsZ_Zs
private

Definition at line 102 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

WeightManager TauValidation::wmanager_
private

Definition at line 71 of file TauValidation.h.

Referenced by analyze().

int TauValidation::zsbins
private

Definition at line 118 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

double TauValidation::zsmax
private

Definition at line 119 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().

double TauValidation::zsmin
private

Definition at line 119 of file TauValidation.h.

Referenced by bookHistograms(), and spinEffectsZH().