CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
FWCaloTauProxyBuilder Class Reference
Inheritance diagram for FWCaloTauProxyBuilder:
FWTauProxyBuilderBase FWProxyBuilderBase

Public Member Functions

 FWCaloTauProxyBuilder ()
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
virtual ~FWCaloTauProxyBuilder ()
 
- Public Member Functions inherited from FWTauProxyBuilderBase
virtual void cleanLocal ()
 
 FWTauProxyBuilderBase ()
 
virtual bool havePerViewProduct (FWViewType::EType) const
 
virtual bool haveSingleProduct () const
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
virtual ~FWTauProxyBuilderBase ()
 
- Public Member Functions inherited from FWProxyBuilderBase
void build ()
 
virtual bool canHandle (const FWEventItem &)
 
const fireworks::Contextcontext () const
 
TEveElementList * createProduct (FWViewType::EType, const FWViewContext *)
 
 FWProxyBuilderBase ()
 
bool getHaveWindow () const
 
const FWEventItemitem () const
 
virtual void itemBeingDestroyed (const FWEventItem *)
 
void itemChanged (const FWEventItem *)
 
int layer () const
 
void modelChanges (const FWModelIds &)
 
void removePerViewProduct (FWViewType::EType, const FWViewContext *vc)
 
void scaleChanged (const FWViewContext *)
 
void setHaveWindow (bool iFlag)
 
virtual void setInteractionList (FWInteractionList *, const std::string &)
 
virtual void setItem (const FWEventItem *iItem)
 
void setupAddElement (TEveElement *el, TEveElement *parent, bool set_color=true) const
 
void setupElement (TEveElement *el, bool color=true) const
 
virtual bool willHandleInteraction () const
 
virtual ~FWProxyBuilderBase ()
 

Static Public Member Functions

static const std::string & classPurpose ()
 
static const std::string & classRegisterTypeName ()
 
static const std::string & classTypeName ()
 
static const std::string & classView ()
 
- Static Public Member Functions inherited from FWProxyBuilderBase
static bool representsSubPart ()
 
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 

Private Member Functions

virtual void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *vc)
 
 FWCaloTauProxyBuilder (const FWCaloTauProxyBuilder &)
 
const FWCaloTauProxyBuilderoperator= (const FWCaloTauProxyBuilder &)
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Member Functions inherited from FWTauProxyBuilderBase
void buildBaseTau (const reco::BaseTau &iTau, const reco::Jet *iJet, TEveElement *comp, FWViewType::EType type, const FWViewContext *vc)
 
virtual void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
 
- Protected Member Functions inherited from FWProxyBuilderBase
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
virtual void clean ()
 
TEveCompound * createCompound (bool set_color=true, bool propagate_color_to_all_children=false) const
 
 FWProxyBuilderBase (const FWProxyBuilderBase &)
 
void increaseComponentTransparency (unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
 
virtual void modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
virtual bool visibilityModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
 
- Protected Attributes inherited from FWTauProxyBuilderBase
float m_maxTheta
 
float m_minTheta
 
std::vector< double > m_phis
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 33 of file FWCaloTauProxyBuilder.cc.

Constructor & Destructor Documentation

FWCaloTauProxyBuilder::FWCaloTauProxyBuilder ( )
inline

Definition at line 36 of file FWCaloTauProxyBuilder.cc.

36 {}
virtual FWCaloTauProxyBuilder::~FWCaloTauProxyBuilder ( )
inlinevirtual

Definition at line 37 of file FWCaloTauProxyBuilder.cc.

37 {}
FWCaloTauProxyBuilder::FWCaloTauProxyBuilder ( const FWCaloTauProxyBuilder )
private

Member Function Documentation

void FWCaloTauProxyBuilder::buildViewType ( const FWEventItem iItem,
TEveElementList *  product,
FWViewType::EType  viewType,
const FWViewContext vc 
)
privatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 51 of file FWCaloTauProxyBuilder.cc.

References fireworks::addCircle(), assert(), FWTauProxyBuilderBase::buildBaseTau(), reco::CaloTauTagInfo::calojetRef(), AlCaHLTBitMon_QueryRunRegistry::comp, FWProxyBuilderBase::createCompound(), alignCSCRings::e, cppFunctionSkipper::exception, fwLog, FWEventItem::get(), edm::Ref< C, T, F >::get(), reco::CaloJet::getCaloConstituents(), customizeTrackingMonitorSeedNumber::idx, metsig::jet, fwlog::kInfo, FWViewType::kLego, FWTauProxyBuilderBase::m_maxTheta, FWTauProxyBuilderBase::m_minTheta, FWTauProxyBuilderBase::m_phis, bookConverter::max, min(), FWProxyBuilderBase::setupAddElement(), fireworks::thetaBins(), and HLT_25ns14e33_v1_cff::towers.

52 {
53  reco::CaloTauCollection const * caloTaus = 0;
54  iItem->get( caloTaus );
55  if( caloTaus == 0 ) return;
56 
57 
58  Int_t idx = 0;
59  for( reco::CaloTauCollection::const_iterator it = caloTaus->begin(), itEnd = caloTaus->end(); it != itEnd; ++it, ++idx)
60  {
61  TEveCompound* comp = createCompound();
62 
63  if (viewType == FWViewType::kLego)
64  {
65  fireworks::addCircle( (*it).eta(), (*it).phi(), 0.5, 20, comp, this );
66  }
67  else
68  {
69  try {
70  const reco::CaloTauTagInfo *tauTagInfo = dynamic_cast<const reco::CaloTauTagInfo*>(((*it).caloTauTagInfoRef().get()));
71  const reco::CaloJet *jet = dynamic_cast<const reco::CaloJet*>((tauTagInfo->calojetRef().get()));
72 
73  int min = 100;
74  int max = -100;
75  std::vector<double> phis;
76  std::vector<CaloTowerPtr> towers = jet->getCaloConstituents();
77  for( std::vector<CaloTowerPtr>::const_iterator tower = towers.begin(), towerEnd = towers.end();
78  tower != towerEnd; ++tower )
79  {
80  unsigned int ieta = 41 + (*tower)->id().ieta();
81  if( ieta > 40 ) --ieta;
82  assert( ieta <= 82 );
83 
84  if( int(ieta) > max ) max = ieta;
85  if( int(ieta) < min ) min = ieta;
86  m_phis.push_back( (*tower)->phi() );
87  }
88  if( min > max ) {
89  min = 0; max = 0;
90  }
91  const std::vector<std::pair<double, double> > thetaBins = fireworks::thetaBins();
92  m_minTheta = thetaBins[min].first;
93  m_maxTheta = thetaBins[max].second;
94 
95  buildBaseTau(*it, jet, comp, viewType, vc);
96  m_phis.clear();
97  }
98  catch (std::exception& e)
99  {
100  fwLog(fwlog::kInfo) << "FWPFTauProxyBuilder missing PFTauTagInfo. Skip drawing of jets.\n";
101  buildBaseTau(*it, 0, comp, viewType, vc);
102  }
103  }
104  setupAddElement( comp, product );
105  }
106 }
Jets made from CaloTowers.
Definition: CaloJet.h:29
const CaloJetRef & calojetRef() const
std::vector< std::pair< double, double > > thetaBins()
Definition: thetaBins.cc:48
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
assert(m_qm.get())
void get(const T *&oData) const
Definition: FWEventItem.h:84
virtual std::vector< CaloTowerPtr > getCaloConstituents() const
get all constituents
Definition: CaloJet.cc:93
std::vector< CaloTau > CaloTauCollection
collection of CaloTau objects
Definition: CaloTauFwd.h:9
void buildBaseTau(const reco::BaseTau &iTau, const reco::Jet *iJet, TEveElement *comp, FWViewType::EType type, const FWViewContext *vc)
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:244
void addCircle(double eta, double phi, double radius, const unsigned int nLineSegments, TEveElement *comp, FWProxyBuilderBase *pb)
T min(T a, T b)
Definition: MathUtil.h:58
#define fwLog(_level_)
Definition: fwLog.h:50
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
std::vector< double > m_phis
const std::string & FWCaloTauProxyBuilder::classPurpose ( )
static

Definition at line 109 of file FWCaloTauProxyBuilder.cc.

const std::string & FWCaloTauProxyBuilder::classRegisterTypeName ( )
static

Definition at line 109 of file FWCaloTauProxyBuilder.cc.

const std::string & FWCaloTauProxyBuilder::classTypeName ( )
static

Definition at line 109 of file FWCaloTauProxyBuilder.cc.

const std::string & FWCaloTauProxyBuilder::classView ( )
static

Definition at line 109 of file FWCaloTauProxyBuilder.cc.

const FWCaloTauProxyBuilder& FWCaloTauProxyBuilder::operator= ( const FWCaloTauProxyBuilder )
private
const std::string& FWCaloTauProxyBuilder::purpose ( ) const
inline
const std::string& FWCaloTauProxyBuilder::typeName ( ) const
inline
const std::string& FWCaloTauProxyBuilder::view ( ) const
inline